[Scummvm-cvs-logs] SF.net SVN: scummvm: [32399] scummvm/trunk/engines/drascula

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Fri May 30 16:44:09 CEST 2008


Revision: 32399
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32399&view=rev
Author:   thebluegr
Date:     2008-05-30 07:44:08 -0700 (Fri, 30 May 2008)

Log Message:
-----------
- x_alakeva/y_alakeva -> destX/destY
- confirma_salir -> confirmExit
- Used CLIP instead of if's

Modified Paths:
--------------
    scummvm/trunk/engines/drascula/drascula.cpp
    scummvm/trunk/engines/drascula/drascula.h

Modified: scummvm/trunk/engines/drascula/drascula.cpp
===================================================================
--- scummvm/trunk/engines/drascula/drascula.cpp	2008-05-30 14:25:03 UTC (rev 32398)
+++ scummvm/trunk/engines/drascula/drascula.cpp	2008-05-30 14:44:08 UTC (rev 32399)
@@ -751,7 +751,7 @@
 		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 @@
 			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 @@
 
 	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 @@
 
 	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 @@
 		}
 
 		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 @@
 	_system->delayMillis(ms * 2); // originaly was 1
 }
 
-bool DrasculaEngine::confirma_salir() {
+bool DrasculaEngine::confirmExit() {
 	byte key;
 
 	color_abc(kColorRed);

Modified: scummvm/trunk/engines/drascula/drascula.h
===================================================================
--- scummvm/trunk/engines/drascula/drascula.h	2008-05-30 14:25:03 UTC (rev 32398)
+++ scummvm/trunk/engines/drascula/drascula.h	2008-05-30 14:44:08 UTC (rev 32399)
@@ -296,7 +296,7 @@
 	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 @@
 	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);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list