aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2008-06-03 08:54:49 +0000
committerFilippos Karapetis2008-06-03 08:54:49 +0000
commit00e662391da59adb8aae478f7af2ab867346ab7f (patch)
tree7223868cb5c90f824f30e600fa3113b8dd45be63 /engines
parent45cce58611ba8fd70bb367168c559e2ef0fe7c9f (diff)
downloadscummvm-rg350-00e662391da59adb8aae478f7af2ab867346ab7f.tar.gz
scummvm-rg350-00e662391da59adb8aae478f7af2ab867346ab7f.tar.bz2
scummvm-rg350-00e662391da59adb8aae478f7af2ab867346ab7f.zip
x_talk_izq/x_talk_dch are used in more than 1 place
sentido_dr -> trackDrascula sentido_hare -> trackProtagonist sentido_final -> trackFinal lleva_al_hare -> gotoObject pon_vb/sentido_vb -> moveVB/trackVB hay_seleccion -> selectionMade suelo -> floor obj_salir -> objIsExit sitio_x/sitio_y -> roomX/roomY fundido -> fade cuanto -> duration (in pause()) pos_hare -> curPos nom_fich -> fileName sitiobj_x/sitiobj_y -> roomObjX/roomObjY sentidobj -> trackObj cirio -> candle pianista -> pianist suma_1_pixel -> talkOffset sincronia -> syncChar svn-id: r32512
Diffstat (limited to 'engines')
-rw-r--r--engines/drascula/animation.cpp172
-rw-r--r--engines/drascula/drascula.cpp414
-rw-r--r--engines/drascula/drascula.h20
-rw-r--r--engines/drascula/rooms.cpp89
-rw-r--r--engines/drascula/talk.cpp61
5 files changed, 378 insertions, 378 deletions
diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp
index 54e9399e05..ae2c3e5aff 100644
--- a/engines/drascula/animation.cpp
+++ b/engines/drascula/animation.cpp
@@ -185,7 +185,7 @@ void DrasculaEngine::animation_1_1() {
loadPic("100.alg", drawSurface1, HALF_PAL);
loadPic("auxigor.alg", frontSurface, 1);
loadPic("auxdr.alg", backSurface, 1);
- sentido_dr = 0;
+ trackDrascula = 0;
x_dr = 129;
y_dr = 95;
sentido_igor = 1;
@@ -288,20 +288,20 @@ void DrasculaEngine::animation_1_1() {
fadeFromBlack(0);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
- sentido_dr = 1;
+ trackDrascula = 1;
talk_igor(1, kIgorDch);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
talk_drascula(11, 1);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
- sentido_dr = 3;
+ trackDrascula = 3;
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
placeIgor();
placeDrascula();
updateScreen();
pause(1);
- sentido_dr = 0;
+ trackDrascula = 0;
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
placeIgor();
placeDrascula();
@@ -309,13 +309,13 @@ void DrasculaEngine::animation_1_1() {
talk_drascula(12);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
- sentido_dr = 3;
+ trackDrascula = 3;
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
placeIgor();
placeDrascula();
updateScreen();
pause(1);
- sentido_dr = 1;
+ trackDrascula = 1;
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
placeIgor();
placeDrascula();
@@ -327,13 +327,13 @@ void DrasculaEngine::animation_1_1() {
talk_drascula(13, 1);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
- sentido_dr = 3;
+ trackDrascula = 3;
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
placeIgor();
placeDrascula();
updateScreen();
pause(1);
- sentido_dr = 0;
+ trackDrascula = 0;
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
placeIgor();
placeDrascula();
@@ -384,7 +384,7 @@ void DrasculaEngine::animation_1_1() {
void DrasculaEngine::animation_2_1() {
int l;
- lleva_al_hare(231, 91);
+ gotoObject(231, 91);
hare_se_ve = 0;
term_int = 0;
@@ -466,7 +466,7 @@ void DrasculaEngine::animation_2_1() {
sentido_bj = 0;
curX = 91;
curY = 95;
- sentido_hare = 1;
+ trackProtagonist = 1;
hare_se_ve = 1;
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
@@ -478,10 +478,10 @@ void DrasculaEngine::animation_2_1() {
if (animate("lev.bin", 15))
break;
- lleva_al_hare(100 + curWidth / 2, 99 + curHeight);
+ gotoObject(100 + curWidth / 2, 99 + curHeight);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
- sentido_hare = 1;
+ trackProtagonist = 1;
curX = 100;
curY = 95;
@@ -538,7 +538,7 @@ void DrasculaEngine::animation_2_1() {
pause(118);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
- lleva_al_hare(132, 97 + curHeight);
+ gotoObject(132, 97 + curHeight);
pause(60);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
@@ -546,7 +546,7 @@ void DrasculaEngine::animation_2_1() {
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
talk_bj(12);
- lleva_al_hare(157, 98 + curHeight);
+ gotoObject(157, 98 + curHeight);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
if (animate("bes.bin", 16))
@@ -554,7 +554,7 @@ void DrasculaEngine::animation_2_1() {
playMusic(11);
if (animate("rap.bin", 16))
break;
- sentido_hare = 3;
+ trackProtagonist = 3;
// The room number was originally changed here to "no_bj.alg",
// which doesn't exist. In reality, this was just a hack to
// set the room number to a non-existant one, so that BJ does
@@ -573,7 +573,7 @@ void DrasculaEngine::animation_2_1() {
pause(76);
if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
break;
- sentido_hare = 1;
+ trackProtagonist = 1;
updateRoom();
updateScreen();
talk(226);
@@ -668,12 +668,12 @@ void DrasculaEngine::animation_4_1() {
}
void DrasculaEngine::animation_1_2() {
- lleva_al_hare(178, 121);
- lleva_al_hare(169, 135);
+ gotoObject(178, 121);
+ gotoObject(169, 135);
}
void DrasculaEngine::animation_2_2() {
- sentido_hare = 0;
+ trackProtagonist = 0;
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
pon_hare();
updateRefresh();
@@ -708,9 +708,9 @@ void DrasculaEngine::animation_2_2() {
}
void DrasculaEngine::animation_3_2() {
- lleva_al_hare(163, 106);
- lleva_al_hare(287, 101);
- sentido_hare = 0;
+ gotoObject(163, 106);
+ gotoObject(287, 101);
+ trackProtagonist = 0;
}
void DrasculaEngine::animation_4_2() {
@@ -826,7 +826,7 @@ void DrasculaEngine::animation_14_2() {
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
updateRefresh_pre();
pon_hare();
- pon_vb();
+ moveVB();
pos_cabina[3] = n;
copyRectClip(pos_cabina, backSurface, screenSurface);
updateRefresh();
@@ -1040,8 +1040,8 @@ void DrasculaEngine::animation_20_2() {
exitRoom(0);
flags[21] = 0;
flags[24] = 0;
- sentido_vb = 1;
- vb_x = 120;
+ trackVB = 1;
+ vbX = 120;
breakOut = 1;
}
@@ -1065,17 +1065,17 @@ void DrasculaEngine::animation_23_2() {
talk_vb(15);
lleva_vb(42);
- sentido_vb = 1;
+ trackVB = 1;
talk_vb(16);
- sentido_vb = 2;
- lleva_al_hare(157, 147);
- lleva_al_hare(131, 149);
- sentido_hare = 0;
+ trackVB = 2;
+ gotoObject(157, 147);
+ gotoObject(131, 149);
+ trackProtagonist = 0;
animation_14_2();
if (flags[25] == 0)
talk_vb(17);
pause(8);
- sentido_vb = 1;
+ trackVB = 1;
talk_vb(18);
if (flags[29] == 0)
@@ -1083,7 +1083,7 @@ void DrasculaEngine::animation_23_2() {
else
animation_23_joined2();
- sentido_vb = 2;
+ trackVB = 2;
animation_25_2();
lleva_vb(99);
@@ -1168,7 +1168,7 @@ void DrasculaEngine::animation_25_2() {
updateRefresh_pre();
pon_hare();
- pon_vb();
+ moveVB();
pos_cabina[3] = n;
@@ -1247,13 +1247,13 @@ void DrasculaEngine::animation_31_2() {
talk_vb(44);
lleva_vb(-50);
pause(15);
- lleva_al_hare(159, 140);
+ gotoObject(159, 140);
loadPic("99.alg", backSurface, 1);
- sentido_hare = 2;
+ trackProtagonist = 2;
updateRoom();
updateScreen();
pause(78);
- sentido_hare = 0;
+ trackProtagonist = 0;
updateRoom();
updateScreen();
pause(22);
@@ -1291,8 +1291,8 @@ void DrasculaEngine::animation_31_2() {
}
void DrasculaEngine::animation_35_2() {
- lleva_al_hare(96, 165);
- lleva_al_hare(79, 165);
+ gotoObject(96, 165);
+ gotoObject(79, 165);
updateRoom();
updateScreen();
@@ -1344,7 +1344,7 @@ void DrasculaEngine::animation_2_3() {
loadPic("97.alg", extraSurface, 1);
loadPic("99.alg", backSurface, 1);
- lleva_al_hare(332, 127);
+ gotoObject(332, 127);
}
void DrasculaEngine::animation_3_3() {
@@ -1494,17 +1494,17 @@ void DrasculaEngine::animation_1_5() {
talk_bj(19);
talk(229);
pause(5);
- lleva_al_hare(114, 170);
- sentido_hare = 3;
+ gotoObject(114, 170);
+ trackProtagonist = 3;
talk(431);
talk_bj(20);
- sentido_hare = 2;
+ trackProtagonist = 2;
pause(4);
talk(438);
- sitio_x = 120;
- sitio_y = 157;
+ roomX = 120;
+ roomY = 157;
walkToObject = 1;
- sentido_final = 1;
+ trackFinal = 1;
startWalking();
talk_bj(21);
@@ -1515,12 +1515,12 @@ void DrasculaEngine::animation_1_5() {
updateScreen();
}
- sentido_hare = 1;
+ trackProtagonist = 1;
talk(229);
flags[0] = 1;
}
- sentido_hare = 1;
+ trackProtagonist = 1;
converse("op_8.cal");
}
@@ -1566,8 +1566,8 @@ void DrasculaEngine::animation_5_5(){
withoutVerb();
removeObject(8);
- lleva_al_hare(curX - 19, curY + curHeight);
- sentido_hare = 1;
+ gotoObject(curX - 19, curY + curHeight);
+ trackProtagonist = 1;
updateRoom();
updateScreen();
@@ -1686,7 +1686,7 @@ void DrasculaEngine::animation_12_5() {
const int elfrusky_x[] = {1, 68, 135, 1, 68, 135, 1, 68, 135, 68, 1, 135, 68, 135, 68};
//const int humo_x[] = {1, 29, 57, 85, 113, 141, 169, 197, 225};
int color, component;
- char fundido;
+ char fade;
playMusic(26);
updateRoom();
@@ -1695,7 +1695,7 @@ void DrasculaEngine::animation_12_5() {
animate("rayo1.bin", 23);
playSound(5);
animate("rayo2.bin", 17);
- sentido_hare = 1;
+ trackProtagonist = 1;
updateRoom();
updateScreen();
@@ -1708,22 +1708,22 @@ void DrasculaEngine::animation_12_5() {
bgPalette3[color][component] = gamePalette[color][component];
}
- for (fundido = 1; fundido >= 0; fundido--) {
+ for (fade = 1; fade >= 0; fade--) {
for (color = 0; color < 128; color++)
for (component = 0; component < 3; component++)
- bgPalette1[color][component] = adjustToVGA(bgPalette1[color][component] - 8 + fundido);
+ bgPalette1[color][component] = adjustToVGA(bgPalette1[color][component] - 8 + fade);
}
- for (fundido = 2; fundido >= 0; fundido--) {
+ for (fade = 2; fade >= 0; fade--) {
for (color = 0; color < 128; color++)
for (component = 0; component < 3; component++)
- bgPalette2[color][component] = adjustToVGA(bgPalette2[color][component] - 8 + fundido);
+ bgPalette2[color][component] = adjustToVGA(bgPalette2[color][component] - 8 + fade);
}
- for (fundido = 3; fundido >= 0; fundido--) {
+ for (fade = 3; fade >= 0; fade--) {
for (color = 0; color < 128; color++)
for (component = 0; component < 3; component++)
- bgPalette3[color][component] = adjustToVGA(bgPalette3[color][component] - 8 + fundido);
+ bgPalette3[color][component] = adjustToVGA(bgPalette3[color][component] - 8 + fade);
}
loadPic("3an11_1.alg", backSurface, 1);
@@ -1773,14 +1773,14 @@ void DrasculaEngine::animation_12_5() {
loadPic("99.alg", backSurface, 1);
- lleva_al_hare(40, 169);
- lleva_al_hare(-14, 175);
+ gotoObject(40, 169);
+ gotoObject(-14, 175);
doBreak = 1;
previousMusic = roomMusic;
hare_se_ve = 1;
clearRoom();
- sentido_hare = 1;
+ trackProtagonist = 1;
characterMoved = 0;
curX = -1;
objExit = 104;
@@ -1823,7 +1823,7 @@ void DrasculaEngine::animation_13_5() {
break;
if (frame == 7) {
frame = 0;
- sentido_hare = 3;
+ trackProtagonist = 3;
}
pause(6);
}
@@ -1836,16 +1836,16 @@ void DrasculaEngine::animation_14_5() {
updateScreen(0, 0, 0,0 , 320, 200, screenSurface);
finishSound();
pause(17);
- sentido_hare = 3;
+ trackProtagonist = 3;
talk(246);
- lleva_al_hare(89, 160);
+ gotoObject(89, 160);
flags[10] = 1;
playSound(7);
updateRoom();
updateScreen();
finishSound();
pause(14);
- sentido_hare = 3;
+ trackProtagonist = 3;
updateRoom();
updateScreen();
talk_solo(_textd[_lang][18], "d18.als");
@@ -1871,7 +1871,7 @@ void DrasculaEngine::animation_17_5() {
void DrasculaEngine::animation_1_6() {
int l;
- sentido_hare = 0;
+ trackProtagonist = 0;
curX = 103;
curY = 108;
flags[0] = 1;
@@ -1933,7 +1933,7 @@ void DrasculaEngine::animation_1_6() {
talk_drascula(33, 1);
talk_igor(12, kIgorFront);
talk_drascula(34, 1);
- sentido_dr = 0;
+ trackDrascula = 0;
talk_drascula(35);
if (_lang == kSpanish)
@@ -1998,10 +1998,10 @@ void DrasculaEngine::animation_6_6() {
withoutVerb();
carga_escoba("58.ald");
hare_se_ve = 1;
- sentido_hare = 1;
+ trackProtagonist = 1;
animate("hbp.bin", 14);
- sentido_hare = 3;
+ trackProtagonist = 3;
flags[0] = 1;
flags[1] = 0;
flags[2] = 1;
@@ -2034,14 +2034,14 @@ void DrasculaEngine::animation_9_6() {
roomNumber = -1;
loadPic("nota2.alg", drawSurface1, HALF_PAL);
black();
- sentido_hare = 1;
+ trackProtagonist = 1;
curX -= 21;
updateRoom();
updateScreen();
fadeFromBlack(0);
pause(96);
- lleva_al_hare(116, 178);
- sentido_hare = 2;
+ gotoObject(116, 178);
+ trackProtagonist = 2;
updateRoom();
updateScreen();
playMusic(9);
@@ -2053,14 +2053,14 @@ void DrasculaEngine::animation_9_6() {
talk_solo(_textbj[_lang][26], "bj26.als");
talk_solo(_textbj[_lang][27], "bj27.als");
talk_solo(_textbj[_lang][28], "bj28.als");
- sentido_hare = 3;
+ trackProtagonist = 3;
clearRoom();
loadPic("96.alg", frontSurface, COMPLETE_PAL);
loadPic("nota2.alg", drawSurface1, HALF_PAL);
talk(296);
talk(297);
talk(298);
- sentido_hare = 1;
+ trackProtagonist = 1;
talk(299);
talk(300);
updateRoom();
@@ -2069,7 +2069,7 @@ void DrasculaEngine::animation_9_6() {
color_abc(kColorLightGreen);
talk_solo("GOOOOOOOOOOOOOOOL", "s15.als");
loadPic("nota2.alg", drawSurface1, 1);
- sentido_hare = 0;
+ trackProtagonist = 0;
updateRoom();
updateScreen();
talk(301);
@@ -2299,12 +2299,12 @@ void DrasculaEngine::animation_18_2() {
void DrasculaEngine::animation_22_2() {
talk(374);
- sentido_hare=2;
+ trackProtagonist=2;
updateRoom();
updateScreen();
playSound(13);
finishSound();
- sentido_hare = 1;
+ trackProtagonist = 1;
talk_vbpuerta(1);
talk(375);
@@ -2317,11 +2317,11 @@ void DrasculaEngine::animation_22_2() {
void DrasculaEngine::animation_24_2() {
if (curX < 178)
- lleva_al_hare(208, 136);
- sentido_hare = 3;
+ gotoObject(208, 136);
+ trackProtagonist = 3;
updateRoom();
pause(3);
- sentido_hare = 0;
+ trackProtagonist = 0;
talk(356);
@@ -2341,8 +2341,8 @@ void DrasculaEngine::animation_24_2() {
exitRoom(0);
flags[21] = 0;
flags[24] = 0;
- sentido_vb = 1;
- vb_x = 120;
+ trackVB = 1;
+ vbX = 120;
}
void DrasculaEngine::animation_32_2() {
@@ -2367,7 +2367,7 @@ void DrasculaEngine::animation_32_2() {
}
void DrasculaEngine::animation_34_2() {
- sentido_hare = 1;
+ trackProtagonist = 1;
updateRoom();
updateScreen();
@@ -2470,7 +2470,7 @@ void DrasculaEngine::animation_7_2() {
}
void DrasculaEngine::animation_5_2() {
- sentido_hare = 0;
+ trackProtagonist = 0;
updateRoom();
updateScreen();
@@ -2664,10 +2664,10 @@ void DrasculaEngine::animation_1_4() {
}
void DrasculaEngine::animation_5_4(){
- sentido_hare = 3;
+ trackProtagonist = 3;
loadPic("anh_dr.alg", backSurface, 1);
- lleva_al_hare(99, 160);
- lleva_al_hare(38, 177);
+ gotoObject(99, 160);
+ gotoObject(38, 177);
hare_se_ve = 0;
updateRoom();
updateScreen();
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index ce3cbcc8f6..5bbad2c531 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -118,7 +118,7 @@ int DrasculaEngine::go() {
takeObject = 0;
menuBar = 0; menuScreen = 0; hasName = 0;
frame_y = 0;
- curX = -1; characterMoved = 0; sentido_hare = 3; num_frame = 0; hare_se_ve = 1;
+ curX = -1; characterMoved = 0; trackProtagonist = 3; num_frame = 0; hare_se_ve = 1;
checkFlags = 1;
doBreak = 0;
walkToObject = 0;
@@ -129,14 +129,14 @@ int DrasculaEngine::go() {
conta_blind_vez = 0;
changeColor = 0;
breakOut = 0;
- vb_x = 120; sentido_vb = 1; vb_se_mueve = 0; frame_vb = 1;
+ vbX = 120; trackVB = 1; vbHasMoved = 0; frame_vb = 1;
frame_piano = 0;
frame_drunk = 0;
frame_candles = 0;
cont_sv = 0;
term_int = 0;
musicStopped = 0;
- hay_seleccion = 0;
+ selectionMade = 0;
UsingMem = 0;
globalSpeed = 0;
frame_blind = 0;
@@ -149,7 +149,7 @@ int DrasculaEngine::go() {
hay_sb = 1;
withVoices = 0;
- hay_seleccion = 0;
+ selectionMade = 0;
if (currentChapter != 6) {
loadPic("95.alg", tableSurface, 1);
@@ -181,7 +181,7 @@ int DrasculaEngine::go() {
loadPic("99.alg", backSurface, 1);
} else if (currentChapter == 6) {
igorX = 105, igorY = 85, sentido_igor = 1;
- x_dr = 62, y_dr = 99, sentido_dr = 1;
+ x_dr = 62, y_dr = 99, trackDrascula = 1;
frame_pen = 0;
flag_tv = 0;
@@ -468,7 +468,7 @@ bool DrasculaEngine::escoba() {
withoutVerb();
loadPic("2aux62.alg", drawSurface2, 1);
- sentido_hare = 1;
+ trackProtagonist = 1;
objExit = 104;
if (hay_que_load != 0) {
if (!para_cargar(saveName)) {
@@ -478,11 +478,11 @@ bool DrasculaEngine::escoba() {
carga_escoba("62.ald");
curX = -20;
curY = 56;
- lleva_al_hare(65, 145);
+ gotoObject(65, 145);
}
} else if (currentChapter == 2) {
addObject(28);
- sentido_hare = 3;
+ trackProtagonist = 3;
objExit = 162;
if (hay_que_load == 0)
carga_escoba("14.ald");
@@ -500,7 +500,7 @@ bool DrasculaEngine::escoba() {
addObject(20);
addObject(19);
flags[1] = 1;
- sentido_hare = 1;
+ trackProtagonist = 1;
objExit = 99;
if (hay_que_load == 0)
carga_escoba("20.ald");
@@ -517,7 +517,7 @@ bool DrasculaEngine::escoba() {
objExit = 100;
if (hay_que_load == 0) {
carga_escoba("21.ald");
- sentido_hare = 0;
+ trackProtagonist = 0;
curX = 235;
curY = 164;
} else {
@@ -535,7 +535,7 @@ bool DrasculaEngine::escoba() {
addObject(15);
addObject(17);
addObject(20);
- sentido_hare = 1;
+ trackProtagonist = 1;
objExit = 100;
if (hay_que_load == 0) {
carga_escoba("45.ald");
@@ -548,7 +548,7 @@ bool DrasculaEngine::escoba() {
addObject(28);
addObject(9);
- sentido_hare = 1;
+ trackProtagonist = 1;
objExit = 104;
if (hay_que_load == 0) {
carga_escoba("58.ald");
@@ -567,7 +567,7 @@ bool DrasculaEngine::escoba() {
stepY = STEP_Y;
}
if (characterMoved == 0 && walkToObject == 1) {
- sentido_hare = sentido_final;
+ trackProtagonist = trackFinal;
walkToObject = 0;
}
@@ -575,9 +575,9 @@ bool DrasculaEngine::escoba() {
if (roomNumber == 3 && (curX == 279) && (curY + curHeight == 101))
animation_1_2();
else if (roomNumber == 14 && (curX == 214) && (curY + curHeight == 121))
- lleva_al_hare(190, 130);
+ gotoObject(190, 130);
else if (roomNumber == 14 && (curX == 246) && (curY + curHeight == 112))
- lleva_al_hare(190, 130);
+ gotoObject(190, 130);
}
moveCursor();
@@ -611,8 +611,8 @@ bool DrasculaEngine::escoba() {
if (button_dch == 1 && menuScreen == 0) {
delay(100);
characterMoved = 0;
- if (sentido_hare == 2)
- sentido_hare = 1;
+ if (trackProtagonist == 2)
+ trackProtagonist = 1;
if (currentChapter == 4)
loadPic("icons2.alg", backSurface, 1);
else if (currentChapter == 5)
@@ -826,8 +826,8 @@ void DrasculaEngine::getStringFromLine(char *buf, int len, char* result) {
sscanf(buf, "%s", result);
}
-void DrasculaEngine::carga_escoba(const char *nom_fich) {
- int soc, l, martin = 0, obj_salir = 0;
+void DrasculaEngine::carga_escoba(const char *fileName) {
+ int soc, l, martin = 0, objIsExit = 0;
float chiquez = 0, pequegnez = 0;
char pant1[20], pant2[20], pant3[20], pant4[20];
char para_codificar[20];
@@ -835,12 +835,12 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) {
hasName = 0;
- strcpy(para_codificar, nom_fich);
- strcpy(currentData, nom_fich);
+ strcpy(para_codificar, fileName);
+ strcpy(currentData, fileName);
- _arj.open(nom_fich);
+ _arj.open(fileName);
if (!_arj.isOpen()) {
- error("missing data file %s", nom_fich);
+ error("missing data file %s", fileName);
}
int size = _arj.size();
@@ -876,9 +876,9 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) {
getIntFromLine(buffer, size, &y1[l]);
getIntFromLine(buffer, size, &x2[l]);
getIntFromLine(buffer, size, &y2[l]);
- getIntFromLine(buffer, size, &sitiobj_x[l]);
- getIntFromLine(buffer, size, &sitiobj_y[l]);
- getIntFromLine(buffer, size, &sentidobj[l]);
+ getIntFromLine(buffer, size, &roomObjX[l]);
+ getIntFromLine(buffer, size, &roomObjY[l]);
+ getIntFromLine(buffer, size, &trackObj[l]);
getIntFromLine(buffer, size, &visible[l]);
getIntFromLine(buffer, size, &isDoor[l]);
if (isDoor[l] != 0) {
@@ -891,10 +891,10 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) {
}
}
- getIntFromLine(buffer, size, &suelo_x1);
- getIntFromLine(buffer, size, &suelo_y1);
- getIntFromLine(buffer, size, &suelo_x2);
- getIntFromLine(buffer, size, &suelo_y2);
+ getIntFromLine(buffer, size, &floorX1);
+ getIntFromLine(buffer, size, &floorY1);
+ getIntFromLine(buffer, size, &floorX2);
+ getIntFromLine(buffer, size, &floorY2);
if (currentChapter != 2) {
getIntFromLine(buffer, size, &far);
@@ -925,13 +925,13 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) {
for (l = 0; l < numRoomObjs; l++) {
if (objectNum[l] == objExit)
- obj_salir = l;
+ objIsExit = l;
}
if (currentChapter == 2) {
if (curX == -1) {
- curX = _destX[obj_salir];
- curY = _destY[obj_salir] - curHeight;
+ curX = _destX[objIsExit];
+ curY = _destY[objIsExit] - curHeight;
}
characterMoved = 0;
}
@@ -958,27 +958,27 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) {
color_abc(kColorLightGreen);
if (currentChapter != 2) {
- for (l = 0; l <= suelo_y1; l++)
+ for (l = 0; l <= floorY1; l++)
factor_red[l] = far;
- for (l = suelo_y1; l <= 201; l++)
+ for (l = floorY1; l <= 201; l++)
factor_red[l] = near;
- chiquez = (float)(near - far) / (float)(suelo_y2 - suelo_y1);
- for (l = suelo_y1; l <= suelo_y2; l++) {
+ chiquez = (float)(near - far) / (float)(floorY2 - floorY1);
+ for (l = floorY1; l <= floorY2; l++) {
factor_red[l] = (int)(far + pequegnez);
pequegnez = pequegnez + chiquez;
}
}
if (roomNumber == 24) {
- for (l = suelo_y1 - 1; l > 74; l--) {
+ for (l = floorY1 - 1; l > 74; l--) {
factor_red[l] = (int)(far - pequegnez);
pequegnez = pequegnez + chiquez;
}
}
if (currentChapter == 5 && roomNumber == 54) {
- for (l = suelo_y1 - 1; l > 84; l--) {
+ for (l = floorY1 - 1; l > 84; l--) {
factor_red[l] = (int)(far - pequegnez);
pequegnez = pequegnez + chiquez;
}
@@ -986,8 +986,8 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) {
if (currentChapter != 2) {
if (curX == -1) {
- curX = _destX[obj_salir];
- curY = _destY[obj_salir];
+ curX = _destX[objIsExit];
+ curY = _destY[objIsExit];
curHeight = (CHARACTER_HEIGHT * factor_red[curY]) / 100;
curWidth = (CHARACTER_WIDTH * factor_red[curY]) / 100;
curY = curY - curHeight;
@@ -1061,18 +1061,18 @@ void DrasculaEngine::clearRoom() {
_system->updateScreen();
}
-void DrasculaEngine::lleva_al_hare(int pointX, int pointY) {
+void DrasculaEngine::gotoObject(int pointX, int pointY) {
if (currentChapter == 5 || currentChapter == 6) {
if (hare_se_ve == 0) {
- curX = sitio_x;
- curY = sitio_y;
+ curX = roomX;
+ curY = roomY;
updateRoom();
updateScreen();
return;
}
}
- sitio_x = pointX;
- sitio_y = pointY;
+ roomX = pointX;
+ roomY = pointY;
startWalking();
for (;;) {
@@ -1084,7 +1084,7 @@ void DrasculaEngine::lleva_al_hare(int pointX, int pointY) {
if (walkToObject == 1) {
walkToObject = 0;
- sentido_hare = sentido_final;
+ trackProtagonist = trackFinal;
}
updateRoom();
updateScreen();
@@ -1188,9 +1188,9 @@ bool DrasculaEngine::verify1() {
for (l = 0; l < numRoomObjs; l++) {
if (mouseX > x1[l] && mouseY > y1[l]
&& mouseX < x2[l] && mouseY < y2[l] && doBreak == 0) {
- sitio_x = sitiobj_x[l];
- sitio_y = sitiobj_y[l];
- sentido_final = sentidobj[l];
+ roomX = roomObjX[l];
+ roomY = roomObjY[l];
+ trackFinal = trackObj[l];
doBreak = 1;
walkToObject = 1;
startWalking();
@@ -1198,8 +1198,8 @@ bool DrasculaEngine::verify1() {
}
if (doBreak == 0) {
- sitio_x = CLIP(mouseX, suelo_x1, suelo_x2);
- sitio_y = CLIP(mouseY, suelo_y1 + feetHeight, suelo_y2);
+ roomX = CLIP(mouseX, floorX1, floorX2);
+ roomY = CLIP(mouseY, floorY1 + feetHeight, floorY2);
startWalking();
}
doBreak = 0;
@@ -1222,9 +1222,9 @@ bool DrasculaEngine::verify2() {
for (l = 0; l < numRoomObjs; l++) {
if (mouseX > x1[l] && mouseY > y1[l]
&& mouseX < x2[l] && mouseY < y2[l] && visible[l] == 1) {
- sentido_final = sentidobj[l];
+ trackFinal = trackObj[l];
walkToObject = 1;
- lleva_al_hare(sitiobj_x[l], sitiobj_y[l]);
+ gotoObject(roomObjX[l], roomObjY[l]);
if (checkFlag(objectNum[l]))
return true;
if (currentChapter == 4)
@@ -1418,11 +1418,11 @@ bool DrasculaEngine::saves() {
strcpy(select, names[n]);
if (strcmp(select, "*"))
- hay_seleccion = 1;
+ selectionMade = 1;
else {
enterName();
strcpy(names[n], select);
- if (hay_seleccion == 1) {
+ if (selectionMade == 1) {
snprintf(file, 50, "%s%02d", _targetName.c_str(), n + 1);
para_grabar(file);
Common::OutSaveFile *tsav;
@@ -1444,14 +1444,14 @@ bool DrasculaEngine::saves() {
print_abc(names[n2], 116, y);
y = y + 9;
}
- if (hay_seleccion == 1) {
+ if (selectionMade == 1) {
snprintf(file, 50, "%s%02d", _targetName.c_str(), n + 1);
}
num_sav = n;
}
}
- if (mouseX > 117 && mouseY > 15 && mouseX < 295 && mouseY < 24 && hay_seleccion == 1) {
+ if (mouseX > 117 && mouseY > 15 && mouseX < 295 && mouseY < 24 && selectionMade == 1) {
enterName();
strcpy(names[num_sav], select);
print_abc(select, 117, 15);
@@ -1462,11 +1462,11 @@ bool DrasculaEngine::saves() {
}
}
- if (mouseX > 125 && mouseY > 123 && mouseX < 199 && mouseY < 149 && hay_seleccion == 1) {
+ if (mouseX > 125 && mouseY > 123 && mouseX < 199 && mouseY < 149 && selectionMade == 1) {
if (!para_cargar(file))
return false;
break;
- } else if (mouseX > 208 && mouseY > 123 && mouseX < 282 && mouseY < 149 && hay_seleccion == 1) {
+ } else if (mouseX > 208 && mouseY > 123 && mouseX < 282 && mouseY < 149 && selectionMade == 1) {
para_grabar(file);
Common::OutSaveFile *tsav;
if (!(tsav = _saveFileMan->openForSaving(fileEpa))) {
@@ -1480,7 +1480,7 @@ bool DrasculaEngine::saves() {
delete tsav;
} else if (mouseX > 168 && mouseY > 154 && mouseX < 242 && mouseY < 180)
break;
- else if (hay_seleccion == 0) {
+ else if (selectionMade == 0) {
print_abc("elige una partida", 117, 15);
}
updateScreen();
@@ -1495,7 +1495,7 @@ bool DrasculaEngine::saves() {
char rm[20];
sprintf(rm, "%i.alg", roomNumber);
loadPic(rm, drawSurface1, HALF_PAL);
- hay_seleccion = 0;
+ selectionMade = 0;
return true;
}
@@ -1729,20 +1729,20 @@ void DrasculaEngine::fliplay(const char *filefli, int vel) {
}
void DrasculaEngine::fadeFromBlack(int fadeSpeed) {
- char fundido;
+ char fade;
unsigned int color, component;
- DacPalette256 palFundido;
+ DacPalette256 palFade;
- for (fundido = 0; fundido < 64; fundido++) {
+ for (fade = 0; fade < 64; fade++) {
for (color = 0; color < 256; color++) {
for (component = 0; component < 3; component++) {
- palFundido[color][component] = adjustToVGA(gamePalette[color][component] - 63 + fundido);
+ palFade[color][component] = adjustToVGA(gamePalette[color][component] - 63 + fade);
}
}
pause(fadeSpeed);
- setPalette((byte *)&palFundido);
+ setPalette((byte *)&palFade);
}
}
@@ -1900,25 +1900,25 @@ bool DrasculaEngine::animate(const char *animationFile, int FPS) {
}
void DrasculaEngine::fadeToBlack(int fadeSpeed) {
- char fundido;
+ char fade;
unsigned int color, component;
- DacPalette256 palFundido;
+ DacPalette256 palFade;
- for (fundido = 63; fundido >= 0; fundido--) {
+ for (fade = 63; fade >= 0; fade--) {
for (color = 0; color < 256; color++) {
for (component = 0; component < 3; component++) {
- palFundido[color][component] = adjustToVGA(gamePalette[color][component] - 63 + fundido);
+ palFade[color][component] = adjustToVGA(gamePalette[color][component] - 63 + fade);
}
}
pause(fadeSpeed);
- setPalette((byte *)&palFundido);
+ setPalette((byte *)&palFade);
}
}
-void DrasculaEngine::pause(int cuanto) {
- _system->delayMillis(cuanto * 30); // was originaly 2
+void DrasculaEngine::pause(int duration) {
+ _system->delayMillis(duration * 30); // was originaly 2
}
void DrasculaEngine::placeIgor() {
@@ -1944,11 +1944,11 @@ void DrasculaEngine::placeIgor() {
void DrasculaEngine::placeDrascula() {
int pos_dr[6];
- if (sentido_dr == 1)
+ if (trackDrascula == 1)
pos_dr[0] = 47;
- else if (sentido_dr == 0)
+ else if (trackDrascula == 0)
pos_dr[0] = 1;
- else if (sentido_dr == 3 && currentChapter == 1)
+ else if (trackDrascula == 3 && currentChapter == 1)
pos_dr[0] = 93;
pos_dr[1] = 122;
pos_dr[2] = x_dr;
@@ -2068,7 +2068,7 @@ bool DrasculaEngine::loadGame(const char *gameName) {
sav->read(currentData, 20);
curX = sav->readSint32LE();
curY = sav->readSint32LE();
- sentido_hare = sav->readSint32LE();
+ trackProtagonist = sav->readSint32LE();
for (l = 1; l < 43; l++) {
inventoryObjects[l] = sav->readSint32LE();
@@ -2149,13 +2149,13 @@ void DrasculaEngine::color_hare() {
}
void DrasculaEngine::funde_hare(int oscuridad) {
- char fundido;
+ char fade;
unsigned int color, component;
- for (fundido = oscuridad; fundido >= 0; fundido--) {
+ for (fade = oscuridad; fade >= 0; fade--) {
for (color = 235; color < 253; color++) {
for (component = 0; component < 3; component++)
- gamePalette[color][component] = adjustToVGA(gamePalette[color][component] - 8 + fundido);
+ gamePalette[color][component] = adjustToVGA(gamePalette[color][component] - 8 + fade);
}
}
@@ -2198,26 +2198,26 @@ void DrasculaEngine::startWalking() {
stepY = STEP_Y;
if (currentChapter == 2) {
- if ((sitio_x < curX) && (sitio_y <= (curY + curHeight)))
+ if ((roomX < curX) && (roomY <= (curY + curHeight)))
quadrant_1();
- else if ((sitio_x < curX) && (sitio_y > (curY + curHeight)))
+ else if ((roomX < curX) && (roomY > (curY + curHeight)))
quadrant_3();
- else if ((sitio_x > curX + curWidth) && (sitio_y <= (curY + curHeight)))
+ else if ((roomX > curX + curWidth) && (roomY <= (curY + curHeight)))
quadrant_2();
- else if ((sitio_x > curX + curWidth) && (sitio_y > (curY + curHeight)))
+ else if ((roomX > curX + curWidth) && (roomY > (curY + curHeight)))
quadrant_4();
- else if (sitio_y < curY + curHeight)
+ else if (roomY < curY + curHeight)
walkUp();
- else if (sitio_y > curY + curHeight)
+ else if (roomY > curY + curHeight)
walkDown();
} else {
- if ((sitio_x < curX + curWidth / 2 ) && (sitio_y <= (curY + curHeight)))
+ if ((roomX < curX + curWidth / 2 ) && (roomY <= (curY + curHeight)))
quadrant_1();
- else if ((sitio_x < curX + curWidth / 2) && (sitio_y > (curY + curHeight)))
+ else if ((roomX < curX + curWidth / 2) && (roomY > (curY + curHeight)))
quadrant_3();
- else if ((sitio_x > curX + curWidth / 2) && (sitio_y <= (curY + curHeight)))
+ else if ((roomX > curX + curWidth / 2) && (roomY <= (curY + curHeight)))
quadrant_2();
- else if ((sitio_x > curX + curWidth / 2) && (sitio_y > (curY + curHeight)))
+ else if ((roomX > curX + curWidth / 2) && (roomY > (curY + curHeight)))
quadrant_4();
else
characterMoved = 0;
@@ -2226,48 +2226,48 @@ void DrasculaEngine::startWalking() {
}
void DrasculaEngine::pon_hare() {
- int pos_hare[6];
+ int curPos[6];
int r;
if (characterMoved == 1 && stepX == STEP_X) {
for (r = 0; r < stepX; r++) {
if (currentChapter != 2) {
- if (sentido_hare == 0 && sitio_x - r == curX + curWidth / 2) {
+ if (trackProtagonist == 0 && roomX - r == curX + curWidth / 2) {
characterMoved = 0;
stepX = STEP_X;
stepY = STEP_Y;
}
- if (sentido_hare == 1 && sitio_x + r == curX + curWidth / 2) {
+ if (trackProtagonist == 1 && roomX + r == curX + curWidth / 2) {
characterMoved = 0;
stepX = STEP_X;
stepY = STEP_Y;
- curX = sitio_x - curWidth / 2;
- curY = sitio_y - curHeight;
+ curX = roomX - curWidth / 2;
+ curY = roomY - curHeight;
}
} else if (currentChapter == 2) {
- if (sentido_hare == 0 && sitio_x - r == curX) {
+ if (trackProtagonist == 0 && roomX - r == curX) {
characterMoved = 0;
stepX = STEP_X;
stepY = STEP_Y;
}
- if (sentido_hare == 1 && sitio_x + r == curX + curWidth) {
+ if (trackProtagonist == 1 && roomX + r == curX + curWidth) {
characterMoved = 0;
stepX = STEP_X;
stepY = STEP_Y;
- curX = sitio_x - curWidth + 4;
- curY = sitio_y - curHeight;
+ curX = roomX - curWidth + 4;
+ curY = roomY - curHeight;
}
}
}
}
if (characterMoved == 1 && stepY == STEP_Y) {
for (r = 0; r < stepY; r++) {
- if (sentido_hare == 2 && sitio_y - r == curY + curHeight) {
+ if (trackProtagonist == 2 && roomY - r == curY + curHeight) {
characterMoved = 0;
stepX = STEP_X;
stepY = STEP_Y;
}
- if (sentido_hare == 3 && sitio_y + r == curY + curHeight) {
+ if (trackProtagonist == 3 && roomY + r == curY + curHeight) {
characterMoved = 0;
stepX = STEP_X;
stepY = STEP_Y;
@@ -2283,80 +2283,80 @@ void DrasculaEngine::pon_hare() {
}
if (characterMoved == 0) {
- pos_hare[0] = 0;
- pos_hare[1] = DIF_MASK_HARE;
- pos_hare[2] = curX;
- pos_hare[3] = curY;
+ curPos[0] = 0;
+ curPos[1] = DIF_MASK_HARE;
+ curPos[2] = curX;
+ curPos[3] = curY;
if (currentChapter == 2) {
- pos_hare[4] = curWidth;
- pos_hare[5] = curHeight;
+ curPos[4] = curWidth;
+ curPos[5] = curHeight;
} else {
- pos_hare[4] = CHARACTER_WIDTH;
- pos_hare[5] = CHARACTER_HEIGHT;
+ curPos[4] = CHARACTER_WIDTH;
+ curPos[5] = CHARACTER_HEIGHT;
}
- if (sentido_hare == 0) {
- pos_hare[1] = 0;
+ if (trackProtagonist == 0) {
+ curPos[1] = 0;
if (currentChapter == 2)
- copyRectClip(pos_hare, extraSurface, screenSurface);
+ copyRectClip(curPos, extraSurface, screenSurface);
else
- reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5],
+ reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5],
factor_red[curY + curHeight], extraSurface, screenSurface);
- } else if (sentido_hare == 1) {
+ } else if (trackProtagonist == 1) {
if (currentChapter == 2)
- copyRectClip(pos_hare, extraSurface, screenSurface);
+ copyRectClip(curPos, extraSurface, screenSurface);
else
- reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5],
+ reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5],
factor_red[curY + curHeight], extraSurface, screenSurface);
- } else if (sentido_hare == 2) {
+ } else if (trackProtagonist == 2) {
if (currentChapter == 2)
- copyRectClip(pos_hare, backSurface, screenSurface);
+ copyRectClip(curPos, backSurface, screenSurface);
else
- reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5],
+ reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5],
factor_red[curY + curHeight], backSurface, screenSurface);
} else {
if (currentChapter == 2)
- copyRectClip(pos_hare, frontSurface, screenSurface);
+ copyRectClip(curPos, frontSurface, screenSurface);
else
- reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5],
+ reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5],
factor_red[curY + curHeight], frontSurface, screenSurface);
}
} else if (characterMoved == 1) {
- pos_hare[0] = frame_x[num_frame];
- pos_hare[1] = frame_y + DIF_MASK_HARE;
- pos_hare[2] = curX;
- pos_hare[3] = curY;
+ curPos[0] = frame_x[num_frame];
+ curPos[1] = frame_y + DIF_MASK_HARE;
+ curPos[2] = curX;
+ curPos[3] = curY;
if (currentChapter == 2) {
- pos_hare[4] = curWidth;
- pos_hare[5] = curHeight;
+ curPos[4] = curWidth;
+ curPos[5] = curHeight;
} else {
- pos_hare[4] = CHARACTER_WIDTH;
- pos_hare[5] = CHARACTER_HEIGHT;
+ curPos[4] = CHARACTER_WIDTH;
+ curPos[5] = CHARACTER_HEIGHT;
}
- if (sentido_hare == 0) {
- pos_hare[1] = 0;
+ if (trackProtagonist == 0) {
+ curPos[1] = 0;
if (currentChapter == 2)
- copyRectClip(pos_hare, extraSurface, screenSurface);
+ copyRectClip(curPos, extraSurface, screenSurface);
else
- reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5],
+ reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5],
factor_red[curY + curHeight], extraSurface, screenSurface);
- } else if (sentido_hare == 1) {
+ } else if (trackProtagonist == 1) {
if (currentChapter == 2)
- copyRectClip(pos_hare, extraSurface, screenSurface);
+ copyRectClip(curPos, extraSurface, screenSurface);
else
- reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5],
+ reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5],
factor_red[curY + curHeight], extraSurface, screenSurface);
- } else if (sentido_hare == 2) {
+ } else if (trackProtagonist == 2) {
if (currentChapter == 2)
- copyRectClip(pos_hare, backSurface, screenSurface);
+ copyRectClip(curPos, backSurface, screenSurface);
else
- reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5],
+ reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5],
factor_red[curY + curHeight], backSurface, screenSurface);
} else {
if (currentChapter == 2)
- copyRectClip(pos_hare, frontSurface, screenSurface);
+ copyRectClip(curPos, frontSurface, screenSurface);
else
- reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5],
+ reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5],
factor_red[curY + curHeight], frontSurface, screenSurface);
}
increaseFrameNum();
@@ -2430,12 +2430,12 @@ bool DrasculaEngine::exitRoom(int l) {
else {
updateDoor(l);
if (isDoor[l] != 0) {
- lleva_al_hare(sitiobj_x[l], sitiobj_y[l]);
- sentido_hare = sentidobj[l];
+ gotoObject(roomObjX[l], roomObjY[l]);
+ trackProtagonist = trackObj[l];
updateRoom();
updateScreen();
characterMoved = 0;
- sentido_hare = sentido_alkeva[l];
+ trackProtagonist = sentido_alkeva[l];
objExit = alapuertakeva[l];
doBreak = 1;
previousMusic = roomMusic;
@@ -2454,9 +2454,9 @@ bool DrasculaEngine::exitRoom(int l) {
} else if (currentChapter == 2) {
updateDoor(l);
if (isDoor[l] != 0) {
- lleva_al_hare(sitiobj_x[l], sitiobj_y[l]);
+ gotoObject(roomObjX[l], roomObjY[l]);
characterMoved = 0;
- sentido_hare = sentido_alkeva[l];
+ trackProtagonist = sentido_alkeva[l];
objExit = alapuertakeva[l];
doBreak = 1;
previousMusic = roomMusic;
@@ -2486,12 +2486,12 @@ bool DrasculaEngine::exitRoom(int l) {
} else if (currentChapter == 3) {
updateDoor(l);
if (isDoor[l] != 0 && visible[l] == 1) {
- lleva_al_hare(sitiobj_x[l], sitiobj_y[l]);
- sentido_hare = sentidobj[l];
+ gotoObject(roomObjX[l], roomObjY[l]);
+ trackProtagonist = trackObj[l];
updateRoom();
updateScreen();
characterMoved = 0;
- sentido_hare = sentido_alkeva[l];
+ trackProtagonist = sentido_alkeva[l];
objExit = alapuertakeva[l];
doBreak = 1;
previousMusic = roomMusic;
@@ -2504,18 +2504,18 @@ bool DrasculaEngine::exitRoom(int l) {
} else if (currentChapter == 4) {
updateDoor(l);
if (isDoor[l] != 0) {
- lleva_al_hare(sitiobj_x[l], sitiobj_y[l]);
- sentido_hare = sentidobj[l];
+ gotoObject(roomObjX[l], roomObjY[l]);
+ trackProtagonist = trackObj[l];
updateRoom();
updateScreen();
characterMoved = 0;
- sentido_hare = sentido_alkeva[l];
+ trackProtagonist = sentido_alkeva[l];
objExit = alapuertakeva[l];
doBreak = 1;
previousMusic = roomMusic;
if (objectNum[l] == 108)
- lleva_al_hare(171, 78);
+ gotoObject(171, 78);
clearRoom();
strcpy(roomExit, _targetSurface[l]);
strcat(roomExit, ".ald");
@@ -2525,12 +2525,12 @@ bool DrasculaEngine::exitRoom(int l) {
} else if (currentChapter == 5) {
updateDoor(l);
if (isDoor[l] != 0 && visible[l] == 1) {
- lleva_al_hare(sitiobj_x[l], sitiobj_y[l]);
- sentido_hare = sentidobj[l];
+ gotoObject(roomObjX[l], roomObjY[l]);
+ trackProtagonist = trackObj[l];
updateRoom();
updateScreen();
characterMoved = 0;
- sentido_hare = sentido_alkeva[l];
+ trackProtagonist = sentido_alkeva[l];
objExit = alapuertakeva[l];
doBreak = 1;
previousMusic = roomMusic;
@@ -2544,12 +2544,12 @@ bool DrasculaEngine::exitRoom(int l) {
} else if (currentChapter == 6) {
updateDoor(l);
if (isDoor[l] != 0) {
- lleva_al_hare(sitiobj_x[l], sitiobj_y[l]);
- sentido_hare = sentidobj[l];
+ gotoObject(roomObjX[l], roomObjY[l]);
+ trackProtagonist = trackObj[l];
updateRoom();
updateScreen();
characterMoved = 0;
- sentido_hare = sentido_alkeva[l];
+ trackProtagonist = sentido_alkeva[l];
objExit = alapuertakeva[l];
doBreak = 1;
previousMusic = roomMusic;
@@ -2655,7 +2655,7 @@ void DrasculaEngine::enterName() {
}
if (h == 1) {
strcpy(select, select2);
- hay_seleccion = 1;
+ selectionMade = 1;
}
}
@@ -2923,19 +2923,19 @@ void DrasculaEngine::quadrant_1() {
float distance_x, distance_y;
if (currentChapter == 2)
- distance_x = curX - sitio_x;
+ distance_x = curX - roomX;
else
- distance_x = curX + curWidth / 2 - sitio_x;
+ distance_x = curX + curWidth / 2 - roomX;
- distance_y = (curY + curHeight) - sitio_y;
+ distance_y = (curY + curHeight) - roomY;
if (distance_x < distance_y) {
curDirection = 0;
- sentido_hare = 2;
+ trackProtagonist = 2;
stepX = (int)(distance_x / (distance_y / STEP_Y));
} else {
curDirection = 7;
- sentido_hare = 0;
+ trackProtagonist = 0;
stepY = (int)(distance_y / (distance_x / STEP_X));
}
}
@@ -2944,19 +2944,19 @@ void DrasculaEngine::quadrant_2() {
float distance_x, distance_y;
if (currentChapter == 2)
- distance_x = abs(curX + curWidth - sitio_x);
+ distance_x = abs(curX + curWidth - roomX);
else
- distance_x = abs(curX + curWidth / 2 - sitio_x);
+ distance_x = abs(curX + curWidth / 2 - roomX);
- distance_y = (curY + curHeight) - sitio_y;
+ distance_y = (curY + curHeight) - roomY;
if (distance_x < distance_y) {
curDirection = 1;
- sentido_hare = 2;
+ trackProtagonist = 2;
stepX = (int)(distance_x / (distance_y / STEP_Y));
} else {
curDirection = 2;
- sentido_hare = 1;
+ trackProtagonist = 1;
stepY = (int)(distance_y / (distance_x / STEP_X));
}
}
@@ -2965,19 +2965,19 @@ void DrasculaEngine::quadrant_3() {
float distance_x, distance_y;
if (currentChapter == 2)
- distance_x = curX - sitio_x;
+ distance_x = curX - roomX;
else
- distance_x = curX + curWidth / 2 - sitio_x;
+ distance_x = curX + curWidth / 2 - roomX;
- distance_y = sitio_y - (curY + curHeight);
+ distance_y = roomY - (curY + curHeight);
if (distance_x < distance_y) {
curDirection = 5;
- sentido_hare = 3;
+ trackProtagonist = 3;
stepX = (int)(distance_x / (distance_y / STEP_Y));
} else {
curDirection = 6;
- sentido_hare = 0;
+ trackProtagonist = 0;
stepY = (int)(distance_y / (distance_x / STEP_X));
}
}
@@ -2986,19 +2986,19 @@ void DrasculaEngine::quadrant_4() {
float distance_x, distance_y;
if (currentChapter == 2)
- distance_x = abs(curX + curWidth - sitio_x);
+ distance_x = abs(curX + curWidth - roomX);
else
- distance_x = abs(curX + curWidth / 2 - sitio_x);
+ distance_x = abs(curX + curWidth / 2 - roomX);
- distance_y = sitio_y - (curY + curHeight);
+ distance_y = roomY - (curY + curHeight);
if (distance_x < distance_y) {
curDirection = 4;
- sentido_hare = 3;
+ trackProtagonist = 3;
stepX = (int)(distance_x / (distance_y / STEP_Y));
} else {
curDirection = 3;
- sentido_hare = 1;
+ trackProtagonist = 1;
stepY = (int)(distance_y / (distance_x / STEP_X));
}
}
@@ -3014,7 +3014,7 @@ void DrasculaEngine::saveGame(char gameName[]) {
out->write(currentData, 20);
out->writeSint32LE(curX);
out->writeSint32LE(curY);
- out->writeSint32LE(sentido_hare);
+ out->writeSint32LE(trackProtagonist);
for (l = 1; l < 43; l++) {
out->writeSint32LE(inventoryObjects[l]);
@@ -3093,7 +3093,7 @@ bool DrasculaEngine::checkMenuFlags() {
return false;
}
-void DrasculaEngine::converse(const char *nom_fich) {
+void DrasculaEngine::converse(const char *fileName) {
int h;
int game1 = 1, game2 = 1, game3 = 1, game4 = 1;
char phrase1[78];
@@ -3116,14 +3116,14 @@ void DrasculaEngine::converse(const char *nom_fich) {
breakOut = 0;
- strcpy(para_codificar, nom_fich);
+ strcpy(para_codificar, fileName);
if (currentChapter == 5)
withoutVerb();
- _arj.open(nom_fich);
+ _arj.open(fileName);
if (!_arj.isOpen()) {
- error("missing data file %s", nom_fich);
+ error("missing data file %s", fileName);
}
int size = _arj.size();
@@ -3141,19 +3141,19 @@ void DrasculaEngine::converse(const char *nom_fich) {
_arj.close();
- if (currentChapter == 2 && !strcmp(nom_fich, "op_5.cal") && flags[38] == 1 && flags[33] == 1) {
+ if (currentChapter == 2 && !strcmp(fileName, "op_5.cal") && flags[38] == 1 && flags[33] == 1) {
strcpy(phrase3, _text[_lang][405]);
strcpy(sound3, "405.als");
answer3 = 31;
}
- if (currentChapter == 6 && !strcmp(nom_fich, "op_12.cal") && flags[7] == 1) {
+ if (currentChapter == 6 && !strcmp(fileName, "op_12.cal") && flags[7] == 1) {
strcpy(phrase3, _text[_lang][273]);
strcpy(sound3, "273.als");
answer3 = 14;
}
- if (currentChapter == 6 && !strcmp(nom_fich, "op_12.cal") && flags[10] == 1) {
+ if (currentChapter == 6 && !strcmp(fileName, "op_12.cal") && flags[10] == 1) {
strcpy(phrase3, " cuanto queda para que acabe el partido?");
strcpy(sound3, "274.als");
answer3 = 15;
@@ -3493,7 +3493,7 @@ void DrasculaEngine::updateVisible() {
if (roomNumber == 59)
isDoor[1] = 0;
if (roomNumber == 60) {
- sentido_dr = 0;
+ trackDrascula = 0;
x_dr = 155;
y_dr = 69;
}
@@ -3502,37 +3502,37 @@ void DrasculaEngine::updateVisible() {
void DrasculaEngine::walkDown() {
curDirection = 4;
- sentido_hare = 3;
+ trackProtagonist = 3;
stepX = 0;
}
void DrasculaEngine::walkUp() {
curDirection = 0;
- sentido_hare = 2;
+ trackProtagonist = 2;
stepX = 0;
}
-void DrasculaEngine::pon_vb() {
+void DrasculaEngine::moveVB() {
int pos_vb[6];
- if (vb_se_mueve == 0) {
+ if (vbHasMoved == 0) {
pos_vb[0] = 256;
pos_vb[1] = 129;
- pos_vb[2] = vb_x;
+ pos_vb[2] = vbX;
pos_vb[3] = 66;
pos_vb[4] = 33;
pos_vb[5] = 69;
- if (sentido_vb == 0)
+ if (trackVB == 0)
pos_vb[0] = 222;
- else if (sentido_vb == 1)
+ else if (trackVB == 1)
pos_vb[0] = 188;
} else {
- pos_vb[2] = vb_x;
+ pos_vb[2] = vbX;
pos_vb[3] = 66;
pos_vb[4] = 28;
pos_vb[5] = 68;
- if (sentido_vb == 0) {
+ if (trackVB == 0) {
pos_vb[0] = frame_vb;
pos_vb[1] = 62;
} else {
@@ -3549,25 +3549,25 @@ void DrasculaEngine::pon_vb() {
}
void DrasculaEngine::lleva_vb(int pointX) {
- sentido_vb = (pointX < vb_x) ? 0 : 1;
- vb_se_mueve = 1;
+ trackVB = (pointX < vbX) ? 0 : 1;
+ vbHasMoved = 1;
for (;;) {
updateRoom();
updateScreen();
- if (sentido_vb == 0) {
- vb_x = vb_x - 5;
- if (vb_x <= pointX)
+ if (trackVB == 0) {
+ vbX = vbX - 5;
+ if (vbX <= pointX)
break;
} else {
- vb_x = vb_x + 5;
- if (vb_x >= pointX)
+ vbX = vbX + 5;
+ if (vbX >= pointX)
break;
}
pause(5);
}
- vb_se_mueve = 0;
+ vbHasMoved = 0;
}
void DrasculaEngine::hipo_sin_nadie(int counter){
diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h
index 27472521bf..f52f84184b 100644
--- a/engines/drascula/drascula.h
+++ b/engines/drascula/drascula.h
@@ -242,7 +242,7 @@ public:
char iconName[44][13];
int objectNum[40], visible[40], isDoor[40];
- int sitiobj_x[40], sitiobj_y[40], sentidobj[40];
+ int roomObjX[40], roomObjY[40], trackObj[40];
int inventoryObjects[43];
char _targetSurface[40][20];
int _destX[40], _destY[40], sentido_alkeva[40], alapuertakeva[40];
@@ -260,22 +260,22 @@ public:
int flags[NUM_FLAGS];
int frame_y;
- int curX, curY, characterMoved, curDirection, sentido_hare, num_frame, hare_se_ve;
- int sitio_x, sitio_y, checkFlags;
+ int curX, curY, characterMoved, curDirection, trackProtagonist, num_frame, hare_se_ve;
+ int roomX, roomY, checkFlags;
int doBreak;
int stepX, stepY;
int curHeight, curWidth, feetHeight;
int talkHeight, talkWidth;
- int suelo_x1, suelo_y1, suelo_x2, suelo_y2;
+ int floorX1, floorY1, floorX2, floorY2;
int near, far;
- int sentido_final, walkToObject;
+ int trackFinal, walkToObject;
int objExit;
int timeDiff, startTime;
int hasAnswer;
int conta_blind_vez;
int changeColor;
int breakOut;
- int vb_x, sentido_vb, vb_se_mueve, frame_vb;
+ int vbX, trackVB, vbHasMoved, frame_vb;
float newHeight, newWidth;
int factor_red[202];
int frame_piano;
@@ -284,7 +284,7 @@ public:
int color_solo;
int blinking;
int igorX, igorY, sentido_igor;
- int x_dr, y_dr, sentido_dr;
+ int x_dr, y_dr, trackDrascula;
int x_bj, y_bj, sentido_bj;
int cont_sv;
int term_int;
@@ -294,7 +294,7 @@ public:
int _color;
int musicStopped;
char select[23];
- int hay_seleccion;
+ int selectionMade;
int mouseX;
int mouseY;
int mouseY_ant;
@@ -306,7 +306,7 @@ public:
void pickObject(int);
void walkUp();
void walkDown();
- void pon_vb();
+ void moveVB();
void lleva_vb(int pointX);
void hipo_sin_nadie(int counter);
void openDoor(int nflag, int doorNum);
@@ -396,7 +396,7 @@ public:
bool para_cargar(char[]);
void carga_escoba(const char *);
void clearRoom();
- void lleva_al_hare(int, int);
+ void gotoObject(int, int);
void moveCursor();
void checkObjects();
void selectVerbFromBar();
diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp
index 052c5c3da0..6a8c87f8b6 100644
--- a/engines/drascula/rooms.cpp
+++ b/engines/drascula/rooms.cpp
@@ -281,7 +281,7 @@ void DrasculaEngine::room_12(int fl){
bool DrasculaEngine::room_13(int fl) {
if (pickedObject == kVerbLook && fl == 51) {
talk(411);
- sentido_hare = 3;
+ trackProtagonist = 3;
talk(412);
strcpy(objName[1], "yoda");
} else if (pickedObject == kVerbTalk && fl == 51)
@@ -325,10 +325,10 @@ void DrasculaEngine::room_15(int fl) {
talk(335);
else if (pickedObject == 19 && fl == 188 && flags[27] == 1) {
talk(336);
- sentido_hare = 3;
+ trackProtagonist = 3;
talk(337);
talk_sinc(_text[_lang][46], "46.als", "4442444244244");
- sentido_hare = 1;
+ trackProtagonist = 1;
} else if (pickedObject == 18 && fl == 188 && flags[26] == 0) {
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
copyRect(133, 135, curX + 6, curY, 39, 63, drawSurface3, screenSurface);
@@ -378,7 +378,7 @@ void DrasculaEngine::room_16(int fl) {
openDoor(19, NO_DOOR);
if (flags[20] == 0) {
flags[20] = 1;
- sentido_hare = 3;
+ trackProtagonist = 3;
updateRoom();
updateScreen();
talk(342);
@@ -396,7 +396,7 @@ void DrasculaEngine::room_16(int fl) {
talk(38);
else if (pickedObject == kVerbLook && fl == 187) {
talk(343);
- sentido_hare = 3;
+ trackProtagonist = 3;
updateRoom();
updateScreen();
talk(344);
@@ -459,7 +459,7 @@ void DrasculaEngine::room_18(int fl) {
animation_24_2();
}
else if (pickedObject == 11 && fl == 50 && flags[22] == 0) {
- sentido_hare = 3;
+ trackProtagonist = 3;
updateRoom();
updateScreen();
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
@@ -523,7 +523,7 @@ void DrasculaEngine::room_22(int fl) {
withoutVerb();
removeObject(22);
updateVisible();
- sentido_hare = 3;
+ trackProtagonist = 3;
talk(499);
talk(500);
} else if (pickedObject == kVerbLook && fl == 52)
@@ -594,23 +594,23 @@ void DrasculaEngine::room_26(int fl) {
else if (pickedObject == 16 && fl == 50 && flags[18] == 1 && flags[12] == 1)
animation_5_4();
else if (pickedObject == kVerbPick && fl == 143 && flags[18] == 1) {
- lleva_al_hare(260, 180);
+ gotoObject(260, 180);
pickObject(10);
visible[1] = 0;
flags[12] = 1;
closeDoor(2, 0);
- sentido_hare = 2;
+ trackProtagonist = 2;
talk_igor(27, kIgorDoor);
flags[30] = 1;
talk_igor(28, kIgorDoor);
- lleva_al_hare(153, 180);
+ gotoObject(153, 180);
} else if (pickedObject == kVerbPick && fl == 143 && flags[18] == 0) {
- lleva_al_hare(260, 180);
+ gotoObject(260, 180);
copyBackground(80, 78, 199, 94, 38, 27, drawSurface3, screenSurface);
updateScreen(199, 94, 199, 94, 38, 27, screenSurface);
pause(3);
talk_igor(25, kIgorWig);
- lleva_al_hare(153, 180);
+ gotoObject(153, 180);
} else if (pickedObject == kVerbTalk && fl == 51)
animation_1_4();
else if (pickedObject == kVerbOpen && fl == 167)
@@ -732,7 +732,7 @@ void DrasculaEngine::room_34(int fl) {
openDoor(8, 2);
else if (pickedObject == kVerbOpen && fl == 120 && flags[25] == 0) {
openDoor(8, 2);
- sentido_hare = 3;
+ trackProtagonist = 3;
talk(425);
pickObject(14);
flags[25] = 1;
@@ -875,7 +875,7 @@ void DrasculaEngine::room_55(int fl) {
playSound(11);
animate("det.bin", 17);
finishSound();
- lleva_al_hare(curX - 3, curY + curHeight + 6);
+ gotoObject(curX - 3, curY + curHeight + 6);
} else
hasAnswer = 0;
}
@@ -922,8 +922,8 @@ void DrasculaEngine::room_59(int fl) {
delay(40);
finishSound();
delay(10);
- lleva_al_hare(174, 168);
- sentido_hare = 2;
+ gotoObject(174, 168);
+ trackProtagonist = 2;
updateRoom();
updateScreen();
pause(40);
@@ -962,7 +962,7 @@ void DrasculaEngine::room_59(int fl) {
loadPic("96.alg", frontSurface, COMPLETE_PAL);
loadPic("99.alg", backSurface, 1);
loadPic("59.alg", drawSurface1, HALF_PAL);
- sentido_hare = 3;
+ trackProtagonist = 3;
talk(245);
withoutVerb();
flags[11] = 1;
@@ -1371,28 +1371,28 @@ void DrasculaEngine::update_13() {
}
void DrasculaEngine::update_14_pre() {
- int candles_y[] = {158, 172, 186};
- int cirio_x[] = {14, 19, 24};
- int pianista_x[] = {1, 91, 61, 31, 91, 31, 1, 61, 31};
- int drunk_x[] = {1, 42, 83, 124, 165, 206, 247, 1};
+ int candleY[] = {158, 172, 186};
+ int candleX[] = {14, 19, 24};
+ int pianistX[] = {1, 91, 61, 31, 91, 31, 1, 61, 31};
+ int drunkX[] = {1, 42, 83, 124, 165, 206, 247, 1};
int difference;
- copyBackground(123, candles_y[frame_candles], 142, 14, 39, 13, drawSurface3, screenSurface);
- copyBackground(cirio_x[frame_candles], 146, 311, 80, 4, 8, drawSurface3, screenSurface);
+ copyBackground(123, candleY[frame_candles], 142, 14, 39, 13, drawSurface3, screenSurface);
+ copyBackground(candleX[frame_candles], 146, 311, 80, 4, 8, drawSurface3, screenSurface);
if (blinking == 5)
copyBackground(1, 149, 127, 52, 9, 5, drawSurface3, screenSurface);
if (curX > 101 && curX < 155)
copyBackground(31, 138, 178, 51, 18, 16, drawSurface3, screenSurface);
if (flags[11] == 0)
- copyBackground(pianista_x[frame_piano], 157, 245, 130, 29, 42, drawSurface3, screenSurface);
+ copyBackground(pianistX[frame_piano], 157, 245, 130, 29, 42, drawSurface3, screenSurface);
else if (flags[5] == 0)
copyBackground(145, 139, 228, 112, 47, 60, extraSurface, screenSurface);
else
copyBackground(165, 140, 229, 117, 43, 59, drawSurface3, screenSurface);
if (flags[12] == 1)
- copyBackground(drunk_x[frame_drunk], 82, 170, 50, 40, 53, drawSurface3, screenSurface);
+ copyBackground(drunkX[frame_drunk], 82, 170, 50, 40, 53, drawSurface3, screenSurface);
difference = getTime() - conta_blind_vez;
if (difference > 6) {
if (flags[12] == 1) {
@@ -1444,7 +1444,7 @@ void DrasculaEngine::update_18_pre() {
copyBackground(1, 69, 120, 58, 56, 61, drawSurface3, screenSurface);
copyBackground(snore_x[frame_snore], snore_y[frame_snore], 124, 59, 40, 37, drawSurface3, screenSurface);
} else
- pon_vb();
+ moveVB();
difference = getTime() - conta_blind_vez;
if (difference > 9) {
@@ -1675,13 +1675,13 @@ void DrasculaEngine::update_59_pre() {
}
void DrasculaEngine::update_60_pre() {
- int candles_y[] = {158, 172, 186};
+ int candleY[] = {158, 172, 186};
int difference;
if (flags[5] == 0)
placeDrascula();
- copyBackground(123, candles_y[frame_candles], 142, 14, 39, 13, drawSurface3, screenSurface);
+ copyBackground(123, candleY[frame_candles], 142, 14, 39, 13, drawSurface3, screenSurface);
if (flag_tv == 1)
copyBackground(114, 158, 8, 30, 8, 23, drawSurface3, screenSurface);
@@ -1710,14 +1710,14 @@ void DrasculaEngine::update_61() {
}
void DrasculaEngine::update_62_pre() {
- int candles_y[] = { 158, 172, 186 };
- int cirio_x[] = { 14, 19, 24 };
- int pianista_x[] = {1, 91, 61, 31, 91, 31, 1, 61, 31 };
- int drunk_x[] = {1, 42, 83, 124, 165, 206, 247, 1 };
+ int candleY[] = { 158, 172, 186 };
+ int candleX[] = { 14, 19, 24 };
+ int pianistX[] = {1, 91, 61, 31, 91, 31, 1, 61, 31 };
+ int drunkX[] = {1, 42, 83, 124, 165, 206, 247, 1 };
int difference;
- copyBackground(123, candles_y[frame_candles], 142, 14, 39, 13, drawSurface3, screenSurface);
- copyBackground(cirio_x[frame_candles], 146, 311, 80, 4, 8, drawSurface3, screenSurface);
+ copyBackground(123, candleY[frame_candles], 142, 14, 39, 13, drawSurface3, screenSurface);
+ copyBackground(candleX[frame_candles], 146, 311, 80, 4, 8, drawSurface3, screenSurface);
if (blinking == 5)
copyBackground(1, 149, 127, 52, 9, 5, drawSurface3, screenSurface);
@@ -1726,14 +1726,14 @@ void DrasculaEngine::update_62_pre() {
copyBackground(31, 138, 178, 51, 18, 16, drawSurface3, screenSurface);
if (flags[11] == 0)
- copyBackground(pianista_x[frame_piano], 157, 245, 130, 29, 42, drawSurface3, screenSurface);
+ copyBackground(pianistX[frame_piano], 157, 245, 130, 29, 42, drawSurface3, screenSurface);
else if (flags[5] == 0)
copyBackground(145, 139, 228, 112, 47, 60, extraSurface, screenSurface);
else
copyBackground(165, 140, 229, 117, 43, 59, drawSurface3, screenSurface);
if (flags[12] == 1)
- copyBackground(drunk_x[frame_drunk], 82, 170, 50, 40, 53, drawSurface3, screenSurface);
+ copyBackground(drunkX[frame_drunk], 82, 170, 50, 40, 53, drawSurface3, screenSurface);
difference = getTime() - conta_blind_vez;
if (difference > 6) {
@@ -1758,13 +1758,13 @@ void DrasculaEngine::update_62_pre() {
}
void DrasculaEngine::update_62() {
- int drunk_x[] = { 1, 42, 83, 124, 165, 206, 247, 1 };
+ int drunkX[] = { 1, 42, 83, 124, 165, 206, 247, 1 };
copyRect(1, 1, 0, 0, 62, 142, drawSurface2, screenSurface);
if (curY + curHeight < 89) {
copyRect(205, 1, 180, 9, 82, 80, drawSurface3, screenSurface);
- copyBackground(drunk_x[frame_drunk], 82, 170, 50, 40, 53, drawSurface3, screenSurface);
+ copyBackground(drunkX[frame_drunk], 82, 170, 50, 40, 53, drawSurface3, screenSurface);
}
}
@@ -2140,6 +2140,7 @@ bool DrasculaEngine::checkFlag(int fl) {
else
hasAnswer = 0;
} else if (currentChapter == 5) {
+ // TODO: These are not translated
if (pickedObject == kVerbLook && fl == 50)
talk("Cuanto mas me miro, mas me gusto", "54.als");
else if (pickedObject == kVerbOpen && fl == 50)
@@ -2171,17 +2172,17 @@ bool DrasculaEngine::checkFlag(int fl) {
if (pickedObject == kVerbLook && fl == 50 && flags[0] == 1)
talk(308);
else if (pickedObject == kVerbLook && fl == 50 && flags[0] == 0)
- talk(310 );
+ talk(310);
else if (pickedObject == kVerbOpen && fl == 50)
- talk(310 );
+ talk(310);
else if (pickedObject == kVerbClose && fl == 50)
- talk(311 );
+ talk(311);
else if (pickedObject == kVerbMove && fl == 50)
- talk(312 );
+ talk(312);
else if (pickedObject == kVerbPick && fl == 50)
- talk(313 );
+ talk(313);
else if (pickedObject == kVerbTalk && fl == 50)
- talk(314 );
+ talk(314);
else if (roomNumber == 102)
room_pendulum(fl);
else if (roomNumber == 58)
diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp
index 35bce21559..3cd45a3253 100644
--- a/engines/drascula/talk.cpp
+++ b/engines/drascula/talk.cpp
@@ -27,6 +27,9 @@
namespace Drascula {
+int x_talk_dch[6] = {1, 25, 49, 73, 97, 121};
+int x_talk_izq[6] = {145, 169, 193, 217, 241, 265};
+
void DrasculaEngine::talkInit(const char *filename) {
_rnd->setSeed((unsigned int)_system->getMillis() / 2);
@@ -348,13 +351,11 @@ void DrasculaEngine::talk(int index) {
}
void DrasculaEngine::talk(const char *said, const char *filename) {
- int suma_1_pixel = 0;
+ int talkOffset = 0;
if (currentChapter != 2)
- suma_1_pixel = 1;
+ talkOffset = 1;
int y_mask_talk = 170;
- int x_talk_dch[6] = { 1, 25, 49, 73, 97, 121 };
- int x_talk_izq[6] = { 145, 169, 193, 217, 241, 265 };
int face;
int length = strlen(said);
@@ -371,7 +372,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) {
if (currentChapter != 2) {
if (factor_red[curY + curHeight] == 100)
- suma_1_pixel = 0;
+ talkOffset = 0;
}
if (currentChapter == 4) {
@@ -408,7 +409,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) {
drawSurface3, screenSurface);
}
- if (sentido_hare == 0) {
+ if (trackProtagonist == 0) {
if (currentChapter == 2)
copyRect(x_talk_izq[face], y_mask_talk, curX + 8, curY - 1, talkWidth, talkHeight,
extraSurface, screenSurface);
@@ -418,7 +419,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) {
extraSurface, screenSurface);
updateRefresh();
- } else if (sentido_hare == 1) {
+ } else if (trackProtagonist == 1) {
if (currentChapter == 2)
copyRect(x_talk_dch[face], y_mask_talk, curX + 12, curY, talkWidth, talkHeight,
extraSurface, screenSurface);
@@ -426,23 +427,23 @@ void DrasculaEngine::talk(const char *said, const char *filename) {
reduce_hare_chico(x_talk_dch[face], y_mask_talk, curX + (int)((12.0f / 100) * factor_red[curY + curHeight]),
curY, talkWidth, talkHeight, factor_red[curY + curHeight], extraSurface, screenSurface);
updateRefresh();
- } else if (sentido_hare == 2) {
+ } else if (trackProtagonist == 2) {
if (currentChapter == 2)
copyRect(x_talk_izq[face], y_mask_talk, curX + 12, curY, talkWidth, talkHeight,
frontSurface, screenSurface);
else
reduce_hare_chico(x_talk_izq[face], y_mask_talk,
- suma_1_pixel + curX + (int)((12.0f / 100) * factor_red[curY + curHeight]),
+ talkOffset + curX + (int)((12.0f / 100) * factor_red[curY + curHeight]),
curY, talkWidth, talkHeight, factor_red[curY + curHeight],
frontSurface, screenSurface);
updateRefresh();
- } else if (sentido_hare == 3) {
+ } else if (trackProtagonist == 3) {
if (currentChapter == 2)
copyRect(x_talk_dch[face], y_mask_talk, curX + 8, curY, talkWidth, talkHeight,
frontSurface, screenSurface);
else
reduce_hare_chico(x_talk_dch[face], y_mask_talk,
- suma_1_pixel + curX + (int)((8.0f / 100) * factor_red[curY + curHeight]),
+ talkOffset + curX + (int)((8.0f / 100) * factor_red[curY + curHeight]),
curY, talkWidth,talkHeight, factor_red[curY + curHeight],
frontSurface, screenSurface);
updateRefresh();
@@ -572,23 +573,23 @@ void DrasculaEngine::talk_vb(int index) {
talkInit(filename);
- copyBackground(vb_x + 5, 64, OBJWIDTH + 1, 0, 25, 27, drawSurface1, drawSurface3);
+ copyBackground(vbX + 5, 64, OBJWIDTH + 1, 0, 25, 27, drawSurface1, drawSurface3);
do {
- if (sentido_vb == 1) {
+ if (trackVB == 1) {
face = _rnd->getRandomNumber(5);
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
pon_hare();
- pon_vb();
+ moveVB();
- copyBackground(OBJWIDTH + 1, 0, vb_x + 5, 64, 25, 27, drawSurface3, screenSurface);
- copyRect(x_talk[face], 34, vb_x + 5, 64, 25, 27, frontSurface, screenSurface);
+ copyBackground(OBJWIDTH + 1, 0, vbX + 5, 64, 25, 27, drawSurface3, screenSurface);
+ copyRect(x_talk[face], 34, vbX + 5, 64, 25, 27, frontSurface, screenSurface);
updateRefresh();
}
if (withVoices == 0)
- centerText(said, vb_x, 66);
+ centerText(said, vbX, 66);
updateScreen();
@@ -633,7 +634,7 @@ void DrasculaEngine::talk_blind(int index) {
char filename[20];
sprintf(filename, "d%i.als", index + TEXTD_START - 1);
const char *said = _textd[_lang][index + TEXTD_START - 1];
- const char *sincronia = _textd1[_lang][index - 1];
+ const char *syncChar = _textd1[_lang][index - 1];
byte *faceBuffer;
int p = 0;
@@ -656,7 +657,7 @@ void DrasculaEngine::talk_blind(int index) {
do {
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
pos_blind[5] = 149;
- char c = toupper(sincronia[p]);
+ char c = toupper(syncChar[p]);
if (c == '0' || c == '2' || c == '4' || c == '6')
pos_blind[0] = 1;
@@ -900,11 +901,9 @@ void DrasculaEngine::talk_htel(int index) {
updateScreen();
}
-void DrasculaEngine::talk_sinc(const char *said, const char *filename, const char *sincronia) {
- int suma_1_pixel = 1;
+void DrasculaEngine::talk_sinc(const char *said, const char *filename, const char *syncChar) {
+ int talkOffset = 1;
int y_mask_talk = 170;
- int x_talk_dch[6] = {1, 25, 49, 73, 97, 121};
- int x_talk_izq[6] = {145, 169, 193, 217, 241, 265};
int p, face = 0;
int length = strlen(said);
@@ -912,7 +911,7 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha
if (currentChapter == 1) {
if (factor_red[curY + curHeight] == 100)
- suma_1_pixel = 0;
+ talkOffset = 0;
}
p = 0;
@@ -920,7 +919,7 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha
talkInit(filename);
do {
- face = atoi(&sincronia[p]);
+ face = atoi(&syncChar[p]);
copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
@@ -938,34 +937,34 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha
copyBackground(OBJWIDTH + 1, 0, curX, curY, (int)(((float)curWidth / 100) * factor_red[curY + curHeight]),
(int)(((float)(talkHeight - 1) / 100) * factor_red[curY + curHeight]), drawSurface3, screenSurface);
- if (sentido_hare == 0) {
+ if (trackProtagonist == 0) {
if (currentChapter == 2)
copyRect(x_talk_izq[face], y_mask_talk, curX + 8, curY - 1, talkWidth, talkHeight, extraSurface, screenSurface);
else
reduce_hare_chico(x_talk_izq[face], y_mask_talk, (int)(curX + (8.0f / 100) * factor_red[curY + curHeight]),
curY, talkWidth, talkHeight, factor_red[curY + curHeight], extraSurface, screenSurface);
updateRefresh();
- } else if (sentido_hare == 1) {
+ } else if (trackProtagonist == 1) {
if (currentChapter == 2)
copyRect(x_talk_dch[face], y_mask_talk, curX + 12, curY, talkWidth, talkHeight, extraSurface, screenSurface);
else
reduce_hare_chico(x_talk_dch[face], y_mask_talk, (int)(curX + (12.0f / 100) * factor_red[curY + curHeight]),
curY, talkWidth, talkHeight, factor_red[curY + curHeight], extraSurface, screenSurface);
updateRefresh();
- } else if (sentido_hare == 2) {
+ } else if (trackProtagonist == 2) {
if (currentChapter == 2)
copyRect(x_talk_izq[face], y_mask_talk, curX + 12, curY, talkWidth, talkHeight, frontSurface, screenSurface);
else
reduce_hare_chico(x_talk_izq[face], y_mask_talk,
- (int)(suma_1_pixel + curX + (12.0f / 100) * factor_red[curY + curHeight]), curY,
+ (int)(talkOffset + curX + (12.0f / 100) * factor_red[curY + curHeight]), curY,
talkWidth, talkHeight, factor_red[curY + curHeight], frontSurface, screenSurface);
updateRefresh();
- } else if (sentido_hare == 3) {
+ } else if (trackProtagonist == 3) {
if (currentChapter == 2)
copyRect(x_talk_dch[face], y_mask_talk, curX + 8, curY, talkWidth, talkHeight, frontSurface, screenSurface);
else
reduce_hare_chico(x_talk_dch[face], y_mask_talk,
- (int)(suma_1_pixel + curX + (8.0f / 100) * factor_red[curY + curHeight]), curY,
+ (int)(talkOffset + curX + (8.0f / 100) * factor_red[curY + curHeight]), curY,
talkWidth, talkHeight, factor_red[curY + curHeight], frontSurface, screenSurface);
updateRefresh();
}