summaryrefslogtreecommitdiff
path: root/ZAPD/ZRoom/Commands/SetMinimapList.cpp
diff options
context:
space:
mode:
authorAnghelo Carvajal <angheloalf95@gmail.com>2021-05-26 22:52:01 -0400
committerGitHub <noreply@github.com>2021-05-26 22:52:01 -0400
commiteb2d42e89153a877bff1bc30f7ea39766faf45d5 (patch)
treea1a6333aa7c512784d2e572a4eb7ce633ac10679 /ZAPD/ZRoom/Commands/SetMinimapList.cpp
parentcd3e9527b185190c5f7826766bf2b4760bd12d5f (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.cpp9
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",