diff options
-rw-r--r-- | scumm/scumm.h | 17 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 11 | ||||
-rw-r--r-- | scumm/smush/smush_player.cpp | 4 |
3 files changed, 13 insertions, 19 deletions
diff --git a/scumm/scumm.h b/scumm/scumm.h index c2fba44076..b9a746963d 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -340,7 +340,7 @@ public: // Event handling void parseEvents(); void waitForTimer(int msec_delay); - void processKbd(); + void processKbd(bool smushMode); void clearClickedStatus(); // Misc utility functions @@ -355,7 +355,6 @@ public: /* _insane vars */ int _smushFrameRate; - bool _insaneState; bool _videoFinished; bool _smushPaused; @@ -954,10 +953,6 @@ protected: int _drawObjectQueNr; byte _drawObjectQue[200]; - byte _palManipStart, _palManipEnd; - uint16 _palManipCounter; - byte *_palManipPalette; - byte *_palManipIntermediatePal; /* For each of the 410 screen strips, gfxUsageBits contains a * bitmask. The lower 80 bits each correspond to one actor and @@ -990,6 +985,11 @@ protected: int _palDirtyMin, _palDirtyMax; + byte _palManipStart, _palManipEnd; + uint16 _palManipCounter; + byte *_palManipPalette; + byte *_palManipIntermediatePal; + byte _haveMsg; bool _useTalkAnims; uint16 _defaultTalkDelay; @@ -1044,18 +1044,15 @@ protected: /* String class */ public: CharsetRenderer *_charset; -protected: - byte _charsetColor; -public: byte _charsetColorMap[16]; protected: + byte _charsetColor; byte _charsetData[15][16]; int _charsetBufPos; byte _charsetBuffer[512]; protected: - void initCharset(int charset); void CHARSET_1(); diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 648e68c8f8..aca3ebb05e 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -319,7 +319,6 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS memset(&res, 0, sizeof(res)); memset(&vm, 0, sizeof(vm)); _smushFrameRate = 0; - _insaneState = false; _videoFinished = false; _smushPaused = false; _quit = false; @@ -1342,7 +1341,7 @@ int ScummEngine::scummLoop(int delta) { if (_version <= 3) CHARSET_1(); - processKbd(); + processKbd(false); if (_features & GF_NEW_CAMERA) { VAR(VAR_CAMERA_POS_X) = camera._cur.x; @@ -1724,7 +1723,7 @@ void ScummEngine::clearClickedStatus() { _rightBtnPressed &= ~msClicked; } -void ScummEngine::processKbd() { +void ScummEngine::processKbd(bool smushMode) { int saveloadkey; _lastKeyHit = _keyPressed; @@ -1837,7 +1836,7 @@ void ScummEngine::processKbd() { if (_lastKeyHit == KEY_ALL_SKIP) { // Skip cutscene - if (_insaneState) { + if (smushMode) { // Eek this is literally shouting for trouble... // Probably should set _lastKey to VAR_CUTSCENEEXIT_KEY instead! _videoFinished = true; @@ -1880,13 +1879,13 @@ void ScummEngine::processKbd() { // Skip cutscene (or active SMUSH video). For the V2 games, which // normally use F4 for this, we add in a hack that makes escape work, // too (just for convenience). - if (_insaneState) { + if (smushMode) { if (_gameId == GID_FT) _insane->escapeKeyHandler(); else _videoFinished = true; } - if (!_insaneState || _videoFinished) + if (!smushMode || _videoFinished) abortCutscene(); if (_version <= 2) { // Ensure that the input script also sees the key press. diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp index fdb3b901ce..91a8672bf6 100644 --- a/scumm/smush/smush_player.cpp +++ b/scumm/smush/smush_player.cpp @@ -247,7 +247,6 @@ void SmushPlayer::init() { _frame = 0; _vm->_videoFinished = false; - _vm->_insaneState = true; _smixer = new SmushMixer(_vm->_mixer); @@ -286,7 +285,6 @@ void SmushPlayer::deinit() { _vm->_mixer->stopHandle(_IACTchannel); - _vm->_insaneState = false; _vm->_fullRedraw = true; } @@ -998,7 +996,7 @@ void SmushPlayer::play(const char *filename, const char *directory) { while (true) { _vm->parseEvents(); - _vm->processKbd(); + _vm->processKbd(true); if (_updateNeeded) { uint32 end_time, start_time; |