//CFTTTextureManager - [2020-04-13 11:57:46]
#ifndef _CFTTTEXTUREMANAGER_H_
#define _CFTTTEXTUREMANAGER_H_

#include "common.h"
#include "FTTMutex.h"
#include "CFTTTexture.h"
#include "CFTTTexMan_TexInfo.h"

/*
00223464 CFTTTextureManager::CFTTTextureManager(int)
002235EC CFTTTextureManager::~CFTTTextureManager()
00223688 CFTTTextureManager::IncreaseReferenceCount(int)
002236B0 CFTTTextureManager::ReleaseAllTextures()
00223704 CFTTTextureManager::ReleaseTexture(CFTTTexture *)
00223752 CFTTTextureManager::ReleaseTexture(int)
0022378A CFTTTextureManager::ReleaseAllOtherTextures(CFTTTexture **,int)
002237F0 CFTTTextureManager::FindTexture(uint,EFTTTextureType)
00223822 CFTTTextureManager::GetTextureID(char const*)
00223852 CFTTTextureManager::FindFreeTexIndex()
00223882 CFTTTextureManager::LoadTexture(char const*,CFTTTexLoadOptions const&)
002239A4 CFTTTextureManager::CreateTexture(char const*,CFTTTexLoadOptions const&)
002239B0 CFTTTextureManager::AddTexture(CFTTTexture *,EFTTTextureType,char const*,int *,bool)
00223A2C CFTTTextureManager::GetDummyTexture(EFTTDummyTexture)
00223A3C CFTTTextureManager::GetTotalUseCount()
00223A5E CFTTTextureManager::GetTextureName(int)

0x34
*/
//-------------------------------------------------------------------------------------------------
class CFTTTextureManager {
public:
  CFTTTextureManager(int dCount);  //00223464
  ~CFTTTextureManager();           //002235EC

  void IncreaseReferenceCount(int dIndex);     //00223688
  void ReleaseAllTextures();                   //002236B0
  bool ReleaseTexture(CFTTTexture *pTexture);  //00223704
  void ReleaseTexture(int dIndex);             //00223752
  void ReleaseAllOtherTextures(CFTTTexture **ppTexture,
                               int a2);          //0022378A
  int FindTexture(uint, EFTTTextureType) const;  //002237F0
  int GetTextureID(char const *);                //00223822
  int FindFreeTexIndex();                        //00223852

  int LoadTexture(char const *pName,
                  CFTTTexLoadOptions const &pTexLoadOptions);  //00223882

  CFTTTexture *CreateTexture(char const *pName,
                             CFTTTexLoadOptions const &pTexLoadOptions);  //002239A4

  int AddTexture(CFTTTexture *pTexture,
                 EFTTTextureType eType,
                 char const *pName,
                 int *pDat,
                 bool b);                          //002239B0
  CFTTTexture *GetDummyTexture(EFTTDummyTexture);  //00223A2C
  int GetTotalUseCount();                          //00223A3C
  char *GetTextureName(int dIndex);                //00223A5E

  CFTTTexMan_TexInfo *list_TexInfo_0;
  int dUseCount_4;
  int dCount_8;
  int field_C;
  FTTMutex Mutex_10;

  static int s_iDummyTextureRefCount;
  static CFTTTexture *s_pDummyTextures[5];
};
//-------------------------------------------------------------------------------------------------
extern CFTTTextureManager *FTT_pTex;
#endif  //_CFTTTEXTUREMANAGER_H_