Ticket #9237: save_actorstate.patch
File save_actorstate.patch, 2.8 KB (added by , 14 years ago) |
---|
-
actor.cpp
2717 2717 MKARRAY(Actor, _cost.heJumpOffsetTable[0], sleUint16, 16, VER(65)), 2718 2718 MKARRAY(Actor, _cost.heJumpCountTable[0], sleUint16, 16, VER(65)), 2719 2719 MKARRAY(Actor, _cost.heCondMaskTable[0], sleUint32, 16, VER(65)), 2720 2721 MKLINE(Actor, _miscflags, sleByte, VER(84)), 2722 MKLINE(Actor, _speaking, sleByte, VER(84)), 2723 MKLINE(Actor, _speakingPrev, sleByte, VER(84)), 2724 MKLINE(Actor, _costCommand, sleByte, VER(84)), 2725 MKLINE(Actor, _costFrame, sleByte, VER(84)), 2726 2720 2727 MKEND() 2721 2728 }; 2722 2729 -
actor.h
141 141 uint32 _hePaletteNum; 142 142 uint32 _heXmapNum; 143 143 144 public: 145 /* v0 specific */ 146 byte _miscflags; // 0x1: strong, 0x8: Ed's enemy, 0x40: stop moving, 0x80: hide(dead/radiation suit) 147 byte _speaking, _speakingPrev; 148 byte _costCommand, _costFrame; 149 144 150 protected: 145 151 struct ActorWalkData { 146 152 Common::Point dest; // Final destination point … … 381 387 382 388 class ActorC64 : public Actor_v2 { 383 389 public: 384 // FIXME: These vars are never saved, which might lead to broken save states. 385 byte _miscflags; 386 byte _speaking, _speakingPrev; 387 byte _costCommand, _costFrame; 388 389 public: 390 ActorC64(ScummEngine *scumm, int id) : Actor_v2(scumm, id) { 391 _speaking = _speakingPrev = _costCommand = _costFrame = 0; 392 } 390 ActorC64(ScummEngine *scumm, int id) : Actor_v2(scumm, id) {} 393 391 virtual void initActor(int mode) { 394 392 Actor_v2::initActor(mode); 393 _speaking = 0; 394 _speakingPrev = 0; 395 _costCommand = 0; 396 _costFrame = 0; 395 397 if (mode == -1) { 396 398 _miscflags = 0; 397 399 } -
saveload.h
50 50 * only saves/loads those which are valid for the version of the savegame 51 51 * which is being loaded/saved currently. 52 52 */ 53 #define CURRENT_VER 8 353 #define CURRENT_VER 84 54 54 55 55 /** 56 56 * An auxillary macro, used to specify savegame versions. We use this instead -
verbs.cpp
836 836 837 837 // Ignore verbs? 838 838 Actor *a = derefActor(VAR(VAR_EGO), "verbObtain"); 839 if ( ((ActorC64 *)a)->_miscflags & 0x40) {839 if (a->_miscflags & 0x40) { 840 840 resetSentence(false); 841 841 return false; 842 842 } … … 928 928 if (verbMoveToActor(_activeActor)) { 929 929 // Ignore verbs? 930 930 Actor *a = derefActor(VAR(VAR_EGO), "verbExec"); 931 if ( ((ActorC64 *)a)->_miscflags & 0x40) {931 if (a->_miscflags & 0x40) { 932 932 resetSentence(false); 933 933 return false; 934 934 }