diff options
author | Treeki <treeki@gmail.com> | 2012-09-27 16:58:43 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-09-27 16:58:43 +0200 |
commit | 624a89dc12d88973486b39937871c5facf6b9bb6 (patch) | |
tree | ff7614e780d13162d1749e4f57478dc16b9226d7 /src/koopatlas/mapdata.cpp | |
parent | 3268b1fab87a34897289faa8a1f5ee0679f74e19 (diff) | |
parent | 0fc70778c02671e64b8360b7ebdbb0e8c29f0a05 (diff) | |
download | kamek-624a89dc12d88973486b39937871c5facf6b9bb6.tar.gz kamek-624a89dc12d88973486b39937871c5facf6b9bb6.zip |
Merge branch 'new-hud' into level-select
Diffstat (limited to '')
-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 cbd0c69..d766bed 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) const { + for (int i = 0; i < data->worldCount; i++) { + if (data->worlds[i].key == id) + return &data->worlds[i]; + } + + return 0; +} + + /****************************************************************************** * Generic Layer ******************************************************************************/ |