22 #ifndef WORLD_ACTORS_AVATARMOVERPROCESS_H 23 #define WORLD_ACTORS_AVATARMOVERPROCESS_H 25 #include "ultima/ultima8/metaengine.h" 26 #include "ultima/ultima8/kernel/process.h" 27 #include "ultima/ultima8/kernel/mouse.h" 28 #include "ultima/ultima8/world/actors/animation.h" 44 void resetIdleTime() {
51 bool hasMovementFlags(uint32 flags)
const {
52 return (_movementFlags & flags) != 0;
54 void setMovementFlag(uint32 mask) {
55 _movementFlags |= mask;
57 virtual void clearMovementFlag(uint32 mask) {
58 _movementFlags &= ~mask;
60 void resetMovementFlags() {
63 void onMouseDown(
int button, int32 mx, int32 my);
64 void onMouseUp(
int button);
67 bool onActionDown(KeybindingAction action);
68 bool onActionUp(KeybindingAction action);
71 MOVE_MOUSE_DIRECTION = 0x001,
77 MOVE_TURN_LEFT = 0x0010,
78 MOVE_TURN_RIGHT = 0x0020,
79 MOVE_FORWARD = 0x0040,
89 MOVE_ATTACKING = 0x1000,
91 MOVE_PENDING_TURN_LEFT = 0x2000,
92 MOVE_PENDING_TURN_RIGHT = 0x4000,
95 MOVE_SHORT_JUMP = 0x008000,
96 MOVE_ROLL_LEFT = 0x010000,
97 MOVE_ROLL_RIGHT = 0x020000,
98 MOVE_STEP_LEFT = 0x040000,
99 MOVE_STEP_RIGHT = 0x080000,
100 MOVE_STEP_FORWARD = 0x100000,
101 MOVE_STEP_BACK = 0x200000,
102 MOVE_TOGGLE_CROUCH = 0x400000,
104 MOVE_ANY_DIRECTION = MOVE_MOUSE_DIRECTION | MOVE_FORWARD | MOVE_BACK | MOVE_LEFT | MOVE_RIGHT | MOVE_UP | MOVE_DOWN
108 virtual void handleHangingMode() = 0;
109 virtual void handleCombatMode() = 0;
110 virtual void handleNormalMode() = 0;
112 void turnToDirection(Direction direction);
113 bool checkTurn(Direction direction,
bool moving);
116 void slowFromRun(Direction direction);
119 void putAwayWeapon(Direction direction);
123 bool standUpIfNeeded(Direction direction);
126 void getMovementFlagAxes(
int &x,
int &y);
129 Direction getTurnDirForTurnFlags(Direction direction, DirectionMode dirmode);
139 uint32 _movementFlags;
Definition: avatar_mover_process.h:37
Definition: detection.h:27
void saveData(Common::WriteStream *ws) override
save Process data