diff options
Diffstat (limited to '')
-rwxr-xr-x | include/game.h | 43 | ||||
-rw-r--r-- | kamek_ntsc.x | 14 | ||||
-rw-r--r-- | kamek_ntsc2.x | 14 | ||||
-rw-r--r-- | kamek_pal.x | 14 | ||||
-rw-r--r-- | kamek_pal2.x | 14 |
5 files changed, 99 insertions, 0 deletions
diff --git a/include/game.h b/include/game.h index ff2e2de..123e4f7 100755 --- a/include/game.h +++ b/include/game.h @@ -284,6 +284,49 @@ void *BgTexMng__LoadAnimTile(void *self, int tileset, short tile, char *name, ch extern void *GameHeaps[];
+class dFlagMgr_c {
+public:
+ dFlagMgr_c();
+
+ enum ActionFlag {
+ ACTIVATE = 1,
+ TICKS = 2
+ };
+
+ u64 flags;
+ float _8[64], _108[64];
+ u8 _208[64];
+ u64 _248[64];
+ u8 _448[64];
+
+ u32 ticksRemainingForAction[64];
+ u8 actionFlag[64];
+ u32 _5C8[64]; // somehow sound related?! assigned by last param to set(); only checked for == 0
+ u8 _6C8; // assigned -1 by FlagMgr, and other values by the Switch object, nothing else though
+
+ void setup(bool isNewLevel);
+ void applyAndClearAllTimedActions(); // only used when setup(true) is called
+ void execute();
+
+ void set(u8 number, int delay, bool activate, bool reverseEffect, bool makeNoise, u32 unknown=0);
+
+ u8 findLowestFlagInSet(u32 unk, u64 set);
+
+ void setSpecial(u8 number, float to8, float to108, u8 to208, u32 unk, u64 to248);
+ float get8(u8 number);
+ float get108(u8 number);
+ u8 get208(u8 number);
+ u64 get248(u8 number);
+ u8 get448(u8 number);
+
+ // convenience inline functions which may or may not actually exist in Nintendo's original code
+ u64 mask(u8 number) { return (u64)1 << number; }
+ bool active(u8 number) { return (flags & mask(number)) != 0; }
+ bool inactive(u8 number) { return (flags & mask(number)) == 0; }
+
+ static dFlagMgr_c *instance;
+};
+
namespace nw4r {
diff --git a/kamek_ntsc.x b/kamek_ntsc.x index 4bee094..5ca062c 100644 --- a/kamek_ntsc.x +++ b/kamek_ntsc.x @@ -356,6 +356,20 @@ SECTIONS { getName__9StateBaseFv = 0x8015F920; getID__9StateBaseFv = 0x8015F930; + __ct__10dFlagMgr_c = 0x800E3AE0; + setup__10dFlagMgr_cFb = 0x800E3BA0; + applyAndClearAllTimedActions__10dFlagMgr_cFv = 0x800E3F20; + execute__10dFlagMgr_cFv = 0x800E4010; + set__10dFlagMgr_cFUcibbbUi = 0x800E41C0; + findLowestFlagInSet__10dFlagMgr_cFUiUl = 0x800E4470; + setSpecial__10dFlagMgr_cFUcffUcUiUl = 0x800E4550; + get8__10dFlagMgr_cFUc = 0x800E4590; + get108__10dFlagMgr_cFUc = 0x800E45A0; + get208__10dFlagMgr_cFUc = 0x800E45B0; + get248__10dFlagMgr_cFUc = 0x800E45C0; + get448__10dFlagMgr_cFUc = 0x800E45E0; + + __ct__7PhysicsFv = 0x8007F7A0; setup__7PhysicsFP8dActor_cPQ27Physics4InfoUcUcP7Point2d = 0x8007FB10; addToList__7PhysicsFv = 0x8007F900; diff --git a/kamek_ntsc2.x b/kamek_ntsc2.x index 570578d..3e70ec6 100644 --- a/kamek_ntsc2.x +++ b/kamek_ntsc2.x @@ -356,6 +356,20 @@ SECTIONS { getName__9StateBaseFv = 0x8015F920; getID__9StateBaseFv = 0x8015F930; + __ct__10dFlagMgr_c = 0x800E3AE0; + setup__10dFlagMgr_cFb = 0x800E3BA0; + applyAndClearAllTimedActions__10dFlagMgr_cFv = 0x800E3F20; + execute__10dFlagMgr_cFv = 0x800E4010; + set__10dFlagMgr_cFUcibbbUi = 0x800E41C0; + findLowestFlagInSet__10dFlagMgr_cFUiUl = 0x800E4470; + setSpecial__10dFlagMgr_cFUcffUcUiUl = 0x800E4550; + get8__10dFlagMgr_cFUc = 0x800E4590; + get108__10dFlagMgr_cFUc = 0x800E45A0; + get208__10dFlagMgr_cFUc = 0x800E45B0; + get248__10dFlagMgr_cFUc = 0x800E45C0; + get448__10dFlagMgr_cFUc = 0x800E45E0; + + __ct__7PhysicsFv = 0x8007F7A0; setup__7PhysicsFP8dActor_cPQ27Physics4InfoUcUcP7Point2d = 0x8007FB10; addToList__7PhysicsFv = 0x8007F900; diff --git a/kamek_pal.x b/kamek_pal.x index 07293c0..fae43cd 100644 --- a/kamek_pal.x +++ b/kamek_pal.x @@ -356,6 +356,20 @@ SECTIONS { getName__9StateBaseFv = 0x8015FA60;
getID__9StateBaseFv = 0x8015FA70;
+ __ct__10dFlagMgr_c = 0x800E3BD0;
+ setup__10dFlagMgr_cFb = 0x800E3C90;
+ applyAndClearAllTimedActions__10dFlagMgr_cFv = 0x800E4010;
+ execute__10dFlagMgr_cFv = 0x800E4100;
+ set__10dFlagMgr_cFUcibbbUi = 0x800E42B0;
+ findLowestFlagInSet__10dFlagMgr_cFUiUl = 0x800E4560;
+ setSpecial__10dFlagMgr_cFUcffUcUiUl = 0x800E4640;
+ get8__10dFlagMgr_cFUc = 0x800E4680;
+ get108__10dFlagMgr_cFUc = 0x800E4690;
+ get208__10dFlagMgr_cFUc = 0x800E46A0;
+ get248__10dFlagMgr_cFUc = 0x800E46B0;
+ get448__10dFlagMgr_cFUc = 0x800E46D0;
+
+
__ct__7PhysicsFv = 0x8007F7A0;
setup__7PhysicsFP8dActor_cPQ27Physics4InfoUcUcP7Point2d = 0x8007FB10;
addToList__7PhysicsFv = 0x8007F900;
diff --git a/kamek_pal2.x b/kamek_pal2.x index 49bd37f..ca1ac2c 100644 --- a/kamek_pal2.x +++ b/kamek_pal2.x @@ -356,6 +356,20 @@ SECTIONS { getName__9StateBaseFv = 0xDEADBEEF; getID__9StateBaseFv = 0xDEADBEEF; + __ct__10dFlagMgr_c = 0xDEADBEEF; + setup__10dFlagMgr_cFb = 0xDEADBEEF; + applyAndClearAllTimedActions__10dFlagMgr_cFv = 0xDEADBEEF; + execute__10dFlagMgr_cFv = 0xDEADBEEF; + set__10dFlagMgr_cFUcibbbUi = 0xDEADBEEF; + findLowestFlagInSet__10dFlagMgr_cFUiUl = 0xDEADBEEF; + setSpecial__10dFlagMgr_cFUcffUcUiUl = 0xDEADBEEF; + get8__10dFlagMgr_cFUc = 0xDEADBEEF; + get108__10dFlagMgr_cFUc = 0xDEADBEEF; + get208__10dFlagMgr_cFUc = 0xDEADBEEF; + get248__10dFlagMgr_cFUc = 0xDEADBEEF; + get448__10dFlagMgr_cFUc = 0xDEADBEEF; + + __ct__7PhysicsFv = 0xDEADBEEF; setup__7PhysicsFP8dActor_cPQ27Physics4InfoUcUcP7Point2d = 0xDEADBEEF; addToList__7PhysicsFv = 0xDEADBEEF; |