summaryrefslogtreecommitdiff
path: root/src/peds/PedIK.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/peds/PedIK.h')
-rw-r--r--src/peds/PedIK.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/peds/PedIK.h b/src/peds/PedIK.h
index a8d9c75d..21f8cce4 100644
--- a/src/peds/PedIK.h
+++ b/src/peds/PedIK.h
@@ -18,16 +18,21 @@ struct LimbMovementInfo {
float pitchD;
};
+enum LimbMoveStatus {
+ ANGLES_SET_TO_MAX, // because given angles were unreachable
+ ONE_ANGLE_COULDNT_BE_SET_EXACTLY, // because it can't be reached in a jiffy
+ ANGLES_SET_EXACTLY
+};
+
class CPed;
class CPedIK
{
public:
- // TODO
enum {
FLAG_1 = 1,
- FLAG_2 = 2, // related to looking somewhere
- FLAG_4 = 4, // aims with arm
+ LOOKING = 2,
+ AIMS_WITH_ARM = 4,
};
CPed *m_ped;
@@ -38,6 +43,7 @@ public:
int32 m_flags;
static LimbMovementInfo &ms_torsoInfo;
+ static LimbMovementInfo &ms_headInfo;
CPedIK(CPed *ped);
bool PointGunInDirection(float phi, float theta);
@@ -47,7 +53,9 @@ public:
void RotateTorso(AnimBlendFrameData* animBlend, LimbOrientation* limb, bool changeRoll);
void ExtractYawAndPitchLocal(RwMatrixTag*, float*, float*);
void ExtractYawAndPitchWorld(RwMatrixTag*, float*, float*);
- uint32 MoveLimb(LimbOrientation &a1, float a2, float a3, LimbMovementInfo &a4);
+ LimbMoveStatus MoveLimb(LimbOrientation &a1, float a2, float a3, LimbMovementInfo &a4);
bool RestoreGunPosn(void);
+ bool LookInDirection(float phi, float theta);
+ bool LookAtPosition(CVector const& pos);
};
static_assert(sizeof(CPedIK) == 0x28, "CPedIK: error");