//CGfxKits - [2020-04-13 11:57:46]
#ifndef _CGFXKITS_H_
#define _CGFXKITS_H_

#include "CFTTTexture.h"
#include "CTeam.h"

/*
00184AE4 CGfxKits::GetTexture(int &,TBuildKitTeamTextures *,int,EKitTextureType,CFTTTexLoadOptions const*)
00184AE8 CGfxKits::BuildTexture(int &,TBuildKitTeamTextures *,int,EKitTextureType,CFTTTexLoadOptions const*)
0018516C CGfxKits::BeginBuildKit(int)
00185184 CGfxKits::EndBuildKit()
001851A0 CGfxKits::EmptyKitTemplateCache()
001851DC CGfxKits::FreeKitTeamTextures(TBuildKitTeamTextures *)
0018521C CGfxKits::LoadKitTeamTextures(CTeam *,TBuildKitTeamTextures *,CFTTTexLoadOptions const&,int)
0018529C CGfxKits::GetKitTemplate(bool,int,int,CFTTTexLoadOptions const&)
00185448 CGfxKits::ReleaseKitTemplate(CFTTTexture *)
00185480 CGfxKits::GetColour(int,int,ETeamColour,bool,bool,int)

*/

struct RefKitProperty_st {
  uint32 filed_0;
  uint32 filed_4;
  uint32 filed_8;
};

extern RefKitProperty_st g_tRefKitProperty[8];

class CFTTTexture;

struct TBuildKitTeamTextures {
  //TBuildKitTeamTextures() {
  // pCTeam_0 = nullptr;
  // filed_4 = -1;
  // pTexture_8 = nullptr;
  // pTexture_C = nullptr;
  // pTexture_10 = nullptr;
  // pTexture_14 = nullptr;
  //};

  CTeam *pCTeam_0;
  int filed_4;
  CFTTTexture *filed_8;
  CFTTTexture *filed_C;
  CFTTTexture *filed_10;
  CFTTTexture *filed_14;
};

enum EKitTextureType {
  EKitTextureType_0,
  EKitTextureType_1,
  EKitTextureType_2,
  EKitTextureType_3,
  EKitTextureType_4,
  EKitTextureType_5,
};

enum ETeamColour {
  ETeamColour_0,
  ETeamColour_1,
  ETeamColour_2,
  ETeamColour_3,
  ETeamColour_4,
  ETeamColour_5,
  ETeamColour_6,
};

struct CachedKitTemplate {
  bool filed_0;
  int trimindex_4;
  int filed_8;
  CFTTTexture *filed_c;
};

class CGfxKits {
public:
  static CFTTTexture* GetTexture(int &, TBuildKitTeamTextures *, int, EKitTextureType, CFTTTexLoadOptions const *);    //00184AE4
  static CFTTTexture* BuildTexture(int &, TBuildKitTeamTextures *, int, EKitTextureType, CFTTTexLoadOptions const *);  //00184AE8
  static int BeginBuildKit(int);                                                                               //0018516C
  static void EndBuildKit();                                                                                   //00185184
  static void EmptyKitTemplateCache();                                                                         //001851A0
  static void FreeKitTeamTextures(TBuildKitTeamTextures *);                                                    //001851DC
  static void LoadKitTeamTextures(CTeam *, TBuildKitTeamTextures *, CFTTTexLoadOptions const &, int);          //0018521C
  static CFTTTexture *GetKitTemplate(bool, int, int, CFTTTexLoadOptions const &);                              //0018529C
  static void ReleaseKitTemplate(CFTTTexture *);                                                               //00185448
  static int GetColour(int, int, ETeamColour, bool, bool, int);                                                //00185480

  static CachedKitTemplate ms_tCachedKitTemplates[16];
  static int ms_iNumCachedKitTemplates;
  static int ms_tBuildKitSetup;
};

#endif  //_CGFXKITS_H_