From 966065269574f258d6106e2a48f23b6d5cf6da9a Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Tue, 10 Dec 2013 20:47:05 -0500 Subject: VOYEUR: More of parsePlayCommands implemented --- engines/voyeur/events.cpp | 4 ++++ engines/voyeur/events.h | 1 + engines/voyeur/files.cpp | 29 +++++++++++++++++++++++++++-- engines/voyeur/files.h | 1 + engines/voyeur/voyeur.cpp | 4 ++++ engines/voyeur/voyeur.h | 1 + 6 files changed, 38 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/voyeur/events.cpp b/engines/voyeur/events.cpp index 67471ad1b8..6dbd7de4a5 100644 --- a/engines/voyeur/events.cpp +++ b/engines/voyeur/events.cpp @@ -450,4 +450,8 @@ void EventsManager::startCursorBlink() { error("TODO: startCursorBlink"); } +void EventsManager::incrementTime(int amt) { + error("TODO: incrementTime"); +} + } // End of namespace Voyeur diff --git a/engines/voyeur/events.h b/engines/voyeur/events.h index 62ae6fd079..5c33beec61 100644 --- a/engines/voyeur/events.h +++ b/engines/voyeur/events.h @@ -215,6 +215,7 @@ public: void getMouseInfo(); void checkForKey(); void startCursorBlink(); + void incrementTime(int amt); }; } // End of namespace Voyeur diff --git a/engines/voyeur/files.cpp b/engines/voyeur/files.cpp index c8db3395f4..4f2cfbf6c3 100644 --- a/engines/voyeur/files.cpp +++ b/engines/voyeur/files.cpp @@ -1555,11 +1555,12 @@ void ThreadResource::parsePlayCommands() { uint16 id = GET_WORD; switch (id) { - case 0: + case 1: _vm->_playStamp2 = READ_LE_UINT16(dataP); dataP += 2; break; - case 1: + + case 2: v2 = GET_WORD; if (v2 == 0 || READ_LE_UINT16(_vm->_controlPtr->_ptr + 4) == 0) { _vm->_eventsManager._videoComputerBut4 = READ_LE_UINT16(dataP); @@ -1616,6 +1617,26 @@ void ThreadResource::parsePlayCommands() { dataP += 6; break; + + case 3: + break; + + case 4: + case 22: + _vm->_eventsManager._videoComputerBut4 = READ_LE_UINT16(dataP) - 1; + dataP += 2; + + // TODO: Original had a block here that would never be executed + + _vm->_voy._vocSecondsOffset = 0; + _vm->_voy._field468 = _vm->_voy._RTVNum; + _vm->_voy._field478 &= ~0x11; + _vm->playAVideo(_vm->_eventsManager._videoComputerBut4); + _vm->_voy._field478 |= 1; + _vm->_eventsManager._videoComputerBut4 = -1; + parseIndex = 999; + break; + default: break; } @@ -1645,6 +1666,10 @@ void ThreadResource::addAudioEventStart() { _vm->_eventsManager._videoDead)); } +void ThreadResource::addAudioEventEnd() { + error("TODO: addAudioEventEnd"); +} + /*------------------------------------------------------------------------*/ PtrResource::PtrResource(BoltFilesState &state, const byte *src) { diff --git a/engines/voyeur/files.h b/engines/voyeur/files.h index 12791cb8c0..4dc95fd7e7 100644 --- a/engines/voyeur/files.h +++ b/engines/voyeur/files.h @@ -431,6 +431,7 @@ private: const byte *getNextRecord(const byte *p); void cardAction(const byte *p); void addAudioEventStart(); + void addAudioEventEnd(); public: VoyeurEngine *_vm; diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp index 184026a044..6409bbbc0f 100644 --- a/engines/voyeur/voyeur.cpp +++ b/engines/voyeur/voyeur.cpp @@ -590,4 +590,8 @@ void VoyeurEngine::doTransitionCard(const Common::String &time, const Common::St _eventsManager.sWaitFlip(); } +void VoyeurEngine::playAVideo(int id) { + warning("TODO: playAVideo"); +} + } // End of namespace Voyeur diff --git a/engines/voyeur/voyeur.h b/engines/voyeur/voyeur.h index 9edabbf687..2619a5115d 100644 --- a/engines/voyeur/voyeur.h +++ b/engines/voyeur/voyeur.h @@ -136,6 +136,7 @@ public: void playRL2Video(const Common::String &filename); void doTransitionCard(const Common::String &time, const Common::String &location); + void playAVideo(int id); }; } // End of namespace Voyeur -- cgit v1.2.3