aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorChristopher Page2008-08-05 02:11:00 +0000
committerChristopher Page2008-08-05 02:11:00 +0000
commit0725f7ec932311987a936d11cefd4ce50f5fc49e (patch)
tree07dafb514f4580c0bf0088e2813aaa5177a55464 /engines/kyra
parent4198ee962399305a4a158b1f43224c00e2e04a1b (diff)
downloadscummvm-rg350-0725f7ec932311987a936d11cefd4ce50f5fc49e.tar.gz
scummvm-rg350-0725f7ec932311987a936d11cefd4ce50f5fc49e.tar.bz2
scummvm-rg350-0725f7ec932311987a936d11cefd4ce50f5fc49e.zip
Made changes to keep KYRA and PARA compatible with RTL/GMM
svn-id: r33628
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/lol.cpp36
1 files changed, 16 insertions, 20 deletions
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp
index ef1121baa0..148b7daf4d 100644
--- a/engines/kyra/lol.cpp
+++ b/engines/kyra/lol.cpp
@@ -180,15 +180,11 @@ void LoLEngine::updateInput() {
while (_eventMan->pollEvent(event)) {
switch (event.type) {
- case Common::EVENT_QUIT:
- _quitFlag = true;
- break;
-
case Common::EVENT_KEYDOWN:
if (event.kbd.keycode == '.' || event.kbd.keycode == Common::KEYCODE_ESCAPE)
_eventList.push_back(Event(event, true));
else if (event.kbd.keycode == 'q' && event.kbd.flags == Common::KBD_CTRL)
- _quitFlag = true;
+ quitGame();
else
_eventList.push_back(event);
break;
@@ -301,7 +297,7 @@ void LoLEngine::showIntro() {
_screen->hideMouse();
uint32 palNextFadeStep = 0;
- while (!_tim->finished() && !_quitFlag && !skipFlag()) {
+ while (!_tim->finished() && !quit() && !skipFlag()) {
updateInput();
_tim->exec(intro, false);
_screen->checkedPageUpdate(8, 4);
@@ -379,14 +375,14 @@ int LoLEngine::chooseCharacter() {
_screen->fadePalette(_screen->getPalette(0), 30, 0);
bool kingIntro = true;
- while (!_quitFlag) {
+ while (!quit()) {
if (kingIntro)
kingSelectionIntro();
if (_charSelection < 0)
processCharacterSelection();
- if (_quitFlag)
+ if (quit())
break;
if (_charSelection == 100) {
@@ -407,11 +403,11 @@ int LoLEngine::chooseCharacter() {
}
}
- if (_quitFlag)
+ if (quit())
return -1;
uint32 waitTime = _system->getMillis() + 420 * _tickLength;
- while (waitTime > _system->getMillis() && !skipFlag() && !_quitFlag) {
+ while (waitTime > _system->getMillis() && !skipFlag() && !quit()) {
updateInput();
_system->delayMillis(10);
}
@@ -443,7 +439,7 @@ void LoLEngine::kingSelectionIntro() {
_chargenWSA->setDrawPage(0);
int index = 4;
- while (_sound->voiceIsPlaying("KING01") && _charSelection == -1 && !_quitFlag && !skipFlag()) {
+ while (_sound->voiceIsPlaying("KING01") && _charSelection == -1 && !quit() && !skipFlag()) {
index = MAX(index, 4);
_chargenWSA->displayFrame(_chargenFrameTable[index], 0, 0, 0);
@@ -454,7 +450,7 @@ void LoLEngine::kingSelectionIntro() {
_screen->updateScreen();
uint32 waitEnd = _system->getMillis() + 7 * _tickLength;
- while (waitEnd > _system->getMillis() && _charSelection == -1 && !_quitFlag && !skipFlag()) {
+ while (waitEnd > _system->getMillis() && _charSelection == -1 && !quit() && !skipFlag()) {
_charSelection = getCharSelection();
_system->delayMillis(10);
}
@@ -485,7 +481,7 @@ void LoLEngine::kingSelectionReminder() {
_chargenWSA->setDrawPage(0);
int index = 0;
- while (_sound->voiceIsPlaying("KING02") && _charSelection == -1 && !_quitFlag && index < 15) {
+ while (_sound->voiceIsPlaying("KING02") && _charSelection == -1 && !quit() && index < 15) {
_chargenWSA->displayFrame(_chargenFrameTable[index+9], 0, 0, 0);
_screen->copyRegion(_selectionPosTable[_reminderChar1IdxTable[index]*2+0], _selectionPosTable[_reminderChar1IdxTable[index]*2+1], _charPreviews[0].x, _charPreviews[0].y, 32, 32, 4, 0);
_screen->copyRegion(_selectionPosTable[_reminderChar2IdxTable[index]*2+0], _selectionPosTable[_reminderChar2IdxTable[index]*2+1], _charPreviews[1].x, _charPreviews[1].y, 32, 32, 4, 0);
@@ -494,7 +490,7 @@ void LoLEngine::kingSelectionReminder() {
_screen->updateScreen();
uint32 waitEnd = _system->getMillis() + 8 * _tickLength;
- while (waitEnd > _system->getMillis() && !_quitFlag) {
+ while (waitEnd > _system->getMillis() && !quit()) {
_charSelection = getCharSelection();
_system->delayMillis(10);
}
@@ -515,14 +511,14 @@ void LoLEngine::kingSelectionOutro() {
_chargenWSA->setDrawPage(0);
int index = 0;
- while (_sound->voiceIsPlaying("KING03") && !_quitFlag && !skipFlag()) {
+ while (_sound->voiceIsPlaying("KING03") && !quit() && !skipFlag()) {
index = MAX(index, 4);
_chargenWSA->displayFrame(_chargenFrameTable[index], 0, 0, 0);
_screen->updateScreen();
uint32 waitEnd = _system->getMillis() + 8 * _tickLength;
- while (waitEnd > _system->getMillis() && !_quitFlag && !skipFlag()) {
+ while (waitEnd > _system->getMillis() && !quit() && !skipFlag()) {
updateInput();
_system->delayMillis(10);
}
@@ -541,10 +537,10 @@ void LoLEngine::processCharacterSelection() {
debugC(9, kDebugLevelMain, "LoLEngine::processCharacterSelection()");
_charSelection = -1;
- while (!_quitFlag && _charSelection == -1) {
+ while (!quit() && _charSelection == -1) {
uint32 nextKingMessage = _system->getMillis() + 900 * _tickLength;
- while (nextKingMessage > _system->getMillis() && _charSelection == -1 && !_quitFlag) {
+ while (nextKingMessage > _system->getMillis() && _charSelection == -1 && !quit()) {
updateSelectionAnims();
_charSelection = getCharSelection();
_system->delayMillis(10);
@@ -663,12 +659,12 @@ void LoLEngine::selectionCharInfoIntro(char *file) {
int index = 0;
file[4] = '0';
- while (_charSelectionInfoResult == -1 && !_quitFlag) {
+ while (_charSelectionInfoResult == -1 && !quit()) {
if (!_sound->voicePlay(file))
break;
int i = 0;
- while (_sound->voiceIsPlaying(file) && _charSelectionInfoResult == -1 && !_quitFlag) {
+ while (_sound->voiceIsPlaying(file) && _charSelectionInfoResult == -1 && !quit()) {
_screen->drawShape(0, _screen->getPtrToShape(_screen->getCPagePtr(9), _charInfoFrameTable[i]), 11, 130, 0, 0);
_screen->updateScreen();