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
This commit is contained in:
Filippos Karapetis 2008-06-03 08:54:49 +00:00
parent 45cce58611
commit 00e662391d
5 changed files with 378 additions and 378 deletions

View File

@ -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();

File diff suppressed because it is too large Load Diff

View File

@ -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();

View File

@ -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)

View File

@ -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();
}