2020-12-02 16:19:16 -05:00
|
|
|
#pragma once
|
2021-07-25 08:29:01 -04:00
|
|
|
#include "pch.h"
|
|
|
|
|
2021-06-19 09:00:13 -04:00
|
|
|
class Animation
|
2020-12-02 16:19:16 -05:00
|
|
|
{
|
|
|
|
private:
|
2021-09-20 08:41:40 -04:00
|
|
|
|
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"
|
|
|
|
};
|
2021-12-22 13:13:10 -05:00
|
|
|
#endif
|
2020-12-02 16:19:16 -05:00
|
|
|
|
|
|
|
protected:
|
2022-01-07 03:18:00 -05:00
|
|
|
Animation();
|
2021-01-07 16:07:45 -05:00
|
|
|
|
2020-12-02 16:19:16 -05:00
|
|
|
public:
|
2022-01-07 03:18:00 -05:00
|
|
|
static void Draw();
|
|
|
|
static void PlayAnimation(std::string& rootKey, std::string& anim, std::string& ifp);
|
|
|
|
static void RemoveAnimation(std::string& rootKey, std::string& anim, std::string& ifp);
|
2021-08-09 14:26:49 -04:00
|
|
|
|
2021-12-22 13:13:10 -05:00
|
|
|
#ifdef GTASA
|
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
|
|
|
|
};
|