[Scummvm-cvs-logs] scummvm master -> f93facaf45ba4eedb9f443c18c90892e06d9889b
eriktorbjorn
eriktorbjorn at telia.com
Fri Jan 4 02:31:40 CET 2013
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
e0b75c59ea TOLTECS: Remove unnecessary calls to quitGame()
f93facaf45 TOLTECS: Make aborting movies more reliable
Commit: e0b75c59ea62e309f537f1000f9289ef91b40d22
https://github.com/scummvm/scummvm/commit/e0b75c59ea62e309f537f1000f9289ef91b40d22
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2013-01-03T17:12:21-08:00
Commit Message:
TOLTECS: Remove unnecessary calls to quitGame()
Calling quitGame() simply creates a new quit event. There's no
need to do that when catching a quit event.
Changed paths:
engines/toltecs/movie.cpp
engines/toltecs/toltecs.cpp
diff --git a/engines/toltecs/movie.cpp b/engines/toltecs/movie.cpp
index 6930383..576890f 100644
--- a/engines/toltecs/movie.cpp
+++ b/engines/toltecs/movie.cpp
@@ -279,7 +279,6 @@ bool MoviePlayer::handleInput() {
case Common::EVENT_RBUTTONDOWN:
return false;
case Common::EVENT_QUIT:
- _vm->quitGame();
return false;
default:
break;
diff --git a/engines/toltecs/toltecs.cpp b/engines/toltecs/toltecs.cpp
index 86b2474..0e71bd8 100644
--- a/engines/toltecs/toltecs.cpp
+++ b/engines/toltecs/toltecs.cpp
@@ -354,9 +354,6 @@ void ToltecsEngine::updateInput() {
case Common::EVENT_KEYUP:
_keyState.reset();
break;
- case Common::EVENT_QUIT:
- quitGame();
- break;
case Common::EVENT_MOUSEMOVE:
_mouseX = event.mouse.x;
_mouseY = event.mouse.y;
Commit: f93facaf45ba4eedb9f443c18c90892e06d9889b
https://github.com/scummvm/scummvm/commit/f93facaf45ba4eedb9f443c18c90892e06d9889b
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2013-01-03T17:27:56-08:00
Commit Message:
TOLTECS: Make aborting movies more reliable
Before, the main updateInput() might swallow attempts at aborting
movies. Now all events are handled by the movie player's own
handleInput(). As a side effect, it's no longer necessary to check
if a movie is playing before removing subtitles when pressing space.
Changed paths:
engines/toltecs/movie.cpp
engines/toltecs/toltecs.cpp
diff --git a/engines/toltecs/movie.cpp b/engines/toltecs/movie.cpp
index 576890f..45711ad 100644
--- a/engines/toltecs/movie.cpp
+++ b/engines/toltecs/movie.cpp
@@ -100,8 +100,9 @@ void MoviePlayer::playMovie(uint resIndex) {
byte *chunkBuffer = NULL;
uint32 chunkBufferSize = 0;
uint32 frame = 0;
+ bool abortMovie = false;
- while (_chunkCount--) {
+ while (_chunkCount-- && !abortMovie) {
byte chunkType = _vm->_arc->readByte();
uint32 chunkSize = _vm->_arc->readUint32LE();
@@ -137,7 +138,8 @@ void MoviePlayer::playMovie(uint resIndex) {
if (_vm->_screen->_shakeActive && _vm->_screen->updateShakeScreen()) {
_vm->_screen->_fullRefresh = true;
}
- _vm->updateInput();
+ if (!handleInput())
+ abortMovie = true;
_vm->drawScreen();
// Note: drawScreen() calls delayMillis()
}
@@ -181,7 +183,7 @@ void MoviePlayer::playMovie(uint resIndex) {
}
if (!handleInput())
- break;
+ abortMovie = true;
}
delete[] chunkBuffer;
@@ -274,6 +276,10 @@ bool MoviePlayer::handleInput() {
case Common::EVENT_KEYDOWN:
if (event.kbd.keycode == Common::KEYCODE_ESCAPE)
return false;
+ if (event.kbd.keycode == Common::KEYCODE_F10) {
+ // TODO: The original would bring up a stripped down
+ // main menu dialog, without the save/restore options.
+ }
break;
case Common::EVENT_LBUTTONDOWN:
case Common::EVENT_RBUTTONDOWN:
diff --git a/engines/toltecs/toltecs.cpp b/engines/toltecs/toltecs.cpp
index 0e71bd8..f6a2dfe 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 (!_moviePlayer->isPlaying() && _screen->getTalkTextDuration() > 0) {
+ if (_screen->getTalkTextDuration() > 0) {
_sound->stopSpeech();
_screen->finishTalkTextItems();
_keyState.reset(); // event consumed
More information about the Scummvm-git-logs
mailing list