summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/statelib.h45
1 files changed, 7 insertions, 38 deletions
diff --git a/include/statelib.h b/include/statelib.h
index e65f33a..22e1de9 100644
--- a/include/statelib.h
+++ b/include/statelib.h
@@ -1,3 +1,6 @@
+// This is no longer totally accurate to Nintendo's version.
+// Should still work for Newer, though.
+
/******************************************************************************/
// dStateBase_c class
/******************************************************************************/
@@ -14,6 +17,10 @@ public:
virtual bool isSameStateName(const char *name);
virtual const char *getName();
virtual int getID();
+ virtual void doBegin(void *owner);
+ virtual void doExecute(void *owner);
+ virtual void doEnd(void *owner);
+
static dStateBase_c mNoState;
@@ -40,13 +47,6 @@ public:
mEnd = end;
}
- ~dState_c();
- bool isSameStateName(const char *name);
-
- virtual void doBegin(TOwner *owner);
- virtual void doExecute(TOwner *owner);
- virtual void doEnd(TOwner *owner);
-
funcPtr mBegin;
funcPtr mExecute;
funcPtr mEnd;
@@ -54,37 +54,6 @@ public:
void *mBaseState;
};
-template <class TOwner>
-dState_c<TOwner>::~dState_c() { }
-
-template <class TOwner>
-bool dState_c<TOwner>::isSameStateName(const char *name) {
- const char *p = strrchr(name, ':');
- if (p)
- name = p + 1;
-
- int cmp = strcmp(strrchr(getName(), ':')+1, name);
- if (cmp == 0)
- return true;
- else
- return false;
-}
-
-template <class TOwner>
-void dState_c<TOwner>::doBegin(TOwner *owner) {
- (owner->*mBegin)();
-}
-
-template <class TOwner>
-void dState_c<TOwner>::doExecute(TOwner *owner) {
- (owner->*mExecute)();
-}
-
-template <class TOwner>
-void dState_c<TOwner>::doEnd(TOwner *owner) {
- (owner->*mEnd)();
-}
-
/******************************************************************************/
// A Very Useless Class
/******************************************************************************/