diff options
| author | Nicholas Estelami <NEstelami@users.noreply.github.com> | 2021-11-30 20:09:32 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-30 20:09:32 -0500 |
| commit | a3363333d809e8089a55efc3ea32eaea9ddb8d8c (patch) | |
| tree | 5cf25cc7a7fb5eebd2a1671f0e54a8e3335ebbce /ZAPD/ZRoom/Commands/SetMesh.cpp | |
| parent | e3b53d3b8f88a0d139e72602c52666057e7066c0 (diff) | |
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>
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 |
