diff options
author | Gregory Montoir | 2003-11-02 16:47:31 +0000 |
---|---|---|
committer | Gregory Montoir | 2003-11-02 16:47:31 +0000 |
commit | c4404baa45f67f2f5cf5241b1c77fc16d6b12585 (patch) | |
tree | c88ea97abf5eb83a0f68dadfa06315cb93ee9b9b /queen/walk.h | |
parent | 082bed69401235b3d8fe2ec63b14d9dc28badd80 (diff) | |
download | scummvm-rg350-c4404baa45f67f2f5cf5241b1c77fc16d6b12585.tar.gz scummvm-rg350-c4404baa45f67f2f5cf5241b1c77fc16d6b12585.tar.bz2 scummvm-rg350-c4404baa45f67f2f5cf5241b1c77fc16d6b12585.zip |
cleanup/remaining Walk cutaway calls
svn-id: r11056
Diffstat (limited to 'queen/walk.h')
-rw-r--r-- | queen/walk.h | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/queen/walk.h b/queen/walk.h index ef5dff7eba..acbe9beef8 100644 --- a/queen/walk.h +++ b/queen/walk.h @@ -28,9 +28,6 @@ namespace Queen { -#define MAX_AREAS 11 - - struct MovePersonAnim { int16 firstFrame; int16 lastFrame; @@ -48,7 +45,7 @@ struct WalkData { // int16 sign; // never used int16 dx, dy; const Area *area; - uint16 areaNum; // extra stuff for joeMoveBlock + uint16 areaNum; // extra stuff for customMoveJoe MovePersonAnim anim; }; @@ -72,65 +69,66 @@ class Graphics; class Walk { public: - Walk(Logic* logic, Graphics* graphics); + Walk(Logic *logic, Graphics *graphics); - //! MOVE_JOE() int16 joeMove(int direction, uint16 endx, uint16 endy, bool inCutaway); - //! MOVE_OTHER int16 personMove(const Person *pp, uint16 endx, uint16 endy, uint16 curImage, int direction); + enum { + MAX_WALK_DATA = 16 + }; private: - void joeMoveBlock(int facing, uint16 areaNum, uint16 walkDataNum); - void animateJoePrepare(); bool animateJoe(); void animatePersonPrepare(const MovePersonData *mpd, int direction); void animatePerson(const MovePersonData *mpd, uint16 image, uint16 bobNum, uint16 bankNum, int direction); - //! CALC_X, CALC_Y + //! compute transition coordinate static uint16 calcC(uint16 c1, uint16 c2, uint16 c3, uint16 c4, uint16 lastc); - //! FIND_OLDP, FIND_NEWP + //! find area for position int16 findAreaPosition(uint16 *x, uint16 *y, bool recalibrate); - //! FIND_FREE_AREA, find an area not already struck + //! find an area not already struck uint16 findFreeArea(uint16 area) const; - //! + //! return true if the area is already on the walking path bool isAreaStruck(uint16 area) const; - //! CALC_PATH, calculates the path list from oldArea to newArea + //! calculates the path list from oldArea to newArea bool calcPath(uint16 oldArea, uint16 newArea); //! resets path computed in calcPath() void initWalkData(); - //! CALC_WALK + //! add an area to the path void incWalkData(uint16 px, uint16 py, uint16 x, uint16 y, uint16 area); - //! equivalent to l.2432,2469 MOVE_OTHER() and l.2696,2744 MOVE_JOE() + //! compute path (and populates _walkData) from current position to the new one void calc(uint16 oldPos, uint16 newPos, uint16 oldx, uint16 oldy, uint16 x, uint16 y); - static const MovePersonData _moveData[]; + WalkData _walkData[MAX_WALK_DATA]; uint16 _walkDataCount; - WalkData _walkData[16]; + uint16 _areaStrike[MAX_WALK_DATA]; uint16 _areaStrikeCount; - uint16 _areaStrike[MAX_AREAS + 1]; + + uint16 _areaList[MAX_WALK_DATA]; uint16 _areaListCount; - uint16 _areaList[MAX_AREAS + 1]; - //! set if joeMoveBlock() is called in joeAnimate() + //! set if customMoveJoe() is called in joeAnimate() bool _joeMoveBlock; Logic *_logic; Graphics *_graphics; + + static const MovePersonData MOVE_DATA[]; }; |