[Scummvm-cvs-logs] SF.net SVN: scummvm:[35496] scummvm/trunk/engines/saga

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Tue Dec 23 16:26:55 CET 2008


Revision: 35496
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35496&view=rev
Author:   thebluegr
Date:     2008-12-23 15:26:55 +0000 (Tue, 23 Dec 2008)

Log Message:
-----------
Enumerated the different actor directions and fixed spelling

Modified Paths:
--------------
    scummvm/trunk/engines/saga/actor.cpp
    scummvm/trunk/engines/saga/actor.h

Modified: scummvm/trunk/engines/saga/actor.cpp
===================================================================
--- scummvm/trunk/engines/saga/actor.cpp	2008-12-23 11:18:01 UTC (rev 35495)
+++ scummvm/trunk/engines/saga/actor.cpp	2008-12-23 15:26:55 UTC (rev 35496)
@@ -685,7 +685,7 @@
 		}
 
 
-		fourDirection = actorDirectectionsLUT[actor->_facingDirection];
+		fourDirection = actorDirectionsLUT[actor->_facingDirection];
 		return &actor->_frames[frameType].directions[fourDirection];
 	}
 
@@ -700,7 +700,7 @@
 			return &def;
 		}
 		frameType = CLIP(frameType, 0, actor->_framesCount - 1);
-		fourDirection = actorDirectectionsLUT[actor->_facingDirection];
+		fourDirection = actorDirectionsLUT[actor->_facingDirection];
 		return &actor->_frames[frameType].directions[fourDirection];
 	}
 	return NULL;

Modified: scummvm/trunk/engines/saga/actor.h
===================================================================
--- scummvm/trunk/engines/saga/actor.h	2008-12-23 11:18:01 UTC (rev 35495)
+++ scummvm/trunk/engines/saga/actor.h	2008-12-23 15:26:55 UTC (rev 35496)
@@ -59,10 +59,6 @@
 #define ACTOR_COLLISION_HEIGHT       8
 
 #define ACTOR_DIRECTIONS_COUNT	4	// for ActorFrameSequence
-#define ACTOR_DIRECTION_RIGHT	0
-#define ACTOR_DIRECTION_LEFT	1
-#define ACTOR_DIRECTION_BACK	2
-#define ACTOR_DIRECTION_FORWARD	3
 
 #define ACTOR_SPEECH_STRING_MAX 16	// speech const
 #define ACTOR_SPEECH_ACTORS_MAX 8
@@ -78,6 +74,13 @@
 
 #define ACTOR_INHM_SIZE 228
 
+enum ActorDirections {
+	kDirectionRight = 0,
+	kDirectionLeft = 1,
+	kDirectionUp = 2,
+	kDirectionDown = 3
+};
+
 enum ActorActions {
 	kActionWait = 0,
 	kActionWalkToPoint = 1,
@@ -131,15 +134,15 @@
 };
 
 // Lookup table to convert 8 cardinal directions to 4
-static const int actorDirectectionsLUT[8] = {
-	ACTOR_DIRECTION_BACK,	// kDirUp
-	ACTOR_DIRECTION_RIGHT,	// kDirUpRight
-	ACTOR_DIRECTION_RIGHT,	// kDirRight
-	ACTOR_DIRECTION_RIGHT,	// kDirDownRight
-	ACTOR_DIRECTION_FORWARD,// kDirDown
-	ACTOR_DIRECTION_LEFT,	// kDirDownLeft
-	ACTOR_DIRECTION_LEFT,	// kDirLeft
-	ACTOR_DIRECTION_LEFT,	// kDirUpLeft
+static const int actorDirectionsLUT[8] = {
+	kDirectionUp,       // kDirUp
+	kDirectionRight,    // kDirUpRight
+	kDirectionRight,    // kDirRight
+	kDirectionRight,    // kDirDownRight
+	kDirectionDown,     // kDirDown
+	kDirectionLeft,     // kDirDownLeft
+	kDirectionLeft,     // kDirLeft
+	kDirectionLeft      // kDirUpLeft
 };
 
 enum ActorFlagsEx {


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