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" 43 void resetIdleTime() {
50 bool hasMovementFlags(uint32 flags)
const {
51 return (_movementFlags & flags) != 0;
53 void setMovementFlag(uint32 mask) {
54 _movementFlags |= mask;
56 virtual void clearMovementFlag(uint32 mask) {
57 _movementFlags &= ~mask;
59 void resetMovementFlags() {
62 void onMouseDown(
int button, int32 mx, int32 my);
63 void onMouseUp(
int button);
66 bool onActionDown(KeybindingAction action);
67 bool onActionUp(KeybindingAction action);
70 MOVE_MOUSE_DIRECTION = 0x001,
76 MOVE_TURN_LEFT = 0x0010,
77 MOVE_TURN_RIGHT = 0x0020,
78 MOVE_FORWARD = 0x0040,
88 MOVE_ATTACKING = 0x1000,
90 MOVE_PENDING_TURN_LEFT = 0x2000,
91 MOVE_PENDING_TURN_RIGHT = 0x4000,
94 MOVE_SHORT_JUMP = 0x008000,
95 MOVE_ROLL_LEFT = 0x010000,
96 MOVE_ROLL_RIGHT = 0x020000,
97 MOVE_STEP_LEFT = 0x040000,
98 MOVE_STEP_RIGHT = 0x080000,
99 MOVE_STEP_FORWARD = 0x100000,
100 MOVE_STEP_BACK = 0x200000,
101 MOVE_TOGGLE_CROUCH = 0x400000,
103 MOVE_ANY_DIRECTION = MOVE_MOUSE_DIRECTION | MOVE_FORWARD | MOVE_BACK | MOVE_LEFT | MOVE_RIGHT | MOVE_UP | MOVE_DOWN
107 virtual void handleHangingMode() = 0;
108 virtual void handleCombatMode() = 0;
109 virtual void handleNormalMode() = 0;
111 void turnToDirection(Direction direction);
112 bool checkTurn(Direction direction,
bool moving);
115 void slowFromRun(Direction direction);
118 void putAwayWeapon(Direction direction);
122 bool standUpIfNeeded(Direction direction);
125 void getMovementFlagAxes(
int &x,
int &y);
128 Direction getTurnDirForTurnFlags(Direction direction, DirectionMode dirmode);
138 uint32 _movementFlags;
Definition: avatar_mover_process.h:36
Definition: detection.h:27
void saveData(Common::WriteStream *ws) override
save Process data