diff options
author | Strangerke | 2014-01-07 00:06:16 +0100 |
---|---|---|
committer | Strangerke | 2014-01-07 00:06:16 +0100 |
commit | 6dff1574590c60eab526b7dcc4061ec9f15c0821 (patch) | |
tree | 4f76f453bd43ebc67d5b9873c357165dd605b817 /engines/voyeur | |
parent | 12386de64b3b3fbb779d4262a0edfcb4fa5ee463 (diff) | |
download | scummvm-rg350-6dff1574590c60eab526b7dcc4061ec9f15c0821.tar.gz scummvm-rg350-6dff1574590c60eab526b7dcc4061ec9f15c0821.tar.bz2 scummvm-rg350-6dff1574590c60eab526b7dcc4061ec9f15c0821.zip |
VOYEUR: Remove a couple of useless variables, change type of some other to use booleans, add CHECKME
Diffstat (limited to 'engines/voyeur')
-rw-r--r-- | engines/voyeur/events.cpp | 9 | ||||
-rw-r--r-- | engines/voyeur/events.h | 5 | ||||
-rw-r--r-- | engines/voyeur/files_threads.cpp | 6 | ||||
-rw-r--r-- | engines/voyeur/graphics.cpp | 2 | ||||
-rw-r--r-- | engines/voyeur/voyeur.cpp | 4 | ||||
-rw-r--r-- | engines/voyeur/voyeur.h | 2 | ||||
-rw-r--r-- | engines/voyeur/voyeur_game.cpp | 21 |
7 files changed, 23 insertions, 26 deletions
diff --git a/engines/voyeur/events.cpp b/engines/voyeur/events.cpp index b96ce6796e..f9e150c8a0 100644 --- a/engines/voyeur/events.cpp +++ b/engines/voyeur/events.cpp @@ -56,7 +56,7 @@ IntData::IntData() { field24 = 0; field26 = 0; field2A = 0; - field38 = 0; + field38 = false; field3B = 0; field3D = 0; _palStartIndex = 0; @@ -98,7 +98,6 @@ EventsManager::EventsManager(): _intPtr(_gameData), _newLeftClick = _newRightClick = false;; _newMouseClicked = _newMouseUnk = false; - _v2A0A2 = 0; _videoDead = 0; } @@ -188,7 +187,7 @@ void EventsManager::voyeurTimer() { if (--_gameData.field26 <= 0) { if (_gameData._flipWait) { - _gameData.field38 = 1; + _gameData.field38 = true; _gameData._flipWait = false; _gameData.field3B = 0; } @@ -353,7 +352,7 @@ void EventsManager::startFade(CMapResource *cMap) { _intPtr._hasPalette = true; if (!(cMap->_fadeStatus & 2)) - _intPtr.field38 = 1; + _intPtr.field38 = true; } if (_cycleStatus & 1) @@ -403,7 +402,7 @@ void EventsManager::vDoFadeInt() { _intPtr._palEndIndex = _fadeLastCol; _intPtr._hasPalette = true; - _intPtr.field38 = 1; + _intPtr.field38 = true; } void EventsManager::vDoCycleInt() { diff --git a/engines/voyeur/events.h b/engines/voyeur/events.h index a8ef89aaee..a51b66916a 100644 --- a/engines/voyeur/events.h +++ b/engines/voyeur/events.h @@ -82,7 +82,7 @@ public: int _field468; int _field46A; int _vocSecondsOffset; - int _field46E; + bool _field46E; int _field470; int _field472; int _transitionId; @@ -154,7 +154,7 @@ public: int field26; int field2A; bool _hasPalette; - int field38; + bool field38; int field3B; int field3D; int _palStartIndex; @@ -206,7 +206,6 @@ public: bool _newLeftClick, _newRightClick; bool _newMouseUnk; - int _v2A0A2; int _videoDead; int _cycleTime[4]; byte *_cycleNext[4]; diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp index dc46b789ec..9f694ecaf9 100644 --- a/engines/voyeur/files_threads.cpp +++ b/engines/voyeur/files_threads.cpp @@ -1176,7 +1176,7 @@ void ThreadResource::doRoom() { while (!vm.shouldQuit() && !breakFlag) { _vm->_voyeurArea = AREA_ROOM; vm._graphicsManager.setColor(128, 0, 255, 0); - vm._eventsManager._intPtr.field38 = 1; + vm._eventsManager._intPtr.field38 = true; vm._eventsManager._intPtr._hasPalette = true; do { @@ -1221,7 +1221,7 @@ void ThreadResource::doRoom() { vm._eventsManager.setCursorColor(128, 2); } - vm._eventsManager._intPtr.field38 = 1; + vm._eventsManager._intPtr.field38 = true; vm._eventsManager._intPtr._hasPalette = true; vm._graphicsManager.flipPage(); vm._eventsManager.sWaitFlip(); @@ -1341,7 +1341,7 @@ int ThreadResource::doInterface() { _vm->_voy._field478 |= 1; if (_vm->_voy._field46E) { - _vm->_voy._field46E = 0; + _vm->_voy._field46E = false; return -2; } diff --git a/engines/voyeur/graphics.cpp b/engines/voyeur/graphics.cpp index e4b30b14c4..c4080e7d38 100644 --- a/engines/voyeur/graphics.cpp +++ b/engines/voyeur/graphics.cpp @@ -658,7 +658,7 @@ void GraphicsManager::resetPalette() { for (int i = 0; i < 256; ++i) setColor(i, 0, 0, 0); - _vm->_eventsManager._intPtr.field38 = 1; + _vm->_eventsManager._intPtr.field38 = true; _vm->_eventsManager._intPtr._hasPalette = true; } diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp index 0238651c4c..af17460d91 100644 --- a/engines/voyeur/voyeur.cpp +++ b/engines/voyeur/voyeur.cpp @@ -307,7 +307,7 @@ bool VoyeurEngine::doLock() { _eventsManager.setCursor(cursorPic); _eventsManager.showCursor(); - _eventsManager._intPtr. field38 = 1; + _eventsManager._intPtr. field38 = true; _eventsManager._intPtr._hasPalette = true; _graphicsManager._fontPtr->_curFont = _bVoy->boltEntry(0x708)._fontResource; @@ -357,7 +357,7 @@ bool VoyeurEngine::doLock() { } _eventsManager.setCursorColor(127, (key == -1) ? 0 : 1); - _eventsManager._intPtr.field38 = 1; + _eventsManager._intPtr.field38 = true; _eventsManager._intPtr._hasPalette = true; _eventsManager.delay(1); diff --git a/engines/voyeur/voyeur.h b/engines/voyeur/voyeur.h index b114c526f0..552b9d035e 100644 --- a/engines/voyeur/voyeur.h +++ b/engines/voyeur/voyeur.h @@ -159,7 +159,7 @@ public: int _currentVocId; int _videoId; const int *_resolvePtr; - int _iForceDeath; + int _iForceDeath; // CHECKME: The original initializes it in ESP_init() int _checkTransitionId; int _gameHour; int _gameMinute; diff --git a/engines/voyeur/voyeur_game.cpp b/engines/voyeur/voyeur_game.cpp index 251772e200..e943af63ce 100644 --- a/engines/voyeur/voyeur_game.cpp +++ b/engines/voyeur/voyeur_game.cpp @@ -41,8 +41,7 @@ void VoyeurEngine::playStamp() { _voy._isAM = false; _gameHour = 9; _gameMinute = 0; - _eventsManager._v2A0A2 = 0; - _voy._field46E = 1; + _voy._field46E = true; int buttonId; bool breakFlag = false; @@ -67,14 +66,14 @@ void VoyeurEngine::playStamp() { break; case 1: _voy._field478 &= ~1; - _voy._field46E = 1; + _voy._field46E = true; threadP->chooseSTAMPButton(22); _voy._field472 = 143; break; case 2: _voy._field478 &= ~1; reviewTape(); - _voy._field46E = 1; + _voy._field46E = true; _voy._field472 = 142; break; case 3: @@ -86,7 +85,7 @@ void VoyeurEngine::playStamp() { break; case 5: doGossip(); - _voy._field46E = 1; + _voy._field46E = true; _voy._field472 = 141; _voy._field478 = -1; break; @@ -116,7 +115,7 @@ void VoyeurEngine::playStamp() { break; case 2: reviewTape(); - _voy._field46E = 1; + _voy._field46E = true; break; case 4: flag = true; @@ -163,7 +162,7 @@ void VoyeurEngine::playStamp() { flag = true; } else { threadP->chooseSTAMPButton(buttonId); - _voy._field46E = 1; + _voy._field46E = true; } } break; @@ -456,7 +455,7 @@ void VoyeurEngine::reviewTape() { _graphicsManager.setColor(12, 120, 248, 120); _eventsManager.setCursorColor(128, 1); - _eventsManager._intPtr.field38 = 1; + _eventsManager._intPtr.field38 = true; _eventsManager._intPtr._hasPalette = true; _graphicsManager._fontPtr->_curFont = _bVoy->boltEntry(0x909)._fontResource; _graphicsManager._fontPtr->_fontSaveBack = false; @@ -986,7 +985,7 @@ void VoyeurEngine::makeViewFinder() { _graphicsManager.setColor(243, 105, 105, 105); _graphicsManager.setColor(palOffset + 241, 219, 235, 235); - _eventsManager._intPtr.field38 = 1; + _eventsManager._intPtr.field38 = true; _eventsManager._intPtr._hasPalette = true; } @@ -1240,7 +1239,7 @@ void VoyeurEngine::doTimeBar(bool force) { (*_graphicsManager._vPort)->sFillBox(6, fullHeight - 92); if (height > 0) { _graphicsManager.setColor(215, 238, 238, 238); - _eventsManager._intPtr.field38 = 1; + _eventsManager._intPtr.field38 = true; _eventsManager._intPtr._hasPalette = true; _graphicsManager._drawPtr->_penColor = 215; @@ -1262,7 +1261,7 @@ void VoyeurEngine::flashTimeBar(){ else _graphicsManager.setColor(240, 220, 220, 220); - _eventsManager._intPtr.field38 = 1; + _eventsManager._intPtr.field38 = true; _eventsManager._intPtr._hasPalette = true; _flashTimeFlag = !_flashTimeFlag; } |