CheatMenuSA/src/animation.h

65 lines
2.4 KiB
C
Raw Normal View History

2020-12-02 16:19:16 -05:00
#pragma once
2021-07-25 08:29:01 -04:00
#include "pch.h"
class Animation
2020-12-02 16:19:16 -05:00
{
private:
2022-01-07 03:18:00 -05:00
// Animation player
static inline ResourceStore m_AnimData{ "animation", eResourceType::TYPE_TEXT };
static inline char m_nAnimBuffer[INPUT_BUFFER_SIZE];
static inline char m_nIfpBuffer[INPUT_BUFFER_SIZE];
static inline bool m_Loop; // loop animation
static inline bool m_bSecondary; // play animation as secondary
2022-01-09 07:09:48 -05:00
static inline bool m_PedAnim;
static inline CPed *m_pTarget = nullptr;
2021-12-22 13:13:10 -05:00
#ifdef GTASA
2022-01-07 03:18:00 -05:00
// Cutscene player
struct m_Cutscene
{
static inline ResourceStore m_Data{ "cutscene", eResourceType::TYPE_TEXT };
static inline std::string m_SceneName;
static inline int m_nInterior; // player interior backup
static inline bool m_bRunning;
};
static inline int m_nFightingStyle;
static inline std::string m_nWalkingStyle = "default";
static inline std::vector<std::string> m_FightingStyleList =
{ "Default", "Boxing", "Kung fu", "Kick Boxing", "Punch Kick" };
static inline std::vector<std::string> m_WalkingStyleList =
{
"default", "man", "shuffle", "oldman", "gang1", "gang2", "oldfatman",
"fatman", "jogger", "drunkman", "blindman", "swat", "woman", "shopping", "busywoman",
"sexywoman", "pro", "oldwoman", "fatwoman", "jogwoman", "oldfatwoman", "skate"
};
2022-02-06 18:16:04 -05:00
// Particle player
struct m_Particle
{
static inline ResourceStore m_Data{ "particle", eResourceType::TYPE_TEXT };
static inline char m_NameBuffer[INPUT_BUFFER_SIZE];
static inline std::vector<int> m_nParticleList;
};
2021-12-22 13:13:10 -05:00
#endif
2020-12-02 16:19:16 -05:00
2022-01-07 03:18:00 -05:00
static void PlayAnimation(std::string& rootKey, std::string& anim, std::string& ifp);
static void RemoveAnimation(std::string& rootKey, std::string& anim, std::string& ifp);
2022-02-06 18:16:04 -05:00
static void RemoveParticle(std::string& ifp, std::string& anim, std::string& ifpRepeat);
2021-12-22 13:13:10 -05:00
#ifdef GTASA
2022-02-06 18:16:04 -05:00
static void PlayParticle(std::string& rootKey, std::string& particle, std::string& dummy);
2022-01-07 03:18:00 -05:00
static void PlayCutscene(std::string& rootKey, std::string& cutsceneId, std::string& interior);
2021-12-22 13:13:10 -05:00
#elif GTAVC
2022-01-07 03:18:00 -05:00
static bool _LoadAnimationBlock(const char* szBlockName);
2021-12-22 13:13:10 -05:00
#endif
#ifndef GTASA
2022-01-07 03:18:00 -05:00
static void _PlayAnimation(RpClump* pClump, int animGroup, int animID, float blend);
2021-12-22 13:13:10 -05:00
#endif
public:
Animation() = delete;
Animation(const Animation&) = delete;
static void Init();
2022-01-20 02:04:45 -05:00
static void ShowPage();
2021-12-22 13:13:10 -05:00
};