diff --git a/plugin_sa/game_sa/CAnimBlendAssociation.h b/plugin_sa/game_sa/CAnimBlendAssociation.h index 4e39f6dc..1cbb82f7 100644 --- a/plugin_sa/game_sa/CAnimBlendAssociation.h +++ b/plugin_sa/game_sa/CAnimBlendAssociation.h @@ -15,24 +15,28 @@ class CAnimBlendNode; class CAnimBlendHierarchy; class CAnimBlendStaticAssociation; -enum eAnimationFlags -{ - ANIMATION_STARTED = 0x1, - ANIMATION_LOOPED = 0x2, - ANIMATION_FREEZE_LAST_FRAME = 0x4, - ANIMATION_UNLOCK_LAST_FRAME = 0x8, // Animation will be stuck on last frame, if not set - ANIMATION_PARTIAL = 0x10, - ANIMATION_MOVEMENT = 0x20, - ANIMATION_TRANLSATE_X = 0x40, - ANIMATION_TRANLSATE_Y = 0x80, - ANIMATION_UNUSED_1 = 0x100, - ANIMATION_UNUSED_2 = 0x200, - ANIMATION_ADD_TO_BLEND = 0x400, - ANIMATION_UNUSED_3 = 0x800, - ANIMATION_UNUSED_4 = 0x1000, - ANIMATION_FREEZE_TRANSLATION = 0x2000, - ANIMATION_BLOCK_REFERENCED = 0x4000, - ANIMATION_INDESTRUCTIBLE = 0x8000 +enum eAnimationFlags { + ANIMATION_DEFAULT = 0, //0x0, + ANIMATION_IS_PLAYING = 1 << 0, //0x1, + ANIMATION_IS_LOOPED = 1 << 1, //0x2, + ANIMATION_IS_BLEND_AUTO_REMOVE = 1 << 2, //!< (0x4) Automatically `delete this` once faded out (`m_BlendAmount <= 0 && m_BlendDelta <= 0`) + ANIMATION_IS_FINISH_AUTO_REMOVE = 1 << 3, //0x8, // Animation will be stuck on last frame, if not set + ANIMATION_IS_PARTIAL = 1 << 4, //0x10, // TODO: Flag name is possibly incorrect? Following the usual logic (like `ANIMATION_MOVEMENT`), it should be `ANIMATION_GET_IN_CAR` (See `RemoveGetInAnims`) + ANIMATION_IS_SYNCRONISED = 1 << 5, //0x20, + ANIMATION_CAN_EXTRACT_VELOCITY = 1 << 6, //0x40, + ANIMATION_CAN_EXTRACT_X_VELOCITY = 1 << 7, //0x80, + + // ** User defined flags ** + ANIMATION_WALK = 1 << 8, //0x100, + ANIMATION_200 = 1 << 9, //0x200, + ANIMATION_DONT_ADD_TO_PARTIAL_BLEND = 1 << 10, //0x400, // Possibly should be renamed to ANIMATION_IDLE, see `CPed::PlayFootSteps()` + ANIMATION_IS_FRONT = 1 << 11, //0x800, + ANIMATION_SECONDARY_TASK_ANIM = 1 << 12, //0x1000, + // ** + + ANIMATION_IGNORE_ROOT_TRANSLATION = 1 << 13, //0x2000, + ANIMATION_REFERENCE_BLOCK = 1 << 14, //0x4000, + ANIMATION_FACIAL = 1 << 15, //0x8000 // The animation is never destroyed if this flag is set, NO MATTER WHAT }; class PLUGIN_API CAnimBlendAssociation { diff --git a/plugin_sa/game_sa/CPad.cpp b/plugin_sa/game_sa/CPad.cpp index 8dcb031d..dd82ce0a 100644 --- a/plugin_sa/game_sa/CPad.cpp +++ b/plugin_sa/game_sa/CPad.cpp @@ -148,14 +148,14 @@ bool CPad::ExitVehicleJustDown() { return plugin::CallMethodAndReturn(this); } -// Converted from thiscall uchar CPad::GetMeleeAttack(void) 0x540340 -unsigned char CPad::GetMeleeAttack() { - return plugin::CallMethodAndReturn(this, 0); +//uchar __thiscall CPad::GetMeleeAttack(CPad *this, bool bCheckButtonCircleStateOnly) 0x540340 +unsigned char CPad::GetMeleeAttack(bool checkButtonCircleOnly) { + return plugin::CallMethodAndReturn(this, checkButtonCircleOnly); } -// Converted from thiscall uchar CPad::MeleeAttackJustDown(void) 0x540390 -unsigned char CPad::MeleeAttackJustDown() { - return plugin::CallMethodAndReturn(this); +//uchar __thiscall CPad::MeleeAttackJustDown(CPad *this, bool bCheckButtonCircleStateOnly) 0x540390 +unsigned char CPad::MeleeAttackJustDown(bool checkButtonCircleOnly) { + return plugin::CallMethodAndReturn(this, checkButtonCircleOnly); } // Converted from thiscall short CPad::GetAccelerate(void) 0x5403F0 diff --git a/plugin_sa/game_sa/CPad.h b/plugin_sa/game_sa/CPad.h index d35caaf9..4c756f2d 100644 --- a/plugin_sa/game_sa/CPad.h +++ b/plugin_sa/game_sa/CPad.h @@ -212,8 +212,8 @@ class CPad { short GetBrake(); bool GetExitVehicle(); bool ExitVehicleJustDown(); - unsigned char GetMeleeAttack(); - unsigned char MeleeAttackJustDown(); + unsigned char GetMeleeAttack(bool checkButtonCircleOnly); + unsigned char MeleeAttackJustDown(bool checkButtonCircleOnly); short GetAccelerate(); bool GetAccelerateJustDown(); bool NextStationJustUp(); diff --git a/plugin_sa/game_sa/CPed.h b/plugin_sa/game_sa/CPed.h index 897b1a04..5b7a3787 100644 --- a/plugin_sa/game_sa/CPed.h +++ b/plugin_sa/game_sa/CPed.h @@ -56,6 +56,20 @@ enum PLUGIN_API eFightingStyle STYLE_ELBOWS }; +enum PLUGIN_API ePedPieceTypes +{ + PED_COL_SPHERE_LEG = 0, + PED_COL_SPHERE_MID = 1, + PED_COL_SPHERE_HEAD = 2, + PED_PIECE_TORSO = 3, // AKA CHEST + PED_PIECE_ASS = 4, // AKA MIDSECTION + PED_PIECE_LEFT_ARM = 5, // AKA UPPERARM_L + PED_PIECE_RIGHT_ARM = 6, // AKA UPPERARM_R + PED_PIECE_LEFT_LEG = 7, // AKA LEG_L + PED_PIECE_RIGHT_LEG = 8, // AKA LEG_R + PED_PIECE_HEAD = 9 +}; + class CObject; class CVehicle; diff --git a/plugin_sa/game_sa/CWeapon.h b/plugin_sa/game_sa/CWeapon.h index 34230577..be2cfddf 100644 --- a/plugin_sa/game_sa/CWeapon.h +++ b/plugin_sa/game_sa/CWeapon.h @@ -11,7 +11,6 @@ #include "FxSystem_c.h" #include "CVector2D.h" #include "CColPoint.h" -#include "ePedPieceTypes.h" enum eWeaponState : unsigned int { @@ -23,6 +22,7 @@ enum eWeaponState : unsigned int }; class CPed; +enum ePedPieceTypes : int; class CVehicle; class CColModel; diff --git a/plugin_sa/game_sa/ePedPieceTypes.h b/plugin_sa/game_sa/ePedPieceTypes.h deleted file mode 100644 index b1cba5a9..00000000 --- a/plugin_sa/game_sa/ePedPieceTypes.h +++ /dev/null @@ -1,11 +0,0 @@ -/* - Plugin-SDK (Grand Theft Auto San Andreas) header file - Authors: GTA Community. See more here - https://github.com/DK22Pac/plugin-sdk - Do not delete this comment block. Respect others' work! -*/ -#pragma once - -enum ePedPieceTypes { - -}; \ No newline at end of file