summaryrefslogtreecommitdiff
path: root/ZAPD/ZRoom/Commands/SetMesh.cpp
diff options
context:
space:
mode:
authorAnghelo Carvajal <angheloalf95@gmail.com>2021-11-24 19:35:40 -0300
committerGitHub <noreply@github.com>2021-11-24 17:35:40 -0500
commit6948306d97a8d87c5ecae23c409894383badfe67 (patch)
tree69ed8d06ade00225dab9d8f844bd314ad6ede28e /ZAPD/ZRoom/Commands/SetMesh.cpp
parent4f7b8393ec8a3abd59649c2ba669e951fb61f3d2 (diff)
Only use array lengths on static variables (#205)
* Only use the array length if static * Add a way to force the array count * format
Diffstat (limited to 'ZAPD/ZRoom/Commands/SetMesh.cpp')
-rw-r--r--ZAPD/ZRoom/Commands/SetMesh.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/ZAPD/ZRoom/Commands/SetMesh.cpp b/ZAPD/ZRoom/Commands/SetMesh.cpp
index d1c8abd..dae736a 100644
--- a/ZAPD/ZRoom/Commands/SetMesh.cpp
+++ b/ZAPD/ZRoom/Commands/SetMesh.cpp
@@ -582,9 +582,11 @@ void PolygonType2::DeclareReferences(const std::string& prefix)
polyDListName = StringHelper::Sprintf("%s%s_%06X", prefix.c_str(), polyDlistType.c_str(),
GETSEGOFFSET(start));
- parent->AddDeclarationArray(GETSEGOFFSET(start), DeclarationAlignment::Align4,
- polyDLists.size() * polyDLists.at(0).GetRawDataSize(),
- polyDlistType, polyDListName, polyDLists.size(), declaration);
+ Declaration* decl = parent->AddDeclarationArray(
+ GETSEGOFFSET(start), DeclarationAlignment::Align4,
+ polyDLists.size() * polyDLists.at(0).GetRawDataSize(), polyDlistType, polyDListName,
+ polyDLists.size(), declaration);
+ decl->forceArrayCnt = true;
}
parent->AddDeclaration(GETSEGOFFSET(end), DeclarationAlignment::Align4, 4, "s32",