diff options
author | Matthew Stewart | 2018-06-24 02:28:18 -0400 |
---|---|---|
committer | Eugene Sandulenko | 2018-08-09 08:37:30 +0200 |
commit | a5c7d6ae11c255647e2026ae447e76f0ae52c67f (patch) | |
tree | 2b86889757948ac43b8cf080101005683f9731a2 /engines/startrek/action.h | |
parent | d8e255e9e7fcd1b91f85ea0a14596d679542fae6 (diff) | |
download | scummvm-rg350-a5c7d6ae11c255647e2026ae447e76f0ae52c67f.tar.gz scummvm-rg350-a5c7d6ae11c255647e2026ae447e76f0ae52c67f.tar.bz2 scummvm-rg350-a5c7d6ae11c255647e2026ae447e76f0ae52c67f.zip |
STARTREK: Revamp of action callbacks.
Old system of putting a callback in an action wouldn't work since it
wasn't serializable. Now it seaches for an index corresponding to the
function pointer before constructing an action.
Diffstat (limited to 'engines/startrek/action.h')
-rw-r--r-- | engines/startrek/action.h | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/engines/startrek/action.h b/engines/startrek/action.h index 6774000771..55a08da738 100644 --- a/engines/startrek/action.h +++ b/engines/startrek/action.h @@ -43,9 +43,7 @@ enum Acton { ACTION_TIMER_EXPIRED = 8, ACTION_FINISHED_ANIMATION = 10, ACTION_FINISHED_WALKING = 12, - ACTION_OPTIONS = 13, // Not really an action, but selectable from action menu - - ACTION_CALLBACK = 255 // Custom action in ScummVM; calls a function in the Room class + ACTION_OPTIONS = 13 // Not really an action, but selectable from action menu }; struct Action : Common::Serializable { @@ -54,10 +52,6 @@ struct Action : Common::Serializable { byte b2; byte b3; - // Only used with ACTION_CALLBACK. - // TODO: Fix serialization. Can this even be serialized? - void (Room::*roomFuncPtr)(); - Action() {} Action(int _type, int _b1, int _b2, int _b3) : type((byte)_type), @@ -65,10 +59,6 @@ struct Action : Common::Serializable { b2((byte)_b2), b3((byte)_b3) {} - Action(int _type, void (Room::*funcPtr)()) - : type((byte)_type), - roomFuncPtr(funcPtr) {} - // ACTION_USE, ACTION_GET, ACTION_LOOK, ACTION_TALK byte activeObject() { return b1; } |