22 #ifndef TWINE_SCENE_MOVEMENTS_H 23 #define TWINE_SCENE_MOVEMENTS_H 25 #include "common/scummsys.h" 26 #include "twine/shared.h" 38 struct ChangedCursorKeys {
39 uint8 forwardChange = 0;
40 uint8 backwardChange = 0;
42 uint8 rightChange = 0;
43 uint8 forwardDown = 0;
44 uint8 backwardDown = 0;
50 inline bool operator==(
const ChangedCursorKeys &rhs)
const {
51 return forwardChange == rhs.forwardChange && backwardChange == rhs.backwardChange && leftChange == rhs.leftChange && rightChange == rhs.rightChange;
54 inline operator bool()
const {
55 return forwardChange && backwardChange && leftChange && rightChange;
58 inline bool operator!=(
const ChangedCursorKeys &rhs)
const {
59 return forwardChange != rhs.forwardChange || backwardChange != rhs.backwardChange || leftChange != rhs.leftChange || rightChange != rhs.rightChange;
64 int16 _heroActionKey = 0;
65 int32 _previousLoopActionKey = 0;
67 ChangedCursorKeys _changedCursorKeys;
68 ChangedCursorKeys _previousChangedCursorKeys;
76 void processManualAction(
int actorIdx);
85 void processFollowAction(
int actorIdx);
93 void processRandomAction(
int actorIdx);
98 void processTrackAction(
int actorIdx);
105 void processSameXZAction(
int actorIdx);
107 void processBehaviourExecution(
int actorIdx);
108 bool processAttackExecution(
int actorIdx);
109 void processManualMovementExecution(
int actorIdx);
110 void processManualRotationExecution(
int actorIdx);
117 bool _actionNormal =
false;
132 bool _lastJoyFlag =
false;
134 int32 _targetActorDistance = 0;
173 int32
getAngle(int32 x1, int32 z1, int32 x2, int32 z2);
176 return getAngle(v1.x, v1.z, v2.x, v2.z);
188 void doDir(int32 actorIdx);
191 inline void Movements::setActionNormal(
bool actionNormal) {
196 return _actionNormal;
IVec3 getShadow(const IVec3 &pos)
void initRealAngle(int16 startAngle, int16 endAngle, int16 stepAngle, RealValue *movePtr)
void initRealAngleConst(int32 start, int32 end, int32 duration, RealValue *movePtr) const
void clearRealAngle(ActorStruct *actorPtr)
void initRealValue(int16 startAngle, int16 endAngle, int16 stepAngle, RealValue *movePtr)
bool actionNormal() const
Definition: movements.h:195
Definition: achievements_tables.h:27
int32 getAngle(int32 x1, int32 z1, int32 x2, int32 z2)
Definition: movements.h:34