aboutsummaryrefslogtreecommitdiff
path: root/engines/startrek/action.h
diff options
context:
space:
mode:
authorMatthew Stewart2018-06-05 04:18:14 -0400
committerEugene Sandulenko2018-08-09 08:37:30 +0200
commit84a30e4dce6bdaf3d40656342e53b5dcd12746be (patch)
tree32476f0e810340b5947ab44ad9b7059a391ecce0 /engines/startrek/action.h
parentc17bef8285086d438a03fcff6ae5f3d15b5532e8 (diff)
downloadscummvm-rg350-84a30e4dce6bdaf3d40656342e53b5dcd12746be.tar.gz
scummvm-rg350-84a30e4dce6bdaf3d40656342e53b5dcd12746be.tar.bz2
scummvm-rg350-84a30e4dce6bdaf3d40656342e53b5dcd12746be.zip
STARTREK: Preliminary saving/loading
Diffstat (limited to 'engines/startrek/action.h')
-rw-r--r--engines/startrek/action.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/engines/startrek/action.h b/engines/startrek/action.h
index 232dc22b35..15d3ea11f7 100644
--- a/engines/startrek/action.h
+++ b/engines/startrek/action.h
@@ -23,6 +23,7 @@
#ifndef STARTREK_ACTION_H
#define STARTREK_ACTION_H
+#include "common/serializer.h"
enum Acton {
ACTION_TICK = 0,
@@ -41,7 +42,7 @@ enum Acton {
ACTION_OPTIONS = 13 // Not really an action, but selectable from action menu
};
-struct Action {
+struct Action : Common::Serializable {
byte type;
byte b1;
byte b2;
@@ -79,6 +80,13 @@ struct Action {
uint32 toUint32() const {
return (type << 24) | (b1 << 16) | (b2 << 8) | (b3 << 0);
}
+
+ virtual void saveLoadWithSerializer(Common::Serializer &ser) {
+ ser.syncAsByte(type);
+ ser.syncAsByte(b1);
+ ser.syncAsByte(b2);
+ ser.syncAsByte(b3);
+ }
};
#endif