diff options
Diffstat (limited to 'engines/cruise')
-rw-r--r-- | engines/cruise/actor.cpp | 42 | ||||
-rw-r--r-- | engines/cruise/actor.h | 5 | ||||
-rw-r--r-- | engines/cruise/function.cpp | 5 | ||||
-rw-r--r-- | engines/cruise/staticres.cpp | 28 | ||||
-rw-r--r-- | engines/cruise/staticres.h | 8 |
5 files changed, 46 insertions, 42 deletions
diff --git a/engines/cruise/actor.cpp b/engines/cruise/actor.cpp index 88870f3f13..c689952cc8 100644 --- a/engines/cruise/actor.cpp +++ b/engines/cruise/actor.cpp @@ -24,6 +24,7 @@ */ #include "cruise/cruise.h" +#include "cruise/staticres.h" namespace Cruise { @@ -714,35 +715,6 @@ void set_anim(int ovl, int obj, int start, int x, int y, int mat, int state) { 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 @@ void processAnimation(void) { 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 @@ void processAnimation(void) { ANIM_PHASE_END; } else { newA = - raoul_stat + actor_stat [currentActor-> startDirection] [currentActor-> @@ -1016,7 +988,7 @@ void processAnimation(void) { nextDirection; newA = - raoul_move + actor_move [currentActor-> startDirection] [currentActor-> @@ -1026,7 +998,7 @@ void processAnimation(void) { counter = 0; newA = - raoul_move + actor_move [currentActor-> startDirection] [currentActor-> @@ -1048,7 +1020,7 @@ void processAnimation(void) { 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); diff --git a/engines/cruise/actor.h b/engines/cruise/actor.h index 6769d14c90..920f067f4d 100644 --- a/engines/cruise/actor.h +++ b/engines/cruise/actor.h @@ -61,11 +61,6 @@ struct actorStruct { 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); diff --git a/engines/cruise/function.cpp b/engines/cruise/function.cpp index 812985c0b0..a47e759e75 100644 --- a/engines/cruise/function.cpp +++ b/engines/cruise/function.cpp @@ -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 @@ int16 Op_AddAnimation(void) { 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; } diff --git a/engines/cruise/staticres.cpp b/engines/cruise/staticres.cpp index 769eec2590..8b3fc3b9f9 100644 --- a/engines/cruise/staticres.cpp +++ b/engines/cruise/staticres.cpp @@ -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 diff --git a/engines/cruise/staticres.h b/engines/cruise/staticres.h index 6b358464d5..c827a92d30 100644 --- a/engines/cruise/staticres.h +++ b/engines/cruise/staticres.h @@ -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 |