SCUMM: Save the new variables, move the setting of the unknown variable to after the setDirection call

This commit is contained in:
segrax 2012-01-20 07:47:43 +11:00 committed by Tobias Gunkel
parent e2d45467bb
commit e331421eae
2 changed files with 8 additions and 6 deletions

View file

@ -865,9 +865,6 @@ void Actor::setDirection(int direction) {
else else
_vm->_costumeLoader->costumeDecodeData(this, _standFrame, 0); _vm->_costumeLoader->costumeDecodeData(this, _standFrame, 0);
// 0x2C17
((ActorC64*) this)->_byte_FD0A = -1;
_needRedraw = true; _needRedraw = true;
return; return;
} }
@ -901,6 +898,7 @@ void Actor::turnToDirection(int newdir) {
if (newdir == -1 || _ignoreTurns) if (newdir == -1 || _ignoreTurns)
return; return;
// 0x2C17
if( _vm->_game.version == 0 ) if( _vm->_game.version == 0 )
((ActorC64*) this)->_byte_FD0A = -1; ((ActorC64*) this)->_byte_FD0A = -1;
@ -2655,7 +2653,6 @@ void ActorC64::animateActor(int anim) {
if( this->isInCurrentRoom() ) { if( this->isInCurrentRoom() ) {
// this->_costCommandNew = anim; // this->_costCommandNew = anim;
this->_byte_FD0A = this->_byte_FDE8;
// 0x273A // 0x273A
/*switch( anim ) { /*switch( anim ) {
@ -2675,9 +2672,11 @@ void ActorC64::animateActor(int anim) {
default: default:
return; return;
}*/ }*/
this->setDirection( dir ); this->setDirection( dir );
this->_byte_FD0A = this->_byte_FDE8;
} else { } else {
if( anim > 4 ) { if( anim > 4 ) {
@ -2696,6 +2695,9 @@ void ActorC64::saveLoadWithSerializer(Serializer *ser) {
MKLINE(ActorC64, _miscflags, sleByte, VER(84)), MKLINE(ActorC64, _miscflags, sleByte, VER(84)),
MKLINE(ActorC64, _speaking, sleByte, VER(84)), MKLINE(ActorC64, _speaking, sleByte, VER(84)),
MKLINE(ActorC64, _speakingPrev, sleByte, VER(84)), MKLINE(ActorC64, _speakingPrev, sleByte, VER(84)),
MKLINE(ActorC64, _byte_FD0A, sleByte, VER(89)),
MKLINE(ActorC64, _byte_FDE8, sleByte, VER(89)),
MKARRAY(ActorC64, _byte_FCE2, sleInt8, 8, VER(89)),
MKEND() MKEND()
}; };

View file

@ -47,7 +47,7 @@ namespace Scumm {
* only saves/loads those which are valid for the version of the savegame * only saves/loads those which are valid for the version of the savegame
* which is being loaded/saved currently. * which is being loaded/saved currently.
*/ */
#define CURRENT_VER 88 #define CURRENT_VER 89
/** /**
* An auxillary macro, used to specify savegame versions. We use this instead * An auxillary macro, used to specify savegame versions. We use this instead