[Scummvm-cvs-logs] scummvm master -> ad36fb3366a68f6e49f00063371ca0ab6e02b929

eriktorbjorn eriktorbjorn at telia.com
Wed Jan 2 22:19:18 CET 2013


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
ad36fb3366 TOLTECS: Don't allow dialog skipping while movies are playing


Commit: ad36fb3366a68f6e49f00063371ca0ab6e02b929
    https://github.com/scummvm/scummvm/commit/ad36fb3366a68f6e49f00063371ca0ab6e02b929
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2013-01-02T13:18:09-08:00

Commit Message:
TOLTECS: Don't allow dialog skipping while movies are playing

Changed paths:
    engines/toltecs/movie.cpp
    engines/toltecs/movie.h
    engines/toltecs/toltecs.cpp



diff --git a/engines/toltecs/movie.cpp b/engines/toltecs/movie.cpp
index 35accb5..6930383 100644
--- a/engines/toltecs/movie.cpp
+++ b/engines/toltecs/movie.cpp
@@ -45,7 +45,7 @@ enum ChunkTypes {
 	kChunkStopSubtitles = 8
 };
 
-MoviePlayer::MoviePlayer(ToltecsEngine *vm) : _vm(vm) {
+MoviePlayer::MoviePlayer(ToltecsEngine *vm) : _vm(vm), _isPlaying(false) {
 }
 
 MoviePlayer::~MoviePlayer() {
@@ -62,6 +62,7 @@ void MoviePlayer::playMovie(uint resIndex) {
 	int16 savedGuiHeight = _vm->_guiHeight;
 	byte moviePalette[768];
 
+	_isPlaying = true;
 	_vm->_isSaveAllowed = false;
 
 	memset(moviePalette, 0, sizeof(moviePalette));
@@ -200,6 +201,7 @@ void MoviePlayer::playMovie(uint resIndex) {
 	_vm->_guiHeight = savedGuiHeight;
 
 	_vm->_isSaveAllowed = true;
+	_isPlaying = false;
 }
 
 void MoviePlayer::fetchAudioChunks() {
diff --git a/engines/toltecs/movie.h b/engines/toltecs/movie.h
index 8fa4897..c1ed6d7 100644
--- a/engines/toltecs/movie.h
+++ b/engines/toltecs/movie.h
@@ -37,11 +37,15 @@ public:
 
 	void playMovie(uint resIndex);
 
+	bool isPlaying() { return _isPlaying; }
+
 protected:
 	ToltecsEngine *_vm;
 	Audio::QueuingAudioStream *_audioStream;
 	Audio::SoundHandle _audioStreamHandle;
 
+	bool _isPlaying;
+
 	uint32 _chunkCount, _frameCount, _lastPrefetchOfs;
 	uint32 _soundChunkFramesLeft, _framesPerSoundChunk;
 
diff --git a/engines/toltecs/toltecs.cpp b/engines/toltecs/toltecs.cpp
index 6d8a5eb..86b2474 100644
--- a/engines/toltecs/toltecs.cpp
+++ b/engines/toltecs/toltecs.cpp
@@ -340,7 +340,7 @@ void ToltecsEngine::updateInput() {
 				break;
 			case Common::KEYCODE_SPACE:
 				// Skip current dialog line, if a dialog is active
-				if (_screen->getTalkTextDuration() > 0) {
+				if (!_moviePlayer->isPlaying() && _screen->getTalkTextDuration() > 0) {
 					_sound->stopSpeech();
 					_screen->finishTalkTextItems();
 					_keyState.reset();	// event consumed






More information about the Scummvm-git-logs mailing list