diff options
| author | Paul Gilbert | 2014-02-01 11:29:49 -0500 | 
|---|---|---|
| committer | Paul Gilbert | 2014-02-01 11:29:49 -0500 | 
| commit | 37402e06e5f55896f3bd8a7bf8a62bca16d1c7b1 (patch) | |
| tree | fcdfd9db64311e56b06b72f41eb09e7373753983 | |
| parent | cbebf203d673d68112b9bcee5dea8bee0b755a70 (diff) | |
| download | scummvm-rg350-37402e06e5f55896f3bd8a7bf8a62bca16d1c7b1.tar.gz scummvm-rg350-37402e06e5f55896f3bd8a7bf8a62bca16d1c7b1.tar.bz2 scummvm-rg350-37402e06e5f55896f3bd8a7bf8a62bca16d1c7b1.zip | |
VOYEUR: Correct mistake in debugger command.. it's time expired, not remaining
| -rw-r--r-- | engines/voyeur/debugger.cpp | 4 | ||||
| -rw-r--r-- | engines/voyeur/files_threads.cpp | 30 | ||||
| -rw-r--r-- | engines/voyeur/voyeur.cpp | 34 | ||||
| -rw-r--r-- | engines/voyeur/voyeur.h | 18 | 
4 files changed, 56 insertions, 30 deletions
| diff --git a/engines/voyeur/debugger.cpp b/engines/voyeur/debugger.cpp index d114e83af2..546691b3f0 100644 --- a/engines/voyeur/debugger.cpp +++ b/engines/voyeur/debugger.cpp @@ -57,10 +57,10 @@ bool Debugger::Cmd_Time(int argc, const char **argv) {  			DebugPrintf("Time is now off\n\n");  		} else if (!strcmp(argv[1], "val")) {  			if (argc < 3) { -				DebugPrintf("Time remaining is currently %d.\n", _vm->_voy._RTVNum); +				DebugPrintf("Time expired is currently %d.\n", _vm->_voy._RTVNum);  			} else {  				_vm->_voy._RTVNum = atoi(argv[2]); -				DebugPrintf("Time remaining is now %d.\n", _vm->_voy._RTVNum); +				DebugPrintf("Time expired is now %d.\n", _vm->_voy._RTVNum);  			}  		} else {  			int timeId = atoi(argv[1]); diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp index 03e393936a..3e2fa6f7bc 100644 --- a/engines/voyeur/files_threads.cpp +++ b/engines/voyeur/files_threads.cpp @@ -384,39 +384,13 @@ void ThreadResource::parsePlayCommands() {  					_vm->_voy._vocSecondsOffset = _vm->_voy._RTVNum - _vm->_voy._field468;  					_vm->_voy.addAudioEventStart(); +					// Play the audio  					assert(_vm->_audioVideoId < 38); -					_vm->_bVoy->getBoltGroup(0x7F00); -					_vm->_graphicsManager._backgroundPage = _vm->_bVoy->boltEntry( -						0x7F00 + BLIND_TABLE[_vm->_audioVideoId])._picResource; -					_vm->_graphicsManager._backColors = _vm->_bVoy->boltEntry(0x7F01 +  -						BLIND_TABLE[_vm->_audioVideoId])._cMapResource; - -					(*_vm->_graphicsManager._vPort)->setupViewPort(); -					_vm->_graphicsManager._backColors->startFade(); -					_vm->flipPageAndWaitForFade(); +					_vm->playAudio(_vm->_audioVideoId); -					_vm->_voy._field478 &= ~1; -					_vm->_soundManager.setVOCOffset(_vm->_voy._vocSecondsOffset); -					Common::String filename = _vm->_soundManager.getVOCFileName( -						_vm->_audioVideoId + 159); -					_vm->_soundManager.startVOCPlay(filename); -					_vm->_voy._field478 |= 16; -					_vm->_eventsManager.startCursorBlink(); - -					while (!_vm->shouldQuit() && !_vm->_eventsManager._mouseClicked &&  -							_vm->_soundManager.getVOCStatus()) -						_vm->_eventsManager.delayClick(1); - -					_vm->_voy._field478 |= 1; -					_vm->_soundManager.stopVOCPlay();  					_vm->_voy.addAudioEventEnd();  					_vm->_eventsManager.incrementTime(1);  					_vm->_eventsManager.incrementTime(1); - -					_vm->_bVoy->freeBoltGroup(0x7F00); -					_vm->_voy._field478 &= ~0x10; -					_vm->_audioVideoId = -1; -					_vm->_voy._field470 = 129;  					parseIndex = 999;  				}				  			}  diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp index cfd05765b3..932a38e60d 100644 --- a/engines/voyeur/voyeur.cpp +++ b/engines/voyeur/voyeur.cpp @@ -594,6 +594,40 @@ void VoyeurEngine::playAVideoDuration(int videoId, int duration) {  	}  } +void VoyeurEngine::playAudio(int audioId) { +	_bVoy->getBoltGroup(0x7F00); +	_graphicsManager._backgroundPage = _bVoy->boltEntry(0x7F00 +  +		BLIND_TABLE[audioId])._picResource; +	_graphicsManager._backColors = _bVoy->boltEntry(0x7F01 +  +		BLIND_TABLE[audioId])._cMapResource; + +	(*_graphicsManager._vPort)->setupViewPort(); +	_graphicsManager._backColors->startFade(); +	flipPageAndWaitForFade(); + +	_voy._field478 &= ~1; +	_soundManager.setVOCOffset(_voy._vocSecondsOffset); +	Common::String filename = _soundManager.getVOCFileName( +		audioId + 159); +	_soundManager.startVOCPlay(filename); +	_voy._field478 |= 16; +	_eventsManager.startCursorBlink(); + +	while (!shouldQuit() && !_eventsManager._mouseClicked &&  +			_soundManager.getVOCStatus()) +		_eventsManager.delayClick(1); + +	_voy._field478 |= 1; +	_soundManager.stopVOCPlay(); + +	_bVoy->freeBoltGroup(0x7F00); +	flipPageAndWait(); + +	_voy._field478 &= ~0x10; +	audioId = -1; +	_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); diff --git a/engines/voyeur/voyeur.h b/engines/voyeur/voyeur.h index 5d729fd757..e4b950d90f 100644 --- a/engines/voyeur/voyeur.h +++ b/engines/voyeur/voyeur.h @@ -137,6 +137,9 @@ private:  	 */  	bool checkForIncriminate(); +	/** +	 * Plays a video event previously witnessed +	 */  	void playAVideoEvent(int eventIndex);  	/** @@ -212,10 +215,25 @@ public:  	void playRL2Video(const Common::String &filename);  	void doTransitionCard(const Common::String &time, const Common::String &location); + +	/** +	 * Play a given video +	 */  	void playAVideo(int videoId); + +	/** +	 * Play a given video for a given amount of time. This is particularly used +	 * for later tape playback, where it will only play back as much of the video +	 * as the user originally watched (since they can break out of watching a video). +	 */  	void playAVideoDuration(int videoId, int duration);  	/** +	 * Play an audio sequence +	 */ +	void playAudio(int audioId); + +	/**  	 * Saves the last time the game was played  	 */  	void saveLastInplay(); | 
