diff options
author | Treeki <treeki@gmail.com> | 2012-09-27 00:51:43 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-09-27 00:51:43 +0200 |
commit | 014f3668eb47b1576bdc182b1db00417f9938cf1 (patch) | |
tree | cf7ade143858d17eb9d7c8114a67b82d60523a59 /src/koopatlas/mapdata.cpp | |
parent | 46b65dfd76411bec6f8356c581f337f8a1944013 (diff) | |
download | kamek-014f3668eb47b1576bdc182b1db00417f9938cf1.tar.gz kamek-014f3668eb47b1576bdc182b1db00417f9938cf1.zip |
added untested support for world change nodes
Diffstat (limited to 'src/koopatlas/mapdata.cpp')
-rw-r--r-- | src/koopatlas/mapdata.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/koopatlas/mapdata.cpp b/src/koopatlas/mapdata.cpp index 52a7937..29c6a23 100644 --- a/src/koopatlas/mapdata.cpp +++ b/src/koopatlas/mapdata.cpp @@ -205,6 +205,12 @@ void dKPMapData_c::fixup() { fixRef(data->unlockData); fixRef(data->sectors); fixRef(data->backgroundName); + if (data->version >= 2) { + fixRef(data->worlds); + for (int i = 0; i < data->worldCount; i++) { + fixRef(data->worlds[i].name); + } + } for (int iLayer = 0; iLayer < data->layerCount; iLayer++) { dKPLayer_s *layer = fixRef(data->layers[iLayer]); @@ -280,6 +286,16 @@ void dKPMapData_c::fixup() { } +const dKPWorldDef_s *dKPMapData_c::findWorldDef(int id) { + for (int i = 0; i < data->worldCount; i++) { + if (data->worlds[i].key == id) + return &data->worlds[i]; + } + + return 0; +} + + /****************************************************************************** * Generic Layer ******************************************************************************/ |