aboutsummaryrefslogtreecommitdiff
path: root/engines/startrek/action.h
diff options
context:
space:
mode:
authorMatthew Stewart2018-05-23 19:56:15 -0400
committerEugene Sandulenko2018-08-09 08:37:30 +0200
commitca3a9dcc8764909e163a860e4a472404620480e2 (patch)
tree4b546d6c1ad2466e25d4c24bbb642d7c0eb49c58 /engines/startrek/action.h
parentbd79e4d653f9476de1501de149589e583e47411d (diff)
downloadscummvm-rg350-ca3a9dcc8764909e163a860e4a472404620480e2.tar.gz
scummvm-rg350-ca3a9dcc8764909e163a860e4a472404620480e2.tar.bz2
scummvm-rg350-ca3a9dcc8764909e163a860e4a472404620480e2.zip
STARTREK: Finish implementing first room
Doors now work, and the system of "walking, then performing an action afterward" is implemented.
Diffstat (limited to 'engines/startrek/action.h')
-rw-r--r--engines/startrek/action.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/engines/startrek/action.h b/engines/startrek/action.h
index 68d5823000..7be09eb671 100644
--- a/engines/startrek/action.h
+++ b/engines/startrek/action.h
@@ -35,8 +35,8 @@ enum Acton {
ACTION_TOUCHED_WARP = 6,
ACTION_TOUCHED_HOTSPOT = 7, // Doors? (Or just hotspots activated by Kirk moving there?)
- ACTION_FINISHED_BEAMING_IN = 10,
- ACTION_FINISHED_ENTERING_ROOM = 12,
+ ACTION_FINISHED_ANIMATION = 10,
+ ACTION_FINISHED_WALKING = 12,
ACTION_OPTIONS = 13 // Not really an action, but selectable from action menu
};
@@ -46,6 +46,7 @@ struct Action {
byte b2;
byte b3;
+ Action() {}
Action(byte _type, byte _b1, byte _b2, byte _b3)
: type(_type),
b1(_b1),
@@ -60,6 +61,23 @@ struct Action {
bool operator==(const Action &a) const {
return type == a.type && b1 == a.b1 && b2 == a.b2 && b3 == a.b3;
}
+
+ uint32 getBitmask() const {
+ uint32 ret = 0;
+ if (type != 0xff)
+ ret |= (0xff << 24);
+ if (b1 != 0xff)
+ ret |= (0xff << 16);
+ if (b2 != 0xff)
+ ret |= (0xff << 8);
+ if (b3 != 0xff)
+ ret |= (0xff << 0);
+ return ret;
+ }
+
+ uint32 toUint32() const {
+ return (type << 24) | (b1 << 16) | (b2 << 8) | (b3 << 0);
+ }
};
#endif