[Scummvm-cvs-logs] SF.net SVN: scummvm:[38539] scummvm/trunk/engines/cruise

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Thu Feb 19 10:55:40 CET 2009


Revision: 38539
          http://scummvm.svn.sourceforge.net/scummvm/?rev=38539&view=rev
Author:   dreammaster
Date:     2009-02-19 09:55:40 +0000 (Thu, 19 Feb 2009)

Log Message:
-----------
Moved a set of static arrays into the staticres.cpp file

Modified Paths:
--------------
    scummvm/trunk/engines/cruise/actor.cpp
    scummvm/trunk/engines/cruise/actor.h
    scummvm/trunk/engines/cruise/function.cpp
    scummvm/trunk/engines/cruise/staticres.cpp
    scummvm/trunk/engines/cruise/staticres.h

Modified: scummvm/trunk/engines/cruise/actor.cpp
===================================================================
--- scummvm/trunk/engines/cruise/actor.cpp	2009-02-19 08:44:53 UTC (rev 38538)
+++ scummvm/trunk/engines/cruise/actor.cpp	2009-02-19 09:55:40 UTC (rev 38539)
@@ -24,6 +24,7 @@
  */
 
 #include "cruise/cruise.h"
+#include "cruise/staticres.h"
 
 namespace Cruise {
 
@@ -714,35 +715,6 @@
 	setObjectPosition(ovl, obj, 5, state);
 }
 
