diff options
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 << "("; |
