diff options
Diffstat (limited to 'ZAPD/ZRoom/Commands/SetMesh.cpp')
| -rw-r--r-- | ZAPD/ZRoom/Commands/SetMesh.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/ZAPD/ZRoom/Commands/SetMesh.cpp b/ZAPD/ZRoom/Commands/SetMesh.cpp index 5463496..69668c4 100644 --- a/ZAPD/ZRoom/Commands/SetMesh.cpp +++ b/ZAPD/ZRoom/Commands/SetMesh.cpp @@ -54,11 +54,9 @@ void SetMesh::DeclareReferences(const std::string& prefix) void GenDListDeclarations(ZRoom* zRoom, ZFile* parent, ZDisplayList* dList) { if (dList == nullptr) - { return; - } - std::string sourceOutput = dList->GetSourceOutputCode(zRoom->GetName()); + dList->DeclareReferences(zRoom->GetName()); for (ZDisplayList* otherDList : dList->otherDLists) GenDListDeclarations(zRoom, parent, otherDList); @@ -144,21 +142,17 @@ std::string PolygonDlist::GetBodySourceCode() const return bodyStr; } -std::string PolygonDlist::GetSourceOutputCode(const std::string& prefix) +void PolygonDlist::GetSourceOutputCode(const std::string& prefix) { std::string bodyStr = StringHelper::Sprintf("\n\t%s\n", GetBodySourceCode().c_str()); Declaration* decl = parent->GetDeclaration(rawDataIndex); + if (decl == nullptr) - { DeclareVar(prefix, bodyStr); - } else - { decl->text = bodyStr; - } - return ""; } std::string PolygonDlist::GetSourceTypeName() const |
