summaryrefslogtreecommitdiff
path: root/src/koopatlas/mapdata.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-09-27 00:51:43 +0200
committerTreeki <treeki@gmail.com>2012-09-27 00:51:43 +0200
commit014f3668eb47b1576bdc182b1db00417f9938cf1 (patch)
treecf7ade143858d17eb9d7c8114a67b82d60523a59 /src/koopatlas/mapdata.cpp
parent46b65dfd76411bec6f8356c581f337f8a1944013 (diff)
downloadkamek-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.cpp16
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
******************************************************************************/