aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2002-10-08 00:29:32 +0000
committerMax Horn2002-10-08 00:29:32 +0000
commitb409ef66089dbc8d42c97c6721ace798b3a1feab (patch)
tree2d22e45d76b4f18c3256b1f12b662f6a82659d03 /scumm
parentbbc3ed3e8f5cd85f6e34f414533e0bc50a662155 (diff)
downloadscummvm-rg350-b409ef66089dbc8d42c97c6721ace798b3a1feab.tar.gz
scummvm-rg350-b409ef66089dbc8d42c97c6721ace798b3a1feab.tar.bz2
scummvm-rg350-b409ef66089dbc8d42c97c6721ace798b3a1feab.zip
allow user to load savegames while Smush movies are playing; cleanup
svn-id: r5106
Diffstat (limited to 'scumm')
-rw-r--r--scumm/scumm.h4
-rw-r--r--scumm/scummvm.cpp12
-rw-r--r--scumm/smush/scumm_renderer.cpp10
3 files changed, 14 insertions, 12 deletions
diff --git a/scumm/scumm.h b/scumm/scumm.h
index 720aeb7b92..33c973aa8a 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -381,8 +381,8 @@ public:
/* _insane vars */
int _insaneFlag;
- int _insaneState;
- int videoFinished;
+ bool _insaneState;
+ bool _videoFinished;
void scummInit();
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index 259387ca00..54f36e8ba4 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -417,7 +417,7 @@ int Scumm::scummLoop(int delta)
tempMusic = 0;
_vars[VAR_MUSIC_FLAG]++;
} else {
- tempMusic ++;
+ tempMusic++;
}
}
@@ -1054,7 +1054,7 @@ void Scumm::processKbd()
if (_lastKeyHit == _vars[VAR_CUTSCENEEXIT_KEY]) {
if (_insaneState) {
- videoFinished = 1;
+ _videoFinished = true;
} else
exitCutscene();
} else if (_lastKeyHit == saveloadkey && _currentRoom != 0) {
@@ -1071,23 +1071,23 @@ void Scumm::processKbd()
if (_sound->_sfxMode & 2)
stopTalk();
return;
- } else if (_lastKeyHit == '[') { // [, eg volume down
+ } else if (_lastKeyHit == '[') { // [ volume down
_sound->_sound_volume_master-=5;
if (_sound->_sound_volume_master < 0)
_sound->_sound_volume_master = 0;
_imuse->set_master_volume(_sound->_sound_volume_master);
- } else if (_lastKeyHit == ']') { // ], eg volume down
+ } else if (_lastKeyHit == ']') { // ] volume down
_sound->_sound_volume_master+=5;
if (_sound->_sound_volume_master > 128)
_sound->_sound_volume_master = 128;
_imuse->set_master_volume(_sound->_sound_volume_master);
- } else if (_lastKeyHit == '-') { // -, eg text speed down
+ } else if (_lastKeyHit == '-') { // - text speed down
_defaultTalkDelay+=5;
if (_defaultTalkDelay > 90)
_defaultTalkDelay = 90;
_vars[VAR_CHARINC] = _defaultTalkDelay / 20;
- } else if (_lastKeyHit == '+') { // +, eg text speed up
+ } else if (_lastKeyHit == '+') { // + text speed up
_defaultTalkDelay-=5;
if (_defaultTalkDelay < 5)
_defaultTalkDelay = 5;
diff --git a/scumm/smush/scumm_renderer.cpp b/scumm/smush/scumm_renderer.cpp
index 9b2ec30426..729032a66e 100644
--- a/scumm/smush/scumm_renderer.cpp
+++ b/scumm/smush/scumm_renderer.cpp
@@ -29,6 +29,7 @@
#include "scumm/sound.h"
#include "scumm/actor.h"
+
class ScummMixer : public Mixer {
private:
SoundMixer * _mixer; //!< pointer to the SoundMixer instance
@@ -216,7 +217,7 @@ Mixer * ScummRenderer::getMixer() {
}
ScummRenderer::~ScummRenderer() {
- _scumm->_insaneState = 0;
+ _scumm->_insaneState = false;
_scumm->exitCutscene();
if(_smixer) {
_scumm->_timer->releaseProcedure(&smush_handler);
@@ -240,8 +241,8 @@ bool ScummRenderer::wait(int32 ms) {
bool ScummRenderer::startDecode(const char * fname, int32 version, int32 nbframes) {
_scumm->_sound->pauseBundleMusic(true);
- _scumm->videoFinished = 0;
- _scumm->_insaneState = 1;
+ _scumm->_videoFinished = false;
+ _scumm->_insaneState = true;
return true;
}
@@ -274,7 +275,8 @@ void ScummRenderer::save(int32 frame) {
bool ScummRenderer::prematureClose() {
- return _scumm->videoFinished ? true : false;
+ return _scumm->_videoFinished || _scumm->_saveLoadFlag;
+
}
bool ScummRenderer::update() {