-int raoul_move[][13] = {
-	{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0},	/* dos         */
-	{13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 0},	/* droite      */
-	{25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 0},	/* face        */
-	{ -13, -14, -15, -16, -17, -18, -19, -20, -21, -22, -23, -24, 0}	/* gauche      */
-};
-
-int raoul_end[][13] = {
-	{37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},	/* stat dos    */
-	{38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},	/* stat droite */
-	{39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},	/* stat face   */
-	{ -38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}	/* stat gauche */
-};
-
-int raoul_stat[][13] = {
-	{53, 54, 55, 56, 57, 0, 0, 0, 0, 0, 0, 0, 0},	/* ret dos-dr  */
-	{59, 60, 62, 63, 78, 0, 0, 0, 0, 0, 0, 0, 0},	/* ret dr-face */
-	{ -78, -63, -62, -60, -59, 0, 0, 0, 0, 0, 0, 0, 0},	/* ret face-ga */
-	{ -57, -56, -55, -54, -53, 0, 0, 0, 0, 0, 0, 0, 0}	/* ret ga-dos  */
-};
-
-int raoul_invstat[][13] = {
-	{ -53, -54, -55, -56, -57, 0, 0, 0, 0, 0, 0, 0, 0},	/* ret dos-dr  */
-	{57, 56, 55, 54, 53, 0, 0, 0, 0, 0, 0, 0, 0},	/* ret ga-dos  */
-	{78, 63, 62, 60, 59, 0, 0, 0, 0, 0, 0, 0, 0},	/* ret face-ga */
-	{ -59, -60, -62, -63, -78, 0, 0, 0, 0, 0, 0, 0, 0}	/* ret dr-face */
-
-};
-
 void processAnimation(void) {
 	objectParamsQuery params;
 	int16 returnVar2[5];
@@ -853,14 +825,14 @@
 
 						if (inc > 0)
 							newA =
-							    raoul_stat
+							    actor_stat
 							    [currentActor->
 							     startDirection]
 							    [currentActor->
 							     counter++];
 						else
 							newA =
-							    raoul_invstat
+							    actor_invstat
 							    [currentActor->
 							     startDirection]
 							    [currentActor->
@@ -903,7 +875,7 @@
 									    ANIM_PHASE_END;
 							} else {
 								newA =
-								    raoul_stat
+								    actor_stat
 								    [currentActor->
 								     startDirection]
 								    [currentActor->
@@ -1016,7 +988,7 @@
 						    nextDirection;
 
 						newA =
-						    raoul_move
+						    actor_move
 						    [currentActor->
 						     startDirection]
 						    [currentActor->
@@ -1026,7 +998,7 @@
 							counter =
 							    0;
 							newA =
-							    raoul_move
+							    actor_move
 							    [currentActor->
 							     startDirection]
 							    [currentActor->
@@ -1048,7 +1020,7 @@
 					break;
 				}
 				case ANIM_PHASE_END: {
-					int newA = raoul_end[currentActor->startDirection][0];
+					int newA = actor_end[currentActor->startDirection][0];
 
 					set_anim(currentActor->overlayNumber, currentActor->idx, currentActor->start, currentActor->x, currentActor->y, newA, currentActor->poly);
 

Modified: scummvm/trunk/engines/cruise/actor.h
===================================================================
--- scummvm/trunk/engines/cruise/actor.h	2009-02-19 08:44:53 UTC (rev 38538)
+++ scummvm/trunk/engines/cruise/actor.h	2009-02-19 09:55:40 UTC (rev 38539)
@@ -61,11 +61,6 @@
 	int16 freeze;
 };
 
-extern int raoul_move[][13];
-extern int raoul_end[][13];
-extern int raoul_stat[][13];
-extern int raoul_invstat[][13];
-
 int16 mainProc13(int overlayIdx, int param1, actorStruct * pStartEntry, int param2);
 actorStruct *findActor(actorStruct *pStartEntry, int overlayIdx, int objIdx, int type);
 void processAnimation(void);

Modified: scummvm/trunk/engines/cruise/function.cpp
===================================================================
--- scummvm/trunk/engines/cruise/function.cpp	2009-02-19 08:44:53 UTC (rev 38538)
+++ scummvm/trunk/engines/cruise/function.cpp	2009-02-19 09:55:40 UTC (rev 38539)
@@ -26,6 +26,7 @@
 #include "cruise/cruise.h"
 #include "cruise/cruise_main.h"
 #include "cruise/cell.h"
+#include "cruise/staticres.h"
 #include "common/util.h"
 
 namespace Cruise {
@@ -1126,11 +1127,11 @@
 			si->stepX = stepX;
 			si->stepY = stepY;
 
-			int newFrame = ABS(raoul_end[direction][0]) - 1;
+			int newFrame = ABS(actor_end[direction][0]) - 1;
 
 			int zoom = computeZoom(params.Y);
 
-			if (raoul_end[direction][0] < 0) {
+			if (actor_end[direction][0] < 0) {
 				zoom = -zoom;
 			}
 

Modified: scummvm/trunk/engines/cruise/staticres.cpp
===================================================================
--- scummvm/trunk/engines/cruise/staticres.cpp	2009-02-19 08:44:53 UTC (rev 38538)
+++ scummvm/trunk/engines/cruise/staticres.cpp	2009-02-19 09:55:40 UTC (rev 38539)
@@ -29,4 +29,32 @@
 
 namespace Cruise {
 
+int actor_move[][13] = {
+	{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0},						// back
+	{13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 0},			// right side
+	{25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 0},			// front
+	{ -13, -14, -15, -16, -17, -18, -19, -20, -21, -22, -23, -24, 0}// left side
+};
+
+int actor_end[][13] = {
+	{37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},	// stat back
+	{38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},	// stat right-side
+	{39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},	// stat front
+	{ -38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}	// stat left-side
+};
+
+int actor_stat[][13] = {
+	{53, 54, 55, 56, 57, 0, 0, 0, 0, 0, 0, 0, 0},
+	{59, 60, 62, 63, 78, 0, 0, 0, 0, 0, 0, 0, 0},
+	{ -78, -63, -62, -60, -59, 0, 0, 0, 0, 0, 0, 0, 0},
+	{ -57, -56, -55, -54, -53, 0, 0, 0, 0, 0, 0, 0, 0}
+};
+
+int actor_invstat[][13] = {
+	{ -53, -54, -55, -56, -57, 0, 0, 0, 0, 0, 0, 0, 0},
+	{57, 56, 55, 54, 53, 0, 0, 0, 0, 0, 0, 0, 0},
+	{78, 63, 62, 60, 59, 0, 0, 0, 0, 0, 0, 0, 0},
+	{ -59, -60, -62, -63, -78, 0, 0, 0, 0, 0, 0, 0, 0}
+};
+
 } // End of namespace Cruise

Modified: scummvm/trunk/engines/cruise/staticres.h
===================================================================
--- scummvm/trunk/engines/cruise/staticres.h	2009-02-19 08:44:53 UTC (rev 38538)
+++ scummvm/trunk/engines/cruise/staticres.h	2009-02-19 09:55:40 UTC (rev 38539)
@@ -28,6 +28,14 @@
 
 namespace Cruise {
 
+extern int actor_move[][13];
+
+extern int actor_end[][13];
+
+extern int actor_stat[][13];
+
+extern int actor_invstat[][13];
+
 } // End of namespace Cruise
 
 #endif


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