aboutsummaryrefslogtreecommitdiff
path: root/engines/drascula
diff options
context:
space:
mode:
authorD G Turner2011-12-08 14:54:18 +0000
committerD G Turner2011-12-08 14:54:18 +0000
commit4a59c954fd07c62c779759f44d2212e1ef459d7e (patch)
tree45533ad967a5f00e65aa7ae81cce7a67b43f907f /engines/drascula
parent111f5806766a322de7f18da89dd0e72aa7cdc609 (diff)
downloadscummvm-rg350-4a59c954fd07c62c779759f44d2212e1ef459d7e.tar.gz
scummvm-rg350-4a59c954fd07c62c779759f44d2212e1ef459d7e.tar.bz2
scummvm-rg350-4a59c954fd07c62c779759f44d2212e1ef459d7e.zip
DRASCULA: Replace usage of 'goto'.
Diffstat (limited to 'engines/drascula')
-rw-r--r--engines/drascula/animation.cpp49
-rw-r--r--engines/drascula/drascula.h1
2 files changed, 31 insertions, 19 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();