//CAnimManager - [2020-04-13 11:57:46]
#ifndef _CANIMMANAGER_H_
#define _CANIMMANAGER_H_

#include "common.h"
#include "TAnimEntry.h"
#include "TAnimData.h"
#include "TStateList.h"
/*
001559E4 CAnimManager::GetStateAnimCount(int)
001559FC CAnimManager::LoadAnimDB()
00155D2C CAnimManager::FreeAnimDB()
00155D48 CAnimManager::UnloadAnimations()
00155D9C CAnimManager::AnimFreeAll()
00155E04 CAnimManager::StateInfoListFill(void (*)())
00155F48 CAnimManager::AnimDataFill(int)
0015639A CAnimManager::SetupRootBoneInitialMove(TAnimData *)
00156404 CAnimManager::AnimDataListFill(void (*)(int))
00156424 CAnimManager::AnimDataListInit()
00156464 CAnimManager::InitAnimations()
00156490 CAnimManager::GetState(int)
001564D8 CAnimManager::StateInfoGet(int)
001564EC CAnimManager::StateInfoGetAnimCount(int)
00156588 CAnimManager::GetRootBoneMove(TPoint *,int,int,int,int)
00156710 CAnimManager::GetRootBoneOfs(TPoint *,int,int,int,int)
0015679C CAnimManager::GetActionTime(int,int,int)
001567C8 CAnimManager::GetActionAnim(CPlayer *,EPlayerState,TPoint3D *,int,int,int,int,int)
00156AB8 CAnimManager::GetAnimID(char const*)
00156AE8 CAnimManager::GetAnimID(uint)
00156B14 CAnimManager::GetBonePositionAnim(short *,int,int,int,int,int)
00156D30 CAnimManager::GetBoneOrientationAnim(TPoint3D *,int,int,int)
*/

enum EPlayerState {
  EPlayerState_0,
  EPlayerState_1,
  EPlayerState_2,
  EPlayerState_3,
  EPlayerState_4,
  EPlayerState_5,
  EPlayerState_12=12,
};

class CPlayer;

class CAnimManager {
public:
  void GetStateAnimCount(int);                                                       //001559E4
  static void LoadAnimDB();                                                          //001559FC
  static void FreeAnimDB();                                                          //00155D2C
  static void UnloadAnimations();                                                    //00155D48
  static void AnimFreeAll();                                                         //00155D9C
  static void StateInfoListFill(void (*)());                                         //00155E04
  static void AnimDataFill(int);                                                     //00155F48
  static void SetupRootBoneInitialMove(TAnimData *);                                 //0015639A
  static void AnimDataListFill(void (*)(int));                                       //00156404
  static void AnimDataListInit();                                                    //00156424
  static void InitAnimations();                                                      //00156464
  static int GetState(int);                                                          //00156490
  static TStateList *StateInfoGet(int);                                              //001564D8
  static int StateInfoGetAnimCount(int);                                             //001564EC
  static void GetRootBoneMove(TPoint *, int, int, int, int);                         //00156588
  static void GetRootBoneOfs(TPoint *, int, int, int, int);                          //00156710
  static int GetActionTime(int, int, int);                                           //0015679C
  static int GetActionAnim(CPlayer *, EPlayerState, TPoint3D *, int, int, int, int, int);  //001567C8
  static int GetAnimID(char const *);                                                //00156AB8
  void GetAnimID(uint);                                                              //00156AE8
  static void GetBonePositionAnim(short *, int, int, int, int, int);                 //00156B14
  void GetBoneOrientationAnim(TPoint3D *, int, int, int);                            //00156D30

  static TAnimEntry *s_pAnimEntries;
  static int16_t *s_pS16Pool;
  static int s_iAnimCount;
  static TAnimData *s_tAnimData;
  static int s_iStateFlags[20];
  static TStateList s_tStateList[20];
  static int s_iStandardWalk[3];
  static int s_iStandardSprint[4];
  static int s_iStandardSprintJostle[3];
  static bool s_bInited;
};

void SET_ROOT_POS(int i0, TAnimData *pTAnimData1, TPoint &pTPoint2, int i3);
void SET_ROOT_POS_NO_SCALE(TAnimData *p_tanimdata_r0_arg, TPoint &p_tpoint_r1_arg, int d_r2_arg);

#endif  //_CANIMMANAGER_H_