diff options
| author | inspectredc <78732756+inspectredc@users.noreply.github.com> | 2024-06-14 14:12:39 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-14 07:12:39 -0600 |
| commit | 61a621576298eede67ce4be3a91f92bb37e853c1 (patch) | |
| tree | 0a931a29ed44785ebc54e1d54eb49c12350c92e3 /src/factories/sm64/LevelScriptFactory.cpp | |
| parent | aa95f29be7b9c7b3190c738e17126ba360b3798c (diff) | |
Fix Script Indenting and GeoLayout BranchAndLink to NULL (#139)
Diffstat (limited to 'src/factories/sm64/LevelScriptFactory.cpp')
| -rw-r--r-- | src/factories/sm64/LevelScriptFactory.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/factories/sm64/LevelScriptFactory.cpp b/src/factories/sm64/LevelScriptFactory.cpp index dc5e68e..c866a0a 100644 --- a/src/factories/sm64/LevelScriptFactory.cpp +++ b/src/factories/sm64/LevelScriptFactory.cpp @@ -43,14 +43,16 @@ ExportResult SM64::LevelScriptCodeExporter::Export(std::ostream &write, std::sha for(auto& [opcode, arguments] : commands) { bool commaFlag = false; + if (opcode == LevelOpcode::END_AREA) { + --indentCount; + } + for (uint32_t i = 0; i < indentCount; ++i) { write << fourSpaceTab; } if (opcode == LevelOpcode::AREA) { ++indentCount; - } else if (opcode == LevelOpcode::END_AREA) { - --indentCount; } write << opcode << "("; |
