diff options
author | Max Horn | 2004-06-27 21:06:04 +0000 |
---|---|---|
committer | Max Horn | 2004-06-27 21:06:04 +0000 |
commit | 4b2d86392473184211a41e2fdc8a5d8188a4e636 (patch) | |
tree | 83ef50c52d5b78755dca74d4b63a69fcd0efcc90 /scumm | |
parent | c026a0a5e18d1d4089b5f6e42bfde90b73feb2e1 (diff) | |
download | scummvm-rg350-4b2d86392473184211a41e2fdc8a5d8188a4e636.tar.gz scummvm-rg350-4b2d86392473184211a41e2fdc8a5d8188a4e636.tar.bz2 scummvm-rg350-4b2d86392473184211a41e2fdc8a5d8188a4e636.zip |
Renamed/documented some odd smush/insane vars
svn-id: r14085
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/insane/insane.cpp | 2 | ||||
-rw-r--r-- | scumm/intern.h | 3 | ||||
-rw-r--r-- | scumm/script_v6.cpp | 2 | ||||
-rw-r--r-- | scumm/scumm.cpp | 9 | ||||
-rw-r--r-- | scumm/scumm.h | 16 | ||||
-rw-r--r-- | scumm/smush/smush_player.cpp | 8 |
6 files changed, 25 insertions, 15 deletions
diff --git a/scumm/insane/insane.cpp b/scumm/insane/insane.cpp index 49603e9342..7135f846d8 100644 --- a/scumm/insane/insane.cpp +++ b/scumm/insane/insane.cpp @@ -755,7 +755,7 @@ int32 Insane::idx2Tweak(void) { void Insane::smush_setToFinish(void) { debugC(DEBUG_INSANE, "Video is set to finish"); - _vm->_videoFinished = 1; + _vm->_smushVideoShouldFinish = true; } // smlayer_stopSound diff --git a/scumm/intern.h b/scumm/intern.h index 4137def1a7..3b502e6fa2 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -329,6 +329,9 @@ protected: // HE v7.0+ games Win32ResExtractor *_Win32ResExtractor; + + int _smushFrameRate; + public: ScummEngine_v6(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs); diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index 46e9d2077b..b15d726512 100644 --- a/scumm/script_v6.cpp +++ b/scumm/script_v6.cpp @@ -2519,7 +2519,7 @@ void ScummEngine_v6::o6_kernelSetFunctions() { ? 232 : 233; _insaneRunning = true; - _insane->setSmushParams(speed); + _insane->setSmushParams(speed); _insane->runScene(insaneVarNum); _insaneRunning = false; } diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index 3f9aaeedd4..ef575d38ef 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -363,8 +363,7 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS _sound = NULL; memset(&res, 0, sizeof(res)); memset(&vm, 0, sizeof(vm)); - _smushFrameRate = 0; - _videoFinished = false; + _smushVideoShouldFinish = false; _smushPaused = false; _insaneRunning = false; _quit = false; @@ -917,6 +916,8 @@ ScummEngine_v6::ScummEngine_v6(GameDetector *detector, OSystem *syst, const Scum } else { _Win32ResExtractor = 0; } + + _smushFrameRate = 0; } void ScummEngine::go() { @@ -1933,9 +1934,9 @@ void ScummEngine::processKbd(bool smushMode) { if (_gameId == GID_FT) _insane->escapeKeyHandler(); else - _videoFinished = true; + _smushVideoShouldFinish = true; } - if (!smushMode || _videoFinished) + if (!smushMode || _smushVideoShouldFinish) abortCutscene(); if (_version <= 2) { // Ensure that the input script also sees the key press. diff --git a/scumm/scumm.h b/scumm/scumm.h index 42597009f1..d43504a3e6 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -394,12 +394,20 @@ public: void animateCursor(); void updatePalette(); - /* _insane vars */ - int _smushFrameRate; - bool _videoFinished; + /** + * Flag which signals that the SMUSH video playback should end now + * (e.g. because it was aborted by the user or it's simply finished). + */ + bool _smushVideoShouldFinish; + /** This flag is a hack to allow the pause dialog to pause SMUSH playback, too. */ bool _smushPaused; + /** This flag tells IMuseDigital that INSANE is running. */ bool _insaneRunning; +protected: + Insane *_insane; + +public: void pauseGame(); void restart(); void shutDown(); @@ -1036,8 +1044,6 @@ protected: bool _demoMode; bool _confirmExit; - Insane *_insane; - public: uint16 _extraBoxFlags[65]; diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp index 052e34ac55..a0dddb6aa0 100644 --- a/scumm/smush/smush_player.cpp +++ b/scumm/smush/smush_player.cpp @@ -251,7 +251,7 @@ SmushPlayer::~SmushPlayer() { void SmushPlayer::init() { _frame = 0; _alreadyInit = false; - _vm->_videoFinished = false; + _vm->_smushVideoShouldFinish = false; _vm->setDirtyColors(0, 255); _dst = _vm->virtscr[0].screenPtr + _vm->virtscr[0].xstart; _smixer = new SmushMixer(_vm->_mixer); @@ -261,7 +261,7 @@ void SmushPlayer::init() { void SmushPlayer::release() { _vm->_timer->removeTimerProc(&timerCallback); - _vm->_videoFinished = true; + _vm->_smushVideoShouldFinish = true; for (int i = 0; i < 5; i++) { if (_sf[i]) { @@ -968,7 +968,7 @@ void SmushPlayer::parseNextFrame() { return; if (_base->eof()) { - _vm->_videoFinished = true; + _vm->_smushVideoShouldFinish = true; return; } @@ -1155,7 +1155,7 @@ void SmushPlayer::play(const char *filename, const char *directory, int32 offset debug(4, "Smush stats: BackendUpdateScreen( %03d )", end_time - start_time); } - if (_vm->_videoFinished || _vm->_quit || _vm->_saveLoadFlag) + if (_vm->_smushVideoShouldFinish || _vm->_quit || _vm->_saveLoadFlag) break; _vm->_system->delay_msecs(10); }; |