Collision and PaintingMap format fixes

This commit is contained in:
inspectredc
2024-04-25 09:41:28 -06:00
committed by Lywx
parent bdb3f94391
commit 3d03764990
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -164,7 +164,7 @@ ExportResult SM64::CollisionCodeExporter::Export(std::ostream &write, std::share
}
if (collision->mSurfaces.size()) {
write << fourSpaceTab;
write << "COL_TRI_STOP()";
write << "COL_TRI_STOP()\n";
++count;
}
@@ -231,7 +231,7 @@ ExportResult SM64::CollisionCodeExporter::Export(std::ostream &write, std::share
}
write << fourSpaceTab;
write << "COL_END()";
write << "COL_END()\n";
++count;
write << "};\n";
+3 -3
View File
@@ -6,7 +6,7 @@
#include "utils/TorchUtils.h"
#include <regex>
#define FORMAT_INT(x, w) std::dec << std::setfill(' ') << std::setw(w) << x
// #define FORMAT_INT(x, w) std::dec << std::setfill(' ') << std::setw(w) << x
ExportResult SM64::PaintingMapHeaderExporter::Export(std::ostream &write, std::shared_ptr<IParsedData> raw, std::string& entryName, YAML::Node &node, std::string* replacement) {
const auto symbol = GetSafeNode(node, "symbol", entryName);
@@ -32,14 +32,14 @@ ExportResult SM64::PaintingMapCodeExporter::Export(std::ostream &write, std::sha
for (auto &mapping : paintingData->mPaintingMappings) {
write << fourSpaceTab;
write << FORMAT_INT(mapping.vtxId << "," << mapping.texX << "," << mapping.texY, 6) << ",\n";
write << mapping.vtxId << ", " << mapping.texX << ", " << mapping.texY << ",\n";
}
write << fourSpaceTab << paintingData->mPaintingMappings.size() << ",\n";
for (auto &group : paintingData->mPaintingGroups) {
write << fourSpaceTab;
write << FORMAT_INT(group, 4) << ",\n";
write << group.x << ", " << group.y << ", " << group.z << ", " << ",\n";
}
write << "};\n";