summaryrefslogtreecommitdiff
path: root/include/game.h
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2011-09-21 17:17:10 +0200
committerTreeki <treeki@gmail.com>2011-09-21 17:17:10 +0200
commite6a84f7143968ac4a8ffa5fa8405d8d986a63951 (patch)
tree428caba44d7cd4cb37c36cebbd7bb92ba8b2a931 /include/game.h
parentdd75729e326b0f7114353649baa275cd06afae2f (diff)
downloadkamek-e6a84f7143968ac4a8ffa5fa8405d8d986a63951.tar.gz
kamek-e6a84f7143968ac4a8ffa5fa8405d8d986a63951.zip
renamed state classes, added dEn_c state references
Diffstat (limited to 'include/game.h')
-rwxr-xr-xinclude/game.h38
1 files changed, 26 insertions, 12 deletions
diff --git a/include/game.h b/include/game.h
index d16a09f..f7728db 100755
--- a/include/game.h
+++ b/include/game.h
@@ -1099,7 +1099,7 @@ public:
dActorMultiState_c *owner;
u32 unkZero;
- StateMgr<dActorMultiState_c> manager;
+ dStateMgr_c<dActorMultiState_c> manager;
// All these are passed straight through to the manager
virtual void _vfC();
@@ -1128,11 +1128,11 @@ public:
virtual void _vfC(); // calls vfC on ptrToStateMgr
virtual void execute(); // calls vf10 on ptrToStateMgr
virtual void _vf14(); // if (isSecondStateMgr()) { disableSecond(); } else { ptrToStateMgr->_vf14(); }
- virtual void setState(StateBase *state); // calls vf18 on ptrToStateMgr
+ virtual void setState(dStateBase_c *state); // calls vf18 on ptrToStateMgr
virtual void _vf1C(); // calls vf1C on ptrToStateMgr
virtual void _vf20(); // calls vf20 on ptrToStateMgr
virtual void _vf24(); // calls vf24 on ptrToStateMgr
- virtual StateBase *getCurrentState(); // calls vf28 on ptrToStateMgr
+ virtual dStateBase_c *getCurrentState(); // calls vf28 on ptrToStateMgr
virtual void _vf2C(); // calls vf2C on ptrToStateMgr
virtual void enableSecond(); // sets ptrToStateMgr to s2, calls vf18 on it
virtual void disableSecond(); // if (isSecondStateMgr()) { ptrToStateMgr->vf14(); ptrToStateMgr = &s1; }
@@ -1146,6 +1146,8 @@ public:
~MultiStateMgr();
};
+#define REF_NINTENDO_STATE(NAME) \
+ static State StateID_##NAME;
#define DECLARE_STATE(NAME) \
static State StateID_##NAME; \
@@ -1161,7 +1163,7 @@ public:
&CLASS::endState_##NAME);
#define USING_STATES(CLASS) \
- typedef State<CLASS> State;
+ typedef dState_c<CLASS> State;
struct LinkListEntry {
@@ -1467,7 +1469,7 @@ public:
MultiStateMgr acState;
- virtual void doStateChange(StateBase *state); // might return bool? overridden by dEn_c
+ virtual void doStateChange(dStateBase_c *state); // might return bool? overridden by dEn_c
virtual void _vfD8(); // nullsub ??
virtual void _vfDC(); // nullsub ??
virtual void _vfE0(); // nullsub ??
@@ -1519,7 +1521,7 @@ public:
void _vfCC(Vec2 *p);
void _vfD0(Vec2 *p);
- void doStateChange(StateBase *state); // might return bool, dunno
+ void doStateChange(dStateBase_c *state); // might return bool, dunno
// Now here's where the fun starts.
@@ -1639,6 +1641,17 @@ public:
static void collisionCallback(ActivePhysics::Info *one, ActivePhysics::Info *two);
+
+ // States
+ USING_STATES(dEn_c);
+ REF_NINTENDO_STATE(DieFumi);
+ REF_NINTENDO_STATE(DieFall);
+ REF_NINTENDO_STATE(DieBigFall);
+ REF_NINTENDO_STATE(DieSmoke);
+ REF_NINTENDO_STATE(DieIceVanish);
+ REF_NINTENDO_STATE(DieYoshiFumi);
+ REF_NINTENDO_STATE(DieGoal);
+ REF_NINTENDO_STATE(DieOther);
};
@@ -1708,12 +1721,13 @@ public:
static void *OPhysicsCallback2;
static void *OPhysicsCallback3;
- static State<daEnBlockMain_c> StateID_UpMove;
- static State<daEnBlockMain_c> StateID_DownMove;
- static State<daEnBlockMain_c> StateID_DownMoveEnd;
- static State<daEnBlockMain_c> StateID_UpMove_Diff;
- static State<daEnBlockMain_c> StateID_DownMove_Diff;
- static State<daEnBlockMain_c> StateID_DownMove_DiffEnd;
+ USING_STATES(daEnBlockMain_c);
+ REF_NINTENDO_STATE(UpMove);
+ REF_NINTENDO_STATE(DownMove);
+ REF_NINTENDO_STATE(DownMoveEnd);
+ REF_NINTENDO_STATE(UpMove_Diff);
+ REF_NINTENDO_STATE(DownMove_Diff);
+ REF_NINTENDO_STATE(DownMove_DiffEnd);
~daEnBlockMain_c();
};