diff options
author | Filippos Karapetis | 2008-12-23 15:26:55 +0000 |
---|---|---|
committer | Filippos Karapetis | 2008-12-23 15:26:55 +0000 |
commit | 350943f291f6e6b9506bb790b7e0496504c2e6fd (patch) | |
tree | b514375d44d75d219fd4b3f4a362f16143b1efa5 /engines | |
parent | 4d7a43734e209142c8ed2e64df82c676b98e848d (diff) | |
download | scummvm-rg350-350943f291f6e6b9506bb790b7e0496504c2e6fd.tar.gz scummvm-rg350-350943f291f6e6b9506bb790b7e0496504c2e6fd.tar.bz2 scummvm-rg350-350943f291f6e6b9506bb790b7e0496504c2e6fd.zip |
Enumerated the different actor directions and fixed spelling
svn-id: r35496
Diffstat (limited to 'engines')
-rw-r--r-- | engines/saga/actor.cpp | 4 | ||||
-rw-r--r-- | engines/saga/actor.h | 29 |
2 files changed, 18 insertions, 15 deletions
diff --git a/engines/saga/actor.cpp b/engines/saga/actor.cpp index 8112ebb655..ffd725b9da 100644 --- a/engines/saga/actor.cpp +++ b/engines/saga/actor.cpp @@ -685,7 +685,7 @@ ActorFrameRange *Actor::getActorFrameRange(uint16 actorId, int frameType) { } - fourDirection = actorDirectectionsLUT[actor->_facingDirection]; + fourDirection = actorDirectionsLUT[actor->_facingDirection]; return &actor->_frames[frameType].directions[fourDirection]; } @@ -700,7 +700,7 @@ ActorFrameRange *Actor::getActorFrameRange(uint16 actorId, int frameType) { 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; diff --git a/engines/saga/actor.h b/engines/saga/actor.h index 351abd78e3..cae8dd8355 100644 --- a/engines/saga/actor.h +++ b/engines/saga/actor.h @@ -59,10 +59,6 @@ class HitZone; #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 @@ class HitZone; #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 @@ enum ActorFrameTypes { }; // 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 { |