summaryrefslogtreecommitdiff
path: root/src/koopatlas/mapdata.h
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-01-17 00:40:00 +0100
committerTreeki <treeki@gmail.com>2012-01-17 00:40:00 +0100
commitbb5d7f7e737e318d095d23939b7d288eaf5f9e63 (patch)
treeec41984cd10376e7fec2b24e22b1b695c3692b36 /src/koopatlas/mapdata.h
parent28efd888af3ffe227565683e2cd2960ea5b52f61 (diff)
downloadkamek-bb5d7f7e737e318d095d23939b7d288eaf5f9e63.tar.gz
kamek-bb5d7f7e737e318d095d23939b7d288eaf5f9e63.zip
added path support and the new API LevelInfo
Diffstat (limited to 'src/koopatlas/mapdata.h')
-rw-r--r--src/koopatlas/mapdata.h34
1 files changed, 21 insertions, 13 deletions
diff --git a/src/koopatlas/mapdata.h b/src/koopatlas/mapdata.h
index b6d1838..f9aa545 100644
--- a/src/koopatlas/mapdata.h
+++ b/src/koopatlas/mapdata.h
@@ -1,3 +1,6 @@
+#ifndef __KOOPATLAS_MAPDATA_H
+#define __KOOPATLAS_MAPDATA_H
+
#include <game.h>
// forward declarations
@@ -50,22 +53,34 @@ struct dKPNode_s {
};
short x, y;
- dKPPath_s *exits[4];
+ union {
+ dKPPath_s *exits[4];
+ struct {
+ dKPPath_s *leftExit;
+ dKPPath_s *rightExit;
+ dKPPath_s *upExit;
+ dKPPath_s *downExit;
+ };
+ };
dKPLayer_s *tileLayer, *doodadLayer;
- int type;
+ NodeTypes type;
union {
struct { u8 levelNumber[2]; };
struct { char *destMap; u8 thisID, foreignID, transition; };
};
+
+
+ dKPPath_s *getOppositeExitTo(dKPPath_s *path);
};
struct dKPPath_s {
dKPNode_s *start, *end;
dKPLayer_s *tileLayer, *doodadLayer;
- u8 unlockType; // 0 = always, 1 = start, 2 = end
- u8 unlockIsSecret;
+ u8 unlockType; // 0 = always, 1 = normal, 2 = secret
+ u8 unlockLevelNumber[2];
+ bool isAvailable; // computed on-the-fly - default from Koopatlas is true
float speed;
int animation;
};
@@ -118,23 +133,15 @@ struct dKPLayer_s {
dKPPath_s **paths;
};
};
-};
-struct dKPUnlock_s {
- u8 isSecret;
- u8 level[2];
- u8 _;
- dKPPath_s *targetPath;
+ int findNodeID(dKPNode_s *node);
};
struct dKPMapFile_s {
int layerCount;
dKPLayer_s **layers;
- int unlockCount;
- dKPUnlock_s *unlocks;
-
int tilesetCount;
GXTexObj *tilesets;
@@ -191,4 +198,5 @@ class dKPMapData_c {
~dKPMapData_c();
};
+#endif