diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/scumm/he/script_v100he.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/he/script_v60he.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/he/script_v72he.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/intern.h | 8 | ||||
-rw-r--r-- | engines/scumm/palette.cpp | 5 | ||||
-rw-r--r-- | engines/scumm/room.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/script_v6.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/script_v8.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/scumm.cpp | 14 | ||||
-rw-r--r-- | engines/scumm/scumm.h | 10 |
10 files changed, 27 insertions, 22 deletions
diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp index 323bd32a05..7e49825632 100644 --- a/engines/scumm/he/script_v100he.cpp +++ b/engines/scumm/he/script_v100he.cpp @@ -1617,7 +1617,7 @@ void ScummEngine_v100he::o100_roomOps() { case 134: // SO_ROOM_NEW_PALETTE a = pop(); - setPalette(a); + setCurrentPalette(a); break; case 135: diff --git a/engines/scumm/he/script_v60he.cpp b/engines/scumm/he/script_v60he.cpp index 6165f42495..59c28bc057 100644 --- a/engines/scumm/he/script_v60he.cpp +++ b/engines/scumm/he/script_v60he.cpp @@ -560,7 +560,7 @@ void ScummEngine_v60he::o60_roomOps() { case 213: // SO_ROOM_NEW_PALETTE a = pop(); - setPalette(a); + setCurrentPalette(a); break; case 220: a = pop(); diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp index adc81ba992..c0dd431d4c 100644 --- a/engines/scumm/he/script_v72he.cpp +++ b/engines/scumm/he/script_v72he.cpp @@ -1038,7 +1038,7 @@ void ScummEngine_v72he::o72_roomOps() { case 213: // SO_ROOM_NEW_PALETTE a = pop(); - setPalette(a); + setCurrentPalette(a); break; case 220: diff --git a/engines/scumm/intern.h b/engines/scumm/intern.h index 19dda7a354..edf4cbd851 100644 --- a/engines/scumm/intern.h +++ b/engines/scumm/intern.h @@ -276,6 +276,10 @@ protected: char _sentenceBuf[256]; + int _activeInventory; + int _activeObject; + int _activeVerb; + public: ScummEngine_v2(OSystem *syst, const DetectorResult &dr); @@ -596,6 +600,10 @@ protected: Insane *_insane; + byte _curActor; + int _curVerb; + int _curVerbSlot; + public: /** This flag tells IMuseDigital that INSANE is running. */ bool _insaneRunning; // Used by IMuseDigital::flushTracks() diff --git a/engines/scumm/palette.cpp b/engines/scumm/palette.cpp index aeb4aa0bfc..b7149ceeb3 100644 --- a/engines/scumm/palette.cpp +++ b/engines/scumm/palette.cpp @@ -905,7 +905,10 @@ void ScummEngine::setPalColor(int idx, int r, int g, int b) { setDirtyColors(idx, idx); } -void ScummEngine::setPalette(int palindex) { +void ScummEngine::setCurrentPalette(int palindex) { + // TODO: This method could almost be moved to ScummEngin_v6, the only + // problem is that it is called by ScummEngine::resetRoomSubBlocks(). + // But it should be possible to get rid of that, too (with some care). const byte *pals; _curPalIndex = palindex; diff --git a/engines/scumm/room.cpp b/engines/scumm/room.cpp index 9635fda27d..881327952b 100644 --- a/engines/scumm/room.cpp +++ b/engines/scumm/room.cpp @@ -553,7 +553,7 @@ void ScummEngine::resetRoomSubBlocks() { #endif if (_PALS_offs || _CLUT_offs) - setPalette(0); + setCurrentPalette(0); } diff --git a/engines/scumm/script_v6.cpp b/engines/scumm/script_v6.cpp index 9eae8a4425..fd163f6542 100644 --- a/engines/scumm/script_v6.cpp +++ b/engines/scumm/script_v6.cpp @@ -1768,7 +1768,7 @@ void ScummEngine_v6::o6_roomOps() { if (_game.id == GID_SAMNMAX && vm.slot[_currentScript].number == 64) setDirtyColors(0, 255); else - setPalette(a); + setCurrentPalette(a); break; default: error("o6_roomOps: default case %d", subOp); diff --git a/engines/scumm/script_v8.cpp b/engines/scumm/script_v8.cpp index 714d973a99..a1aa0b9508 100644 --- a/engines/scumm/script_v8.cpp +++ b/engines/scumm/script_v8.cpp @@ -853,7 +853,7 @@ void ScummEngine_v8::o8_roomOps() { break; case 0x5C: // SO_ROOM_NEW_PALETTE New palette a = pop(); - setPalette(a); + setCurrentPalette(a); break; case 0x5D: // SO_ROOM_SAVE_GAME Save game _saveTemporaryState = true; diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 6fbd551200..3cf046715e 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -149,9 +149,6 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr) _numTalkies = 0; _numPalettes = 0; _numUnk = 0; - _curActor = 0; - _curVerb = 0; - _curVerbSlot = 0; _curPalIndex = 0; _currentRoom = 0; _egoPositioned = false; @@ -170,9 +167,6 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr) _numObjectsInRoom = 0; _userPut = 0; _userState = 0; - _activeInventory = 0; - _activeObject = 0; - _activeVerb = 0; _resourceHeaderSize = 8; _saveLoadFlag = 0; _saveLoadSlot = 0; @@ -612,6 +606,10 @@ ScummEngine_v3old::ScummEngine_v3old(OSystem *syst, const DetectorResult &dr) ScummEngine_v2::ScummEngine_v2(OSystem *syst, const DetectorResult &dr) : ScummEngine_v3old(syst, dr) { + _activeInventory = 0; + _activeObject = 0; + _activeVerb = 0; + VAR_SENTENCE_VERB = 0xFF; VAR_SENTENCE_OBJECT1 = 0xFF; VAR_SENTENCE_OBJECT2 = 0xFF; @@ -639,6 +637,10 @@ ScummEngine_v6::ScummEngine_v6(OSystem *syst, const DetectorResult &dr) memset(_akosQueue, 0, sizeof(_akosQueue)); _akosQueuePos = 0; + _curActor = 0; + _curVerb = 0; + _curVerbSlot = 0; + VAR_VIDEONAME = 0xFF; VAR_RANDOM_NR = 0xFF; VAR_STRING2DRAW = 0xFF; diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h index d26a7d0786..d1141c5669 100644 --- a/engines/scumm/scumm.h +++ b/engines/scumm/scumm.h @@ -583,10 +583,6 @@ public: int _NESStartStrip; protected: - /* Current objects - can go in their respective classes */ - byte _curActor; - int _curVerb; - int _curVerbSlot; int _curPalIndex; public: @@ -870,10 +866,6 @@ protected: int8 _userPut; uint16 _userState; - int _activeInventory; - int _activeObject; - int _activeVerb; - virtual void handleMouseOver(bool updateInventory); virtual void redrawVerbs(); virtual void checkExecVerbs(); @@ -1013,7 +1005,7 @@ protected: void resetPalette(); - void setPalette(int pal); + void setCurrentPalette(int pal); void setRoomPalette(int pal, int room); virtual void setPaletteFromPtr(const byte *ptr, int numcolor = -1); virtual void setPalColor(int index, int r, int g, int b); |