summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rwxr-xr-xinclude/game.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/game.h b/include/game.h
index 3476eaa..7382c34 100755
--- a/include/game.h
+++ b/include/game.h
@@ -1104,6 +1104,23 @@ public:
};
+#define DECLARE_STATE(NAME) \
+ static State StateID_##NAME; \
+ void beginState_##NAME(); \
+ void executeState_##NAME(); \
+ void endState_##NAME();
+
+#define CREATE_STATE(CLASS, NAME) \
+ CLASS::State CLASS::StateID_##NAME \
+ (#CLASS "::StateID_" #NAME, \
+ &CLASS::beginState_##NAME, \
+ &CLASS::executeState_##NAME, \
+ &CLASS::endState_##NAME);
+
+#define USING_STATES(CLASS) \
+ typedef State<CLASS> State;
+
+
struct LinkListEntry {
LinkListEntry *prev;
LinkListEntry *next;