added hack-ish intro ESCape key code

svn-id: r7205
This commit is contained in:
Joost Peters 2003-04-29 20:42:47 +00:00
parent 849178c462
commit 27bacb86cc
3 changed files with 13 additions and 6 deletions

View File

@ -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) )

View File

@ -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);

View File

@ -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 {