aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/voyeur/data.cpp2
-rw-r--r--engines/voyeur/data.h5
-rw-r--r--engines/voyeur/events.cpp43
-rw-r--r--engines/voyeur/events.h6
-rw-r--r--engines/voyeur/files_threads.cpp56
-rw-r--r--engines/voyeur/graphics.cpp4
-rw-r--r--engines/voyeur/voyeur.cpp44
-rw-r--r--engines/voyeur/voyeur.h1
-rw-r--r--engines/voyeur/voyeur_game.cpp40
9 files changed, 106 insertions, 95 deletions
diff --git a/engines/voyeur/data.cpp b/engines/voyeur/data.cpp
index e3791d2303..8bcf32fb2f 100644
--- a/engines/voyeur/data.cpp
+++ b/engines/voyeur/data.cpp
@@ -82,7 +82,7 @@ void SVoy::synchronize(Common::Serializer &s) {
s.syncAsSint16LE(_aptLoadMode);
s.syncAsSint16LE(_transitionId);
s.syncAsSint16LE(_RTVLimit);
- s.syncAsSint16LE(_field478);
+ s.syncAsSint16LE(_eventFlags);
s.syncAsSint16LE(_field47A);
s.syncAsSint16LE(_field4AC);
diff --git a/engines/voyeur/data.h b/engines/voyeur/data.h
index bdd583b9c3..8b561e9a29 100644
--- a/engines/voyeur/data.h
+++ b/engines/voyeur/data.h
@@ -34,6 +34,9 @@ namespace Voyeur {
enum VoyeurEventType { EVTYPE_VIDEO = 1, EVTYPE_AUDIO = 2, EVTYPE_EVID = 3,
EVTYPE_COMPUTER = 4 };
+enum EventFlag { EVTFLAG_1 = 1, EVTFLAG_2 = 2, EVTFLAG_8 = 8, EVTFLAG_RECORDING = 0x10,
+ EVTFLAG_40 = 0x40, EVTFLAG_100 = 0x100 };
+
struct VoyeurEvent {
int _hour;
int _minute;
@@ -118,7 +121,7 @@ public:
int _aptLoadMode;
int _transitionId;
int _RTVLimit;
- int _field478;
+ int _eventFlags;
int _field47A;
PictureResource *_evPicPtrs[6];
CMapResource *_evCmPtrs[6];
diff --git a/engines/voyeur/events.cpp b/engines/voyeur/events.cpp
index d79b6a0fed..3fe37ca22b 100644
--- a/engines/voyeur/events.cpp
+++ b/engines/voyeur/events.cpp
@@ -56,7 +56,7 @@ IntData::IntData() {
field24 = 0;
field26 = 0;
field2A = 0;
- field38 = false;
+ _palChanged = false;
field3B = false;
field3D = false;
_palStartIndex = 0;
@@ -73,7 +73,10 @@ EventsManager::EventsManager(): _intPtr(_gameData),
_fadeStatus = 0;
_priorFrameTime = g_system->getMillis();
_gameCounter = 0;
- _joe = 0;
+ _counterFlag = false;
+ _recordBlinkCounter = 0;
+ _cursorBlinked = false;
+
Common::fill(&_keyState[0], &_keyState[256], false);
Common::fill(&_cycleTime[0], &_cycleTime[4], 0);
Common::fill(&_cycleNext[0], &_cycleNext[4], (byte *)nullptr);
@@ -99,7 +102,7 @@ void EventsManager::startMainClockInt() {
}
void EventsManager::mainVoyeurIntFunc() {
- if (!(_vm->_voy._field478 & 1)) {
+ if (!(_vm->_voy._eventFlags & EVTFLAG_1)) {
++_vm->_voy._switchBGNum;
if (_vm->_debugger._isTimeActive) {
@@ -141,7 +144,9 @@ void EventsManager::checkForNextFrameCounter() {
// Check for next game frame
uint32 milli = g_system->getMillis();
if ((milli - _priorFrameTime) >= GAME_FRAME_TIME) {
- ++_gameCounter;
+ _counterFlag = !_counterFlag;
+ if (_counterFlag)
+ ++_gameCounter;
_priorFrameTime = milli;
// Run the timer-based updates
@@ -173,7 +178,7 @@ void EventsManager::voyeurTimer() {
if (--_gameData.field26 <= 0) {
if (_gameData._flipWait) {
- _gameData.field38 = true;
+ _gameData._palChanged = true;
_gameData._flipWait = false;
_gameData.field3B = false;
}
@@ -338,7 +343,7 @@ void EventsManager::startFade(CMapResource *cMap) {
_intPtr._hasPalette = true;
if (!(cMap->_fadeStatus & 2))
- _intPtr.field38 = true;
+ _intPtr._palChanged = true;
}
if (_cycleStatus & 1)
@@ -388,7 +393,7 @@ void EventsManager::vDoFadeInt() {
_intPtr._palEndIndex = _fadeLastCol;
_intPtr._hasPalette = true;
- _intPtr.field38 = true;
+ _intPtr._palChanged = true;
}
void EventsManager::vDoCycleInt() {
@@ -471,7 +476,7 @@ void EventsManager::vDoCycleInt() {
}
_intPtr._hasPalette = true;
- _intPtr.field38 = true;
+ _intPtr._palChanged = true;
}
}
}
@@ -535,18 +540,18 @@ void EventsManager::hideCursor() {
void EventsManager::getMouseInfo() {
pollEvents();
- if (_vm->_voy._field478 & 0x10) {
- if ((_gameCounter - _joe) > 8) {
- _joe = _gameCounter;
+ if (_vm->_voy._eventFlags & EVTFLAG_RECORDING) {
+ if ((_gameCounter - _recordBlinkCounter) > 8) {
+ _recordBlinkCounter = _gameCounter;
- if (_vm->_bob) {
- _vm->_bob = false;
- _vm->_graphicsManager.setOneColor(128, 55, 5, 5);
+ if (_cursorBlinked) {
+ _cursorBlinked = false;
+ _vm->_graphicsManager.setOneColor(128, 220, 20, 20);
_vm->_graphicsManager.setColor(128, 220, 20, 20);
} else {
- _vm->_bob = true;
- _vm->_graphicsManager.setOneColor(128, 55, 55, 55);
- _vm->_graphicsManager.setColor(128, 220, 20, 20);
+ _cursorBlinked = true;
+ _vm->_graphicsManager.setOneColor(128, 220, 220, 220);
+ _vm->_graphicsManager.setColor(128, 220, 220, 220);
}
}
}
@@ -567,10 +572,10 @@ void EventsManager::checkForKey() {
}
void EventsManager::startCursorBlink() {
- if (_vm->_voy._field478 & 0x10) {
+ if (_vm->_voy._eventFlags & EVTFLAG_RECORDING) {
_vm->_graphicsManager.setOneColor(128, 55, 5, 5);
_vm->_graphicsManager.setColor(128, 220, 20, 20);
- _intPtr.field38 = true;
+ _intPtr._palChanged = true;
_intPtr._hasPalette = true;
_vm->_graphicsManager.drawDot();
diff --git a/engines/voyeur/events.h b/engines/voyeur/events.h
index 753139bf35..6e2d297851 100644
--- a/engines/voyeur/events.h
+++ b/engines/voyeur/events.h
@@ -62,7 +62,7 @@ public:
int field26;
int field2A; // CHECKME: Useless variable
bool _hasPalette;
- bool field38; // CHECKME: Useless variable
+ bool _palChanged; // CHECKME: Useless variable
bool field3B; // Skip fading
bool field3D; // CHECKME: Useless variable
int _palStartIndex;
@@ -78,12 +78,14 @@ class EventsManager {
private:
VoyeurEngine *_vm;
uint32 _priorFrameTime;
+ bool _counterFlag;
uint32 _gameCounter;
- uint32 _joe;
+ uint32 _recordBlinkCounter; // Original field was called _joe :)
bool _keyState[256];
int _mouseButton;
Common::List<IntNode *> _intNodes;
Common::Point _mousePos;
+ bool _cursorBlinked;
void mainVoyeurIntFunc();
private:
diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp
index 7955cfdbb6..5ea450e30f 100644
--- a/engines/voyeur/files_threads.cpp
+++ b/engines/voyeur/files_threads.cpp
@@ -341,7 +341,7 @@ void ThreadResource::parsePlayCommands() {
_vm->_voy._field46A = 0;
_vm->_voy._field47A = -1;
_vm->_voy._computerTextId = -1;
- _vm->_voy._field478 &= ~8;
+ _vm->_voy._eventFlags &= ~EVTFLAG_8;
_vm->_eventsManager._videoDead = -1;
// Reset hotspot data
@@ -410,12 +410,12 @@ void ThreadResource::parsePlayCommands() {
} else {
_vm->_voy._vocSecondsOffset = _vm->_voy._RTVNum - _vm->_voy._field468;
_vm->_voy.addVideoEventStart();
- _vm->_voy._field478 &= ~1;
- _vm->_voy._field478 |= 0x10;
+ _vm->_voy._eventFlags &= ~EVTFLAG_1;
+ _vm->_voy._eventFlags |= EVTFLAG_RECORDING;
_vm->playAVideo(_vm->_audioVideoId);
- _vm->_voy._field478 &= ~0x10;
- _vm->_voy._field478 |= 1;
+ _vm->_voy._eventFlags &= ~EVTFLAG_RECORDING;
+ _vm->_voy._eventFlags |= EVTFLAG_1;
_vm->_voy.addVideoEventEnd();
_vm->_eventsManager.incrementTime(1);
@@ -454,9 +454,9 @@ void ThreadResource::parsePlayCommands() {
_vm->_voy._vocSecondsOffset = 0;
_vm->_voy._field468 = _vm->_voy._RTVNum;
- _vm->_voy._field478 &= ~0x11;
+ _vm->_voy._eventFlags &= ~(EVTFLAG_1 | EVTFLAG_RECORDING);
_vm->playAVideo(_vm->_audioVideoId);
- _vm->_voy._field478 |= 1;
+ _vm->_voy._eventFlags |= EVTFLAG_1;
if (id != 22) {
_vm->_audioVideoId = -1;
@@ -515,7 +515,7 @@ void ThreadResource::parsePlayCommands() {
if (_vm->_voy._transitionId != count) {
if (_vm->_voy._transitionId > 1)
- _vm->_voy._field478 &= ~0x100;
+ _vm->_voy._eventFlags &= ~EVTFLAG_100;
_vm->_voy._transitionId = count;
_vm->_gameMinute = LEVEL_M[count - 1];
@@ -610,7 +610,7 @@ void ThreadResource::parsePlayCommands() {
break;
case 11:
- _vm->_voy._field478 |= 2;
+ _vm->_voy._eventFlags |= EVTFLAG_2;
break;
case 12:
@@ -1034,7 +1034,7 @@ int ThreadResource::doApt() {
_vm->_graphicsManager.setColor(131, 215, 215, 215);
_vm->_graphicsManager.setColor(132, 235, 235, 235);
- _vm->_eventsManager._intPtr.field38 = true;
+ _vm->_eventsManager._intPtr._palChanged = true;
_vm->_eventsManager._intPtr._hasPalette = true;
// Main loop to allow users to move the cursor and select hotspots
@@ -1070,7 +1070,7 @@ int ThreadResource::doApt() {
if (hotspotId != prevHotspotId) {
// Check for whether to replace hotspot Id for "Watch TV" for
// "Review the Tape" if player has already watched the TV
- if ((_vm->_voy._field478 & 0x100) && (hotspotId == 2))
+ if ((_vm->_voy._eventFlags & 0x100) && (hotspotId == 2))
hotspotId = 5;
// Draw the text description for the highlighted hotspot
@@ -1161,13 +1161,13 @@ void ThreadResource::doRoom() {
voy._vocSecondsOffset = 0;
vm._soundManager.startVOCPlay(vm._currentVocId);
- voy._field478 &= ~1;
+ voy._eventFlags &= ~EVTFLAG_1;
bool breakFlag = false;
while (!vm.shouldQuit() && !breakFlag) {
_vm->_voyeurArea = AREA_ROOM;
vm._graphicsManager.setColor(128, 0, 255, 0);
- vm._eventsManager._intPtr.field38 = true;
+ vm._eventsManager._intPtr._palChanged = true;
vm._eventsManager._intPtr._hasPalette = true;
do {
@@ -1207,7 +1207,7 @@ void ThreadResource::doRoom() {
vm._eventsManager.setCursor(magnifierCursor);
}
- vm._eventsManager._intPtr.field38 = true;
+ vm._eventsManager._intPtr._palChanged = true;
vm._eventsManager._intPtr._hasPalette = true;
vm._graphicsManager.flipPage();
vm._eventsManager.sWaitFlip();
@@ -1221,7 +1221,7 @@ void ThreadResource::doRoom() {
vm._eventsManager.getMouseInfo();
vm._eventsManager.setMousePos(pt);
} else {
- voy._field478 |= 16;
+ voy._eventFlags |= EVTFLAG_RECORDING;
vm._eventsManager.hideCursor();
vm._eventsManager.startCursorBlink();
@@ -1250,7 +1250,7 @@ void ThreadResource::doRoom() {
vm.doEvidDisplay(hotspotId, 999);
}
- voy._field478 &= ~0x10;
+ voy._eventFlags &= ~EVTFLAG_RECORDING;
if (!vm._eventsManager._mouseClicked)
vm._eventsManager.delayClick(18000);
@@ -1289,12 +1289,12 @@ void ThreadResource::doRoom() {
_vm->flipPageAndWait();
vm._graphicsManager.fadeUpICF1(0);
- voy._field478 &= 0x10;
+ voy._eventFlags &= EVTFLAG_RECORDING;
vm._eventsManager.showCursor();
}
}
- voy._field478 = 1;
+ voy._eventFlags = EVTFLAG_1;
vm._eventsManager.incrementTime(1);
voy._viewBounds = nullptr;
voy._field437E = 0;
@@ -1323,13 +1323,13 @@ int ThreadResource::doInterface() {
PictureResource *pic;
Common::Point pt;
- _vm->_voy._field478 |= 1;
+ _vm->_voy._eventFlags |= EVTFLAG_1;
if (_vm->_voy._field46E) {
_vm->_voy._field46E = false;
return -2;
}
- _vm->_voy._field478 &= ~0x100;
+ _vm->_voy._eventFlags &= ~EVTFLAG_100;
_vm->_playStampGroupId = -1;
_vm->_eventsManager._intPtr.field1E = 1;
_vm->_eventsManager._intPtr.field1A = 0;
@@ -1344,14 +1344,14 @@ int ThreadResource::doInterface() {
_vm->initIFace();
_vm->_voy._RTVNum = _vm->_voy._RTVLimit - 4;
- _vm->_voy._field478 &= ~1;
+ _vm->_voy._eventFlags &= ~EVTFLAG_1;
while (!_vm->shouldQuit() && _vm->_voy._RTVNum < _vm->_voy._RTVLimit) {
_vm->flashTimeBar();
_vm->_eventsManager.delayClick(1);
}
- _vm->_voy._field478 = 1;
+ _vm->_voy._eventFlags |= EVTFLAG_1;
chooseSTAMPButton(20);
parsePlayCommands();
}
@@ -1371,9 +1371,9 @@ int ThreadResource::doInterface() {
_vm->_eventsManager.getMouseInfo();
_vm->_graphicsManager.setColor(240, 220, 220, 220);
- _vm->_eventsManager._intPtr.field38 = true;
+ _vm->_eventsManager._intPtr._palChanged = true;
_vm->_eventsManager._intPtr._hasPalette = true;
- _vm->_voy._field478 &= ~1;
+ _vm->_voy._eventFlags &= ~EVTFLAG_1;
// Set the cusor
PictureResource *crosshairsCursor = _vm->_bVoy->boltEntry(0x112)._picResource;
@@ -1470,7 +1470,7 @@ int ThreadResource::doInterface() {
_vm->flipPageAndWait();
pt = _vm->_eventsManager.getMousePos();
- if ((_vm->_voy._RTVNum >= _vm->_voy._RTVLimit) || ((_vm->_voy._field478 & 0x80) &&
+ if ((_vm->_voy._RTVNum >= _vm->_voy._RTVLimit) || ((_vm->_voy._eventFlags & 0x80) &&
_vm->_eventsManager._rightClick && (pt.x == 0))) {
// Time to transition to the next time period
_vm->_eventsManager.getMouseInfo();
@@ -1482,7 +1482,7 @@ int ThreadResource::doInterface() {
_vm->checkTransition();
_vm->_eventsManager._leftClick = true;
} else {
- _vm->_voy._field478 = 1;
+ _vm->_voy._eventFlags |= EVTFLAG_1;
chooseSTAMPButton(20);
parsePlayCommands();
@@ -1494,7 +1494,7 @@ int ThreadResource::doInterface() {
hotspots = &_vm->_bVoy->boltEntry(_vm->_playStampGroupId + 1)._rectResource->_entries;
_vm->_eventsManager.getMouseInfo();
- _vm->_voy._field478 &= ~2;
+ _vm->_voy._eventFlags &= ~2;
_vm->_eventsManager._intPtr.field1E = 1;
_vm->_eventsManager._intPtr.field1A = 0;
}
@@ -1503,7 +1503,7 @@ int ThreadResource::doInterface() {
(!_vm->_eventsManager._leftClick || regionIndex == -1));
_vm->_eventsManager.hideCursor();
- _vm->_voy._field478 |= 1;
+ _vm->_voy._eventFlags |= EVTFLAG_1;
_vm->_bVoy->freeBoltGroup(_vm->_playStampGroupId);
if (_vm->_currentVocId != -1)
_vm->_soundManager.stopVOCPlay();
diff --git a/engines/voyeur/graphics.cpp b/engines/voyeur/graphics.cpp
index ebe8a5034b..bf73822c52 100644
--- a/engines/voyeur/graphics.cpp
+++ b/engines/voyeur/graphics.cpp
@@ -959,7 +959,7 @@ void GraphicsManager::resetPalette() {
for (int i = 0; i < 256; ++i)
setColor(i, 0, 0, 0);
- _vm->_eventsManager._intPtr.field38 = true;
+ _vm->_eventsManager._intPtr._palChanged = true;
_vm->_eventsManager._intPtr._hasPalette = true;
}
@@ -989,7 +989,7 @@ void GraphicsManager::setColors(int start, int count, const byte *pal) {
}
}
- _vm->_eventsManager._intPtr.field38 = true;
+ _vm->_eventsManager._intPtr._palChanged = true;
_vm->_eventsManager._intPtr._hasPalette = true;
}
diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp
index 4d3f235d82..9f941bc1ac 100644
--- a/engines/voyeur/voyeur.cpp
+++ b/engines/voyeur/voyeur.cpp
@@ -42,7 +42,6 @@ VoyeurEngine::VoyeurEngine(OSystem *syst, const VoyeurGameDescription *gameDesc)
_bVoy = NULL;
_iForceDeath = -1;
_controlPtr = NULL;
- _bob = false;
_stampFlags = 0;
_playStampGroupId = _currentVocId = 0;
_audioVideoId = -1;
@@ -70,7 +69,7 @@ Common::Error VoyeurEngine::run() {
_eventsManager.resetMouse();
if (doHeadTitle()) {
if (_iForceDeath >= 1 && _iForceDeath <= 4)
- _voy._field478 |= 0x80;
+ _voy._eventFlags |= 0x80;
playStamp();
if (!shouldQuit())
@@ -118,11 +117,11 @@ void VoyeurEngine::globalInitBolt() {
assert(_graphicsManager._fontPtr->_curFont);
// Setup default flags
- _voy._field478 = 1;
+ _voy._eventFlags = EVTFLAG_1;
_voy._field4376 = _voy._field4378 = 127;
_voy._field4F2 = 9999;
_voy._aptLoadMode = -1;
- _voy._field478 = 256;
+ _voy._eventFlags |= EVTFLAG_100;
_voy._curICF0 = _graphicsManager._palFlag ? 0xFFFFA5E0 : 0x5F90;
_eventsManager.addFadeInt();
@@ -179,7 +178,7 @@ bool VoyeurEngine::doHeadTitle() {
_eventsManager._mouseClicked = false;
}
*/
- if (_voy._field478 & 0x80) {
+ if (_voy._eventFlags & 0x80) {
// Add initial game event set
if (_voy._eventCount <= 1)
_voy.addEvent(18, 1, EVTYPE_VIDEO, 33, 0, 998, -1);
@@ -275,7 +274,7 @@ bool VoyeurEngine::doLock() {
_eventsManager.setCursor(cursorPic);
_eventsManager.showCursor();
- _eventsManager._intPtr. field38 = true;
+ _eventsManager._intPtr. _palChanged = true;
_eventsManager._intPtr._hasPalette = true;
_graphicsManager._fontPtr->_curFont = _bVoy->boltEntry(0x708)._fontResource;
@@ -326,7 +325,7 @@ bool VoyeurEngine::doLock() {
}
_eventsManager.setCursorColor(127, (key == -1) ? 0 : 1);
- _eventsManager._intPtr.field38 = true;
+ _eventsManager._intPtr._palChanged = true;
_eventsManager._intPtr._hasPalette = true;
_eventsManager.delay(1);
@@ -457,19 +456,19 @@ void VoyeurEngine::doOpening() {
_voy._vocSecondsOffset = 0;
_voy._RTVNum = 0;
_voy._field468 = _voy._RTVNum;
- _voy._field478 = 16;
+ _voy._eventFlags = 16;
_gameHour = 4;
_gameMinute = 0;
_audioVideoId = 1;
_eventsManager._videoDead = -1;
_voy.addVideoEventStart();
- _voy._field478 &= ~1;
+ _voy._eventFlags &= ~EVTFLAG_1;
for (int i = 0; i < 256; ++i)
_graphicsManager.setColor(i, 8, 8, 8);
- _eventsManager._intPtr.field38 = 1;
+ _eventsManager._intPtr._palChanged = true;
_eventsManager._intPtr._hasPalette = true;
(*_graphicsManager._vPort)->setupViewPort();
flipPageAndWait();
@@ -499,9 +498,9 @@ void VoyeurEngine::doOpening() {
if ((_voy._RTVNum - _voy._field468) < 2)
_eventsManager.delay(60);
- _voy._field478 |= 1;
+ _voy._eventFlags |= EVTFLAG_1;
_voy.addVideoEventEnd();
- _voy._field478 &= 0x10;
+ _voy._eventFlags &= EVTFLAG_RECORDING;
_bVoy->freeBoltGroup(0x200);
}
@@ -553,6 +552,9 @@ void VoyeurEngine::playAVideoDuration(int videoId, int duration) {
int endFrame = decoder.getCurFrame() + totalFrames;
_eventsManager.getMouseInfo();
+ if (!_voy._fadeICF0)
+ _eventsManager.startCursorBlink();
+
while (!shouldQuit() && !decoder.endOfVideo() && !_eventsManager._mouseClicked &&
(decoder.getCurFrame() < endFrame)) {
if (decoder.needsUpdate()) {
@@ -560,6 +562,7 @@ void VoyeurEngine::playAVideoDuration(int videoId, int duration) {
Common::copy((const byte *)frame->getPixels(), (const byte *)frame->getPixels() + 320 * 200,
(byte *)_graphicsManager._screenSurface.getPixels());
+ _graphicsManager.drawDot();
}
if (decoder.hasDirtyPalette()) {
@@ -574,14 +577,14 @@ void VoyeurEngine::playAVideoDuration(int videoId, int duration) {
// RL2 finished
_graphicsManager.screenReset();
- _voy._field478 &= ~0x10;
+ _voy._eventFlags &= ~EVTFLAG_RECORDING;
- if (_voy._field478 & 8) {
+ if (_voy._eventFlags & EVTFLAG_8) {
assert(pic);
byte *imgData = (*_graphicsManager._vPort)->_currentPic->_imgData;
(*_graphicsManager._vPort)->_currentPic->_imgData = pic->_imgData;
pic->_imgData = imgData;
- _voy._field478 &= ~8;
+ _voy._eventFlags &= ~EVTFLAG_8;
}
}
@@ -596,32 +599,32 @@ void VoyeurEngine::playAudio(int audioId) {
_graphicsManager._backColors->startFade();
flipPageAndWaitForFade();
- _voy._field478 &= ~1;
+ _voy._eventFlags &= ~EVTFLAG_1;
_soundManager.setVOCOffset(_voy._vocSecondsOffset);
Common::String filename = _soundManager.getVOCFileName(
audioId + 159);
_soundManager.startVOCPlay(filename);
- _voy._field478 |= 16;
+ _voy._eventFlags |= EVTFLAG_RECORDING;
_eventsManager.startCursorBlink();
while (!shouldQuit() && !_eventsManager._mouseClicked &&
_soundManager.getVOCStatus())
_eventsManager.delayClick(1);
- _voy._field478 |= 1;
+ _voy._eventFlags |= EVTFLAG_1;
_soundManager.stopVOCPlay();
_bVoy->freeBoltGroup(0x7F00);
(*_graphicsManager._vPort)->setupViewPort(NULL);
- _voy._field478 &= ~0x10;
+ _voy._eventFlags &= ~EVTFLAG_RECORDING;
_voy._field470 = 129;
}
void VoyeurEngine::doTransitionCard(const Common::String &time, const Common::String &location) {
_graphicsManager.setColor(128, 16, 16, 16);
_graphicsManager.setColor(224, 220, 220, 220);
- _eventsManager._intPtr.field38 = true;
+ _eventsManager._intPtr._palChanged = true;
_eventsManager._intPtr._hasPalette = true;
(*_graphicsManager._vPort)->setupViewPort(NULL);
@@ -761,7 +764,6 @@ Common::Error VoyeurEngine::saveGameState(int slot, const Common::String &desc)
void VoyeurEngine::synchronize(Common::Serializer &s) {
s.syncAsSint16LE(_glGoScene);
s.syncAsSint16LE(_glGoStack);
- s.syncAsSint16LE(_bob);
s.syncAsSint16LE(_stampFlags);
s.syncAsSint16LE(_playStampGroupId);
s.syncAsSint16LE(_currentVocId);
diff --git a/engines/voyeur/voyeur.h b/engines/voyeur/voyeur.h
index a79ec5b93d..907ebcf07f 100644
--- a/engines/voyeur/voyeur.h
+++ b/engines/voyeur/voyeur.h
@@ -172,7 +172,6 @@ public:
BoltGroup *_stackGroupPtr;
int _glGoScene;
int _glGoStack;
- bool _bob;
int _stampFlags;
int _playStampGroupId;
int _currentVocId;
diff --git a/engines/voyeur/voyeur_game.cpp b/engines/voyeur/voyeur_game.cpp
index a95355e8e0..425686952e 100644
--- a/engines/voyeur/voyeur_game.cpp
+++ b/engines/voyeur/voyeur_game.cpp
@@ -53,7 +53,7 @@ void VoyeurEngine::playStamp() {
_mainThread->parsePlayCommands();
- bool flag = breakFlag = (_voy._field478 & 2) != 0;
+ bool flag = breakFlag = (_voy._eventFlags & EVTFLAG_2) != 0;
switch (_voy._field470) {
case 5:
@@ -65,19 +65,19 @@ void VoyeurEngine::playStamp() {
_voy._aptLoadMode = 140;
break;
case 1:
- _voy._field478 &= ~1;
+ _voy._eventFlags &= ~EVTFLAG_1;
_voy._field46E = true;
_mainThread->chooseSTAMPButton(22);
_voy._aptLoadMode = 143;
break;
case 2:
- _voy._field478 &= ~1;
+ _voy._eventFlags &= ~EVTFLAG_1;
reviewTape();
_voy._field46E = true;
_voy._aptLoadMode = 142;
break;
case 3:
- _voy._field478 &= ~1;
+ _voy._eventFlags &= ~EVTFLAG_1;
_mainThread->chooseSTAMPButton(21);
break;
case 4:
@@ -87,7 +87,7 @@ void VoyeurEngine::playStamp() {
doGossip();
_voy._field46E = true;
_voy._aptLoadMode = 141;
- _voy._field478 &= ~0x100;
+ _voy._eventFlags &= ~EVTFLAG_100;
break;
default:
break;
@@ -133,7 +133,7 @@ void VoyeurEngine::playStamp() {
if (_voy._videoEventId != -1) {
playAVideoEvent(_voy._videoEventId);
- _voy._field478 &= ~0x10;
+ _voy._eventFlags &= ~EVTFLAG_RECORDING;
}
_mainThread->chooseSTAMPButton(0);
@@ -279,7 +279,7 @@ void VoyeurEngine::doClosingCredits() {
(*_graphicsManager._vPort)->setupViewPort(NULL);
_graphicsManager.setColor(1, 180, 180, 180);
_graphicsManager.setColor(2, 200, 200, 200);
- _eventsManager._intPtr.field38 = true;
+ _eventsManager._intPtr._palChanged = true;
_eventsManager._intPtr._hasPalette = true;
_graphicsManager._fontPtr->_curFont = _bVoy->boltEntry(0x402)._fontResource;
@@ -383,7 +383,7 @@ void VoyeurEngine::doPiracy() {
_graphicsManager.screenReset();
_graphicsManager.setColor(1, 0, 0, 0);
_graphicsManager.setColor(2, 255, 255, 255);
- _eventsManager._intPtr.field38 = true;
+ _eventsManager._intPtr._palChanged = true;
_eventsManager._intPtr._hasPalette = true;
(*_graphicsManager._vPort)->setupViewPort(NULL);
(*_graphicsManager._vPort)->fillPic(1);
@@ -453,7 +453,7 @@ void VoyeurEngine::reviewTape() {
_graphicsManager.setColor(12, 120, 248, 120);
_eventsManager.setCursorColor(128, 1);
- _eventsManager._intPtr.field38 = true;
+ _eventsManager._intPtr._palChanged = true;
_eventsManager._intPtr._hasPalette = true;
_graphicsManager._fontPtr->_curFont = _bVoy->boltEntry(0x909)._fontResource;
_graphicsManager._fontPtr->_fontSaveBack = false;
@@ -574,17 +574,17 @@ void VoyeurEngine::reviewTape() {
_eventsManager.getMouseInfo();
foundIndex = -1;
}
- } else if ((_voy._field478 & 0x40) && _voy._viewBounds->left == pt.x &&
+ } else if ((_voy._eventFlags & EVTFLAG_40) && _voy._viewBounds->left == pt.x &&
_voy._viewBounds->bottom == pt.y) {
foundIndex = 999;
- } else if ((_voy._field478 & 0x40) && _voy._viewBounds->left == pt.x &&
+ } else if ((_voy._eventFlags & EVTFLAG_40) && _voy._viewBounds->left == pt.x &&
_voy._viewBounds->top == pt.y) {
foundIndex = 998;
} else {
_eventsManager.setCursorColor(128, (foundIndex == -1) ? 0 : 1);
}
- _eventsManager._intPtr.field38 = true;
+ _eventsManager._intPtr._palChanged = true;
_eventsManager._intPtr._hasPalette = true;
if (_eventsManager._mouseClicked || _eventsManager._mouseUnk) {
@@ -635,7 +635,7 @@ void VoyeurEngine::reviewTape() {
pt = _eventsManager.getMousePos();
if (_eventsManager._mouseClicked && _voy._viewBounds->left == pt.x &&
- (_voy._field478 & 0x40) && _eventsManager._rightClick) {
+ (_voy._eventFlags & EVTFLAG_40) && _eventsManager._rightClick) {
WRITE_LE_UINT32(_controlPtr->_ptr + 4, (pt.y / 60) + 1);
foundIndex = -1;
_eventsManager._rightClick = 0;
@@ -683,7 +683,7 @@ void VoyeurEngine::reviewTape() {
_eventsManager._intPtr.field1E = 1;
_eventsManager._intPtr.field1A = 0;
- _voy._field478 &= ~1;
+ _voy._eventFlags &= ~EVTFLAG_1;
// Play suond for the given duration
_soundManager.setVOCOffset(_voy._vocSecondsOffset);
@@ -697,7 +697,7 @@ void VoyeurEngine::reviewTape() {
_eventsManager.delay(10);
}
- _voy._field478 |= 1;
+ _voy._eventFlags |= EVTFLAG_1;
_soundManager.stopVOCPlay();
_bVoy->freeBoltGroup(0x7F00);
break;
@@ -902,11 +902,11 @@ void VoyeurEngine::playAVideoEvent(int eventIndex) {
_audioVideoId = evt._audioVideoId;
_voy._vocSecondsOffset = evt._computerOn;
_eventsManager._videoDead = evt._dead;
- _voy._field478 &= ~1;
+ _voy._eventFlags &= ~EVTFLAG_1;
playAVideoDuration(_audioVideoId, evt._computerOff);
- _voy._field478 |= 1;
+ _voy._eventFlags |= EVTFLAG_1;
if (_eventsManager._videoDead != -1) {
_bVoy->freeBoltGroup(0xE00);
_eventsManager._videoDead = -1;
@@ -1023,7 +1023,7 @@ void VoyeurEngine::makeViewFinder() {
_graphicsManager.setColor(243, 105, 105, 105);
_graphicsManager.setColor(palOffset + 241, 219, 235, 235);
- _eventsManager._intPtr.field38 = true;
+ _eventsManager._intPtr._palChanged = true;
_eventsManager._intPtr._hasPalette = true;
}
@@ -1283,7 +1283,7 @@ void VoyeurEngine::doTimeBar(bool force) {
(*_graphicsManager._vPort)->sFillBox(6, fullHeight - 92);
if (height > 0) {
_graphicsManager.setColor(215, 238, 238, 238);
- _eventsManager._intPtr.field38 = true;
+ _eventsManager._intPtr._palChanged = true;
_eventsManager._intPtr._hasPalette = true;
_graphicsManager._drawPtr->_penColor = 215;
@@ -1305,7 +1305,7 @@ void VoyeurEngine::flashTimeBar(){
else
_graphicsManager.setColor(240, 220, 220, 220);
- _eventsManager._intPtr.field38 = true;
+ _eventsManager._intPtr._palChanged = true;
_eventsManager._intPtr._hasPalette = true;
_flashTimeFlag = !_flashTimeFlag;
}