[Scummvm-cvs-logs] SF.net SVN: scummvm:[53842] scummvm/trunk/engines/scumm
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Tue Oct 26 06:20:21 CEST 2010
Revision: 53842
http://scummvm.svn.sourceforge.net/scummvm/?rev=53842&view=rev
Author: Kirben
Date: 2010-10-26 04:20:20 +0000 (Tue, 26 Oct 2010)
Log Message:
-----------
SCUMM: Add alternative version of patch #3094717 - MMC64: save actor state.
Modified Paths:
--------------
scummvm/trunk/engines/scumm/actor.cpp
scummvm/trunk/engines/scumm/actor.h
scummvm/trunk/engines/scumm/saveload.h
Modified: scummvm/trunk/engines/scumm/actor.cpp
===================================================================
--- scummvm/trunk/engines/scumm/actor.cpp 2010-10-26 00:41:42 UTC (rev 53841)
+++ scummvm/trunk/engines/scumm/actor.cpp 2010-10-26 04:20:20 UTC (rev 53842)
@@ -2612,6 +2612,21 @@
#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)),
Modified: scummvm/trunk/engines/scumm/actor.h
===================================================================
--- scummvm/trunk/engines/scumm/actor.h 2010-10-26 00:41:42 UTC (rev 53841)
+++ scummvm/trunk/engines/scumm/actor.h 2010-10-26 04:20:20 UTC (rev 53842)
@@ -305,7 +305,7 @@
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 @@
class ActorC64 : public Actor_v2 {
public:
- // FIXME: These vars are never saved, which might lead to broken save states.
- byte _miscflags;
+ byte _costCommand, _costFrame;
+ byte _miscflags; // 0x1: strong, 0x8: Ed's enemy, 0x40: stop moving, 0x80: hide(dead/radiation suit)
byte _speaking, _speakingPrev;
- byte _costCommand, _costFrame;
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 @@
}
}
+ // Used by the save/load system:
+ virtual void saveLoadWithSerializer(Serializer *ser);
+
protected:
};
Modified: scummvm/trunk/engines/scumm/saveload.h
===================================================================
--- scummvm/trunk/engines/scumm/saveload.h 2010-10-26 00:41:42 UTC (rev 53841)
+++ scummvm/trunk/engines/scumm/saveload.h 2010-10-26 04:20:20 UTC (rev 53842)
@@ -50,7 +50,7 @@
* 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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list