summaryrefslogtreecommitdiff
path: root/src/eventblock.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2011-09-17 03:38:41 +0200
committerTreeki <treeki@gmail.com>2011-09-17 03:38:41 +0200
commite0ff484a06fd3f068e29eff4a125f61fbfd174c4 (patch)
treea7df31ed5108e4107ebb2aaa63a1f401a9cf86a4 /src/eventblock.cpp
parente86081a64a2f2fc3e3d0d4974572702b158dfd64 (diff)
downloadkamek-e0ff484a06fd3f068e29eff4a125f61fbfd174c4.tar.gz
kamek-e0ff484a06fd3f068e29eff4a125f61fbfd174c4.zip
merged level-select updates to game.h and State stuffclassic_controller
Diffstat (limited to 'src/eventblock.cpp')
-rw-r--r--src/eventblock.cpp23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/eventblock.cpp b/src/eventblock.cpp
index f285da8..6f353b7 100644
--- a/src/eventblock.cpp
+++ b/src/eventblock.cpp
@@ -10,8 +10,6 @@ public:
SWAP_EVENTS = 1
};
- typedef State<daEnEventBlock_c> State;
-
TileRenderer tile;
Physics::Info physicsInfo;
@@ -28,21 +26,16 @@ public:
void calledWhenUpMoveExecutes();
void calledWhenDownMoveExecutes();
- void wait_Begin();
- void wait_Execute();
- void wait_End();
-
void blockWasHit(bool isDown);
- static State StateID_Wait;
+ USING_STATES(daEnEventBlock_c);
+ DECLARE_STATE(Wait);
+
static daEnEventBlock_c *build();
};
-daEnEventBlock_c::State daEnEventBlock_c::StateID_Wait(
- "daEnEventBlock_c::StateID_Wait",
- &daEnEventBlock_c::wait_Begin,
- &daEnEventBlock_c::wait_Execute,
- &daEnEventBlock_c::wait_End);
+
+CREATE_STATE(daEnEventBlock_c, Wait);
int daEnEventBlock_c::onCreate() {
@@ -184,13 +177,13 @@ void daEnEventBlock_c::calledWhenDownMoveExecutes() {
-void daEnEventBlock_c::wait_Begin() {
+void daEnEventBlock_c::beginState_Wait() {
}
-void daEnEventBlock_c::wait_End() {
+void daEnEventBlock_c::endState_Wait() {
}
-void daEnEventBlock_c::wait_Execute() {
+void daEnEventBlock_c::executeState_Wait() {
int result = blockResult();
if (result == 0)