aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2008-05-31 09:16:26 +0000
committerFilippos Karapetis2008-05-31 09:16:26 +0000
commitbbfb4661eee5ad18c5dcfdb93ecb0de686bda3a8 (patch)
treea6afcee4604b4d9c557b30d0dfeb737c40171719
parent8fd8c68a05e8ca8df8dbc2a10f0be470a875f4c1 (diff)
downloadscummvm-rg350-bbfb4661eee5ad18c5dcfdb93ecb0de686bda3a8.tar.gz
scummvm-rg350-bbfb4661eee5ad18c5dcfdb93ecb0de686bda3a8.tar.bz2
scummvm-rg350-bbfb4661eee5ad18c5dcfdb93ecb0de686bda3a8.zip
updateData -> updateVisible
num_ejec -> currentChapter svn-id: r32417
-rw-r--r--engines/drascula/animation.cpp4
-rw-r--r--engines/drascula/drascula.cpp280
-rw-r--r--engines/drascula/drascula.h4
-rw-r--r--engines/drascula/rooms.cpp68
-rw-r--r--engines/drascula/talk.cpp90
5 files changed, 223 insertions, 223 deletions
diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp
index 1abe1257c2..73ea0f8bc4 100644
--- a/engines/drascula/animation.cpp
+++ b/engines/drascula/animation.cpp
@@ -1592,7 +1592,7 @@ void DrasculaEngine::animation_5_5(){
}
flags[6] = 1;
- updateData();
+ updateVisible();
pause(12);
loadAndDecompressPic("96.alg", frontSurface, 1);
@@ -2009,7 +2009,7 @@ void DrasculaEngine::animation_6_6() {
void DrasculaEngine::animation_7_6() {
flags[8] = 1;
- updateData();
+ updateVisible();
}
void DrasculaEngine::animation_9_6() {
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index 9248a1d3a1..241e9596ed 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -111,7 +111,7 @@ int DrasculaEngine::init() {
}
int DrasculaEngine::go() {
- num_ejec = 1; // values from 1 to 6 will start each part of game
+ currentChapter = 1; // values from 1 to 6 will start each part of game
hay_que_load = 0;
for (;;) {
@@ -158,23 +158,23 @@ int DrasculaEngine::go() {
withVoices = 0;
hay_seleccion = 0;
- if (num_ejec != 6) {
+ if (currentChapter != 6) {
loadAndDecompressPic("95.alg", tableSurface, 1);
}
- if (num_ejec == 1) {
+ if (currentChapter == 1) {
loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL);
loadAndDecompressPic("99.alg", backSurface, 1);
loadAndDecompressPic("97.alg", extraSurface, 1);
- } else if (num_ejec == 2) {
+ } else if (currentChapter == 2) {
loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL);
loadAndDecompressPic("pts.alg", drawSurface2, 1);
- } else if (num_ejec == 3) {
+ } else if (currentChapter == 3) {
loadAndDecompressPic("aux13.alg", drawSurface1, COMPLETE_PAL);
loadAndDecompressPic("96.alg", frontSurface, 1);
loadAndDecompressPic("97.alg", extraSurface, 1);
loadAndDecompressPic("99.alg", backSurface, 1);
- } else if (num_ejec == 4) {
+ } else if (currentChapter == 4) {
loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL);
if (hay_que_load == 0)
animation_rayo();
@@ -182,11 +182,11 @@ int DrasculaEngine::go() {
clearRoom();
loadAndDecompressPic("99.alg", backSurface, 1);
loadAndDecompressPic("97.alg", extraSurface, 1);
- } else if (num_ejec == 5) {
+ } else if (currentChapter == 5) {
loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL);
loadAndDecompressPic("97.alg", extraSurface, 1);
loadAndDecompressPic("99.alg", backSurface, 1);
- } else if (num_ejec == 6) {
+ } else if (currentChapter == 6) {
x_igor = 105, y_igor = 85, sentido_igor = 1;
x_dr = 62, y_dr = 99, sentido_dr = 1;
frame_pen = 0;
@@ -210,10 +210,10 @@ int DrasculaEngine::go() {
break;
}
releaseGame();
- if (num_ejec == 6)
+ if (currentChapter == 6)
break;
- num_ejec++;
+ currentChapter++;
}
return 0;
@@ -443,7 +443,7 @@ bool DrasculaEngine::escoba() {
previousMusic = -1;
- if (num_ejec != 2) {
+ if (currentChapter != 2) {
int soc = 0;
for (n = 0; n < 6; n++) {
soc = soc + CHARACTER_WIDTH;
@@ -457,7 +457,7 @@ bool DrasculaEngine::escoba() {
for (n = 0; n < NUM_FLAGS; n++)
flags[n] = 0;
- if (num_ejec == 2) {
+ if (currentChapter == 2) {
flags[16] = 1;
flags[17] = 1;
flags[27] = 1;
@@ -466,7 +466,7 @@ bool DrasculaEngine::escoba() {
for (n = 1; n < 7; n++)
inventoryObjects[n] = n;
- if (num_ejec == 1) {
+ if (currentChapter == 1) {
pickObject(28);
if (hay_que_load == 0)
@@ -486,7 +486,7 @@ bool DrasculaEngine::escoba() {
hare_y = 56;
lleva_al_hare(65, 145);
}
- } else if (num_ejec == 2) {
+ } else if (currentChapter == 2) {
addObject(28);
sentido_hare = 3;
objExit = 162;
@@ -497,7 +497,7 @@ bool DrasculaEngine::escoba() {
return true;
}
}
- } else if (num_ejec == 3) {
+ } else if (currentChapter == 3) {
addObject(28);
addObject(11);
addObject(14);
@@ -515,7 +515,7 @@ bool DrasculaEngine::escoba() {
return true;
}
}
- } else if (num_ejec == 4) {
+ } else if (currentChapter == 4) {
addObject(28);
addObject(9);
addObject(20);
@@ -531,7 +531,7 @@ bool DrasculaEngine::escoba() {
return true;
}
}
- } else if (num_ejec == 5) {
+ } else if (currentChapter == 5) {
addObject(28);
addObject(7);
addObject(9);
@@ -550,7 +550,7 @@ bool DrasculaEngine::escoba() {
return true;
}
}
- } else if (num_ejec == 6) {
+ } else if (currentChapter == 6) {
addObject(28);
addObject(9);
@@ -577,7 +577,7 @@ bool DrasculaEngine::escoba() {
walkToObject = 0;
}
- if (num_ejec == 2) {
+ if (currentChapter == 2) {
if (roomNumber == 3 && (hare_x == 279) && (hare_y + alto_hare == 101))
animation_1_2();
else if (roomNumber == 14 && (hare_x == 214) && (hare_y + alto_hare == 121))
@@ -589,7 +589,7 @@ bool DrasculaEngine::escoba() {
moveCursor();
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
- if (num_ejec == 2) {
+ if (currentChapter == 2) {
if (musicStatus() == 0 && roomMusic != 0)
playMusic(roomMusic);
} else {
@@ -604,14 +604,14 @@ bool DrasculaEngine::escoba() {
if (button_dch == 1 && menuScreen == 1) {
delay(100);
- if (num_ejec == 2)
+ if (currentChapter == 2)
loadAndDecompressPic(menuBackground, backSurface, 1);
else
loadAndDecompressPic("99.alg", backSurface, 1);
setPalette((byte *)&gamePalette);
menuScreen = 0;
updateEvents();
- if (num_ejec != 3)
+ if (currentChapter != 3)
cont_sv = 0;
}
if (button_dch == 1 && menuScreen == 0) {
@@ -619,36 +619,36 @@ bool DrasculaEngine::escoba() {
characterMoved = 0;
if (sentido_hare == 2)
sentido_hare = 1;
- if (num_ejec == 4)
+ if (currentChapter == 4)
loadAndDecompressPic("icons2.alg", backSurface, 1);
- else if (num_ejec == 5)
+ else if (currentChapter == 5)
loadAndDecompressPic("icons3.alg", backSurface, 1);
- else if (num_ejec == 6)
+ else if (currentChapter == 6)
loadAndDecompressPic("iconsp.alg", backSurface, 1);
else
loadAndDecompressPic("icons.alg", backSurface, 1);
menuScreen = 1;
updateEvents();
withoutVerb();
- if (num_ejec != 3)
+ if (currentChapter != 3)
cont_sv = 0;
}
if (button_izq == 1 && menuBar == 1) {
delay(100);
elige_en_barra();
- if (num_ejec != 3)
+ if (currentChapter != 3)
cont_sv = 0;
} else if (button_izq == 1 && takeObject == 0) {
delay(100);
if (comprueba1())
return true;
- if (num_ejec != 3)
+ if (currentChapter != 3)
cont_sv = 0;
} else if (button_izq == 1 && takeObject == 1) {
if (comprueba2())
return true;
- if (num_ejec != 3)
+ if (currentChapter != 3)
cont_sv = 0;
}
@@ -657,90 +657,90 @@ bool DrasculaEngine::escoba() {
Common::KeyCode key = getScan();
if (key == Common::KEYCODE_F1 && menuScreen == 0) {
selectVerb(1);
- if (num_ejec != 3)
+ if (currentChapter != 3)
cont_sv = 0;
} else if (key == Common::KEYCODE_F2 && menuScreen == 0) {
selectVerb(2);
- if (num_ejec != 3)
+ if (currentChapter != 3)
cont_sv = 0;
} else if (key == Common::KEYCODE_F3 && menuScreen == 0) {
selectVerb(3);
- if (num_ejec != 3)
+ if (currentChapter != 3)
cont_sv = 0;
} else if (key == Common::KEYCODE_F4 && menuScreen == 0) {
selectVerb(4);
cont_sv = 0;
} else if (key == Common::KEYCODE_F5 && menuScreen == 0) {
selectVerb(5);
- if (num_ejec != 3)
+ if (currentChapter != 3)
cont_sv = 0;
} else if (key == Common::KEYCODE_F6 && menuScreen == 0) {
selectVerb(6);
- if (num_ejec != 3)
+ if (currentChapter != 3)
cont_sv = 0;
} else if (key == Common::KEYCODE_F9) {
mesa();
- if (num_ejec != 3)
+ if (currentChapter != 3)
cont_sv = 0;
} else if (key == Common::KEYCODE_F10) {
if (!saves())
return true;
- if (num_ejec != 3)
+ if (currentChapter != 3)
cont_sv = 0;
} else if (key == Common::KEYCODE_F8) {
withoutVerb();
- if (num_ejec != 3)
+ if (currentChapter != 3)
cont_sv = 0;
} else if (key == Common::KEYCODE_v) {
withVoices = 1;
print_abc(_textsys[_lang][2], 96, 86);
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
delay(1410);
- if (num_ejec != 3)
+ if (currentChapter != 3)
cont_sv = 0;
} else if (key == Common::KEYCODE_t) {
withVoices = 0;
print_abc(_textsys[_lang][3], 94, 86);
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
delay(1460);
- if (num_ejec != 3)
+ if (currentChapter != 3)
cont_sv = 0;
} else if (key == Common::KEYCODE_ESCAPE) {
if (!confirmExit())
return false;
- if (num_ejec != 3)
+ if (currentChapter != 3)
cont_sv = 0;
- } else if (num_ejec == 6 && key == Common::KEYCODE_0 && roomNumber == 61) {
+ } else if (currentChapter == 6 && key == Common::KEYCODE_0 && roomNumber == 61) {
loadAndDecompressPic("alcbar.alg", drawSurface1, 255);
} else if (cont_sv == 15000) {
screenSaver();
- if (num_ejec != 3)
+ if (currentChapter != 3)
cont_sv = 0;
} else {
- if (num_ejec != 3)
+ if (currentChapter != 3)
cont_sv++;
}
}
}
void DrasculaEngine::pickObject(int objeto) {
- if (num_ejec == 6)
+ if (currentChapter == 6)
loadAndDecompressPic("iconsp.alg", backSurface, 1);
- else if (num_ejec == 4)
+ else if (currentChapter == 4)
loadAndDecompressPic("icons2.alg", backSurface, 1);
- else if (num_ejec == 5)
+ else if (currentChapter == 5)
loadAndDecompressPic("icons3.alg", backSurface, 1);
else
loadAndDecompressPic("icons.alg", backSurface, 1);
chooseObject(objeto);
- if (num_ejec == 2)
+ if (currentChapter == 2)
loadAndDecompressPic(menuBackground, backSurface, 1);
else
loadAndDecompressPic("99.alg", backSurface, 1);
}
void DrasculaEngine::chooseObject(int objeto) {
- if (num_ejec == 5) {
+ if (currentChapter == 5) {
if (takeObject == 1 && menuScreen == 0 && pickedObject != 16)
addObject(pickedObject);
} else {
@@ -770,7 +770,7 @@ void DrasculaEngine::withoutVerb() {
int c = 171;
if (menuScreen == 1)
c = 0;
- if (num_ejec == 5) {
+ if (currentChapter == 5) {
if (takeObject == 1 && pickedObject != 16)
addObject(pickedObject);
} else {
@@ -786,11 +786,11 @@ void DrasculaEngine::withoutVerb() {
bool DrasculaEngine::para_cargar(char gameName[]) {
previousMusic = roomMusic;
menuScreen = 0;
- if (num_ejec != 1)
+ if (currentChapter != 1)
clearRoom();
if (!loadGame(gameName))
return false;
- if (num_ejec == 2 || num_ejec == 3 || num_ejec == 5) {
+ if (currentChapter == 2 || currentChapter == 3 || currentChapter == 5) {
delete ald;
ald = NULL;
}
@@ -851,12 +851,12 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) {
getLine(ald, buffer, size);
sscanf(buffer, "%d", &nivel_osc);
- if (num_ejec == 2) {
+ if (currentChapter == 2) {
getLine(ald, buffer, size);
sscanf(buffer, "%d", &martin);
}
- if (num_ejec == 2 && martin != 0) {
+ if (currentChapter == 2 && martin != 0) {
ancho_hare = martin;
getLine(ald, buffer, size);
sscanf(buffer, "%d",&alto_hare);
@@ -933,7 +933,7 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) {
getLine(ald, buffer, size);
sscanf(buffer, "%d", &suelo_y2);
- if (num_ejec != 2) {
+ if (currentChapter != 2) {
getLine(ald, buffer, size);
sscanf(buffer, "%d", &far);
getLine(ald, buffer, size);
@@ -942,7 +942,7 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) {
delete ald;
ald = NULL;
- if (num_ejec == 2) {
+ if (currentChapter == 2) {
if (martin == 0) {
stepX = PASO_HARE_X;
stepY = PASO_HARE_Y;
@@ -962,7 +962,7 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) {
obj_salir = l;
}
- if (num_ejec == 2) {
+ if (currentChapter == 2) {
if (hare_x == -1) {
hare_x = _destX[obj_salir];
hare_y = _destY[obj_salir] - alto_hare;
@@ -988,10 +988,10 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) {
hare_claro();
changeColor = -1;
- if (num_ejec == 2)
+ if (currentChapter == 2)
color_abc(kColorLightGreen);
- if (num_ejec != 2) {
+ if (currentChapter != 2) {
for (l = 0; l <= suelo_y1; l++)
factor_red[l] = far;
for (l = suelo_y1; l <= 201; l++)
@@ -1011,14 +1011,14 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) {
}
}
- if (num_ejec == 5 && roomNumber == 54) {
+ if (currentChapter == 5 && roomNumber == 54) {
for (l = suelo_y1 - 1; l > 84; l--) {
factor_red[l] = (int)(far - pequegnez);
pequegnez = pequegnez + chiquez;
}
}
- if (num_ejec != 2) {
+ if (currentChapter != 2) {
if (hare_x == -1) {
hare_x = _destX[obj_salir];
hare_y = _destY[obj_salir];
@@ -1032,7 +1032,7 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) {
characterMoved = 0;
}
- if (num_ejec == 2) {
+ if (currentChapter == 2) {
soc = 0;
for (l = 0; l < 6; l++) {
soc += ancho_hare;
@@ -1040,15 +1040,15 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) {
}
}
- if (num_ejec == 5)
+ if (currentChapter == 5)
hare_se_ve = 1;
- updateData();
+ updateVisible();
- if (num_ejec == 1)
+ if (currentChapter == 1)
isDoor[7] = 0;
- if (num_ejec == 2) {
+ if (currentChapter == 2) {
if (roomNumber == 14 && flags[39] == 1)
roomMusic = 16;
else if (roomNumber == 15 && flags[39] == 1)
@@ -1067,19 +1067,19 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) {
playMusic(roomMusic);
}
- if (num_ejec == 2) {
+ if (currentChapter == 2) {
if (roomNumber == 9 || roomNumber == 2 || roomNumber == 14 || roomNumber == 18)
conta_blind_vez = getTime();
}
- if (num_ejec == 4) {
+ if (currentChapter == 4) {
if (roomNumber == 26)
conta_blind_vez = getTime();
}
- if (num_ejec == 4 && roomNumber == 24 && flags[29] == 1)
+ if (currentChapter == 4 && roomNumber == 24 && flags[29] == 1)
animation_7_4();
- if (num_ejec == 5) {
+ if (currentChapter == 5) {
if (roomNumber == 45)
hare_se_ve = 0;
if (roomNumber == 49 && flags[7] == 0)
@@ -1096,7 +1096,7 @@ void DrasculaEngine::clearRoom() {
}
void DrasculaEngine::lleva_al_hare(int pointX, int pointY) {
- if (num_ejec == 5 || num_ejec == 6) {
+ if (currentChapter == 5 || currentChapter == 6) {
if (hare_se_ve == 0) {
hare_x = sitio_x;
hare_y = sitio_y;
@@ -1167,7 +1167,7 @@ void DrasculaEngine::checkObjects() {
}
}
- if (num_ejec == 2) {
+ if (currentChapter == 2) {
if (mouseX > hare_x + 2 && mouseY > hare_y + 2
&& mouseX < hare_x + ancho_hare - 2 && mouseY < hare_y + alto_hare - 2) {
strcpy(textName, "hacker");
@@ -1262,7 +1262,7 @@ bool DrasculaEngine::comprueba2() {
lleva_al_hare(sitiobj_x[l], sitiobj_y[l]);
if (checkFlag(objectNum[l]))
return true;
- if (num_ejec == 4)
+ if (currentChapter == 4)
break;
}
}
@@ -1324,7 +1324,7 @@ void DrasculaEngine::selectVerb(int verbo) {
if (menuScreen == 1)
c = 0;
- if (num_ejec == 5) {
+ if (currentChapter == 5) {
if (takeObject == 1 && pickedObject != 16)
addObject(pickedObject);
} else {
@@ -1997,7 +1997,7 @@ void DrasculaEngine::placeIgor() {
int pos_igor[6];
pos_igor[0] = 1;
- if (num_ejec == 4) {
+ if (currentChapter == 4) {
pos_igor[1] = 138;
} else {
if (sentido_igor == 3)
@@ -2020,7 +2020,7 @@ void DrasculaEngine::placeDrascula() {
pos_dr[0] = 47;
else if (sentido_dr == 0)
pos_dr[0] = 1;
- else if (sentido_dr == 3 && num_ejec == 1)
+ else if (sentido_dr == 3 && currentChapter == 1)
pos_dr[0] = 93;
pos_dr[1] = 122;
pos_dr[2] = x_dr;
@@ -2028,7 +2028,7 @@ void DrasculaEngine::placeDrascula() {
pos_dr[4] = 45;
pos_dr[5] = 77;
- if (num_ejec == 6)
+ if (currentChapter == 6)
copyRectClip(pos_dr, drawSurface2, screenSurface);
else
copyRectClip(pos_dr, backSurface, screenSurface);
@@ -2052,14 +2052,14 @@ void DrasculaEngine::placeBJ() {
void DrasculaEngine::hiccup(int counter) {
int y = 0, sentido = 0;
- if (num_ejec == 3)
+ if (currentChapter == 3)
y = -1;
do {
counter--;
updateRoom();
- if (num_ejec == 3)
+ if (currentChapter == 3)
updateScreen(0, 0, 0, y, 320, 200, screenSurface);
else
updateScreen(0, 1, 0, y, 320, 198, screenSurface);
@@ -2069,7 +2069,7 @@ void DrasculaEngine::hiccup(int counter) {
else
y--;
- if (num_ejec == 3) {
+ if (currentChapter == 3) {
if (y == 1)
sentido = 1;
if (y == -1)
@@ -2112,7 +2112,7 @@ int DrasculaEngine::musicStatus() {
void DrasculaEngine::updateRoom() {
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
updateRefresh_pre();
- if (num_ejec == 3) {
+ if (currentChapter == 3) {
if (flags[0] == 0)
pon_hare();
else
@@ -2132,9 +2132,9 @@ bool DrasculaEngine::loadGame(const char *gameName) {
}
n_ejec2 = sav->readSint32LE();
- if (n_ejec2 != num_ejec) {
+ if (n_ejec2 != currentChapter) {
strcpy(saveName, gameName);
- num_ejec = n_ejec2 - 1;
+ currentChapter = n_ejec2 - 1;
hay_que_load = 1;
return false;
}
@@ -2159,9 +2159,9 @@ bool DrasculaEngine::loadGame(const char *gameName) {
}
void DrasculaEngine::updateDoor(int doorNum) {
- if (num_ejec == 1 || num_ejec == 3 || num_ejec == 5 || num_ejec == 6)
+ if (currentChapter == 1 || currentChapter == 3 || currentChapter == 5 || currentChapter == 6)
return;
- else if (num_ejec == 2) {
+ else if (currentChapter == 2) {
if (objectNum[doorNum] == 138)
isDoor[doorNum] = flags[0];
else if (objectNum[doorNum] == 136)
@@ -2176,7 +2176,7 @@ void DrasculaEngine::updateDoor(int doorNum) {
isDoor[doorNum] = flags[40];
else if (objectNum[doorNum] == 173)
isDoor[doorNum] = flags[36];
- } else if (num_ejec == 4) {
+ } else if (currentChapter == 4) {
if (objectNum[doorNum] == 101 && flags[0] == 0)
isDoor[doorNum] = 0;
else if (objectNum[doorNum] == 101 && flags[0] == 1 && flags[28] == 1)
@@ -2270,7 +2270,7 @@ void DrasculaEngine::startWalking() {
stepX = PASO_HARE_X;
stepY = PASO_HARE_Y;
- if (num_ejec == 2) {
+ if (currentChapter == 2) {
if ((sitio_x < hare_x) && (sitio_y <= (hare_y + alto_hare)))
quadrant_1();
else if ((sitio_x < hare_x) && (sitio_y > (hare_y + alto_hare)))
@@ -2304,7 +2304,7 @@ void DrasculaEngine::pon_hare() {
if (characterMoved == 1 && stepX == PASO_HARE_X) {
for (r = 0; r < stepX; r++) {
- if (num_ejec != 2) {
+ if (currentChapter != 2) {
if (sentido_hare == 0 && sitio_x - r == hare_x + ancho_hare / 2) {
characterMoved = 0;
stepX = PASO_HARE_X;
@@ -2317,7 +2317,7 @@ void DrasculaEngine::pon_hare() {
hare_x = sitio_x - ancho_hare / 2;
hare_y = sitio_y - alto_hare;
}
- } else if (num_ejec == 2) {
+ } else if (currentChapter == 2) {
if (sentido_hare == 0 && sitio_x - r == hare_x) {
characterMoved = 0;
stepX = PASO_HARE_X;
@@ -2348,7 +2348,7 @@ void DrasculaEngine::pon_hare() {
}
}
- if (num_ejec == 1 || num_ejec == 4 || num_ejec == 5 || num_ejec == 6) {
+ if (currentChapter == 1 || currentChapter == 4 || currentChapter == 5 || currentChapter == 6) {
if (hare_se_ve == 0) {
increaseFrameNum();
return;
@@ -2360,7 +2360,7 @@ void DrasculaEngine::pon_hare() {
pos_hare[1] = DIF_MASK_HARE;
pos_hare[2] = hare_x;
pos_hare[3] = hare_y;
- if (num_ejec == 2) {
+ if (currentChapter == 2) {
pos_hare[4] = ancho_hare;
pos_hare[5] = alto_hare;
} else {
@@ -2370,25 +2370,25 @@ void DrasculaEngine::pon_hare() {
if (sentido_hare == 0) {
pos_hare[1] = 0;
- if (num_ejec == 2)
+ if (currentChapter == 2)
copyRectClip(pos_hare, extraSurface, screenSurface);
else
reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5],
factor_red[hare_y + alto_hare], extraSurface, screenSurface);
} else if (sentido_hare == 1) {
- if (num_ejec == 2)
+ if (currentChapter == 2)
copyRectClip(pos_hare, extraSurface, screenSurface);
else
reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5],
factor_red[hare_y + alto_hare], extraSurface, screenSurface);
} else if (sentido_hare == 2) {
- if (num_ejec == 2)
+ if (currentChapter == 2)
copyRectClip(pos_hare, backSurface, screenSurface);
else
reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5],
factor_red[hare_y + alto_hare], backSurface, screenSurface);
} else {
- if (num_ejec == 2)
+ if (currentChapter == 2)
copyRectClip(pos_hare, frontSurface, screenSurface);
else
reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5],
@@ -2399,7 +2399,7 @@ void DrasculaEngine::pon_hare() {
pos_hare[1] = frame_y + DIF_MASK_HARE;
pos_hare[2] = hare_x;
pos_hare[3] = hare_y;
- if (num_ejec == 2) {
+ if (currentChapter == 2) {
pos_hare[4] = ancho_hare;
pos_hare[5] = alto_hare;
} else {
@@ -2408,25 +2408,25 @@ void DrasculaEngine::pon_hare() {
}
if (sentido_hare == 0) {
pos_hare[1] = 0;
- if (num_ejec == 2)
+ if (currentChapter == 2)
copyRectClip(pos_hare, extraSurface, screenSurface);
else
reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5],
factor_red[hare_y + alto_hare], extraSurface, screenSurface);
} else if (sentido_hare == 1) {
- if (num_ejec == 2)
+ if (currentChapter == 2)
copyRectClip(pos_hare, extraSurface, screenSurface);
else
reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5],
factor_red[hare_y + alto_hare], extraSurface, screenSurface);
} else if (sentido_hare == 2) {
- if (num_ejec == 2)
+ if (currentChapter == 2)
copyRectClip(pos_hare, backSurface, screenSurface);
else
reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5],
factor_red[hare_y + alto_hare], backSurface, screenSurface);
} else {
- if (num_ejec == 2)
+ if (currentChapter == 2)
copyRectClip(pos_hare, frontSurface, screenSurface);
else
reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5],
@@ -2447,7 +2447,7 @@ void DrasculaEngine::showMenu() {
h = inventoryObjects[n];
if (h != 0) {
- if (num_ejec == 6)
+ if (currentChapter == 6)
copyBackground(x_pol[n], y_pol[n], itemLocations[n].x, itemLocations[n].y,
OBJWIDTH, OBJHEIGHT, tableSurface, screenSurface);
else
@@ -2497,7 +2497,7 @@ void DrasculaEngine::removeObject() {
bool DrasculaEngine::exitRoom(int l) {
char salgo[13];
- if (num_ejec == 1) {
+ if (currentChapter == 1) {
if (objectNum[l] == 105 && flags[0] == 0)
talk(442);
else {
@@ -2524,7 +2524,7 @@ bool DrasculaEngine::exitRoom(int l) {
carga_escoba(salgo);
}
}
- } else if (num_ejec == 2) {
+ } else if (currentChapter == 2) {
updateDoor(l);
if (isDoor[l] != 0) {
lleva_al_hare(sitiobj_x[l], sitiobj_y[l]);
@@ -2557,7 +2557,7 @@ bool DrasculaEngine::exitRoom(int l) {
hare_x =- 1;
carga_escoba(salgo);
}
- } else if (num_ejec == 3) {
+ } else if (currentChapter == 3) {
updateDoor(l);
if (isDoor[l] != 0 && visible[l] == 1) {
lleva_al_hare(sitiobj_x[l], sitiobj_y[l]);
@@ -2575,7 +2575,7 @@ bool DrasculaEngine::exitRoom(int l) {
hare_x =- 1;
carga_escoba(salgo);
}
- } else if (num_ejec == 4) {
+ } else if (currentChapter == 4) {
updateDoor(l);
if (isDoor[l] != 0) {
lleva_al_hare(sitiobj_x[l], sitiobj_y[l]);
@@ -2596,7 +2596,7 @@ bool DrasculaEngine::exitRoom(int l) {
hare_x = -1;
carga_escoba(salgo);
}
- } else if (num_ejec == 5) {
+ } else if (currentChapter == 5) {
updateDoor(l);
if (isDoor[l] != 0 && visible[l] == 1) {
lleva_al_hare(sitiobj_x[l], sitiobj_y[l]);
@@ -2615,7 +2615,7 @@ bool DrasculaEngine::exitRoom(int l) {
hare_x = -1;
carga_escoba(salgo);
}
- } else if (num_ejec == 6) {
+ } else if (currentChapter == 6) {
updateDoor(l);
if (isDoor[l] != 0) {
lleva_al_hare(sitiobj_x[l], sitiobj_y[l]);
@@ -2998,7 +2998,7 @@ void DrasculaEngine::reduce_hare_chico(int xx1, int yy1, int xx2, int yy2, int w
void DrasculaEngine::quadrant_1() {
float distance_x, distance_y;
- if (num_ejec == 2)
+ if (currentChapter == 2)
distance_x = hare_x - sitio_x;
else
distance_x = hare_x + ancho_hare / 2 - sitio_x;
@@ -3019,7 +3019,7 @@ void DrasculaEngine::quadrant_1() {
void DrasculaEngine::quadrant_2() {
float distance_x, distance_y;
- if (num_ejec == 2)
+ if (currentChapter == 2)
distance_x = abs(hare_x + ancho_hare - sitio_x);
else
distance_x = abs(hare_x + ancho_hare / 2 - sitio_x);
@@ -3040,7 +3040,7 @@ void DrasculaEngine::quadrant_2() {
void DrasculaEngine::quadrant_3() {
float distance_x, distance_y;
- if (num_ejec == 2)
+ if (currentChapter == 2)
distance_x = hare_x - sitio_x;
else
distance_x = hare_x + ancho_hare / 2 - sitio_x;
@@ -3061,7 +3061,7 @@ void DrasculaEngine::quadrant_3() {
void DrasculaEngine::quadrant_4() {
float distance_x, distance_y;
- if (num_ejec == 2)
+ if (currentChapter == 2)
distance_x = abs(hare_x + ancho_hare - sitio_x);
else
distance_x = abs(hare_x + ancho_hare / 2 - sitio_x);
@@ -3086,7 +3086,7 @@ void DrasculaEngine::saveGame(char gameName[]) {
if (!(out = _saveFileMan->openForSaving(gameName))) {
error("no puedo abrir el archivo");
}
- out->writeSint32LE(num_ejec);
+ out->writeSint32LE(currentChapter);
out->write(currentData, 20);
out->writeSint32LE(hare_x);
out->writeSint32LE(hare_y);
@@ -3134,7 +3134,7 @@ void DrasculaEngine::increaseFrameNum() {
}
}
- if (num_ejec != 2) {
+ if (currentChapter != 2) {
hare_y += (int)(alto_hare - newHeight);
hare_x += (int)(ancho_hare - newWidth);
alto_hare = (int)newHeight;
@@ -3194,7 +3194,7 @@ void DrasculaEngine::converse(const char *nom_fich) {
strcpy(para_codificar, nom_fich);
- if (num_ejec == 5)
+ if (currentChapter == 5)
withoutVerb();
ald = new Common::File;
@@ -3229,19 +3229,19 @@ void DrasculaEngine::converse(const char *nom_fich) {
delete ald;
ald = NULL;
- if (num_ejec == 2 && !strcmp(nom_fich, "op_5.cal") && flags[38] == 1 && flags[33] == 1) {
+ if (currentChapter == 2 && !strcmp(nom_fich, "op_5.cal") && flags[38] == 1 && flags[33] == 1) {
strcpy(phrase3, _text[_lang][405]);
strcpy(sound3, "405.als");
answer3 = 31;
}
- if (num_ejec == 6 && !strcmp(nom_fich, "op_12.cal") && flags[7] == 1) {
+ if (currentChapter == 6 && !strcmp(nom_fich, "op_12.cal") && flags[7] == 1) {
strcpy(phrase3, _text[_lang][273]);
strcpy(sound3, "273.als");
answer3 = 14;
}
- if (num_ejec == 6 && !strcmp(nom_fich, "op_12.cal") && flags[10] == 1) {
+ if (currentChapter == 6 && !strcmp(nom_fich, "op_12.cal") && flags[10] == 1) {
strcpy(phrase3, " cuanto queda para que acabe el partido?");
strcpy(sound3, "274.als");
answer3 = 15;
@@ -3276,13 +3276,13 @@ void DrasculaEngine::converse(const char *nom_fich) {
while (breakOut == 0) {
updateRoom();
- if (num_ejec == 1 || num_ejec == 4 || num_ejec == 6) {
+ if (currentChapter == 1 || currentChapter == 4 || currentChapter == 6) {
if (musicStatus() == 0 && flags[11] == 0)
playMusic(roomMusic);
- } else if (num_ejec == 2) {
+ } else if (currentChapter == 2) {
if (musicStatus() == 0 && flags[11] == 0 && roomMusic != 0)
playMusic(roomMusic);
- } else if (num_ejec == 3 || num_ejec == 5) {
+ } else if (currentChapter == 3 || currentChapter == 5) {
if (musicStatus() == 0)
playMusic(roomMusic);
}
@@ -3327,7 +3327,7 @@ void DrasculaEngine::converse(const char *nom_fich) {
delay(100);
used1 = 1;
talk(phrase1, sound1);
- if (num_ejec == 3)
+ if (currentChapter == 3)
grr();
else
response(answer1);
@@ -3335,7 +3335,7 @@ void DrasculaEngine::converse(const char *nom_fich) {
delay(100);
used2 = 1;
talk(phrase2, sound2);
- if (num_ejec == 3)
+ if (currentChapter == 3)
grr();
else
response(answer2);
@@ -3343,7 +3343,7 @@ void DrasculaEngine::converse(const char *nom_fich) {
delay(100);
used3 = 1;
talk(phrase3, sound3);
- if (num_ejec == 3)
+ if (currentChapter == 3)
grr();
else
response(answer3);
@@ -3364,23 +3364,23 @@ void DrasculaEngine::converse(const char *nom_fich) {
game4 = 1;
} // while (breakOut == 0)
- if (num_ejec == 2)
+ if (currentChapter == 2)
loadAndDecompressPic(menuBackground, backSurface, 1);
else
loadAndDecompressPic("99.alg", backSurface, 1);
- if (num_ejec != 5)
+ if (currentChapter != 5)
withoutVerb();
}
void DrasculaEngine::response(int function) {
- if (num_ejec == 1) {
+ if (currentChapter == 1) {
if (function == 10)
talk_drunk(1);
else if (function == 11)
talk_drunk(2);
else if (function == 12)
talk_drunk(3);
- } else if (num_ejec == 2) {
+ } else if (currentChapter == 2) {
if (function == 8)
animation_8_2();
else if (function == 9)
@@ -3409,14 +3409,14 @@ void DrasculaEngine::response(int function) {
animation_30_2();
else if (function == 31)
animation_31_2();
- } else if (num_ejec == 4) {
+ } else if (currentChapter == 4) {
if (function == 2)
animation_2_4();
else if (function == 3)
animation_3_4();
else if (function == 4)
animation_4_4();
- } else if (num_ejec == 5) {
+ } else if (currentChapter == 5) {
if (function == 2)
animation_2_5();
else if (function == 3)
@@ -3433,7 +3433,7 @@ void DrasculaEngine::response(int function) {
animation_16_5();
else if (function == 17)
animation_17_5();
- } else if (num_ejec == 6) {
+ } else if (currentChapter == 6) {
if (function == 2)
animation_2_6();
else if (function == 3)
@@ -3529,10 +3529,10 @@ bool DrasculaEngine::soundIsActive() {
return _mixer->isSoundHandleActive(_soundHandle);
}
-void DrasculaEngine::updateData() {
- if (num_ejec == 1) {
+void DrasculaEngine::updateVisible() {
+ if (currentChapter == 1) {
// nothing
- } else if (num_ejec == 2) {
+ } else if (currentChapter == 2) {
if (roomNumber == 2 && flags[40] == 0)
visible[3] = 0;
else if (roomNumber == 3 && flags[3] == 1)
@@ -3546,9 +3546,9 @@ void DrasculaEngine::updateData() {
visible[4] = 0;
else if (roomNumber == 18 && flags[28] == 1)
visible[2] = 0;
- } else if (num_ejec == 3) {
+ } else if (currentChapter == 3) {
// nothing
- } else if (num_ejec == 4) {
+ } else if (currentChapter == 4) {
if (roomNumber == 23 && flags[0] == 0 && flags[11] == 0)
visible[2] = 1;
if (roomNumber == 23 && flags[0] == 1 && flags[11] == 0)
@@ -3573,7 +3573,7 @@ void DrasculaEngine::updateData() {
visible[3] = 1;
if (roomNumber == 35 && flags[15] == 1)
visible[1] = 0;
- } else if (num_ejec == 5) {
+ } else if (currentChapter == 5) {
if (roomNumber == 49 && flags[6] == 1)
visible[2] = 0;
if (roomNumber == 49 && flags[6] == 0)
@@ -3588,7 +3588,7 @@ void DrasculaEngine::updateData() {
visible[3] = 0;
if (roomNumber == 55 && flags[8] == 1)
visible[1] = 0;
- } else if (num_ejec == 6) {
+ } else if (currentChapter == 6) {
if (roomNumber == 58 && flags[8] == 0)
isDoor[1] = 0;
if (roomNumber == 58 && flags[8] == 1)
@@ -3675,14 +3675,14 @@ void DrasculaEngine::lleva_vb(int pointX) {
void DrasculaEngine::hipo_sin_nadie(int counter){
int y = 0, sentido = 0;
- if (num_ejec == 3)
+ if (currentChapter == 3)
y = -1;
do {
counter--;
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
- if (num_ejec == 3)
+ if (currentChapter == 3)
updateScreen(0, 0, 0, y, 320, 200, screenSurface);
else
updateScreen(0, 1, 0, y, 320, 198, screenSurface);
@@ -3692,7 +3692,7 @@ void DrasculaEngine::hipo_sin_nadie(int counter){
else
y--;
- if (num_ejec == 3) {
+ if (currentChapter == 3) {
if (y == 1)
sentido = 1;
if (y == -1)
@@ -3711,7 +3711,7 @@ void DrasculaEngine::hipo_sin_nadie(int counter){
void DrasculaEngine::openDoor(int nflag, int doorNum) {
if (flags[nflag] == 0) {
- if (num_ejec == 1 /*|| num_ejec == 4*/) {
+ if (currentChapter == 1 /*|| currentChapter == 4*/) {
if (nflag != 7) {
playSound(3);
flags[nflag] = 1;
diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h
index 54669a6ca4..c50110c65c 100644
--- a/engines/drascula/drascula.h
+++ b/engines/drascula/drascula.h
@@ -275,7 +275,7 @@ public:
int x_bj, y_bj, sentido_bj;
int cont_sv;
int term_int;
- int num_ejec;
+ int currentChapter;
int hay_que_load;
char saveName[13];
int _color;
@@ -478,7 +478,7 @@ public:
void paleta_hare_claro();
void paleta_hare_oscuro();
void hare_claro();
- void updateData();
+ void updateVisible();
void startWalking();
void updateRefresh();
void updateRefresh_pre();
diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp
index deaff84c53..78426aa0cf 100644
--- a/engines/drascula/rooms.cpp
+++ b/engines/drascula/rooms.cpp
@@ -32,7 +32,7 @@ bool DrasculaEngine::roomParse(RoomTalkAction* roomActions, int fl) {
bool didAction = false;
for (int i = 0; i < ARRAYSIZE(roomActions); i++) {
- if (roomActions[i].num == num_ejec ||
+ if (roomActions[i].num == currentChapter ||
roomActions[i].num == -1) {
if (roomActions[i].action == pickedObject ||
roomActions[i].action == kVerbDefault) {
@@ -57,8 +57,8 @@ void DrasculaEngine::room_0() {
return;
// non-default actions
- if (num_ejec == 2 || num_ejec == 4 ||
- num_ejec == 5 || num_ejec == 6) {
+ if (currentChapter == 2 || currentChapter == 4 ||
+ currentChapter == 5 || currentChapter == 6) {
if (pickedObject == kVerbLook) {
talk(mirar_t[c_mirar]);
c_mirar++;
@@ -522,7 +522,7 @@ void DrasculaEngine::room_22(int fl) {
stopSound();
withoutVerb();
removeObject(22);
- updateData();
+ updateVisible();
sentido_hare = 3;
talk(499);
talk(500);
@@ -543,10 +543,10 @@ void DrasculaEngine::room_22(int fl) {
void DrasculaEngine::room_23(int fl) {
if (pickedObject == kVerbOpen && fl == 103) {
openDoor(0, 0);
- updateData();
+ updateVisible();
} else if(pickedObject == kVerbClose && fl == 103) {
closeDoor(0, 0);
- updateData();
+ updateVisible();
} else if(pickedObject == kVerbOpen && fl == 104)
openDoor(1, 1);
else if(pickedObject == kVerbClose && fl == 104)
@@ -757,7 +757,7 @@ void DrasculaEngine::room_35(int fl) {
visible[1] = 0;
flags[15] = 1;
flags[17] = 1;
- updateData();
+ updateVisible();
} else if (pickedObject == kVerbPick && fl == 149) {
pickObject(13);
visible[3] = 0;
@@ -813,7 +813,7 @@ void DrasculaEngine::room_53(int fl) {
else if (pickedObject == 16 && fl == 121) {
flags[2] = 1;
withoutVerb();
- updateData();
+ updateVisible();
} else if (pickedObject == 16) {
talk(439);
withoutVerb();
@@ -846,7 +846,7 @@ void DrasculaEngine::room_54(int fl) {
pickObject(8);
flags[13] = 1;
talk_mus(10);
- updateData();
+ updateVisible();
} else if (pickedObject == kVerbOpen && fl == 119)
talk(125);
else if (pickedObject == kVerbLook && fl == 119)
@@ -864,7 +864,7 @@ void DrasculaEngine::room_55(int fl) {
if (pickedObject == kVerbPick && fl == 122) {
pickObject(12);
flags[8] = 1;
- updateData();
+ updateVisible();
} else if (pickedObject == kVerbLook && fl == 122)
talk(138);
else if (pickedObject == kVerbLook && fl == 204)
@@ -1078,12 +1078,12 @@ void DrasculaEngine::room_pendulum(int fl) {
}
void DrasculaEngine::updateRefresh() {
- if (num_ejec == 1) {
+ if (currentChapter == 1) {
if (roomNumber == 63)
update_63();
else if (roomNumber == 62)
update_62();
- } else if (num_ejec == 2) {
+ } else if (currentChapter == 2) {
if (roomNumber == 3)
update_3();
else if (roomNumber == 2)
@@ -1100,12 +1100,12 @@ void DrasculaEngine::updateRefresh() {
update_18();
else if (roomNumber == 10)
showMap();
- } else if (num_ejec == 3) {
+ } else if (currentChapter == 3) {
if (roomNumber == 20)
update_20();
else if (roomNumber == 13)
update_13();
- } else if (num_ejec == 4) {
+ } else if (currentChapter == 4) {
if (roomNumber == 29)
update_29();
else if (roomNumber == 26)
@@ -1118,14 +1118,14 @@ void DrasculaEngine::updateRefresh() {
update_34();
else if (roomNumber == 35)
update_35();
- } else if (num_ejec == 5) {
+ } else if (currentChapter == 5) {
if (roomNumber == 45)
showMap();
else if (roomNumber == 50)
update_50();
else if (roomNumber == 57)
update_57();
- } else if (num_ejec == 6) {
+ } else if (currentChapter == 6) {
if (roomNumber == 60)
update_60();
else if (roomNumber == 61)
@@ -1136,12 +1136,12 @@ void DrasculaEngine::updateRefresh() {
}
void DrasculaEngine::updateRefresh_pre() {
- if (num_ejec == 1) {
+ if (currentChapter == 1) {
if (roomNumber == 62)
update_62_pre();
else if (roomNumber == 16)
placeBJ();
- } else if (num_ejec == 2) {
+ } else if (currentChapter == 2) {
if (roomNumber == 1)
update_1_pre();
else if (roomNumber == 3)
@@ -1164,9 +1164,9 @@ void DrasculaEngine::updateRefresh_pre() {
update_17_pre();
else if (roomNumber == 18)
update_18_pre();
- } else if (num_ejec == 3) {
+ } else if (currentChapter == 3) {
// nothing
- } else if (num_ejec == 4) {
+ } else if (currentChapter == 4) {
if (roomNumber == 21)
update_21_pre();
else if (roomNumber == 22)
@@ -1189,7 +1189,7 @@ void DrasculaEngine::updateRefresh_pre() {
update_34_pre();
else if (roomNumber == 35)
update_35_pre();
- } else if (num_ejec == 5) {
+ } else if (currentChapter == 5) {
if (roomNumber == 49)
update_49_pre();
else if (roomNumber == 53)
@@ -1198,7 +1198,7 @@ void DrasculaEngine::updateRefresh_pre() {
update_54_pre();
else if (roomNumber == 56)
update_56_pre();
- } else if (num_ejec == 6) {
+ } else if (currentChapter == 6) {
if (roomNumber == 102)
update_pendulum();
else if (roomNumber == 58)
@@ -1808,10 +1808,10 @@ bool DrasculaEngine::checkFlag(int fl) {
hasAnswer = 1;
if (menuScreen == 1) {
- if (num_ejec == 1) {
+ if (currentChapter == 1) {
if (pickedObject == kVerbLook && fl == 28)
talk(328);
- } else if (num_ejec == 2) {
+ } else if (currentChapter == 2) {
if ((pickedObject == kVerbLook && fl == 22 && flags[23] == 0)
|| (pickedObject == kVerbOpen && fl == 22 && flags[23] == 0)) {
talk(164);
@@ -1863,7 +1863,7 @@ bool DrasculaEngine::checkFlag(int fl) {
talk(152);
else
hasAnswer = 0;
- } else if (num_ejec == 3) {
+ } else if (currentChapter == 3) {
if (pickedObject == kVerbLook && fl == 22)
talk(307);
else if (pickedObject == kVerbLook && fl == 28)
@@ -1908,7 +1908,7 @@ bool DrasculaEngine::checkFlag(int fl) {
talk(152);
else
hasAnswer = 0;
- } else if (num_ejec == 4) {
+ } else if (currentChapter == 4) {
if ((pickedObject == 18 && fl == 19) || (pickedObject == 19 && fl == 18)) {
withoutVerb();
chooseObject(21);
@@ -1958,7 +1958,7 @@ bool DrasculaEngine::checkFlag(int fl) {
talk(161);
else
hasAnswer = 0;
- } else if (num_ejec == 5) {
+ } else if (currentChapter == 5) {
if (pickedObject == kVerbLook && fl == 28)
talk(328);
else if (pickedObject == kVerbLook && fl == 7)
@@ -1986,7 +1986,7 @@ bool DrasculaEngine::checkFlag(int fl) {
talk(162);
else
hasAnswer = 0;
- } else if (num_ejec == 6) {
+ } else if (currentChapter == 6) {
if (pickedObject == kVerbLook && fl == 28)
talk(328);
else if (pickedObject == kVerbLook && fl == 9) {
@@ -2000,7 +2000,7 @@ bool DrasculaEngine::checkFlag(int fl) {
hasAnswer = 0;
}
} else {
- if (num_ejec == 1) {
+ if (currentChapter == 1) {
if (pickedObject == kVerbLook && fl == 50)
talk(308);
else if (pickedObject == kVerbOpen && fl == 50)
@@ -2019,7 +2019,7 @@ bool DrasculaEngine::checkFlag(int fl) {
room_63(fl);
else
hasAnswer = 0;
- } else if (num_ejec == 2) {
+ } else if (currentChapter == 2) {
if (pickedObject == kVerbLook && fl == 50)
talk(308);
else if (pickedObject == kVerbOpen && fl == 50)
@@ -2071,7 +2071,7 @@ bool DrasculaEngine::checkFlag(int fl) {
room_19(fl);
else
hasAnswer = 0;
- } else if (num_ejec == 3) {
+ } else if (currentChapter == 3) {
if (pickedObject == kVerbLook && fl == 50)
talk(309);
else if (pickedObject == kVerbOpen && fl == 50)
@@ -2089,7 +2089,7 @@ bool DrasculaEngine::checkFlag(int fl) {
return true;
} else
hasAnswer = 0;
- } else if (num_ejec == 4) {
+ } else if (currentChapter == 4) {
if (roomNumber == 28)
talk(178);
else if (pickedObject == kVerbLook && fl == 50)
@@ -2139,7 +2139,7 @@ bool DrasculaEngine::checkFlag(int fl) {
room_44(fl);
else
hasAnswer = 0;
- } else if (num_ejec == 5) {
+ } else if (currentChapter == 5) {
if (pickedObject == kVerbLook && fl == 50)
talk("Cuanto mas me miro, mas me gusto", "54.als");
else if (pickedObject == kVerbOpen && fl == 50)
@@ -2167,7 +2167,7 @@ bool DrasculaEngine::checkFlag(int fl) {
return true;
} else
hasAnswer = 0;
- } else if (num_ejec == 6) {
+ } else if (currentChapter == 6) {
if (pickedObject == kVerbLook && fl == 50 && flags[0] == 1)
talk(308);
else if (pickedObject == kVerbLook && fl == 50 && flags[0] == 0)
diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp
index e01c6dd3ad..5f9f6098f5 100644
--- a/engines/drascula/talk.cpp
+++ b/engines/drascula/talk.cpp
@@ -130,11 +130,11 @@ void DrasculaEngine::talk_dr_izq(const char *said, const char *filename) {
placeIgor();
placeDrascula();
- if (num_ejec == 6)
+ if (currentChapter == 6)
pon_hare();
copyBackground(x_dr, y_dr, x_dr, y_dr, 38, 31, drawSurface1, screenSurface);
- if (num_ejec == 6)
+ if (currentChapter == 6)
copyRect(x_talk[face], 90, x_dr, y_dr, 38, 31, drawSurface2, screenSurface);
else
copyRect(x_talk[face], 90, x_dr, y_dr, 38, 31, backSurface, screenSurface);
@@ -179,11 +179,11 @@ void DrasculaEngine::talk_dr_dch(const char *said, const char *filename) {
placeIgor();
placeDrascula();
- if (num_ejec == 6)
+ if (currentChapter == 6)
pon_hare();
copyBackground(x_dr, y_dr, x_dr, y_dr, 45, 31, drawSurface1, screenSurface);
- if (num_ejec != 6)
+ if (currentChapter != 6)
copyRect(x_talk[face], 58, x_dr + 7, y_dr, 38, 31, backSurface, screenSurface);
else
copyRect(x_talk[face], 58, x_dr + 7, y_dr, 38, 31, drawSurface2, screenSurface);
@@ -199,12 +199,12 @@ void DrasculaEngine::talk_dr_dch(const char *said, const char *filename) {
} while (!isTalkFinished(&length));
- if (num_ejec == 6)
+ if (currentChapter == 6)
updateRoom();
placeIgor();
placeDrascula();
- if (num_ejec == 6)
+ if (currentChapter == 6)
pon_hare();
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
}
@@ -212,29 +212,29 @@ void DrasculaEngine::talk_dr_dch(const char *said, const char *filename) {
void DrasculaEngine::talk_solo(const char *said, const char *filename) {
int length = strlen(said);
- if (num_ejec == 1)
+ if (currentChapter == 1)
color_abc(color_solo);
- else if (num_ejec == 4)
+ else if (currentChapter == 4)
color_abc(kColorRed);
talkInit(filename);
- if (num_ejec == 6)
+ if (currentChapter == 6)
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
do {
if (withVoices == 0) {
- if (num_ejec == 1)
+ if (currentChapter == 1)
centerText(said, 156, 90);
- else if (num_ejec == 6)
+ else if (currentChapter == 6)
centerText(said, 213, 72);
- else if (num_ejec == 5)
+ else if (currentChapter == 5)
centerText(said, 173, 92);
}
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
} while (!isTalkFinished(&length));
- if (num_ejec == 6) {
+ if (currentChapter == 6) {
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
}
@@ -262,11 +262,11 @@ void DrasculaEngine::talk_igor_front(const char *said, const char *filename) {
updateRefresh_pre();
- if (num_ejec == 1 || num_ejec == 4)
+ if (currentChapter == 1 || currentChapter == 4)
placeIgor();
- if (num_ejec == 1)
+ if (currentChapter == 1)
placeDrascula();
- if (num_ejec == 1 || num_ejec == 6)
+ if (currentChapter == 1 || currentChapter == 6)
copyBackground(x_igor, y_igor, x_igor, y_igor, 29, 25, drawSurface1, screenSurface);
copyRect(x_talk[face], 173, x_igor, y_igor, 29, 25, frontSurface, screenSurface);
@@ -280,11 +280,11 @@ void DrasculaEngine::talk_igor_front(const char *said, const char *filename) {
pause(3);
} while (!isTalkFinished(&length));
- if (num_ejec == 6) {
+ if (currentChapter == 6) {
updateRoom();
}
- if (num_ejec == 1) {
+ if (currentChapter == 1) {
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
placeIgor();
placeDrascula();
@@ -308,10 +308,10 @@ void DrasculaEngine::talk_bartender(const char *said, const char *filename) {
talkInit(filename);
do {
- if (num_ejec == 1) {
+ if (currentChapter == 1) {
if (musicStatus() == 0)
playMusic(roomMusic);
- } else if (num_ejec == 2) {
+ } else if (currentChapter == 2) {
if (musicStatus() == 0 && flags[11] == 0 && roomMusic != 0)
playMusic(roomMusic);
}
@@ -355,7 +355,7 @@ void DrasculaEngine::talk_bj(const char *said, const char *filename) {
talkInit(filename);
do {
- if (num_ejec != 5) {
+ if (currentChapter != 5) {
face = _rnd->getRandomNumber(4);
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
@@ -398,7 +398,7 @@ void DrasculaEngine::talk(int index) {
void DrasculaEngine::talk(const char *said, const char *filename) {
int suma_1_pixel = 0;
- if (num_ejec != 2)
+ if (currentChapter != 2)
suma_1_pixel = 1;
int y_mask_talk = 170;
@@ -407,7 +407,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) {
int face;
int length = strlen(said);
- if (num_ejec == 6) {
+ if (currentChapter == 6) {
if (flags[0] == 0 && roomNumber == 102) {
talk_pen(said, filename);
return;
@@ -418,12 +418,12 @@ void DrasculaEngine::talk(const char *said, const char *filename) {
}
}
- if (num_ejec != 2) {
+ if (currentChapter != 2) {
if (factor_red[hare_y + alto_hare] == 100)
suma_1_pixel = 0;
}
- if (num_ejec == 4) {
+ if (currentChapter == 4) {
if (roomNumber == 24 || flags[29] == 0) {
color_abc(kColorYellow);
}
@@ -439,7 +439,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) {
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
updateRefresh_pre();
- if (num_ejec == 2)
+ if (currentChapter == 2)
copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, ancho_hare, alto_talk - 1, screenSurface, drawSurface3);
else
copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]),
@@ -448,7 +448,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) {
pon_hare();
- if (num_ejec == 2) {
+ if (currentChapter == 2) {
if (!strcmp(menuBackground, "99.alg") || !strcmp(menuBackground, "994.alg"))
copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, ancho_hare, alto_talk - 1, drawSurface3, screenSurface);
} else {
@@ -458,7 +458,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) {
}
if (sentido_hare == 0) {
- if (num_ejec == 2)
+ if (currentChapter == 2)
copyRect(x_talk_izq[face], y_mask_talk, hare_x + 8, hare_y - 1, ancho_talk, alto_talk,
extraSurface, screenSurface);
else
@@ -468,7 +468,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) {
updateRefresh();
} else if (sentido_hare == 1) {
- if (num_ejec == 2)
+ if (currentChapter == 2)
copyRect(x_talk_dch[face], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk,
extraSurface, screenSurface);
else
@@ -476,7 +476,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) {
hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], extraSurface, screenSurface);
updateRefresh();
} else if (sentido_hare == 2) {
- if (num_ejec == 2)
+ if (currentChapter == 2)
copyRect(x_talk_izq[face], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk,
frontSurface, screenSurface);
else
@@ -486,7 +486,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) {
frontSurface, screenSurface);
updateRefresh();
} else if (sentido_hare == 3) {
- if (num_ejec == 2)
+ if (currentChapter == 2)
copyRect(x_talk_dch[face], y_mask_talk, hare_x + 8, hare_y, ancho_talk, alto_talk,
frontSurface, screenSurface);
else
@@ -508,7 +508,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) {
updateRoom();
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
- if (num_ejec == 1) {
+ if (currentChapter == 1) {
if (musicStatus() == 0 && flags[11] == 0 && musicStopped == 0)
playMusic(roomMusic);
}
@@ -564,7 +564,7 @@ void DrasculaEngine::talk_drunk(const char *said, const char *filename) {
int face;
int length = strlen(said);
- if (num_ejec == 1) {
+ if (currentChapter == 1) {
loadAndDecompressPic("an11y13.alg", frontSurface, 1);
}
@@ -602,14 +602,14 @@ void DrasculaEngine::talk_drunk(const char *said, const char *filename) {
updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
flags[13] = 0;
- if (num_ejec == 1) {
+ if (currentChapter == 1) {
loadAndDecompressPic("96.alg", frontSurface, 1);
}
- if (num_ejec == 1) {
+ if (currentChapter == 1) {
if (musicStatus() == 0 && flags[11] == 0)
playMusic(roomMusic);
- } else if (num_ejec == 2) {
+ } else if (currentChapter == 2) {
if (musicStatus() == 0 && flags[11] == 0 && roomMusic != 0)
playMusic(roomMusic);
}
@@ -1037,7 +1037,7 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha
color_abc(kColorYellow);
- if (num_ejec == 1) {
+ if (currentChapter == 1) {
if (factor_red[hare_y + alto_hare] == 100)
suma_1_pixel = 0;
}
@@ -1052,13 +1052,13 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
updateRefresh_pre();
- if (num_ejec == 2)
+ if (currentChapter == 2)
copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, ancho_hare, alto_talk - 1, screenSurface, drawSurface3);
else
copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]),
(int)(((float)(alto_talk - 1) / 100) * factor_red[hare_y + alto_hare]), screenSurface, drawSurface3);
pon_hare();
- if (num_ejec == 2) {
+ if (currentChapter == 2) {
if (alto_hare != 56)
copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, ancho_hare, alto_talk - 1, drawSurface3, screenSurface);
} else
@@ -1066,21 +1066,21 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha
(int)(((float)(alto_talk - 1) / 100) * factor_red[hare_y + alto_hare]), drawSurface3, screenSurface);
if (sentido_hare == 0) {
- if (num_ejec == 2)
+ if (currentChapter == 2)
copyRect(x_talk_izq[face], y_mask_talk, hare_x + 8, hare_y - 1, ancho_talk, alto_talk, extraSurface, screenSurface);
else
reduce_hare_chico(x_talk_izq[face], y_mask_talk, (int)(hare_x + (8.0f / 100) * factor_red[hare_y + alto_hare]),
hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], extraSurface, screenSurface);
updateRefresh();
} else if (sentido_hare == 1) {
- if (num_ejec == 2)
+ if (currentChapter == 2)
copyRect(x_talk_dch[face], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, extraSurface, screenSurface);
else
reduce_hare_chico(x_talk_dch[face], y_mask_talk, (int)(hare_x + (12.0f / 100) * factor_red[hare_y + alto_hare]),
hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], extraSurface, screenSurface);
updateRefresh();
} else if (sentido_hare == 2) {
- if (num_ejec == 2)
+ if (currentChapter == 2)
copyRect(x_talk_izq[face], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, frontSurface, screenSurface);
else
reduce_hare_chico(x_talk_izq[face], y_mask_talk,
@@ -1088,7 +1088,7 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha
ancho_talk, alto_talk, factor_red[hare_y + alto_hare], frontSurface, screenSurface);
updateRefresh();
} else if (sentido_hare == 3) {
- if (num_ejec == 2)
+ if (currentChapter == 2)
copyRect(x_talk_dch[face], y_mask_talk, hare_x + 8, hare_y, ancho_talk, alto_talk, frontSurface, screenSurface);
else
reduce_hare_chico(x_talk_dch[face], y_mask_talk,
@@ -1106,9 +1106,9 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha
pause(3);
} while (!isTalkFinished(&length));
- if (num_ejec == 1 && musicStatus() == 0 && flags[11] == 0)
+ if (currentChapter == 1 && musicStatus() == 0 && flags[11] == 0)
playMusic(roomMusic);
- if (num_ejec == 2 && musicStatus() == 0 && flags[11] == 0 && roomMusic != 0)
+ if (currentChapter == 2 && musicStatus() == 0 && flags[11] == 0 && roomMusic != 0)
playMusic(roomMusic);
}