From 6b06266eb8d35a7865aa1f942ecbe393e7cde740 Mon Sep 17 00:00:00 2001 From: Anghelo Carvajal Date: Fri, 1 Oct 2021 22:19:47 -0300 Subject: Add `--static` flag (#193) * remove static from every extracted asset * fix makefile * Move a bunch of code to Declaration * make static enablalble * fix texture static * clean up * minor fixes * Format * add small docs * fix * add table * add note in the readme * typo * maybe_unused * Add warning to ZSymbol * format * fix --- ZAPD/ZRoom/Commands/SetMesh.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'ZAPD/ZRoom/Commands/SetMesh.cpp') diff --git a/ZAPD/ZRoom/Commands/SetMesh.cpp b/ZAPD/ZRoom/Commands/SetMesh.cpp index c334082..024f054 100644 --- a/ZAPD/ZRoom/Commands/SetMesh.cpp +++ b/ZAPD/ZRoom/Commands/SetMesh.cpp @@ -68,7 +68,7 @@ void GenDListDeclarations(ZRoom* zRoom, ZFile* parent, ZDisplayList* dList) { parent->AddDeclarationArray( vtxEntry.first, DeclarationAlignment::Align16, - dList->vertices[vtxEntry.first].size() * 16, "static Vtx", + dList->vertices[vtxEntry.first].size() * 16, "Vtx", StringHelper::Sprintf("%sVtx_%06X", zRoom->GetName().c_str(), vtxEntry.first), dList->vertices[vtxEntry.first].size(), vtxEntry.second); } @@ -646,8 +646,10 @@ void PolygonType2::DeclareReferences(const std::string& prefix) polyDlistType, polyDListName, polyDLists.size(), declaration); } - parent->AddDeclaration(GETSEGOFFSET(end), DeclarationAlignment::Align4, 4, "static s32", - "terminatorMaybe", "0x01000000"); + parent->AddDeclaration(GETSEGOFFSET(end), DeclarationAlignment::Align4, 4, "s32", + StringHelper::Sprintf("%s_terminatorMaybe_%06X", + parent->GetName().c_str(), GETSEGOFFSET(end)), + "0x01000000"); } std::string PolygonType2::GetBodySourceCode() const -- cgit v1.2.3