mirror of
https://github.com/izzy2lost/Torch.git
synced 2026-07-06 00:18:35 -07:00
Fixed some sm64 bugs
This commit is contained in:
@@ -165,6 +165,7 @@ ExportResult SM64::PaintingBinaryExporter::Export(std::ostream &write, std::shar
|
||||
writer.Write(hash);
|
||||
} else {
|
||||
SPDLOG_WARN("Could not find DisplayList at 0x{:X}", ptr);
|
||||
writer.Write((uint64_t) 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,6 +178,7 @@ ExportResult SM64::PaintingBinaryExporter::Export(std::ostream &write, std::shar
|
||||
writer.Write(hash);
|
||||
} else {
|
||||
SPDLOG_WARN("Could not find Texture Maps at 0x{:X}", ptr);
|
||||
writer.Write((uint64_t) 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,6 +191,7 @@ ExportResult SM64::PaintingBinaryExporter::Export(std::ostream &write, std::shar
|
||||
writer.Write(hash);
|
||||
} else {
|
||||
SPDLOG_WARN("Could not find Texture Arrays at 0x{:X}", ptr);
|
||||
writer.Write((uint64_t) 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,6 +207,7 @@ ExportResult SM64::PaintingBinaryExporter::Export(std::ostream &write, std::shar
|
||||
writer.Write(hash);
|
||||
} else {
|
||||
SPDLOG_WARN("Could not find DisplayList at 0x{:X}", ptr);
|
||||
writer.Write((uint64_t) 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,9 @@ ExportResult SM64::PaintingMapBinaryExporter::Export(std::ostream &write, std::s
|
||||
|
||||
WriteHeader(writer, Torch::ResourceType::PaintingData, 0);
|
||||
|
||||
writer.Write((int16_t)paintingData->mPaintingMappings.size());
|
||||
writer.Write((uint32_t) (paintingData->mPaintingMappings.size() + paintingData->mPaintingGroups.size()) + 2 );
|
||||
|
||||
writer.Write((int16_t) paintingData->mPaintingMappings.size());
|
||||
|
||||
for (auto &mapping : paintingData->mPaintingMappings) {
|
||||
writer.Write(mapping.vtxId);
|
||||
@@ -63,7 +65,7 @@ ExportResult SM64::PaintingMapBinaryExporter::Export(std::ostream &write, std::s
|
||||
writer.Write(mapping.texY);
|
||||
}
|
||||
|
||||
writer.Write((int16_t)paintingData->mPaintingGroups.size());
|
||||
writer.Write((int16_t) paintingData->mPaintingGroups.size());
|
||||
|
||||
for (auto &group : paintingData->mPaintingGroups) {
|
||||
writer.Write(group.x);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "GeoUtils.h"
|
||||
|
||||
#define next_s16_in_geo_script(src) BSWAP16((*(*src)++))
|
||||
#define next_s16_in_geo_script(src) (int16_t) BSWAP16((*(*src)++))
|
||||
|
||||
int16_t* read_vec3s_to_vec3f(Vec3f& dst, int16_t *src) {
|
||||
dst.x = next_s16_in_geo_script(&src);
|
||||
|
||||
Reference in New Issue
Block a user