diff options
author | Filippos Karapetis | 2015-12-13 19:27:34 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2015-12-23 21:34:03 +0100 |
commit | c883769adc7ca1dcf5c2157a6ea09238ead59a56 (patch) | |
tree | 12d06a11d9ccb751cf0ef8e1908816719515c42e | |
parent | 231dda2ba989fb2993d3c82f1dd79be34bba436f (diff) | |
download | scummvm-rg350-c883769adc7ca1dcf5c2157a6ea09238ead59a56.tar.gz scummvm-rg350-c883769adc7ca1dcf5c2157a6ea09238ead59a56.tar.bz2 scummvm-rg350-c883769adc7ca1dcf5c2157a6ea09238ead59a56.zip |
LAB: Move the LAB2 teaser screen in a separate function
-rw-r--r-- | engines/lab/engine.cpp | 41 | ||||
-rw-r--r-- | engines/lab/lab.h | 1 | ||||
-rw-r--r-- | engines/lab/processroom.cpp | 4 |
3 files changed, 24 insertions, 22 deletions
diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp index 748b0ef501..9ae7beb29a 100644 --- a/engines/lab/engine.cpp +++ b/engines/lab/engine.cpp @@ -575,6 +575,26 @@ void LabEngine::mainGameLoop() { } } +void LabEngine::showLab2Teaser() { + _graphics->blackAllScreen(); + _graphics->readPict("P:End/L2In.1", true); + + for (uint16 i = 0; i < 120; i++) { + _music->updateMusic(); + waitTOF(); + } + + _graphics->readPict("P:End/L2In.9", true); + _graphics->readPict("P:End/Lost", true); + + warning("STUB: waitForPress"); + while (!1) { // 1 means ignore SDL_ProcessInput calls + _music->updateMusic(); + _anim->diffNextFrame(); + waitTOF(); + } +} + bool LabEngine::fromCrumbs(uint32 tmpClass, uint16 code, uint16 qualifier, Common::Point tmpPos, uint16 &curInv, IntuiMessage *curMsg, bool &forceDraw, uint16 gadgetId, uint16 &actionMode) { uint32 msgClass = tmpClass; @@ -1099,27 +1119,6 @@ void LabEngine::go() { _event->mouseShow(); mainGameLoop(); - if (_quitLab) { - // Won the game - _graphics->blackAllScreen(); - _graphics->readPict("P:End/L2In.1", true); - - for (uint16 i = 0; i < 120; i++) { - _music->updateMusic(); - waitTOF(); - } - - _graphics->readPict("P:End/L2In.9", true); - _graphics->readPict("P:End/Lost", true); - - warning("STUB: waitForPress"); - while (!1) { // 1 means ignore SDL_ProcessInput calls - _music->updateMusic(); - _anim->diffNextFrame(); - waitTOF(); - } - } - _graphics->closeFont(_msgFont); _graphics->freePict(); diff --git a/engines/lab/lab.h b/engines/lab/lab.h index eb8db5cbb2..7c438c4a6e 100644 --- a/engines/lab/lab.h +++ b/engines/lab/lab.h @@ -234,6 +234,7 @@ private: void loadJournalData(); void loadMapData(); void mainGameLoop(); + void showLab2Teaser(); void mayShowCrumbIndicator(); void mayShowCrumbIndicatorOff(); void perFlipGadget(uint16 gadID); diff --git a/engines/lab/processroom.cpp b/engines/lab/processroom.cpp index bdf1d96b45..7b9e4132c9 100644 --- a/engines/lab/processroom.cpp +++ b/engines/lab/processroom.cpp @@ -481,10 +481,12 @@ void LabEngine::doActions(Action *actionList, CloseDataPtr *closePtrList) { case WINGAME: _quitLab = true; + showLab2Teaser(); break; case LOSTGAME: - _quitLab = true; + // This seems to be unused? + error("Unused opcode LOSTGAME has been called"); break; case RESETBUFFER: |