summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinclude/game.h11
-rw-r--r--src/levelinfo.cpp2
-rw-r--r--src/levelinfo.h2
-rw-r--r--src/levelinfo_old.h2
4 files changed, 15 insertions, 2 deletions
diff --git a/include/game.h b/include/game.h
index e383cf7..ef6aba4 100755
--- a/include/game.h
+++ b/include/game.h
@@ -140,6 +140,17 @@ inline void *GetGameMgr() {
bool QueryPlayerAvailability(int id);
void DoStartLevel(void *gameMgr, StartLevelInfo *sl);
+
+
+// Level Conditions
+// 1 : Has Toad Block
+// 2 : Is Regular Level (has star coins, etc)
+// 0x10 : Has Normal Exit
+// 0x20 : Has Secret Exit
+// 0x40 : Warp Cannon
+// 0x80 : 1up/Green Mushroom House
+// 0x100 : Red Mushroom House
+// 0x200 : Star/Yellow Mushroom House
void SetSomeConditionShit(int world, int level, unsigned int bits);
bool IsWideScreen();
diff --git a/src/levelinfo.cpp b/src/levelinfo.cpp
index fd147f3..8ce2845 100644
--- a/src/levelinfo.cpp
+++ b/src/levelinfo.cpp
@@ -12,6 +12,8 @@ void dLevelInfo_c::load(void *buffer) {
for (int lev = 0; lev < thisSect->levelCount; lev++) {
entry_s *level = &levels[lev];
+ SetSomeConditionShit(level->worldSlot, level->levelSlot, level->flags);
+
char *name = (char*)getNameForLevel(level);
for (int i = 0; i < level->nameLength+1; i++) {
diff --git a/src/levelinfo.h b/src/levelinfo.h
index 8d8a4e5..20628d9 100644
--- a/src/levelinfo.h
+++ b/src/levelinfo.h
@@ -22,7 +22,7 @@ public:
u8 displayLevel;
u8 nameLength;
u8 reserved3;
- u16 reserved4;
+ u16 flags;
u32 nameOffset;
};
diff --git a/src/levelinfo_old.h b/src/levelinfo_old.h
index 50760c5..ed43757 100644
--- a/src/levelinfo_old.h
+++ b/src/levelinfo_old.h
@@ -20,7 +20,7 @@ struct LevelInfo_Entry {
u8 displayLevel;
u8 nameLength;
u8 reserved3;
- u16 reserved4;
+ u16 flags;
u32 nameOffset;
};