summaryrefslogtreecommitdiff
path: root/src/koopatlas/mapdata.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-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