diff options
author | Paul Gilbert | 2013-12-05 22:36:59 -0500 |
---|---|---|
committer | Paul Gilbert | 2013-12-05 22:36:59 -0500 |
commit | 9922353f5618a2f3b0371b02cca14707fbdc5a4b (patch) | |
tree | eae2c3d27e5c68871b2b959bde2862926210a7b9 /engines/voyeur | |
parent | 75c960081c1a729c9f356c622ef9b2d9e0911f9d (diff) | |
download | scummvm-rg350-9922353f5618a2f3b0371b02cca14707fbdc5a4b.tar.gz scummvm-rg350-9922353f5618a2f3b0371b02cca14707fbdc5a4b.tar.bz2 scummvm-rg350-9922353f5618a2f3b0371b02cca14707fbdc5a4b.zip |
VOYEUR: Implemented addVideoEventStart and dependent variable initialisation
Diffstat (limited to 'engines/voyeur')
-rw-r--r-- | engines/voyeur/events.cpp | 5 | ||||
-rw-r--r-- | engines/voyeur/events.h | 37 | ||||
-rw-r--r-- | engines/voyeur/graphics.cpp | 2 | ||||
-rw-r--r-- | engines/voyeur/voyeur.cpp | 18 | ||||
-rw-r--r-- | engines/voyeur/voyeur.h | 4 | ||||
-rw-r--r-- | engines/voyeur/voyeur_game.cpp | 9 |
6 files changed, 44 insertions, 31 deletions
diff --git a/engines/voyeur/events.cpp b/engines/voyeur/events.cpp index 2c534b666b..5aa00e77f9 100644 --- a/engines/voyeur/events.cpp +++ b/engines/voyeur/events.cpp @@ -72,6 +72,11 @@ EventsManager::EventsManager(): _intPtr(_gameData), _fadeStatus = 0; _priorFrameTime = g_system->getMillis(); Common::fill(&_keyState[0], &_keyState[256], false); + + _videoComputerNum = 0; + _videoComputerBut1 = 0; + _videoComputerBut4 = 0; + _videoDead = 0; } void EventsManager::resetMouse() { diff --git a/engines/voyeur/events.h b/engines/voyeur/events.h index efc7ac4c47..47a6c5ab3c 100644 --- a/engines/voyeur/events.h +++ b/engines/voyeur/events.h @@ -50,15 +50,13 @@ public: IntNode(uint16 curTime, uint16 timeReset, uint16 flags); }; -class Event { +class VoyeurEvent { public: - int _hours; - int _minutes; - int _seconds; - int _type; - int _data1; - int _data2; - byte *_data; + int _computerNum; + int _computerBut[4]; + int _computerOn; + int _computerOff; + int _dead; }; class SVoy { @@ -98,14 +96,16 @@ public: int _phones[5]; int _numPhonesUsed; int _evidence[20]; - int _computerNum; - int _computerBut; - int _computerOn; - int _computerOff; - int _dead; - int _deadTime; - int _eventCnt; - Event _eventTable[1000]; + VoyeurEvent _events[1000]; + int _field4376; + int _field4378; + int _field437A; + int _field437C; + int _field437E; + int _field4380; + int _field4382; + int _field4384; + byte *_field4386; int _curICF0; int _curICF1; int _fadeICF0; @@ -170,6 +170,11 @@ public: int _fadeFirstCol, _fadeLastCol; int _fadeCount; int _fadeStatus; + + int _videoComputerNum; + int _videoComputerBut1; + int _videoComputerBut4; + int _videoDead; public: EventsManager(); void setVm(VoyeurEngine *vm) { _vm = vm; } diff --git a/engines/voyeur/graphics.cpp b/engines/voyeur/graphics.cpp index dc62336c25..9b9ebe462b 100644 --- a/engines/voyeur/graphics.cpp +++ b/engines/voyeur/graphics.cpp @@ -506,7 +506,7 @@ error("TODO: var22/var24/var2C not initialised before use?"); // loc_27481 destP = (byte *)_screenSurface.getPixels() + screenOffset; for (int yp = 0; yp < height1; ++yp) { - Common::fill(srcP, srcP + width2, onOff); + Common::fill(destP, destP + width2, onOff); destP += width2 + widthDiff2; } } else { diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp index eaae6c8290..72de920680 100644 --- a/engines/voyeur/voyeur.cpp +++ b/engines/voyeur/voyeur.cpp @@ -130,7 +130,7 @@ void VoyeurEngine::globalInitBolt() { Common::fill((byte *)&_voy, (byte *)&_voy + sizeof(SVoy), 0); _voy._eCursorOff[0x74 / 2] = 1; _voy._eCursorOff[0x68 / 2] = 0; - _voy._eventTable[998]._data = NULL; // Original set 63h:63h + _voy._field4376 = NULL; // Original set 63h:63h _voy._evidence[19] = 0; _voy._evidence[17] = 0; _voy._evidence[18] = 9999; @@ -253,8 +253,8 @@ bool VoyeurEngine::doLock() { lock.getSysDate(); lock.getThePassword(); - _voy._eventTable[999]._type = lock.fieldC; - _voy._eventTable[999]._data = _bVoy->memberAddr(0x704); + _voy._field4380 = lock.fieldC; + _voy._field4386 = _bVoy->memberAddr(0x704); Common::String password = lock._password; cursorPic = _bVoy->getPictureResource(0x702); @@ -411,7 +411,7 @@ bool VoyeurEngine::doLock() { lock._password = displayString; lock.saveThePassword(); - _voy._eventTable[999]._data = NULL; + _voy._field4386 = NULL; _bVoy->freeBoltGroup(0x10700); } @@ -479,15 +479,17 @@ void VoyeurEngine::doOpening() { byte *whTable = _bVoy->memberAddr(0x217); int frmaeIndex = 0; int creditShow = 1; - _v2A098 = 1; + _voy._eCursorOff[52] = 0; _voy._RTVNum = 0; _voy._eCursorOff[50] = _voy._RTVNum; - _v2A0A6 = 4; - _v2A0A4 = 0; _voy._eCursorOff[58] = 16; - _v2A09A = -1; + _eventsManager._videoComputerNum = 4; + _eventsManager._videoComputerBut1 = 0; + _eventsManager._videoComputerBut4 = 1; + _eventsManager._videoDead = -1; addVideoEventStart(); + _voy._eCursorOff[58] &= ~1; for (int i = 0; i < 256; ++i) diff --git a/engines/voyeur/voyeur.h b/engines/voyeur/voyeur.h index 9306fb55e5..74bb714e1a 100644 --- a/engines/voyeur/voyeur.h +++ b/engines/voyeur/voyeur.h @@ -66,10 +66,6 @@ private: Common::Array<int> _resolves; FontInfoResource _defaultFontInfo; int _iForceDeath; - int _v2A098; - int _v2A0A6; - int _v2A0A4; - int _v2A09A; void ESP_Init(); void initialiseManagers(); diff --git a/engines/voyeur/voyeur_game.cpp b/engines/voyeur/voyeur_game.cpp index bc7fa6fe20..48c65c5045 100644 --- a/engines/voyeur/voyeur_game.cpp +++ b/engines/voyeur/voyeur_game.cpp @@ -25,10 +25,15 @@ namespace Voyeur { void VoyeurEngine::addVideoEventStart() { - + VoyeurEvent &e = _voy._events[_voy._evidence[19]]; + e._computerNum = _eventsManager._videoComputerNum; + e._computerBut[0] = _eventsManager._videoComputerBut1; + e._computerBut[1] = _voy._delaySecs; + e._computerBut[2] = 1; + e._computerBut[3] = _eventsManager._videoComputerBut4; + e._dead = _eventsManager._videoDead; } - void VoyeurEngine::playStamp() { } |