diff options
| author | Anghelo Carvajal <angheloalf95@gmail.com> | 2021-05-26 22:52:01 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-26 22:52:01 -0400 |
| commit | eb2d42e89153a877bff1bc30f7ea39766faf45d5 (patch) | |
| tree | a1a6333aa7c512784d2e572a4eb7ce633ac10679 /ZAPD/ZRoom/Commands/SetMinimapList.cpp | |
| parent | cd3e9527b185190c5f7826766bf2b4760bd12d5f (diff) | |
Hotfix: fix AnimatedMaterial and Minimap extraction (#139)
* Fix minimaplist
* fix the animated textures stuff
Diffstat (limited to 'ZAPD/ZRoom/Commands/SetMinimapList.cpp')
| -rw-r--r-- | ZAPD/ZRoom/Commands/SetMinimapList.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/ZAPD/ZRoom/Commands/SetMinimapList.cpp b/ZAPD/ZRoom/Commands/SetMinimapList.cpp index 51a8a81..c94ef30 100644 --- a/ZAPD/ZRoom/Commands/SetMinimapList.cpp +++ b/ZAPD/ZRoom/Commands/SetMinimapList.cpp @@ -13,8 +13,8 @@ SetMinimapList::SetMinimapList(ZFile* nParent) : ZRoomCommand(nParent) void SetMinimapList::ParseRawData() { ZRoomCommand::ParseRawData(); - listSegmentOffset = - GETSEGOFFSET(BitConverter::ToInt32BE(parent->GetRawData(), segmentOffset + 0)); + listSegmentAddr = BitConverter::ToInt32BE(parent->GetRawData(), segmentOffset); + listSegmentOffset = GETSEGOFFSET(listSegmentAddr); unk4 = BitConverter::ToInt32BE(parent->GetRawData(), segmentOffset + 4); int32_t currentPtr = listSegmentOffset; @@ -51,9 +51,8 @@ void SetMinimapList::DeclareReferences(const std::string& prefix) } { - std::string listName = parent->GetDeclarationPtrName(listSegmentOffset); - - std::string declaration = StringHelper::Sprintf("(u32)%s, 0x%08X", listName.c_str(), unk4); + std::string listName = parent->GetDeclarationPtrName(listSegmentAddr); + std::string declaration = StringHelper::Sprintf("\n\t%s, 0x%08X\n", listName.c_str(), unk4); parent->AddDeclaration( segmentOffset, DeclarationAlignment::Align4, 8, "MinimapList", |
