From 9d86715e30a91b405b5df2e2a3646d1f930d4e34 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 7 Feb 2014 20:40:04 -0500 Subject: VOYEUR: Renaming SVoy fields --- engines/voyeur/data.cpp | 16 ++++++------- engines/voyeur/data.h | 14 +++++------ engines/voyeur/files_threads.cpp | 50 ++++++++++++++++++++-------------------- engines/voyeur/voyeur.cpp | 8 +++---- engines/voyeur/voyeur_game.cpp | 36 ++++++++++++++--------------- 5 files changed, 62 insertions(+), 62 deletions(-) (limited to 'engines/voyeur') diff --git a/engines/voyeur/data.cpp b/engines/voyeur/data.cpp index 4cbfef5995..98a7a0731f 100644 --- a/engines/voyeur/data.cpp +++ b/engines/voyeur/data.cpp @@ -81,19 +81,19 @@ void SVoy::synchronize(Common::Serializer &s) { s.syncAsByte(_roomHotspotsEnabled[idx]); } - s.syncAsSint16LE(_field468); - s.syncAsSint16LE(_field46A); + s.syncAsSint16LE(_audioVisualStartTime); + s.syncAsSint16LE(_audioVisualDuration); s.syncAsSint16LE(_vocSecondsOffset); s.syncAsSint16LE(_abortInterface); - s.syncAsSint16LE(_field470); + s.syncAsSint16LE(_playStampMode); s.syncAsSint16LE(_aptLoadMode); s.syncAsSint16LE(_transitionId); s.syncAsSint16LE(_RTVLimit); s.syncAsSint16LE(_eventFlags); s.syncAsSint16LE(_boltGroupId2); - s.syncAsSint16LE(_field4AC); - s.syncAsSint16LE(_field4B8); + s.syncAsSint16LE(_musicStartTime); + s.syncAsSint16LE(_totalPhoneCalls); s.syncAsSint16LE(_computerTextId); s.syncAsSint16LE(_computerTimeMin); s.syncAsSint16LE(_computerTimeMax); @@ -111,7 +111,7 @@ void SVoy::synchronize(Common::Serializer &s) { s.syncAsSint16LE(_field437C); s.syncAsSint16LE(_field437E); s.syncAsSint16LE(_victimNumber); - s.syncAsSint16LE(_field4382); + s.syncAsSint16LE(_incriminatedVictimNumber); s.syncAsSint16LE(_videoEventId); if (s.isLoading()) { @@ -134,7 +134,7 @@ void SVoy::addVideoEventStart() { void SVoy::addVideoEventEnd() { VoyeurEvent &e = _events[_eventCount]; - e._computerOff = _RTVNum - _field468 - _vocSecondsOffset; + e._computerOff = _RTVNum - _audioVisualStartTime - _vocSecondsOffset; if (_eventCount < (TOTAL_EVENTS - 1)) ++_eventCount; } @@ -152,7 +152,7 @@ void SVoy::addAudioEventStart() { void SVoy::addAudioEventEnd() { VoyeurEvent &e = _events[_eventCount]; - e._computerOff = _RTVNum - _field468 - _vocSecondsOffset; + e._computerOff = _RTVNum - _audioVisualStartTime - _vocSecondsOffset; if (_eventCount < (TOTAL_EVENTS - 1)) ++_eventCount; } diff --git a/engines/voyeur/data.h b/engines/voyeur/data.h index d9c62bc7ca..0b32d9abee 100644 --- a/engines/voyeur/data.h +++ b/engines/voyeur/data.h @@ -113,11 +113,11 @@ public: HotspotTimes<3> _evidenceHotspotTimes; bool _roomHotspotsEnabled[20]; - int _field468; - int _field46A; + int _audioVisualStartTime; + int _audioVisualDuration; int _vocSecondsOffset; bool _abortInterface; - int _field470; + int _playStampMode; int _aptLoadMode; int _transitionId; int _RTVLimit; @@ -125,9 +125,9 @@ public: int _boltGroupId2; PictureResource *_evPicPtrs[6]; CMapResource *_evCmPtrs[6]; - int _field4AC; - int _field4AE[5]; - int _field4B8; + int _musicStartTime; + bool _phoneCallsReceived[5]; + int _totalPhoneCalls; int _computerTextId; Common::Rect _rect4E4; @@ -142,7 +142,7 @@ public: int _field437C; int _field437E; int _victimNumber; - int _field4382; + int _incriminatedVictimNumber; int _videoEventId; RectResource *_viewBounds; int _curICF0; diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp index ba85ec2e80..7635a9dea2 100644 --- a/engines/voyeur/files_threads.cpp +++ b/engines/voyeur/files_threads.cpp @@ -336,9 +336,9 @@ bool ThreadResource::chooseSTAMPButton(int buttonId) { } void ThreadResource::parsePlayCommands() { - _vm->_voy._field470 = -1; - _vm->_voy._field468 = 0; - _vm->_voy._field46A = 0; + _vm->_voy._playStampMode = -1; + _vm->_voy._audioVisualStartTime = 0; + _vm->_voy._audioVisualDuration = 0; _vm->_voy._boltGroupId2 = -1; _vm->_voy._computerTextId = -1; _vm->_voy._eventFlags &= ~EVTFLAG_8; @@ -372,14 +372,14 @@ void ThreadResource::parsePlayCommands() { if (v2 == 0 || _vm->_controlPtr->_state->_victimIndex == v2) { _vm->_audioVideoId = READ_LE_UINT16(dataP + 2) - 1; - _vm->_voy._field468 = READ_LE_UINT16(dataP + 4); - _vm->_voy._field46A = READ_LE_UINT16(dataP + 6); + _vm->_voy._audioVisualStartTime = READ_LE_UINT16(dataP + 4); + _vm->_voy._audioVisualDuration = READ_LE_UINT16(dataP + 6); - if (_vm->_voy._RTVNum < _vm->_voy._field468 || - (_vm->_voy._field468 + _vm->_voy._field46A) < _vm->_voy._RTVNum) { + if (_vm->_voy._RTVNum < _vm->_voy._audioVisualStartTime || + (_vm->_voy._audioVisualStartTime + _vm->_voy._audioVisualDuration) < _vm->_voy._RTVNum) { _vm->_audioVideoId = -1; } else { - _vm->_voy._vocSecondsOffset = _vm->_voy._RTVNum - _vm->_voy._field468; + _vm->_voy._vocSecondsOffset = _vm->_voy._RTVNum - _vm->_voy._audioVisualStartTime; _vm->_voy.addAudioEventStart(); // Play the audio @@ -403,14 +403,14 @@ void ThreadResource::parsePlayCommands() { if (v2 == 0 || _vm->_controlPtr->_state->_victimIndex == v2) { _vm->_audioVideoId = READ_LE_UINT16(dataP + 2) - 1; - _vm->_voy._field468 = READ_LE_UINT16(dataP + 4); - _vm->_voy._field46A = READ_LE_UINT16(dataP + 6); + _vm->_voy._audioVisualStartTime = READ_LE_UINT16(dataP + 4); + _vm->_voy._audioVisualDuration = READ_LE_UINT16(dataP + 6); - if (_vm->_voy._RTVNum < _vm->_voy._field468 || - (_vm->_voy._field468 + _vm->_voy._field46A) < _vm->_voy._RTVNum) { + if (_vm->_voy._RTVNum < _vm->_voy._audioVisualStartTime || + (_vm->_voy._audioVisualStartTime + _vm->_voy._audioVisualDuration) < _vm->_voy._RTVNum) { _vm->_audioVideoId = -1; } else { - _vm->_voy._vocSecondsOffset = _vm->_voy._RTVNum - _vm->_voy._field468; + _vm->_voy._vocSecondsOffset = _vm->_voy._RTVNum - _vm->_voy._audioVisualStartTime; _vm->_voy.addVideoEventStart(); _vm->_voy._eventFlags &= ~EVTFLAG_TIME_DISABLED; _vm->_voy._eventFlags |= EVTFLAG_RECORDING; @@ -432,10 +432,10 @@ void ThreadResource::parsePlayCommands() { _vm->_eventsManager._videoDead = -1; if (_stateCount == 2 && _vm->_eventsManager._mouseClicked == 0) { - _vm->_voy._field470 = 132; + _vm->_voy._playStampMode = 132; parseIndex = 999; } else { - _vm->_voy._field470 = 129; + _vm->_voy._playStampMode = 129; } } } @@ -456,7 +456,7 @@ void ThreadResource::parsePlayCommands() { } _vm->_voy._vocSecondsOffset = 0; - _vm->_voy._field468 = _vm->_voy._RTVNum; + _vm->_voy._audioVisualStartTime = _vm->_voy._RTVNum; _vm->_voy._eventFlags &= ~(EVTFLAG_TIME_DISABLED | EVTFLAG_RECORDING); _vm->playAVideo(_vm->_audioVideoId); _vm->_voy._eventFlags |= EVTFLAG_TIME_DISABLED; @@ -513,7 +513,7 @@ void ThreadResource::parsePlayCommands() { // if so, load the time information for the new time period v2 = READ_LE_UINT16(dataP); if (v2 == 0 || _vm->_controlPtr->_state->_victimIndex == v2) { - _vm->_voy._field470 = 5; + _vm->_voy._playStampMode = 5; int count = READ_LE_UINT16(dataP + 2); _vm->_voy._RTVLimit = READ_LE_UINT16(dataP + 4); @@ -536,7 +536,7 @@ void ThreadResource::parsePlayCommands() { break; case 6: - _vm->_voy._field470 = 6; + _vm->_voy._playStampMode = 6; v2 = READ_LE_UINT16(dataP); _vm->_playStampGroupId = _vm->_resolvePtr[v2]; dataP += 2; @@ -652,7 +652,7 @@ void ThreadResource::parsePlayCommands() { case 14: _vm->_playStampGroupId = 2048; - _vm->_voy._field470 = 130; + _vm->_voy._playStampMode = 130; break; case 15: @@ -660,11 +660,11 @@ void ThreadResource::parsePlayCommands() { break; case 16: - _vm->_voy._field470 = 16; + _vm->_voy._playStampMode = 16; break; case 17: - _vm->_voy._field470 = 17; + _vm->_voy._playStampMode = 17; break; case 18: @@ -985,7 +985,7 @@ int ThreadResource::doApt() { _vm->_currentVocId = 153; } - if (_vm->_voy._field470 == 16) { + if (_vm->_voy._playStampMode == 16) { hotspots[0].left = 999; hotspots[3].left = 999; _aptPos.x = hotspots[4].left + 28; @@ -1141,7 +1141,7 @@ void ThreadResource::doRoom() { vm._eventsManager.setMousePos(Common::Point(192, 120)); voy._field437E = 0; vm._currentVocId = 146; - voy._field4AC = voy._RTVNum; + voy._musicStartTime = voy._RTVNum; voy._vocSecondsOffset = 0; vm._soundManager.startVOCPlay(vm._currentVocId); @@ -1156,7 +1156,7 @@ void ThreadResource::doRoom() { do { if (vm._currentVocId != -1 && !vm._soundManager.getVOCStatus()) { - voy._field4AC = voy._RTVNum; + voy._musicStartTime = voy._RTVNum; voy._vocSecondsOffset = 0; vm._soundManager.startVOCPlay(vm._currentVocId); } @@ -1213,7 +1213,7 @@ void ThreadResource::doRoom() { _vm->flipPageAndWait(); if (vm._currentVocId != -1) { - voy._vocSecondsOffset = voy._RTVNum - voy._field4AC; + voy._vocSecondsOffset = voy._RTVNum - voy._musicStartTime; vm._soundManager.stopVOCPlay(); } diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp index dae4e41f72..4ce2524ff8 100644 --- a/engines/voyeur/voyeur.cpp +++ b/engines/voyeur/voyeur.cpp @@ -443,7 +443,7 @@ void VoyeurEngine::doOpening() { _voy._vocSecondsOffset = 0; _voy._RTVNum = 0; - _voy._field468 = _voy._RTVNum; + _voy._audioVisualStartTime = _voy._RTVNum; _voy._eventFlags |= EVTFLAG_RECORDING; _gameHour = 4; _gameMinute = 0; @@ -504,7 +504,7 @@ void VoyeurEngine::doOpening() { _eventsManager.delay(5); } - if ((_voy._RTVNum - _voy._field468) < 2) + if ((_voy._RTVNum - _voy._audioVisualStartTime) < 2) _eventsManager.delay(60); _voy._eventFlags |= EVTFLAG_TIME_DISABLED; @@ -628,7 +628,7 @@ void VoyeurEngine::playAudio(int audioId) { (*_graphicsManager._vPort)->setupViewPort(NULL); _voy._eventFlags &= ~EVTFLAG_RECORDING; - _voy._field470 = 129; + _voy._playStampMode = 129; } void VoyeurEngine::doTransitionCard(const Common::String &time, const Common::String &location) { @@ -686,7 +686,7 @@ void VoyeurEngine::flipPageAndWaitForFade() { } void VoyeurEngine::showEndingNews() { - _playStampGroupId = (_voy._field4382 - 1) * 256 + 0x7700; + _playStampGroupId = (_voy._incriminatedVictimNumber - 1) * 256 + 0x7700; _voy._boltGroupId2 = (_controlPtr->_state->_victimIndex - 1) * 256 + 0x7B00; _bVoy->getBoltGroup(_playStampGroupId); diff --git a/engines/voyeur/voyeur_game.cpp b/engines/voyeur/voyeur_game.cpp index c95281e66e..29d1957517 100644 --- a/engines/voyeur/voyeur_game.cpp +++ b/engines/voyeur/voyeur_game.cpp @@ -58,7 +58,7 @@ void VoyeurEngine::playStamp() { bool flag = breakFlag = (_voy._eventFlags & EVTFLAG_2) != 0; - switch (_voy._field470) { + switch (_voy._playStampMode) { case 5: buttonId = _mainThread->doInterface(); @@ -163,7 +163,7 @@ void VoyeurEngine::playStamp() { flag = true; if (buttonId != 4) { - _voy._field470 = 131; + _voy._playStampMode = 131; _voy.checkForKey(); _mainThread->chooseSTAMPButton(buttonId); } else { @@ -478,7 +478,7 @@ void VoyeurEngine::reviewTape() { bool var1E = true; do { if (_currentVocId != -1 && !_soundManager.getVOCStatus()) { - _voy._field4AC = _voy._RTVNum; + _voy._musicStartTime = _voy._RTVNum; _soundManager.startVOCPlay(_currentVocId); } @@ -659,7 +659,7 @@ void VoyeurEngine::reviewTape() { (*_graphicsManager._vPort)->setupViewPort(NULL); if (_currentVocId != -1) { - _voy._vocSecondsOffset = _voy._RTVNum - _voy._field4AC; + _voy._vocSecondsOffset = _voy._RTVNum - _voy._musicStartTime; _soundManager.stopVOCPlay(); } @@ -713,7 +713,7 @@ void VoyeurEngine::reviewTape() { case EVTYPE_EVID: _voy.reviewAnEvidEvent(eventIndex); - _voy._vocSecondsOffset = _voy._RTVNum - _voy._field4AC; + _voy._vocSecondsOffset = _voy._RTVNum - _voy._musicStartTime; _soundManager.stopVOCPlay(); _bVoy->getBoltGroup(0x900); break; @@ -721,7 +721,7 @@ void VoyeurEngine::reviewTape() { case EVTYPE_COMPUTER: _voy.reviewComputerEvent(eventIndex); - _voy._vocSecondsOffset = _voy._RTVNum - _voy._field4AC; + _voy._vocSecondsOffset = _voy._RTVNum - _voy._musicStartTime; _soundManager.stopVOCPlay(); _bVoy->getBoltGroup(0x900); break; @@ -864,7 +864,7 @@ bool VoyeurEngine::checkForMurder() { } bool VoyeurEngine::checkForIncriminate() { - _voy._field4382 = 0; + _voy._incriminatedVictimNumber = 0; for (int idx = 0; idx < _voy._eventCount; ++idx) { VoyeurEvent &evt = _voy._events[idx]; @@ -872,31 +872,31 @@ bool VoyeurEngine::checkForIncriminate() { if (evt._type == EVTYPE_VIDEO) { if (evt._audioVideoId == 44 && evt._computerOn <= 40 && (evt._computerOff + evt._computerOn) >= 70) { - _voy._field4382 = 1; + _voy._incriminatedVictimNumber = 1; } if (evt._audioVideoId == 44 && evt._computerOn <= 79 && (evt._computerOff + evt._computerOn) >= 129) { - _voy._field4382 = 1; + _voy._incriminatedVictimNumber = 1; } if (evt._audioVideoId == 20 && evt._computerOn <= 28 && (evt._computerOff + evt._computerOn) >= 45) { - _voy._field4382 = 2; + _voy._incriminatedVictimNumber = 2; } if (evt._audioVideoId == 35 && evt._computerOn <= 17 && (evt._computerOff + evt._computerOn) >= 36) { - _voy._field4382 = 3; + _voy._incriminatedVictimNumber = 3; } if (evt._audioVideoId == 30 && evt._computerOn <= 80 && (evt._computerOff + evt._computerOn) >= 139) { - _voy._field4382 = 4; + _voy._incriminatedVictimNumber = 4; } } - if (_voy._field4382) { + if (_voy._incriminatedVictimNumber) { _controlPtr->_state->_victimMurderIndex = 88; _voy._videoEventId = idx; return true; @@ -1322,21 +1322,21 @@ void VoyeurEngine::flashTimeBar(){ } void VoyeurEngine::checkPhoneCall() { - if ((_voy._RTVLimit - _voy._RTVNum) >= 36 && _voy._field4B8 < 5 && + if ((_voy._RTVLimit - _voy._RTVNum) >= 36 && _voy._totalPhoneCalls < 5 && _currentVocId <= 151 && _currentVocId > 146) { if ((_voy._switchBGNum < _checkPhoneVal || _checkPhoneVal > 180) && !_soundManager.getVOCStatus()) { int soundIndex; do { soundIndex = getRandomNumber(4); - } while (_voy._field4AE[soundIndex]); + } while (_voy._phoneCallsReceived[soundIndex]); _currentVocId = 154 + soundIndex; _soundManager.stopVOCPlay(); _soundManager.startVOCPlay(_currentVocId); _checkPhoneVal = _voy._switchBGNum; - ++_voy._field4AE[soundIndex]; - ++_voy._field4B8; + ++_voy._phoneCallsReceived[soundIndex]; + ++_voy._totalPhoneCalls; } } } @@ -1346,7 +1346,7 @@ void VoyeurEngine::doEvidDisplay(int evidId, int eventId) { flipPageAndWait(); if (_currentVocId != -1) { - _voy._vocSecondsOffset = _voy._RTVNum - _voy._field4AC; + _voy._vocSecondsOffset = _voy._RTVNum - _voy._musicStartTime; _soundManager.stopVOCPlay(); } -- cgit v1.2.3