diff options
Diffstat (limited to 'engines/drascula')
-rw-r--r-- | engines/drascula/animation.cpp | 49 | ||||
-rw-r--r-- | engines/drascula/drascula.h | 1 | ||||
-rw-r--r-- | engines/drascula/interface.cpp | 2 |
3 files changed, 32 insertions, 20 deletions
diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index c4a8d3eb01..43799f7944 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -748,6 +748,19 @@ void DrasculaEngine::animation_14_2() { loadPic(99, backSurface); } +void DrasculaEngine::asco() { + loadPic(roomDisk, drawSurface3); + loadPic(roomNumber, bgSurface, HALF_PAL); + black(); + updateRoom(); + updateScreen(); + fadeFromBlack(0); + if (roomMusic != 0) + playMusic(roomMusic); + else + stopMusic(); +} + // The drunk tells us about Von Braun void DrasculaEngine::animation_16_2() { debug(4, "animation_16_2()"); @@ -763,8 +776,10 @@ void DrasculaEngine::animation_16_2() { else playMusic(32); - if (getScan() != 0) - goto asco; + if (getScan() != 0) { + asco(); + return; + } color_abc(kColorDarkGreen); @@ -778,16 +793,20 @@ void DrasculaEngine::animation_16_2() { centerText(_texthis[i], 180, 180); updateScreen(); - if (getScan() != 0) - goto asco; + if (getScan() != 0) { + asco(); + return; + } delay(3000); if (i < 4) { fadeToBlack(1); - if (getScan() != 0) - goto asco; + if (getScan() != 0) { + asco(); + return; + } clearRoom(); } @@ -800,25 +819,17 @@ void DrasculaEngine::animation_16_2() { copyBackground(0, 0, 0, l, 320, 200 - l, drawSurface3, screenSurface); copyBackground(0, 200 - l, 0, 0, 320, l, bgSurface, screenSurface); updateScreen(); - if (getScan() != 0) - goto asco; + if (getScan() != 0) { + asco(); + return; + } } pause(5); fadeToBlack(2); clearRoom(); -asco: - loadPic(roomDisk, drawSurface3); - loadPic(roomNumber, bgSurface, HALF_PAL); - black(); - updateRoom(); - updateScreen(); - fadeFromBlack(0); - if (roomMusic != 0) - playMusic(roomMusic); - else - stopMusic(); + asco(); } void DrasculaEngine::animation_20_2() { diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 6f98c50fdc..2d1954e3ca 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -664,6 +664,7 @@ public: void animation_12_2(); void animation_13_2(); void animation_14_2(); + void asco(); void animation_16_2(); void animation_20_2(); void animation_23_2(); diff --git a/engines/drascula/interface.cpp b/engines/drascula/interface.cpp index 5e4f7a1541..c08bcea01f 100644 --- a/engines/drascula/interface.cpp +++ b/engines/drascula/interface.cpp @@ -168,7 +168,7 @@ void DrasculaEngine::enterName() { key = getScan(); if (key != 0) { - if (key >= 0 && key <= 0xFF && isalpha(static_cast<unsigned char>(key))) + if (key >= 0 && key <= 0xFF && isAlpha(key)) select2[v] = tolower(key); else if ((key >= Common::KEYCODE_0 && key <= Common::KEYCODE_9) || key == Common::KEYCODE_SPACE) select2[v] = key; |