From a3363333d809e8089a55efc3ea32eaea9ddb8d8c Mon Sep 17 00:00:00 2001 From: Nicholas Estelami Date: Tue, 30 Nov 2021 20:09:32 -0500 Subject: ZResource::GetSourceOutputCode no longer returns a string (#209) * Updated nuget to use newer version of libpng. Also updated uses of std::filesystem::path to be compliant with MSVC implementation. * Updated nuget to use newer version of libpng. Also updated uses of std::filesystem::path to be compliant with MSVC implementation. * GetSourceOutputCode no longer uses strings, and some overrides were removed. * Removed redundant GetSourceOutputHeader * Fixed MSVC issue * Changed libpng nuget package due to compilation issues. Other minor tweaks. Co-authored-by: Jack Walker <7463599+Jack-Walker@users.noreply.github.com> --- ZAPD/ZRoom/Commands/SetMesh.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'ZAPD/ZRoom/Commands/SetMesh.cpp') 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 -- cgit v1.2.3