summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Estelami <NEstelami@users.noreply.github.com>2022-01-10 19:05:33 -0500
committerNicholas Estelami <NEstelami@users.noreply.github.com>2022-01-10 19:05:33 -0500
commit768ac46d172efeee4616cf3472ed4a69bf5678ec (patch)
tree0cc03059560029dedc32d39e425ee15c978841b4
parentd06fb101439a7e5de28bb824b70992f97d91b54a (diff)
Skin Skeleton, alt header fixes
-rw-r--r--OTRExporter/OTRSkeletonLimbExporter.cpp32
-rw-r--r--OTRExporter/RoomExporter.cpp21
2 files changed, 39 insertions, 14 deletions
diff --git a/OTRExporter/OTRSkeletonLimbExporter.cpp b/OTRExporter/OTRSkeletonLimbExporter.cpp
index 1ff1839..fb9974c 100644
--- a/OTRExporter/OTRSkeletonLimbExporter.cpp
+++ b/OTRExporter/OTRSkeletonLimbExporter.cpp
@@ -11,6 +11,38 @@ void OTRExporter_SkeletonLimb::Save(ZResource* res, fs::path outPath, BinaryWrit
writer->Write((uint8_t)limb->type);
writer->Write((uint8_t)limb->skinSegmentType);
+ writer->Write(limb->segmentStruct.unk_0);
+ writer->Write((uint32_t)limb->segmentStruct.unk_4_arr.size());
+
+ for (auto item : limb->segmentStruct.unk_4_arr)
+ {
+ writer->Write(item.unk_4);
+
+ writer->Write((uint32_t)item.unk_8_arr.size());
+
+ for (auto item2 : item.unk_8_arr)
+ {
+ writer->Write(item2.unk_0);
+ writer->Write(item2.unk_2);
+ writer->Write(item2.unk_4);
+ writer->Write(item2.unk_6);
+ writer->Write(item2.unk_7);
+ writer->Write(item2.unk_8);
+ writer->Write(item2.unk_9);
+ }
+
+ writer->Write((uint32_t)item.unk_C_arr.size());
+
+ for (auto item2 : item.unk_C_arr)
+ {
+ writer->Write(item2.unk_0);
+ writer->Write(item2.x);
+ writer->Write(item2.y);
+ writer->Write(item2.z);
+ writer->Write(item2.unk_8);
+ }
+ }
+
writer->Write(limb->legTransX);
writer->Write(limb->legTransY);
writer->Write(limb->legTransZ);
diff --git a/OTRExporter/RoomExporter.cpp b/OTRExporter/RoomExporter.cpp
index 5c62a81..0269506 100644
--- a/OTRExporter/RoomExporter.cpp
+++ b/OTRExporter/RoomExporter.cpp
@@ -404,20 +404,13 @@ void OTRExporter_Room::Save(ZResource* res, const fs::path outPath, BinaryWriter
uint32_t seg = cmdHeaders->headers[i] & 0xFFFFFFFF;
std::string headerName = "";
bool foundDecl = Globals::Instance->GetSegmentedPtrName(seg, room->parent, "", headerName);
- std::string name = OTRExporter_DisplayList::GetPathToRes(room, headerName);
-
- writer->Write(name);
-
- // TEST
- /*auto testRes = room->parent->FindResource(GETSEGOFFSET(seg));
-
- std::shared_ptr<MemoryStream> headerStream = std::shared_ptr<MemoryStream>(new MemoryStream());
- std::shared_ptr<BinaryWriter> headerWriter = std::shared_ptr<BinaryWriter>(new BinaryWriter(headerStream));
- Save(testRes, outPath, headerWriter.get());
-
- otrArchive->AddFile(name, (uintptr_t)headerStream->ToVector().data(), headerWriter->GetBaseAddress());
-
- int bp = 0;*/
+ if (headerName == "NULL")
+ writer->Write("");
+ else
+ {
+ std::string name = OTRExporter_DisplayList::GetPathToRes(room, headerName);
+ writer->Write(name);
+ }
}
}
break;