aboutsummaryrefslogtreecommitdiff
path: root/engines/drascula
diff options
context:
space:
mode:
authorEugene Sandulenko2009-05-12 10:02:18 +0000
committerEugene Sandulenko2009-05-12 10:02:18 +0000
commit17a68490be5478b982023382ef9637ea968dbceb (patch)
treec5d957cd9210728540defcd75b70daf7003f28d8 /engines/drascula
parent968aec7627ab397e48ce8039ec1e4789c64c5f37 (diff)
downloadscummvm-rg350-17a68490be5478b982023382ef9637ea968dbceb.tar.gz
scummvm-rg350-17a68490be5478b982023382ef9637ea968dbceb.tar.bz2
scummvm-rg350-17a68490be5478b982023382ef9637ea968dbceb.zip
Replace verb numbers with constants in selectVerb() call
svn-id: r40476
Diffstat (limited to 'engines/drascula')
-rw-r--r--engines/drascula/animation.cpp22
-rw-r--r--engines/drascula/converse.cpp2
-rw-r--r--engines/drascula/drascula.cpp18
-rw-r--r--engines/drascula/drascula.h1
-rw-r--r--engines/drascula/interface.cpp2
-rw-r--r--engines/drascula/objects.cpp2
-rw-r--r--engines/drascula/rooms.cpp26
-rw-r--r--engines/drascula/saveload.cpp4
-rw-r--r--engines/drascula/sound.cpp2
9 files changed, 40 insertions, 39 deletions
diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp
index 3f4e36661f..4a0b82d746 100644
--- a/engines/drascula/animation.cpp
+++ b/engines/drascula/animation.cpp
@@ -697,7 +697,7 @@ void DrasculaEngine::animation_4_2() {
loadPic(96, frontSurface);
loadPic(97, extraSurface);
loadPic(99, backSurface);
- selectVerb(0);
+ selectVerb(kVerbNone);
flags[9] = 0;
flags[4] = 1;
@@ -969,7 +969,7 @@ void DrasculaEngine::animation_25_2() {
void DrasculaEngine::animation_27_2() {
flags[22] = 1;
- selectVerb(0);
+ selectVerb(kVerbNone);
removeObject(kItemEarWithEarPlug);
addObject(kItemEarplugs);
@@ -1010,7 +1010,7 @@ void DrasculaEngine::animation_31_2() {
playTalkSequence(31); // sequence 31, chapter 2
- selectVerb(0);
+ selectVerb(kVerbNone);
removeObject(kItemLeaves);
removeObject(kItemBubbleGum);
removeObject(kItemTissues);
@@ -1231,7 +1231,7 @@ void DrasculaEngine::animation_5_5(){
int flyX[] = {1, 63, 125, 187, 249};
int pixelX = curX - 53, pixelY = curY - 9;
- selectVerb(0);
+ selectVerb(kVerbNone);
removeObject(8);
gotoObject(curX - 19, curY + curHeight);
@@ -1410,7 +1410,7 @@ void DrasculaEngine::animation_12_5() {
characterMoved = 0;
curX = -1;
objExit = 104;
- selectVerb(0);
+ selectVerb(kVerbNone);
enterRoom(57);
}
@@ -1562,7 +1562,7 @@ void DrasculaEngine::animation_5_6() {
void DrasculaEngine::animation_6_6() {
animate("rct.bin", 11);
clearRoom();
- selectVerb(0);
+ selectVerb(kVerbNone);
removeObject(20);
loadPic(96, frontSurface);
loadPic(97, frontSurface);
@@ -1571,7 +1571,7 @@ void DrasculaEngine::animation_6_6() {
doBreak = 1;
objExit = 104;
curX = -1;
- selectVerb(0);
+ selectVerb(kVerbNone);
enterRoom(58);
hare_se_ve = 1;
trackProtagonist = 1;
@@ -1960,7 +1960,7 @@ void DrasculaEngine::animation_5_2() {
flags[8] = 1;
curX = curX - 4;
talk_sync(_text[46], "46.als", "4442444244244");
- selectVerb(0);
+ selectVerb(kVerbNone);
}
void DrasculaEngine::animation_6_2() {
@@ -1999,7 +1999,7 @@ void DrasculaEngine::animation_6_2() {
loadPic(96, frontSurface);
loadPic(97, extraSurface);
loadPic(99, backSurface);
- selectVerb(0);
+ selectVerb(kVerbNone);
flags[9] = 0;
}
@@ -2045,7 +2045,7 @@ void DrasculaEngine::animation_33_2() {
loadPic(96, frontSurface);
loadPic(97, extraSurface);
loadPic(99, backSurface);
- selectVerb(0);
+ selectVerb(kVerbNone);
flags[33] = 1;
flags[9] = 0;
@@ -2156,7 +2156,7 @@ void DrasculaEngine::animation_6_4() {
loadPic(96, frontSurface);
loadPic(roomDisk, drawSurface3);
loadPic(roomNumber, bgSurface, HALF_PAL);
- selectVerb(0);
+ selectVerb(kVerbNone);
updateRoom();
}
diff --git a/engines/drascula/converse.cpp b/engines/drascula/converse.cpp
index 81d9c9741a..4aa8ee0d9e 100644
--- a/engines/drascula/converse.cpp
+++ b/engines/drascula/converse.cpp
@@ -148,7 +148,7 @@ void DrasculaEngine::converse(int index) {
breakOut = 0;
- selectVerb(0);
+ selectVerb(kVerbNone);
getStringFromLine(buffer, size, phrase1);
getStringFromLine(buffer, size, phrase2);
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index e40b8d53f6..b39df842f4 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -318,7 +318,7 @@ bool DrasculaEngine::runCurrentChapter() {
if (loadedDifferentChapter == 0)
animation_1_1();
- selectVerb(0);
+ selectVerb(kVerbNone);
loadPic("2aux62.alg", drawSurface2);
trackProtagonist = 1;
objExit = 104;
@@ -517,7 +517,7 @@ bool DrasculaEngine::runCurrentChapter() {
#ifndef _WIN32_WCE
updateEvents();
#endif
- selectVerb(0);
+ selectVerb(kVerbNone);
}
if (leftMouseButton == 1 && menuBar == 1) {
@@ -536,24 +536,24 @@ bool DrasculaEngine::runCurrentChapter() {
Common::KeyCode key = getScan();
if (key == Common::KEYCODE_F1 && menuScreen == 0) {
- selectVerb(1);
+ selectVerb(kVerbLook);
} else if (key == Common::KEYCODE_F2 && menuScreen == 0) {
- selectVerb(2);
+ selectVerb(kVerbPick);
} else if (key == Common::KEYCODE_F3 && menuScreen == 0) {
- selectVerb(3);
+ selectVerb(kVerbOpen);
} else if (key == Common::KEYCODE_F4 && menuScreen == 0) {
- selectVerb(4);
+ selectVerb(kVerbClose);
} else if (key == Common::KEYCODE_F5 && menuScreen == 0) {
- selectVerb(5);
+ selectVerb(kVerbTalk);
} else if (key == Common::KEYCODE_F6 && menuScreen == 0) {
- selectVerb(6);
+ selectVerb(kVerbMove);
} else if (key == Common::KEYCODE_F9) {
volumeControls();
} else if (key == Common::KEYCODE_F10) {
if (!saveLoadScreen())
return true;
} else if (key == Common::KEYCODE_F8) {
- selectVerb(0);
+ selectVerb(kVerbNone);
} else if (key == Common::KEYCODE_v) {
_subtitlesDisabled = true;
ConfMan.setBool("subtitles", !_subtitlesDisabled);
diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h
index 4ef54d136d..85761a6b1e 100644
--- a/engines/drascula/drascula.h
+++ b/engines/drascula/drascula.h
@@ -60,6 +60,7 @@ enum Languages {
enum Verbs {
kVerbDefault = -1,
+ kVerbNone = 0,
kVerbLook = 1,
kVerbPick = 2,
kVerbOpen = 3,
diff --git a/engines/drascula/interface.cpp b/engines/drascula/interface.cpp
index 480bc05682..1e148aff9b 100644
--- a/engines/drascula/interface.cpp
+++ b/engines/drascula/interface.cpp
@@ -61,7 +61,7 @@ void DrasculaEngine::selectVerbFromBar() {
}
// no verb selected
- selectVerb(0);
+ selectVerb(kVerbNone);
}
void DrasculaEngine::selectVerb(int verb) {
diff --git a/engines/drascula/objects.cpp b/engines/drascula/objects.cpp
index a64ee7e0cc..4d1fcd67c0 100644
--- a/engines/drascula/objects.cpp
+++ b/engines/drascula/objects.cpp
@@ -178,7 +178,7 @@ bool DrasculaEngine::pickupObject() {
}
updateEvents();
if (takeObject == 0)
- selectVerb(0);
+ selectVerb(kVerbNone);
return false;
}
diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp
index 12ec3594b1..18b859f064 100644
--- a/engines/drascula/rooms.cpp
+++ b/engines/drascula/rooms.cpp
@@ -572,7 +572,7 @@ bool DrasculaEngine::room_21(int fl) {
} else if (pickedObject == 7 && fl == 101) {
flags[28] = 1;
toggleDoor(0, 1, kOpenDoor);
- selectVerb(0);
+ selectVerb(kVerbNone);
} else if (pickedObject == 21 && fl == 179) {
animate("st.bin", 14);
fadeToBlack(1);
@@ -594,7 +594,7 @@ bool DrasculaEngine::room_22(int fl) {
playSound(1);
hiccup(14);
finishSound();
- selectVerb(0);
+ selectVerb(kVerbNone);
removeObject(22);
updateVisible();
trackProtagonist = 3;
@@ -705,7 +705,7 @@ bool DrasculaEngine::room_27(int fl) {
else if (pickedObject == 17 && fl == 116) {
flags[23] = 1;
toggleDoor(5, 3, kOpenDoor);
- selectVerb(0);
+ selectVerb(kVerbNone);
} else if (fl == 150)
talk(460);
else
@@ -834,16 +834,16 @@ bool DrasculaEngine::room_53(int fl) {
} else if (pickedObject == 12 && fl == 52) {
flags[3] = 1;
talk(401);
- selectVerb(0);
+ selectVerb(kVerbNone);
removeObject(12);
} else if (pickedObject == 15 && fl == 52) {
flags[4] = 1;
talk(401);
- selectVerb(0);
+ selectVerb(kVerbNone);
removeObject(15);
} else if (pickedObject == 16 && fl == 121) {
flags[2] = 1;
- selectVerb(0);
+ selectVerb(kVerbNone);
updateVisible();
pickedObject = kVerbMove;
} else if (pickedObject == 16) {
@@ -882,7 +882,7 @@ bool DrasculaEngine::room_54(int fl) {
} else if (pickedObject == 10 && fl == 119) {
pause(4);
talk(436);
- selectVerb(0);
+ selectVerb(kVerbNone);
removeObject(10);
} else
hasAnswer = 0;
@@ -986,7 +986,7 @@ bool DrasculaEngine::room_59(int fl) {
loadPic(59, bgSurface, HALF_PAL);
trackProtagonist = 3;
talk(245);
- selectVerb(0);
+ selectVerb(kVerbNone);
flags[11] = 1;
}
} else
@@ -1009,11 +1009,11 @@ bool DrasculaEngine::room_60(int fl) {
talk(266);
talk_bartender(1, 1);
converse(12);
- selectVerb(0);
+ selectVerb(kVerbNone);
pickedObject = 0;
} else if (pickedObject == 21 && fl == 56) {
flags[6] = 1;
- selectVerb(0);
+ selectVerb(kVerbNone);
removeObject(21);
animate("beb.bin", 10);
} else if (pickedObject == 9 && fl == 56 && flags[6] == 1) {
@@ -1514,7 +1514,7 @@ bool DrasculaEngine::checkAction(int fl) {
|| (pickedObject == kVerbOpen && fl == 22 && flags[23] == 0)) {
talk(164);
flags[23] = 1;
- selectVerb(0);
+ selectVerb(kVerbNone);
addObject(kItemMoney);
addObject(kItemTwoCoins);
} else if (pickedObject == kVerbLook && fl == 22 && flags[23] == 1)
@@ -1525,7 +1525,7 @@ bool DrasculaEngine::checkAction(int fl) {
hasAnswer = 0;
} else if (currentChapter == 4) {
if ((pickedObject == 18 && fl == 19) || (pickedObject == 19 && fl == 18)) {
- selectVerb(0);
+ selectVerb(kVerbNone);
chooseObject(21);
removeObject(18);
removeObject(19);
@@ -2004,7 +2004,7 @@ void DrasculaEngine::toggleDoor(int nflag, int doorNum, int action) {
updateRoom();
updateScreen();
finishSound();
- selectVerb(0);
+ selectVerb(kVerbNone);
}
}
diff --git a/engines/drascula/saveload.cpp b/engines/drascula/saveload.cpp
index 91b2eee480..937f4d388a 100644
--- a/engines/drascula/saveload.cpp
+++ b/engines/drascula/saveload.cpp
@@ -174,7 +174,7 @@ bool DrasculaEngine::saveLoadScreen() {
delay(5);
}
- selectVerb(0);
+ selectVerb(kVerbNone);
clearRoom();
loadPic(roomNumber, bgSurface, HALF_PAL);
@@ -223,7 +223,7 @@ bool DrasculaEngine::loadGame(const char *gameName) {
loadedDifferentChapter = 0;
sscanf(currentData, "%d.ald", &roomNum);
enterRoom(roomNum);
- selectVerb(0);
+ selectVerb(kVerbNone);
return true;
}
diff --git a/engines/drascula/sound.cpp b/engines/drascula/sound.cpp
index 41bebdbe59..06585e3dce 100644
--- a/engines/drascula/sound.cpp
+++ b/engines/drascula/sound.cpp
@@ -100,7 +100,7 @@ void DrasculaEngine::volumeControls() {
if (_lang == kSpanish)
loadPic(974, tableSurface);
- selectVerb(0);
+ selectVerb(kVerbNone);
updateEvents();
}