diff options
author | Joost Peters | 2003-04-29 20:42:47 +0000 |
---|---|---|
committer | Joost Peters | 2003-04-29 20:42:47 +0000 |
commit | 27bacb86cc7a0d7fcbb6eec606c249a263a7650d (patch) | |
tree | 3e21da9ff14113e748fcff2f67d9c33dc51c5ab7 | |
parent | 849178c46296791cf58bbfe6e4751a1624bd5059 (diff) | |
download | scummvm-rg350-27bacb86cc7a0d7fcbb6eec606c249a263a7650d.tar.gz scummvm-rg350-27bacb86cc7a0d7fcbb6eec606c249a263a7650d.tar.bz2 scummvm-rg350-27bacb86cc7a0d7fcbb6eec606c249a263a7650d.zip |
added hack-ish intro ESCape key code
svn-id: r7205
-rw-r--r-- | sky/cd_intro.cpp | 5 | ||||
-rw-r--r-- | sky/intro.cpp | 11 | ||||
-rw-r--r-- | sky/sky.cpp | 3 |
3 files changed, 13 insertions, 6 deletions
diff --git a/sky/cd_intro.cpp b/sky/cd_intro.cpp index 7f94afb936..03e690c7bc 100644 --- a/sky/cd_intro.cpp +++ b/sky/cd_intro.cpp @@ -194,8 +194,9 @@ #define START_BG ( _skySound->playBgSound(bgVocBuffer, bgVocSize) ) #define LOAD_NEW_VOICE(num) ( free (vocBuffer), vocBuffer = _skyDisk->loadFile(num, NULL), loadedVocSize = _skyDisk->_lastLoadedFileSize ) #define LOAD_NEW_BG(num) ( free (bgVocBuffer), bgVocBuffer = _skyDisk->loadFile(num, NULL), bgVocSize = _skyDisk->_lastLoadedFileSize ) -#define WAIT_VOICE while (_skySound->_voiceHandle != 0) { delay(50); } -#define WAIT_SEQUENCE while (_tseqFrames != 0) { delay(50); } +#define WAIT_VOICE while (_skySound->_voiceHandle != 0) { delay(50); CHECK_ESC } +#define WAIT_SEQUENCE while (_tseqFrames != 0) { delay(50); CHECK_ESC } +#define CHECK_ESC if (_key_pressed == 27) { _tseqFrames = 0; return; } #define WAIT_RELATIVE(x) ( delay(20 * (x)) ) #define COPY_SCREEN ( memcpy(_workScreen, workScreen2, GAME_SCREEN_WIDTH * GAME_SCREEN_HEIGHT) ) diff --git a/sky/intro.cpp b/sky/intro.cpp index b11c0aa5c9..71e6566085 100644 --- a/sky/intro.cpp +++ b/sky/intro.cpp @@ -25,7 +25,8 @@ #include "sky/skydefs.h" #include "sky/sky.h" -#define WAIT_SEQUENCE while (_tseqFrames != 0) { checkCommands(commandPtr); delay(50); } +#define WAIT_SEQUENCE while (_tseqFrames != 0) { checkCommands(commandPtr); delay(50); CHECK_ESC } +#define CHECK_ESC if (_key_pressed == 27) { _tseqFrames = 0; return; } #define INTRO_TEXT_WIDTH 128 @@ -209,11 +210,13 @@ void SkyState::intro(void) { _skyMusic->loadSectionMusic(0); delay(3000); //keep virgin screen up for 3 seconds - + CHECK_ESC + if (!isCDVersion(_gameVersion)) _skyMusic->startMusic(1); delay(3000); //and another 3 seconds. + CHECK_ESC fnFadeDown(0); //remove virgin screen showScreen(); paletteFadeUp(_tempPal); @@ -230,7 +233,8 @@ void SkyState::intro(void) { _skyText->getText(77); delay(8000); // keep revolution up for 8 seconds - + CHECK_ESC + fnFadeDown(0); showScreen(); paletteFadeUp(_tempPal); @@ -248,6 +252,7 @@ void SkyState::intro(void) { //keep gibbo up for 2 seconds delay(2000); + CHECK_ESC fnFadeDown(0); showScreen(); paletteFadeUp(_tempPal); diff --git a/sky/sky.cpp b/sky/sky.cpp index 762a7b5943..f5aa44700c 100644 --- a/sky/sky.cpp +++ b/sky/sky.cpp @@ -156,7 +156,8 @@ void SkyState::delay(uint amount) { //copied and mutilated from Simon.cpp uint32 start = _system->get_msecs(); uint32 cur = start; - + _key_pressed = 0; //reset + _rnd.getRandomNumber(2); do { |