aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/scumm/actor.cpp15
-rw-r--r--engines/scumm/actor.h15
-rw-r--r--engines/scumm/saveload.h2
3 files changed, 26 insertions, 6 deletions
diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp
index 3c5c0d2bf2..ca1dc8869f 100644
--- a/engines/scumm/actor.cpp
+++ b/engines/scumm/actor.cpp
@@ -2612,6 +2612,21 @@ void ScummEngine_v71he::queueAuxEntry(int actorNum, int subIndex) {
#endif
+void ActorC64::saveLoadWithSerializer(Serializer *ser) {
+ Actor::saveLoadWithSerializer(ser);
+
+ static const SaveLoadEntry actorEntries[] = {
+ MKLINE(ActorC64, _costCommand, sleByte, VER(84)),
+ MKLINE(ActorC64, _costFrame, sleByte, VER(84)),
+ MKLINE(ActorC64, _miscflags, sleByte, VER(84)),
+ MKLINE(ActorC64, _speaking, sleByte, VER(84)),
+ MKLINE(ActorC64, _speakingPrev, sleByte, VER(84)),
+ MKEND()
+ };
+
+ ser->saveLoadEntries(this, actorEntries);
+}
+
void Actor::saveLoadWithSerializer(Serializer *ser) {
static const SaveLoadEntry actorEntries[] = {
MKLINE(Actor, _pos.x, sleInt16, VER(8)),
diff --git a/engines/scumm/actor.h b/engines/scumm/actor.h
index 88ba9902b4..98854ec5ba 100644
--- a/engines/scumm/actor.h
+++ b/engines/scumm/actor.h
@@ -305,7 +305,7 @@ public:
void classChanged(int cls, bool value);
// Used by the save/load system:
- void saveLoadWithSerializer(Serializer *ser);
+ virtual void saveLoadWithSerializer(Serializer *ser);
protected:
bool isInClass(int cls);
@@ -381,14 +381,16 @@ protected:
class ActorC64 : public Actor_v2 {
public:
- // FIXME: These vars are never saved, which might lead to broken save states.
- byte _miscflags;
- byte _speaking, _speakingPrev;
byte _costCommand, _costFrame;
+ byte _miscflags; // 0x1: strong, 0x8: Ed's enemy, 0x40: stop moving, 0x80: hide(dead/radiation suit)
+ byte _speaking, _speakingPrev;
public:
ActorC64(ScummEngine *scumm, int id) : Actor_v2(scumm, id) {
- _speaking = _speakingPrev = _costCommand = _costFrame = 0;
+ _costCommand = 0;
+ _costFrame = 0;
+ _speaking = 0;
+ _speakingPrev = 0;
}
virtual void initActor(int mode) {
Actor_v2::initActor(mode);
@@ -397,6 +399,9 @@ public:
}
}
+ // Used by the save/load system:
+ virtual void saveLoadWithSerializer(Serializer *ser);
+
protected:
};
diff --git a/engines/scumm/saveload.h b/engines/scumm/saveload.h
index d33ece7f6a..91e780bcd1 100644
--- a/engines/scumm/saveload.h
+++ b/engines/scumm/saveload.h
@@ -50,7 +50,7 @@ namespace Scumm {
* only saves/loads those which are valid for the version of the savegame
* which is being loaded/saved currently.
*/
-#define CURRENT_VER 83
+#define CURRENT_VER 84
/**
* An auxillary macro, used to specify savegame versions. We use this instead