aboutsummaryrefslogtreecommitdiff
path: root/engines/drascula
diff options
context:
space:
mode:
authorFilippos Karapetis2008-05-30 14:44:08 +0000
committerFilippos Karapetis2008-05-30 14:44:08 +0000
commit1da231a34efb38b3a1035b59c506cc46d3aa8b81 (patch)
treef01175f39971b99386e890c547bdfc4f19d7e6d0 /engines/drascula
parent4837ff8b9be211eff889100a72dfbbf58e0fc2a0 (diff)
downloadscummvm-rg350-1da231a34efb38b3a1035b59c506cc46d3aa8b81.tar.gz
scummvm-rg350-1da231a34efb38b3a1035b59c506cc46d3aa8b81.tar.bz2
scummvm-rg350-1da231a34efb38b3a1035b59c506cc46d3aa8b81.zip
- x_alakeva/y_alakeva -> destX/destY
- confirma_salir -> confirmExit - Used CLIP instead of if's svn-id: r32399
Diffstat (limited to 'engines/drascula')
-rw-r--r--engines/drascula/drascula.cpp30
-rw-r--r--engines/drascula/drascula.h4
2 files changed, 12 insertions, 22 deletions
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index 457af09265..3c7c9be46a 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -751,7 +751,7 @@ bucles:
if (num_ejec != 3)
cont_sv = 0;
} else if (key == Common::KEYCODE_ESCAPE) {
- if (!confirma_salir())
+ if (!confirmExit())
return false;
if (num_ejec != 3)
cont_sv = 0;
@@ -958,9 +958,9 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) {
getLine(ald, buffer, size);
sscanf(buffer, "%s", targetSurface[l]);
getLine(ald, buffer, size);
- sscanf(buffer, "%d", &x_alakeva[l]);
+ sscanf(buffer, "%d", &destX[l]);
getLine(ald, buffer, size);
- sscanf(buffer, "%d", &y_alakeva[l]);
+ sscanf(buffer, "%d", &destY[l]);
getLine(ald, buffer, size);
sscanf(buffer, "%d", &sentido_alkeva[l]);
getLine(ald, buffer, size);
@@ -1009,8 +1009,8 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) {
if (num_ejec == 2) {
if (hare_x == -1) {
- hare_x = x_alakeva[obj_salir];
- hare_y = y_alakeva[obj_salir] - alto_hare;
+ hare_x = destX[obj_salir];
+ hare_y = destY[obj_salir] - alto_hare;
}
characterMoved = 0;
}
@@ -1065,8 +1065,8 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) {
if (num_ejec != 2) {
if (hare_x == -1) {
- hare_x = x_alakeva[obj_salir];
- hare_y = y_alakeva[obj_salir];
+ 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;
@@ -1278,18 +1278,8 @@ bool DrasculaEngine::comprueba1() {
}
if (doBreak == 0) {
- sitio_x = mouseX;
- sitio_y = mouseY;
-
- if (sitio_x < suelo_x1)
- sitio_x = suelo_x1;
- if (sitio_x > suelo_x2)
- sitio_x = suelo_x2;
- if (sitio_y < suelo_y1 + feetHeight)
- sitio_y = suelo_y1 + feetHeight;
- if (sitio_y > suelo_y2)
- sitio_y = suelo_y2;
-
+ sitio_x = CLIP(mouseX, suelo_x1, suelo_x2);
+ sitio_y = CLIP(mouseY, suelo_y1 + feetHeight, suelo_y2);
startWalking();
}
doBreak = 0;
@@ -1721,7 +1711,7 @@ void DrasculaEngine::delay(int ms) {
_system->delayMillis(ms * 2); // originaly was 1
}
-bool DrasculaEngine::confirma_salir() {
+bool DrasculaEngine::confirmExit() {
byte key;
color_abc(kColorRed);
diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h
index c3cac99005..c80ef82a01 100644
--- a/engines/drascula/drascula.h
+++ b/engines/drascula/drascula.h
@@ -296,7 +296,7 @@ public:
int sitiobj_x[40], sitiobj_y[40], sentidobj[40];
int inventoryObjects[43];
char targetSurface[40][20];
- int x_alakeva[40], y_alakeva[40], sentido_alkeva[40], alapuertakeva[40];
+ int destX[40], destY[40], sentido_alkeva[40], alapuertakeva[40];
int x1[40], y1[40], x2[40], y2[40];
int takeObject, pickedObject;
int withVoices;
@@ -465,7 +465,7 @@ public:
bool saves();
void print_abc(const char *, int, int);
void delay(int ms);
- bool confirma_salir();
+ bool confirmExit();
void screenSaver();
void chooseObject(int objeto);
void addObject(int);