diff options
| author | Anghelo Carvajal <angheloalf95@gmail.com> | 2021-10-16 22:21:04 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-16 21:21:04 -0400 |
| commit | d0cd6b3974706fc4d89c9b6545b8c17dd424b664 (patch) | |
| tree | adce2c5394489cab708303e63b80e697dd6c16cc /ZAPD/ZRoom | |
| parent | e243634e5b0e7a7e3a6a5b2e7e9d73676df956ca (diff) | |
Fix static forward declarations for remaining resources (#202)
* Add sizes to almost every extracted array
* Remove redundant stuff in zfile
(cherry picked from commit c1cbf20f6786994dabdaf9e0cb95549fe7adcf34)
* this is dumb
* format
* Fix merge issue
* whoops
Diffstat (limited to 'ZAPD/ZRoom')
| -rw-r--r-- | ZAPD/ZRoom/Commands/SetActorCutsceneList.cpp | 2 | ||||
| -rw-r--r-- | ZAPD/ZRoom/Commands/SetAlternateHeaders.cpp | 2 | ||||
| -rw-r--r-- | ZAPD/ZRoom/Commands/SetRoomList.cpp | 2 | ||||
| -rw-r--r-- | ZAPD/ZRoom/Commands/SetStartPositionList.cpp | 4 | ||||
| -rw-r--r-- | ZAPD/ZRoom/Commands/SetTransitionActorList.cpp | 4 | ||||
| -rw-r--r-- | ZAPD/ZRoom/ZRoom.cpp | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/ZAPD/ZRoom/Commands/SetActorCutsceneList.cpp b/ZAPD/ZRoom/Commands/SetActorCutsceneList.cpp index ba31bc7..60391a9 100644 --- a/ZAPD/ZRoom/Commands/SetActorCutsceneList.cpp +++ b/ZAPD/ZRoom/Commands/SetActorCutsceneList.cpp @@ -47,7 +47,7 @@ void SetActorCutsceneList::DeclareReferences(const std::string& prefix) parent->AddDeclarationArray( segmentOffset, GetDeclarationAlignment(), cutscenes.size() * 16, typeName, StringHelper::Sprintf("%s%sList_%06X", prefix.c_str(), typeName.c_str(), segmentOffset), - 0, declaration); + cutscenes.size(), declaration); } } diff --git a/ZAPD/ZRoom/Commands/SetAlternateHeaders.cpp b/ZAPD/ZRoom/Commands/SetAlternateHeaders.cpp index 016df12..629d4a0 100644 --- a/ZAPD/ZRoom/Commands/SetAlternateHeaders.cpp +++ b/ZAPD/ZRoom/Commands/SetAlternateHeaders.cpp @@ -59,7 +59,7 @@ void SetAlternateHeaders::DeclareReferencesLate(const std::string& prefix) std::string varName = StringHelper::Sprintf("%sAlternateHeaders0x%06X", prefix.c_str(), segmentOffset); parent->AddDeclarationArray(segmentOffset, GetDeclarationAlignment(), headers.size() * 4, - "SceneCmd*", varName, 0, declaration); + "SceneCmd*", varName, headers.size(), declaration); } } diff --git a/ZAPD/ZRoom/Commands/SetRoomList.cpp b/ZAPD/ZRoom/Commands/SetRoomList.cpp index e038139..43c3968 100644 --- a/ZAPD/ZRoom/Commands/SetRoomList.cpp +++ b/ZAPD/ZRoom/Commands/SetRoomList.cpp @@ -86,7 +86,7 @@ Declaration* RomFile::DeclareVar(const std::string& prefix, const std::string& b return parent->AddDeclarationArray(rawDataIndex, DeclarationAlignment::Align4, rooms.size() * rooms.at(0).GetRawDataSize(), - GetSourceTypeName(), auxName, 0, body); + GetSourceTypeName(), auxName, rooms.size(), body); } std::string RomFile::GetBodySourceCode() const diff --git a/ZAPD/ZRoom/Commands/SetStartPositionList.cpp b/ZAPD/ZRoom/Commands/SetStartPositionList.cpp index ad1d0a9..f75b5e0 100644 --- a/ZAPD/ZRoom/Commands/SetStartPositionList.cpp +++ b/ZAPD/ZRoom/Commands/SetStartPositionList.cpp @@ -43,8 +43,8 @@ void SetStartPositionList::DeclareReferences(const std::string& prefix) parent->AddDeclarationArray( segmentOffset, DeclarationAlignment::Align4, actors.size() * 16, "ActorEntry", - StringHelper::Sprintf("%sStartPositionList0x%06X", prefix.c_str(), segmentOffset), 0, - declaration); + StringHelper::Sprintf("%sStartPositionList0x%06X", prefix.c_str(), segmentOffset), + actors.size(), declaration); } } diff --git a/ZAPD/ZRoom/Commands/SetTransitionActorList.cpp b/ZAPD/ZRoom/Commands/SetTransitionActorList.cpp index d47ca34..a33d1c6 100644 --- a/ZAPD/ZRoom/Commands/SetTransitionActorList.cpp +++ b/ZAPD/ZRoom/Commands/SetTransitionActorList.cpp @@ -45,8 +45,8 @@ void SetTransitionActorList::DeclareReferences(const std::string& prefix) parent->AddDeclarationArray( segmentOffset, DeclarationAlignment::Align4, transitionActors.size() * 16, "TransitionActorEntry", - StringHelper::Sprintf("%sTransitionActorList_%06X", prefix.c_str(), segmentOffset), 0, - declaration); + StringHelper::Sprintf("%sTransitionActorList_%06X", prefix.c_str(), segmentOffset), + transitionActors.size(), declaration); } std::string SetTransitionActorList::GetBodySourceCode() const diff --git a/ZAPD/ZRoom/ZRoom.cpp b/ZAPD/ZRoom/ZRoom.cpp index 9f4d5a9..edc0cad 100644 --- a/ZAPD/ZRoom/ZRoom.cpp +++ b/ZAPD/ZRoom/ZRoom.cpp @@ -301,7 +301,7 @@ Declaration* ZRoom::DeclareVar(const std::string& prefix, const std::string& bod Declaration* decl = parent->AddDeclarationArray(rawDataIndex, GetDeclarationAlignment(), GetRawDataSize(), - GetSourceTypeName(), auxName, 0, body); + GetSourceTypeName(), auxName, commands.size(), body); decl->staticConf = staticConf; return decl; } |
