From 220dd330c2f7418e2d20217507569551f22fc0d5 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 2 Jun 2008 23:09:19 +0000 Subject: hare_x/hare_y -> curX/curY ancho_hare -> curWidth alto_hare -> curHeight direccion_hare -> curDirection Some slight cleanup svn-id: r32508 --- engines/drascula/animation.cpp | 46 ++++---- engines/drascula/drascula.cpp | 236 ++++++++++++++++++++--------------------- engines/drascula/drascula.h | 4 +- engines/drascula/rooms.cpp | 42 ++++---- engines/drascula/talk.cpp | 82 +++++++------- 5 files changed, 205 insertions(+), 205 deletions(-) (limited to 'engines') diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 018b6e2a04..54e9399e05 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -464,8 +464,8 @@ void DrasculaEngine::animation_2_1() { x_bj = 170; y_bj = 90; sentido_bj = 0; - hare_x = 91; - hare_y = 95; + curX = 91; + curY = 95; sentido_hare = 1; hare_se_ve = 1; if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) @@ -478,12 +478,12 @@ void DrasculaEngine::animation_2_1() { if (animate("lev.bin", 15)) break; - lleva_al_hare(100 + ancho_hare / 2, 99 + alto_hare); + lleva_al_hare(100 + curWidth / 2, 99 + curHeight); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; sentido_hare = 1; - hare_x = 100; - hare_y = 95; + curX = 100; + curY = 95; talk_bj(2); talk(215); @@ -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 + alto_hare); + lleva_al_hare(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 + alto_hare); + lleva_al_hare(157, 98 + curHeight); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; if (animate("bes.bin", 16)) @@ -1107,7 +1107,7 @@ void DrasculaEngine::animation_23_2() { } void DrasculaEngine::animation_23_joined() { - int n, p_x = hare_x + 2, p_y = hare_y - 3; + int n, p_x = curX + 2, p_y = curY - 3; int x[] = {1, 38, 75, 112, 75, 112, 75, 112, 149, 112, 149, 112, 149, 186, 223, 260, 1, 38, 75, 112, 149, 112, 149, 112, 149, 112, 149, 186, 223, 260, 260, 260, 260, 223}; int y[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 76, 76, 76, 76, 76, 76, 76, @@ -1127,7 +1127,7 @@ void DrasculaEngine::animation_23_joined() { } void DrasculaEngine::animation_23_joined2() { - int n, p_x = hare_x + 4, p_y = hare_y; + int n, p_x = curX + 4, p_y = curY; int x[] = {1, 35, 69, 103, 137, 171, 205, 239, 273, 1, 35, 69, 103, 137}; int y[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 73, 73, 73, 73, 73}; @@ -1348,7 +1348,7 @@ void DrasculaEngine::animation_2_3() { } void DrasculaEngine::animation_3_3() { - int px = hare_x - 20, py = hare_y - 1; + int px = curX - 20, py = curY - 1; loadPic("an2y_1.alg", frontSurface, 1); loadPic("an2y_2.alg", extraSurface, 1); @@ -1378,7 +1378,7 @@ void DrasculaEngine::animation_4_3() { } void DrasculaEngine::animation_5_3() { - int px = hare_x - 20, py = hare_y - 1; + int px = curX - 20, py = curY - 1; loadPic("an3y_1.alg", frontSurface, 1); loadPic("an3y_2.alg", extraSurface, 1); @@ -1561,12 +1561,12 @@ void DrasculaEngine::animation_5_5(){ int hueso_x[] = {1, 99, 197, 1, 99, 197, 1, 99, 197}; int hueso_y[] = {1, 1, 1, 66, 66, 66, 131, 131, 131}; int vuela_x[] = {1, 63, 125, 187, 249}; - int pixelX = hare_x - 53, pixelY = hare_y - 9; + int pixelX = curX - 53, pixelY = curY - 9; withoutVerb(); removeObject(8); - lleva_al_hare(hare_x - 19, hare_y + alto_hare); + lleva_al_hare(curX - 19, curY + curHeight); sentido_hare = 1; updateRoom(); updateScreen(); @@ -1782,7 +1782,7 @@ void DrasculaEngine::animation_12_5() { clearRoom(); sentido_hare = 1; characterMoved = 0; - hare_x = -1; + curX = -1; objExit = 104; withoutVerb(); carga_escoba("57.ald"); @@ -1872,8 +1872,8 @@ void DrasculaEngine::animation_1_6() { int l; sentido_hare = 0; - hare_x = 103; - hare_y = 108; + curX = 103; + curY = 108; flags[0] = 1; for (l = 0; l < 200; l++) factor_red[l] = 98; @@ -1994,7 +1994,7 @@ void DrasculaEngine::animation_6_6() { loadPic("99.alg", backSurface, 1); doBreak = 1; objExit = 104; - hare_x = -1; + curX = -1; withoutVerb(); carga_escoba("58.ald"); hare_se_ve = 1; @@ -2021,7 +2021,7 @@ void DrasculaEngine::animation_9_6() { animate("drf.bin", 16); fadeToBlack(0); clearRoom(); - hare_x = -1; + curX = -1; objExit = 108; carga_escoba("59.ald"); // The room number was originally changed here to "nada.alg", @@ -2035,7 +2035,7 @@ void DrasculaEngine::animation_9_6() { loadPic("nota2.alg", drawSurface1, HALF_PAL); black(); sentido_hare = 1; - hare_x -= 21; + curX -= 21; updateRoom(); updateScreen(); fadeFromBlack(0); @@ -2316,7 +2316,7 @@ void DrasculaEngine::animation_22_2() { } void DrasculaEngine::animation_24_2() { - if (hare_x < 178) + if (curX < 178) lleva_al_hare(208, 136); sentido_hare = 3; updateRoom(); @@ -2502,7 +2502,7 @@ void DrasculaEngine::animation_5_2() { loadPic("964.alg", frontSurface, 1); loadPic("aux5.alg", drawSurface3, 1); flags[8] = 1; - hare_x = hare_x - 4; + curX = curX - 4; talk_sinc(_text[_lang][46], "46.als", "4442444244244"); withoutVerb(); } @@ -2674,8 +2674,8 @@ void DrasculaEngine::animation_5_4(){ delay(800); animate("bio.bin", 14); flags[29] = 1; - hare_x = 95; - hare_y = 82; + curX = 95; + curY = 82; updateRoom(); updateScreen(); openDoor(2, 0); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index c21ceebdb0..ce3cbcc8f6 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -118,12 +118,12 @@ int DrasculaEngine::go() { takeObject = 0; menuBar = 0; menuScreen = 0; hasName = 0; frame_y = 0; - hare_x = -1; characterMoved = 0; sentido_hare = 3; num_frame = 0; hare_se_ve = 1; + curX = -1; characterMoved = 0; sentido_hare = 3; num_frame = 0; hare_se_ve = 1; checkFlags = 1; doBreak = 0; walkToObject = 0; stepX = STEP_X; stepY = STEP_Y; - alto_hare = CHARACTER_HEIGHT; ancho_hare = CHARACTER_WIDTH; feetHeight = FEET_HEIGHT; + curHeight = CHARACTER_HEIGHT; curWidth = CHARACTER_WIDTH; feetHeight = FEET_HEIGHT; talkHeight = TALK_HEIGHT; talkWidth = TALK_WIDTH; hasAnswer = 0; conta_blind_vez = 0; @@ -476,8 +476,8 @@ bool DrasculaEngine::escoba() { } } else { carga_escoba("62.ald"); - hare_x = -20; - hare_y = 56; + curX = -20; + curY = 56; lleva_al_hare(65, 145); } } else if (currentChapter == 2) { @@ -518,8 +518,8 @@ bool DrasculaEngine::escoba() { if (hay_que_load == 0) { carga_escoba("21.ald"); sentido_hare = 0; - hare_x = 235; - hare_y = 164; + curX = 235; + curY = 164; } else { if (!para_cargar(saveName)) { return true; @@ -572,11 +572,11 @@ bool DrasculaEngine::escoba() { } if (currentChapter == 2) { - if (roomNumber == 3 && (hare_x == 279) && (hare_y + alto_hare == 101)) + if (roomNumber == 3 && (curX == 279) && (curY + curHeight == 101)) animation_1_2(); - else if (roomNumber == 14 && (hare_x == 214) && (hare_y + alto_hare == 121)) + else if (roomNumber == 14 && (curX == 214) && (curY + curHeight == 121)) lleva_al_hare(190, 130); - else if (roomNumber == 14 && (hare_x == 246) && (hare_y + alto_hare == 112)) + else if (roomNumber == 14 && (curX == 246) && (curY + curHeight == 112)) lleva_al_hare(190, 130); } @@ -853,8 +853,8 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { getIntFromLine(buffer, size, &martin); if (currentChapter == 2 && martin != 0) { - ancho_hare = martin; - getIntFromLine(buffer, size, &alto_hare); + curWidth = martin; + getIntFromLine(buffer, size, &curHeight); getIntFromLine(buffer, size, &feetHeight); getIntFromLine(buffer, size, &stepX); getIntFromLine(buffer, size, &stepY); @@ -912,8 +912,8 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { if (martin == 0) { stepX = STEP_X; stepY = STEP_Y; - alto_hare = CHARACTER_HEIGHT; - ancho_hare = CHARACTER_WIDTH; + curHeight = CHARACTER_HEIGHT; + curWidth = CHARACTER_WIDTH; feetHeight = FEET_HEIGHT; loadPic("97.alg", extraSurface, 1); loadPic("96.alg", frontSurface, 1); @@ -929,9 +929,9 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { } if (currentChapter == 2) { - if (hare_x == -1) { - hare_x = _destX[obj_salir]; - hare_y = _destY[obj_salir] - alto_hare; + if (curX == -1) { + curX = _destX[obj_salir]; + curY = _destY[obj_salir] - curHeight; } characterMoved = 0; } @@ -985,15 +985,15 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { } if (currentChapter != 2) { - if (hare_x == -1) { - hare_x = _destX[obj_salir]; - hare_y = _destY[obj_salir]; - alto_hare = (CHARACTER_HEIGHT * factor_red[hare_y]) / 100; - ancho_hare = (CHARACTER_WIDTH * factor_red[hare_y]) / 100; - hare_y = hare_y - alto_hare; + if (curX == -1) { + curX = _destX[obj_salir]; + curY = _destY[obj_salir]; + curHeight = (CHARACTER_HEIGHT * factor_red[curY]) / 100; + curWidth = (CHARACTER_WIDTH * factor_red[curY]) / 100; + curY = curY - curHeight; } else { - alto_hare = (CHARACTER_HEIGHT * factor_red[hare_y]) / 100; - ancho_hare = (CHARACTER_WIDTH * factor_red[hare_y]) / 100; + curHeight = (CHARACTER_HEIGHT * factor_red[curY]) / 100; + curWidth = (CHARACTER_WIDTH * factor_red[curY]) / 100; } characterMoved = 0; } @@ -1001,7 +1001,7 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { if (currentChapter == 2) { soc = 0; for (l = 0; l < 6; l++) { - soc += ancho_hare; + soc += curWidth; frame_x[l] = soc; } } @@ -1064,8 +1064,8 @@ void DrasculaEngine::clearRoom() { void DrasculaEngine::lleva_al_hare(int pointX, int pointY) { if (currentChapter == 5 || currentChapter == 6) { if (hare_se_ve == 0) { - hare_x = sitio_x; - hare_y = sitio_y; + curX = sitio_x; + curY = sitio_y; updateRoom(); updateScreen(); return; @@ -1134,15 +1134,15 @@ void DrasculaEngine::checkObjects() { } if (currentChapter == 2) { - if (mouseX > hare_x + 2 && mouseY > hare_y + 2 - && mouseX < hare_x + ancho_hare - 2 && mouseY < hare_y + alto_hare - 2) { + if (mouseX > curX + 2 && mouseY > curY + 2 + && mouseX < curX + curWidth - 2 && mouseY < curY + curHeight - 2) { strcpy(textName, "hacker"); hasName = 1; veo = 1; } } else { - if (mouseX > hare_x + 2 && mouseY > hare_y + 2 - && mouseX < hare_x + ancho_hare - 2 && mouseY < hare_y + alto_hare - 2 && veo == 0) { + if (mouseX > curX + 2 && mouseY > curY + 2 + && mouseX < curX + curWidth - 2 && mouseY < curY + curHeight - 2 && veo == 0) { strcpy(textName, "hacker"); hasName = 1; veo = 1; @@ -1181,8 +1181,8 @@ bool DrasculaEngine::verify1() { } } - if (mouseX > hare_x && mouseY > hare_y - && mouseX < hare_x + ancho_hare && mouseY < hare_y + alto_hare) + if (mouseX > curX && mouseY > curY + && mouseX < curX + curWidth && mouseY < curY + curHeight) doBreak = 1; for (l = 0; l < numRoomObjs; l++) { @@ -2043,7 +2043,7 @@ void DrasculaEngine::updateRoom() { if (flags[0] == 0) pon_hare(); else - copyRect(113, 54, hare_x - 20, hare_y - 1, 77, 89, drawSurface3, screenSurface); + copyRect(113, 54, curX - 20, curY - 1, 77, 89, drawSurface3, screenSurface); } else { pon_hare(); } @@ -2066,8 +2066,8 @@ bool DrasculaEngine::loadGame(const char *gameName) { return false; } sav->read(currentData, 20); - hare_x = sav->readSint32LE(); - hare_y = sav->readSint32LE(); + curX = sav->readSint32LE(); + curY = sav->readSint32LE(); sentido_hare = sav->readSint32LE(); for (l = 1; l < 43; l++) { @@ -2198,26 +2198,26 @@ void DrasculaEngine::startWalking() { stepY = STEP_Y; if (currentChapter == 2) { - if ((sitio_x < hare_x) && (sitio_y <= (hare_y + alto_hare))) + if ((sitio_x < curX) && (sitio_y <= (curY + curHeight))) quadrant_1(); - else if ((sitio_x < hare_x) && (sitio_y > (hare_y + alto_hare))) + else if ((sitio_x < curX) && (sitio_y > (curY + curHeight))) quadrant_3(); - else if ((sitio_x > hare_x + ancho_hare) && (sitio_y <= (hare_y + alto_hare))) + else if ((sitio_x > curX + curWidth) && (sitio_y <= (curY + curHeight))) quadrant_2(); - else if ((sitio_x > hare_x + ancho_hare) && (sitio_y > (hare_y + alto_hare))) + else if ((sitio_x > curX + curWidth) && (sitio_y > (curY + curHeight))) quadrant_4(); - else if (sitio_y < hare_y + alto_hare) + else if (sitio_y < curY + curHeight) walkUp(); - else if (sitio_y > hare_y + alto_hare) + else if (sitio_y > curY + curHeight) walkDown(); } else { - if ((sitio_x < hare_x + ancho_hare / 2 ) && (sitio_y <= (hare_y + alto_hare))) + if ((sitio_x < curX + curWidth / 2 ) && (sitio_y <= (curY + curHeight))) quadrant_1(); - else if ((sitio_x < hare_x + ancho_hare / 2) && (sitio_y > (hare_y + alto_hare))) + else if ((sitio_x < curX + curWidth / 2) && (sitio_y > (curY + curHeight))) quadrant_3(); - else if ((sitio_x > hare_x + ancho_hare / 2) && (sitio_y <= (hare_y + alto_hare))) + else if ((sitio_x > curX + curWidth / 2) && (sitio_y <= (curY + curHeight))) quadrant_2(); - else if ((sitio_x > hare_x + ancho_hare / 2) && (sitio_y > (hare_y + alto_hare))) + else if ((sitio_x > curX + curWidth / 2) && (sitio_y > (curY + curHeight))) quadrant_4(); else characterMoved = 0; @@ -2232,42 +2232,42 @@ void DrasculaEngine::pon_hare() { if (characterMoved == 1 && stepX == STEP_X) { for (r = 0; r < stepX; r++) { if (currentChapter != 2) { - if (sentido_hare == 0 && sitio_x - r == hare_x + ancho_hare / 2) { + if (sentido_hare == 0 && sitio_x - r == curX + curWidth / 2) { characterMoved = 0; stepX = STEP_X; stepY = STEP_Y; } - if (sentido_hare == 1 && sitio_x + r == hare_x + ancho_hare / 2) { + if (sentido_hare == 1 && sitio_x + r == curX + curWidth / 2) { characterMoved = 0; stepX = STEP_X; stepY = STEP_Y; - hare_x = sitio_x - ancho_hare / 2; - hare_y = sitio_y - alto_hare; + curX = sitio_x - curWidth / 2; + curY = sitio_y - curHeight; } } else if (currentChapter == 2) { - if (sentido_hare == 0 && sitio_x - r == hare_x) { + if (sentido_hare == 0 && sitio_x - r == curX) { characterMoved = 0; stepX = STEP_X; stepY = STEP_Y; } - if (sentido_hare == 1 && sitio_x + r == hare_x + ancho_hare) { + if (sentido_hare == 1 && sitio_x + r == curX + curWidth) { characterMoved = 0; stepX = STEP_X; stepY = STEP_Y; - hare_x = sitio_x - ancho_hare + 4; - hare_y = sitio_y - alto_hare; + curX = sitio_x - curWidth + 4; + curY = sitio_y - curHeight; } } } } if (characterMoved == 1 && stepY == STEP_Y) { for (r = 0; r < stepY; r++) { - if (sentido_hare == 2 && sitio_y - r == hare_y + alto_hare) { + if (sentido_hare == 2 && sitio_y - r == curY + curHeight) { characterMoved = 0; stepX = STEP_X; stepY = STEP_Y; } - if (sentido_hare == 3 && sitio_y + r == hare_y + alto_hare) { + if (sentido_hare == 3 && sitio_y + r == curY + curHeight) { characterMoved = 0; stepX = STEP_X; stepY = STEP_Y; @@ -2285,11 +2285,11 @@ void DrasculaEngine::pon_hare() { if (characterMoved == 0) { pos_hare[0] = 0; pos_hare[1] = DIF_MASK_HARE; - pos_hare[2] = hare_x; - pos_hare[3] = hare_y; + pos_hare[2] = curX; + pos_hare[3] = curY; if (currentChapter == 2) { - pos_hare[4] = ancho_hare; - pos_hare[5] = alto_hare; + pos_hare[4] = curWidth; + pos_hare[5] = curHeight; } else { pos_hare[4] = CHARACTER_WIDTH; pos_hare[5] = CHARACTER_HEIGHT; @@ -2301,34 +2301,34 @@ void DrasculaEngine::pon_hare() { copyRectClip(pos_hare, extraSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], - factor_red[hare_y + alto_hare], extraSurface, screenSurface); + factor_red[curY + curHeight], extraSurface, screenSurface); } else if (sentido_hare == 1) { if (currentChapter == 2) copyRectClip(pos_hare, extraSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], - factor_red[hare_y + alto_hare], extraSurface, screenSurface); + factor_red[curY + curHeight], extraSurface, screenSurface); } else if (sentido_hare == 2) { if (currentChapter == 2) copyRectClip(pos_hare, backSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], - factor_red[hare_y + alto_hare], backSurface, screenSurface); + factor_red[curY + curHeight], backSurface, screenSurface); } else { if (currentChapter == 2) copyRectClip(pos_hare, frontSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], - factor_red[hare_y + alto_hare], frontSurface, screenSurface); + 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] = hare_x; - pos_hare[3] = hare_y; + pos_hare[2] = curX; + pos_hare[3] = curY; if (currentChapter == 2) { - pos_hare[4] = ancho_hare; - pos_hare[5] = alto_hare; + pos_hare[4] = curWidth; + pos_hare[5] = curHeight; } else { pos_hare[4] = CHARACTER_WIDTH; pos_hare[5] = CHARACTER_HEIGHT; @@ -2339,25 +2339,25 @@ void DrasculaEngine::pon_hare() { copyRectClip(pos_hare, extraSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], - factor_red[hare_y + alto_hare], extraSurface, screenSurface); + factor_red[curY + curHeight], extraSurface, screenSurface); } else if (sentido_hare == 1) { if (currentChapter == 2) copyRectClip(pos_hare, extraSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], - factor_red[hare_y + alto_hare], extraSurface, screenSurface); + factor_red[curY + curHeight], extraSurface, screenSurface); } else if (sentido_hare == 2) { if (currentChapter == 2) copyRectClip(pos_hare, backSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], - factor_red[hare_y + alto_hare], backSurface, screenSurface); + factor_red[curY + curHeight], backSurface, screenSurface); } else { if (currentChapter == 2) copyRectClip(pos_hare, frontSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], - factor_red[hare_y + alto_hare], frontSurface, screenSurface); + factor_red[curY + curHeight], frontSurface, screenSurface); } increaseFrameNum(); } @@ -2447,7 +2447,7 @@ bool DrasculaEngine::exitRoom(int l) { clearRoom(); strcpy(roomExit, _targetSurface[l]); strcat(roomExit, ".ald"); - hare_x = -1; + curX = -1; carga_escoba(roomExit); } } @@ -2480,7 +2480,7 @@ bool DrasculaEngine::exitRoom(int l) { strcpy(roomExit, _targetSurface[l]); strcat(roomExit, ".ald"); - hare_x =- 1; + curX =- 1; carga_escoba(roomExit); } } else if (currentChapter == 3) { @@ -2498,7 +2498,7 @@ bool DrasculaEngine::exitRoom(int l) { clearRoom(); strcpy(roomExit, _targetSurface[l]); strcat(roomExit, ".ald"); - hare_x =- 1; + curX =- 1; carga_escoba(roomExit); } } else if (currentChapter == 4) { @@ -2519,7 +2519,7 @@ bool DrasculaEngine::exitRoom(int l) { clearRoom(); strcpy(roomExit, _targetSurface[l]); strcat(roomExit, ".ald"); - hare_x = -1; + curX = -1; carga_escoba(roomExit); } } else if (currentChapter == 5) { @@ -2538,7 +2538,7 @@ bool DrasculaEngine::exitRoom(int l) { clearRoom(); strcpy(roomExit, _targetSurface[l]); strcat(roomExit, ".ald"); - hare_x = -1; + curX = -1; carga_escoba(roomExit); } } else if (currentChapter == 6) { @@ -2556,7 +2556,7 @@ bool DrasculaEngine::exitRoom(int l) { clearRoom(); strcpy(roomExit, _targetSurface[l]); strcat(roomExit, ".ald"); - hare_x = -1; + curX = -1; carga_escoba(roomExit); if (objExit == 105) @@ -2923,18 +2923,18 @@ void DrasculaEngine::quadrant_1() { float distance_x, distance_y; if (currentChapter == 2) - distance_x = hare_x - sitio_x; + distance_x = curX - sitio_x; else - distance_x = hare_x + ancho_hare / 2 - sitio_x; + distance_x = curX + curWidth / 2 - sitio_x; - distance_y = (hare_y + alto_hare) - sitio_y; + distance_y = (curY + curHeight) - sitio_y; if (distance_x < distance_y) { - direccion_hare = 0; + curDirection = 0; sentido_hare = 2; stepX = (int)(distance_x / (distance_y / STEP_Y)); } else { - direccion_hare = 7; + curDirection = 7; sentido_hare = 0; stepY = (int)(distance_y / (distance_x / STEP_X)); } @@ -2944,18 +2944,18 @@ void DrasculaEngine::quadrant_2() { float distance_x, distance_y; if (currentChapter == 2) - distance_x = abs(hare_x + ancho_hare - sitio_x); + distance_x = abs(curX + curWidth - sitio_x); else - distance_x = abs(hare_x + ancho_hare / 2 - sitio_x); + distance_x = abs(curX + curWidth / 2 - sitio_x); - distance_y = (hare_y + alto_hare) - sitio_y; + distance_y = (curY + curHeight) - sitio_y; if (distance_x < distance_y) { - direccion_hare = 1; + curDirection = 1; sentido_hare = 2; stepX = (int)(distance_x / (distance_y / STEP_Y)); } else { - direccion_hare = 2; + curDirection = 2; sentido_hare = 1; stepY = (int)(distance_y / (distance_x / STEP_X)); } @@ -2965,18 +2965,18 @@ void DrasculaEngine::quadrant_3() { float distance_x, distance_y; if (currentChapter == 2) - distance_x = hare_x - sitio_x; + distance_x = curX - sitio_x; else - distance_x = hare_x + ancho_hare / 2 - sitio_x; + distance_x = curX + curWidth / 2 - sitio_x; - distance_y = sitio_y - (hare_y + alto_hare); + distance_y = sitio_y - (curY + curHeight); if (distance_x < distance_y) { - direccion_hare = 5; + curDirection = 5; sentido_hare = 3; stepX = (int)(distance_x / (distance_y / STEP_Y)); } else { - direccion_hare = 6; + curDirection = 6; sentido_hare = 0; stepY = (int)(distance_y / (distance_x / STEP_X)); } @@ -2986,18 +2986,18 @@ void DrasculaEngine::quadrant_4() { float distance_x, distance_y; if (currentChapter == 2) - distance_x = abs(hare_x + ancho_hare - sitio_x); + distance_x = abs(curX + curWidth - sitio_x); else - distance_x = abs(hare_x + ancho_hare / 2 - sitio_x); + distance_x = abs(curX + curWidth / 2 - sitio_x); - distance_y = sitio_y - (hare_y + alto_hare); + distance_y = sitio_y - (curY + curHeight); if (distance_x < distance_y) { - direccion_hare = 4; + curDirection = 4; sentido_hare = 3; stepX = (int)(distance_x / (distance_y / STEP_Y)); } else { - direccion_hare = 3; + curDirection = 3; sentido_hare = 1; stepY = (int)(distance_y / (distance_x / STEP_X)); } @@ -3012,8 +3012,8 @@ void DrasculaEngine::saveGame(char gameName[]) { } out->writeSint32LE(currentChapter); out->write(currentData, 20); - out->writeSint32LE(hare_x); - out->writeSint32LE(hare_y); + out->writeSint32LE(curX); + out->writeSint32LE(curY); out->writeSint32LE(sentido_hare); for (l = 1; l < 43; l++) { @@ -3043,26 +3043,26 @@ void DrasculaEngine::increaseFrameNum() { if (num_frame == 6) num_frame = 0; - if (direccion_hare == 0 || direccion_hare == 7) { - hare_x = hare_x - stepX; - hare_y = hare_y - stepY; - } else if (direccion_hare == 1 || direccion_hare == 2) { - hare_x = hare_x + stepX; - hare_y = hare_y - stepY; - } else if (direccion_hare == 3 || direccion_hare == 4) { - hare_x = hare_x + stepX; - hare_y = hare_y + stepY; - } else if (direccion_hare == 5 || direccion_hare == 6) { - hare_x = hare_x - stepX; - hare_y = hare_y + stepY; + if (curDirection == 0 || curDirection == 7) { + curX -= stepX; + curY -= stepY; + } else if (curDirection == 1 || curDirection == 2) { + curX += stepX; + curY -= stepY; + } else if (curDirection == 3 || curDirection == 4) { + curX += stepX; + curY += stepY; + } else if (curDirection == 5 || curDirection == 6) { + curX -= stepX; + curY += stepY; } } if (currentChapter != 2) { - hare_y += (int)(alto_hare - newHeight); - hare_x += (int)(ancho_hare - newWidth); - alto_hare = (int)newHeight; - ancho_hare = (int)newWidth; + curY += (int)(curHeight - newHeight); + curX += (int)(curWidth - newWidth); + curHeight = (int)newHeight; + curWidth = (int)newWidth; } } @@ -3501,13 +3501,13 @@ void DrasculaEngine::updateVisible() { } void DrasculaEngine::walkDown() { - direccion_hare = 4; + curDirection = 4; sentido_hare = 3; stepX = 0; } void DrasculaEngine::walkUp() { - direccion_hare = 0; + curDirection = 0; sentido_hare = 2; stepX = 0; } diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 3d2306bbdb..27472521bf 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -260,11 +260,11 @@ public: int flags[NUM_FLAGS]; int frame_y; - int hare_x, hare_y, characterMoved, direccion_hare, sentido_hare, num_frame, hare_se_ve; + int curX, curY, characterMoved, curDirection, sentido_hare, num_frame, hare_se_ve; int sitio_x, sitio_y, checkFlags; int doBreak; int stepX, stepY; - int alto_hare, ancho_hare, feetHeight; + int curHeight, curWidth, feetHeight; int talkHeight, talkWidth; int suelo_x1, suelo_y1, suelo_x2, suelo_y2; int near, far; diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index d5b4c0b82e..052c5c3da0 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -112,7 +112,7 @@ void DrasculaEngine::room_3(int fl) { } else if (pickedObject == kVerbPick && fl == 165) { copyBackground(0, 0, 0,0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyRect(44, 1, hare_x, hare_y, 41, 70, drawSurface2, screenSurface); + copyRect(44, 1, curX, curY, 41, 70, drawSurface2, screenSurface); updateRefresh(); updateScreen(); pause(4); @@ -172,7 +172,7 @@ void DrasculaEngine::room_6(int fl){ else if (pickedObject == kVerbOpen && fl == 143 && flags[2] == 0) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyRect(228, 102, hare_x + 5, hare_y - 1, 47, 73, drawSurface3, screenSurface); + copyRect(228, 102, curX + 5, curY - 1, 47, 73, drawSurface3, screenSurface); updateScreen(); pause(10); playSound(3); @@ -184,7 +184,7 @@ void DrasculaEngine::room_6(int fl){ copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); flags[2] = 0; updateRefresh_pre(); - copyRect(228, 102, hare_x + 5, hare_y - 1, 47, 73, drawSurface3, screenSurface); + copyRect(228, 102, curX + 5, curY - 1, 47, 73, drawSurface3, screenSurface); updateScreen(); pause(5); playSound(4); @@ -194,7 +194,7 @@ void DrasculaEngine::room_6(int fl){ } else if (pickedObject == kVerbOpen && fl == 139 && flags[1] == 0) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyRect(267, 1, hare_x - 14, hare_y - 2, 52, 73, drawSurface3, screenSurface); + copyRect(267, 1, curX - 14, curY - 2, 52, 73, drawSurface3, screenSurface); updateScreen(); pause(19); playSound(3); @@ -207,7 +207,7 @@ void DrasculaEngine::room_6(int fl){ } else if (pickedObject == kVerbPick && fl == 140) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyRect(267, 1, hare_x - 14, hare_y - 2, 52, 73, drawSurface3, screenSurface); + copyRect(267, 1, curX - 14, curY - 2, 52, 73, drawSurface3, screenSurface); updateScreen(); pause(19); pickObject(9); @@ -331,7 +331,7 @@ void DrasculaEngine::room_15(int fl) { sentido_hare = 1; } else if (pickedObject == 18 && fl == 188 && flags[26] == 0) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - copyRect(133, 135, hare_x + 6, hare_y, 39, 63, drawSurface3, screenSurface); + copyRect(133, 135, curX + 6, curY, 39, 63, drawSurface3, screenSurface); updateScreen(); playSound(8); finishSound(); @@ -440,7 +440,7 @@ void DrasculaEngine::room_18(int fl) { else if (pickedObject == kVerbPick && fl == 182) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyRect(44, 1, hare_x, hare_y, 41, 70, drawSurface2, screenSurface); + copyRect(44, 1, curX, curY, 41, 70, drawSurface2, screenSurface); updateRefresh(); updateScreen(); pause(4); @@ -464,7 +464,7 @@ void DrasculaEngine::room_18(int fl) { updateScreen(); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyRect(1, 1, hare_x - 1, hare_y + 3, 42, 67, drawSurface2, screenSurface); + copyRect(1, 1, curX - 1, curY + 3, 42, 67, drawSurface2, screenSurface); updateRefresh(); updateScreen(); pause(6); @@ -875,7 +875,7 @@ void DrasculaEngine::room_55(int fl) { playSound(11); animate("det.bin", 17); finishSound(); - lleva_al_hare(hare_x - 3, hare_y + alto_hare + 6); + lleva_al_hare(curX - 3, curY + curHeight + 6); } else hasAnswer = 0; } @@ -932,7 +932,7 @@ void DrasculaEngine::room_59(int fl) { stopSound(); hare_se_ve = 0; updateRoom(); - copyRect(101, 34, hare_x - 4, hare_y - 1, 37, 70, drawSurface3, screenSurface); + copyRect(101, 34, curX - 4, curY - 1, 37, 70, drawSurface3, screenSurface); copyBackground(0, 0, 0, 0, 320, 200, screenSurface, drawSurface1); updateScreen(); hare_se_ve = 1; @@ -1213,7 +1213,7 @@ void DrasculaEngine::updateRefresh_pre() { void DrasculaEngine::update_1_pre() { int cambio_col_antes = changeColor; - if (hare_x > 98 && hare_x < 153) + if (curX > 98 && curX < 153) changeColor = 1; else changeColor = 0; @@ -1283,14 +1283,14 @@ void DrasculaEngine::update_3_pre() { } void DrasculaEngine::update_3() { - if (hare_y + alto_hare < 118) + if (curY + curHeight < 118) copyRect(129, 110, 194, 36, 126, 88, drawSurface3, screenSurface); copyRect(47, 57, 277, 143, 43, 50, drawSurface3, screenSurface); } void DrasculaEngine::update_4() { int cambio_col_antes = changeColor; - if (hare_x > 190) + if (curX > 190) changeColor = 1; else changeColor = 0; @@ -1313,8 +1313,8 @@ void DrasculaEngine::update_5() { void DrasculaEngine::update_6_pre() { int cambio_col_antes = changeColor; - if ((hare_x > 149 && hare_y + alto_hare > 160 && hare_x < 220 && hare_y + alto_hare < 188) || - (hare_x > 75 && hare_y + alto_hare > 183 && hare_x < 145)) + if ((curX > 149 && curY + curHeight > 160 && curX < 220 && curY + curHeight < 188) || + (curX > 75 && curY + curHeight > 183 && curX < 145)) changeColor = 0; else changeColor = 1; @@ -1361,7 +1361,7 @@ void DrasculaEngine::update_12_pre() { } void DrasculaEngine::update_13() { - if (hare_x > 55 && flags[3] == 0) + if (curX > 55 && flags[3] == 0) animation_6_3(); if (flags[1] == 0) copyRect(185, 110, 121, 65, 67, 88, drawSurface3, screenSurface); @@ -1382,7 +1382,7 @@ void DrasculaEngine::update_14_pre() { if (blinking == 5) copyBackground(1, 149, 127, 52, 9, 5, drawSurface3, screenSurface); - if (hare_x > 101 && hare_x < 155) + 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); @@ -1532,7 +1532,7 @@ void DrasculaEngine::update_26_pre() { void DrasculaEngine::update_26() { if (flags[29] == 1) - copyRect(93, 1, hare_x, hare_y, 45, 78, backSurface, screenSurface); + copyRect(93, 1, curX, curY, 45, 78, backSurface, screenSurface); copyRect(233, 107, 17, 102, 66, 92, drawSurface3, screenSurface); } @@ -1701,7 +1701,7 @@ void DrasculaEngine::update_60_pre() { } void DrasculaEngine::update_60() { - if (hare_y - 10 < y_dr && flags[5] == 0) + if (curY - 10 < y_dr && flags[5] == 0) placeDrascula(); } @@ -1722,7 +1722,7 @@ void DrasculaEngine::update_62_pre() { if (blinking == 5) copyBackground(1, 149, 127, 52, 9, 5, drawSurface3, screenSurface); - if (hare_x > 101 && hare_x < 155) + if (curX > 101 && curX < 155) copyBackground(31, 138, 178, 51, 18, 16, drawSurface3, screenSurface); if (flags[11] == 0) @@ -1762,7 +1762,7 @@ void DrasculaEngine::update_62() { copyRect(1, 1, 0, 0, 62, 142, drawSurface2, screenSurface); - if (hare_y + alto_hare < 89) { + 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); } diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 40c5d4a1ab..35bce21559 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -370,7 +370,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) { } if (currentChapter != 2) { - if (factor_red[hare_y + alto_hare] == 100) + if (factor_red[curY + curHeight] == 100) suma_1_pixel = 0; } @@ -391,65 +391,65 @@ void DrasculaEngine::talk(const char *said, const char *filename) { updateRefresh_pre(); if (currentChapter == 2) - copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, ancho_hare, talkHeight - 1, screenSurface, drawSurface3); + copyBackground(curX, curY, OBJWIDTH + 1, 0, curWidth, talkHeight - 1, screenSurface, drawSurface3); else - copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), - (int)(((float)(talkHeight - 1) / 100) * factor_red[hare_y + alto_hare]), + copyBackground(curX, curY, OBJWIDTH + 1, 0, (int)(((float)curWidth / 100) * factor_red[curY + curHeight]), + (int)(((float)(talkHeight - 1) / 100) * factor_red[curY + curHeight]), screenSurface, drawSurface3); pon_hare(); if (currentChapter == 2) { if (!strcmp(menuBackground, "99.alg") || !strcmp(menuBackground, "994.alg")) - copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, ancho_hare, talkHeight - 1, drawSurface3, screenSurface); + copyBackground(OBJWIDTH + 1, 0, curX, curY, curWidth, talkHeight - 1, drawSurface3, screenSurface); } else { - copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), - (int)(((float)(talkHeight - 1) / 100) * factor_red[hare_y + alto_hare]), + 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 (currentChapter == 2) - copyRect(x_talk_izq[face], y_mask_talk, hare_x + 8, hare_y - 1, talkWidth, talkHeight, + 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, hare_x + (int)((8.0f / 100) * factor_red[hare_y + alto_hare]), - hare_y, talkWidth, talkHeight, factor_red[hare_y + alto_hare], + reduce_hare_chico(x_talk_izq[face], y_mask_talk, curX + (int)((8.0f / 100) * factor_red[curY + curHeight]), + curY, talkWidth, talkHeight, factor_red[curY + curHeight], extraSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 1) { if (currentChapter == 2) - copyRect(x_talk_dch[face], y_mask_talk, hare_x + 12, hare_y, talkWidth, talkHeight, + 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, hare_x + (int)((12.0f / 100) * factor_red[hare_y + alto_hare]), - hare_y, talkWidth, talkHeight, factor_red[hare_y + alto_hare], extraSurface, screenSurface); + 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) { if (currentChapter == 2) - copyRect(x_talk_izq[face], y_mask_talk, hare_x + 12, hare_y, talkWidth, talkHeight, + 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 + hare_x + (int)((12.0f / 100) * factor_red[hare_y + alto_hare]), - hare_y, talkWidth, talkHeight, factor_red[hare_y + alto_hare], + suma_1_pixel + curX + (int)((12.0f / 100) * factor_red[curY + curHeight]), + curY, talkWidth, talkHeight, factor_red[curY + curHeight], frontSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 3) { if (currentChapter == 2) - copyRect(x_talk_dch[face], y_mask_talk, hare_x + 8, hare_y, talkWidth, talkHeight, + 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 + hare_x + (int)((8.0f / 100) * factor_red[hare_y + alto_hare]), - hare_y, talkWidth,talkHeight, factor_red[hare_y + alto_hare], + suma_1_pixel + curX + (int)((8.0f / 100) * factor_red[curY + curHeight]), + curY, talkWidth,talkHeight, factor_red[curY + curHeight], frontSurface, screenSurface); updateRefresh(); } if (withVoices == 0) - centerText(said, hare_x, hare_y); + centerText(said, curX, curY); updateScreen(); @@ -911,7 +911,7 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha color_abc(kColorYellow); if (currentChapter == 1) { - if (factor_red[hare_y + alto_hare] == 100) + if (factor_red[curY + curHeight] == 100) suma_1_pixel = 0; } @@ -926,52 +926,52 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha updateRefresh_pre(); if (currentChapter == 2) - copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, ancho_hare, talkHeight - 1, screenSurface, drawSurface3); + copyBackground(curX, curY, OBJWIDTH + 1, 0, curWidth, talkHeight - 1, screenSurface, drawSurface3); else - copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), - (int)(((float)(talkHeight - 1) / 100) * factor_red[hare_y + alto_hare]), screenSurface, drawSurface3); + copyBackground(curX, curY, OBJWIDTH + 1, 0, (int)(((float)curWidth / 100) * factor_red[curY + curHeight]), + (int)(((float)(talkHeight - 1) / 100) * factor_red[curY + curHeight]), screenSurface, drawSurface3); pon_hare(); if (currentChapter == 2) { - if (alto_hare != 56) - copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, ancho_hare, talkHeight - 1, drawSurface3, screenSurface); + if (curHeight != 56) + copyBackground(OBJWIDTH + 1, 0, curX, curY, curWidth, talkHeight - 1, drawSurface3, screenSurface); } else - copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), - (int)(((float)(talkHeight - 1) / 100) * factor_red[hare_y + alto_hare]), drawSurface3, screenSurface); + 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 (currentChapter == 2) - copyRect(x_talk_izq[face], y_mask_talk, hare_x + 8, hare_y - 1, talkWidth, talkHeight, extraSurface, screenSurface); + 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)(hare_x + (8.0f / 100) * factor_red[hare_y + alto_hare]), - hare_y, talkWidth, talkHeight, factor_red[hare_y + alto_hare], extraSurface, screenSurface); + 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) { if (currentChapter == 2) - copyRect(x_talk_dch[face], y_mask_talk, hare_x + 12, hare_y, talkWidth, talkHeight, extraSurface, screenSurface); + 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)(hare_x + (12.0f / 100) * factor_red[hare_y + alto_hare]), - hare_y, talkWidth, talkHeight, factor_red[hare_y + alto_hare], extraSurface, screenSurface); + 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) { if (currentChapter == 2) - copyRect(x_talk_izq[face], y_mask_talk, hare_x + 12, hare_y, talkWidth, talkHeight, frontSurface, screenSurface); + 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 + hare_x + (12.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, - talkWidth, talkHeight, factor_red[hare_y + alto_hare], frontSurface, screenSurface); + (int)(suma_1_pixel + curX + (12.0f / 100) * factor_red[curY + curHeight]), curY, + talkWidth, talkHeight, factor_red[curY + curHeight], frontSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 3) { if (currentChapter == 2) - copyRect(x_talk_dch[face], y_mask_talk, hare_x + 8, hare_y, talkWidth, talkHeight, frontSurface, screenSurface); + 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 + hare_x + (8.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, - talkWidth, talkHeight, factor_red[hare_y + alto_hare], frontSurface, screenSurface); + (int)(suma_1_pixel + curX + (8.0f / 100) * factor_red[curY + curHeight]), curY, + talkWidth, talkHeight, factor_red[curY + curHeight], frontSurface, screenSurface); updateRefresh(); } if (withVoices == 0) - centerText(said, hare_x, hare_y); + centerText(said, curX, curY); updateScreen(); -- cgit v1.2.3