Tried to use Ragel to create state machines but its lacking an incremental mode and doesn't do any logging of state activity so debugging is harder. Put it in scratchpad for reference though.
This commit is contained in:
parent
7fc32b0248
commit
d99d9a68c8
10 changed files with 541 additions and 313 deletions
31
gui/fsm_events.hpp
Normal file
31
gui/fsm_events.hpp
Normal file
|
@ -0,0 +1,31 @@
|
|||
#pragma once
|
||||
|
||||
namespace gui {
|
||||
enum class Event {
|
||||
STARTED=0,
|
||||
TICK=1,
|
||||
MOVE_FORWARD = 2,
|
||||
MOVE_BACK = 3,
|
||||
MOVE_LEFT = 4,
|
||||
MOVE_RIGHT = 5,
|
||||
MAP_OPEN = 6,
|
||||
CLOSE = 7,
|
||||
ROTATE_LEFT = 8,
|
||||
ROTATE_RIGHT = 9,
|
||||
ATTACK = 10,
|
||||
START_COMBAT = 11,
|
||||
STOP_COMBAT = 12,
|
||||
STAIRS_DOWN = 13,
|
||||
LOOT_OPEN=14,
|
||||
LOOT_ITEM=15,
|
||||
LOOT_SELECT=16,
|
||||
INV_SELECT=17,
|
||||
QUIT = 18,
|
||||
MOUSE_CLICK=19,
|
||||
MOUSE_MOVE=20,
|
||||
MOUSE_DRAG=21,
|
||||
MOUSE_DRAG_START=22,
|
||||
MOUSE_DROP=23,
|
||||
KEY_PRESS=24
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue