//FETU - [2020-06-22 11:41:46]
#ifndef _FETU_H_
#define _FETU_H_

#include "CTeam.h"
#include "CMyProfile.h"
#include "XMATH.h"
#include "CFTTTextureAtlas.h"
#include "CFTTTexture.h"

/*
0014E008 FETU_GetImage(TImage *,char const*,bool,EFTTTexFormat,bool,bool,bool)
0014E0C6 FETU_GetWidth(CFTTAtlasTileData *)
0014E0D4 FETU_GetHeight(CFTTAtlasTileData *)
0014E0E2 FETU_GetWidth(CFTTTexture *)
0014E0F2 FETU_GetHeight(CFTTTexture *)
0014E102 FETU_GetStoryImage(TImage *,EStoryImage)
0014E124 FETU_GetStoryImage(EStoryImage,int)
0014E244 FETU_CheckFLCache(int,uint,uint,bool,EFTTTexFormat,TFLCache **)
0014E2F0 FETU_DrawFlagCol(uint,uint,float,float,float,float)
0014E450 FETU_CheckKitCache(int,uint *,TKitCache **)
0014E4C4 FETU_GetKit(int,uint *)
0014E508 FETU_CreateKitIcon(int,uint *)
0014E7E0 FETU_BlitTextureCol(CFTTTexture *,CFTTTexture *,int,int,int,int,int,int,uint)
0014E974 FETU_CreateFlagTexture(int,uint,uint,EFTTTexFormat)
0014EA40 FETU_GetFlag(int,uint,uint,bool,EFTTTexFormat)
0014EB24 FETU_GetFlag(CTeam *,bool,EFTTTexFormat)
0014EB40 FETU_ClearKitCache()
0014EB6C FETU_ClearFlagCache()
0014EB94 FETU_InitKitCache()
0014EBAC FETU_InitFlagCache()
0014EBC4 FETU_DrawWoodBox(float,float,float,float,int,float,float,float)
0014EE08 FETU_DrawButton(float,float,float,float,int,float,float,float)
0014F06C FETU_DrawBoxText(char const*,float,float,float,float,int,float,float,float)
0014F2B4 FETU_DrawBoxRed(float,float,float,float,int,float,float,float)
0014F2F0 FETU_DrawBoxBlue(float,float,float,float,int,float,float,float)
0014F32C FETU_DrawBoxGreen(float,float,float,float,int,float,float,float)
0014F368 FETU_DrawBoxRounded(float,float,float,float,int,float,float,float,int)
001500D8 FETU_DrawBoxRoundedOutline(float,float,float,float,int,float,float,float,int)
001504F0 FETU_DrawLoadingArrow(float,float,float)
0015058C FETU_RenderPitch(int,uint,int,bool)
0015124C FETU_GetTeamLogo(CFTTTexture **,int,int,EFTTTexFormat,CFTTTexLoadOptions const*)
001512C4 FETU_GetTeamLogo(TImage *,int)
00151314 FETU_DrawLevelNumberBackground(float,float,float,float,int,int,float,float,float,bool,uint,float)
00151324 FETU_DrawLevelNumber(float,float,float,float,int,int,float,float,float,bool,uint,TRect)
00151770 FETU_DrawObjectiveBox(float,float,float,float,int,int,int *,float,float,float,float,bool,EMedal_Type)
00151E98 FETU_DrawSingleMedal(float,float,float,EMedal_Type,bool,bool,uint,int,float,bool)
00152194 FETU_DrawClock(float,float,float,bool,bool)
*/

//-------------------------------------------------------------------------------------------------
//大小未知，但是至少是0x20
class CFTTAtlasTileData {
public:
  int field_0;
  int field_4;
  int field_8;
  int field_C;
  int field_10;
  int field_14;
  int dWidth_18;
  int dheight_1C;
};
//-------------------------------------------------------------------------------------------------
struct TImage {
  CFTTTexture *pTexture_0;
  CFTTTextureAtlas *pTextureAtlas_4;
  ushort field_8;
  ushort field_A;
  uchar field_C;
  uchar field_D;
  uchar field_E;
  int width_10;
  int height_14;
};
//-------------------------------------------------------------------------------------------------
enum EStoryImage {
  EStoryImage_0,
  EStoryImage_1,
  EStoryImage_2,
  EStoryImage_3,
  EStoryImage_4,
  EStoryImage_5,
  EStoryImage_6,
  EStoryImage_7,
  EStoryImage_8,
  EStoryImage_9,
  EStoryImage_10,
  EStoryImage_11,
  EStoryImage_12,
  EStoryImage_13,
  EStoryImage_14
};
//-------------------------------------------------------------------------------------------------
struct TFLCache {
  int field_0;
  uint field_4;
  int field_8;
  CFTTTexture *pTexture_C;
  EFTTTexFormat eTexFormat_10;
  uint dTick_14;
};
//-------------------------------------------------------------------------------------------------
//size 0x34
struct TKitCache {
  int field_0;
  uint list_4[10];
  CFTTTexture *pTexture_2C;
  uint dTick_30;
};
//-------------------------------------------------------------------------------------------------
//0014E008
void FETU_GetImage(TImage *pImage, char const *pName, bool a3,
                   EFTTTexFormat eFormat,
                   bool a5, bool a6, bool a7);

//0014E0C6
float FETU_GetWidth(CFTTAtlasTileData *pData);

//0014E0D4
float FETU_GetHeight(CFTTAtlasTileData *pData);

//0014E0E2
float FETU_GetWidth(CFTTTexture *);

//0014E0F2
float FETU_GetHeight(CFTTTexture *);

//0014E102
void FETU_GetStoryImage(TImage *, EStoryImage);

//0014E124
const char *FETU_GetStoryImage(EStoryImage e, int i1);

//0014E244
CFTTTexture *FETU_CheckFLCache(int a1, uint a2, uint a3, bool b4,
                               EFTTTexFormat e, TFLCache **ppCache);

//0014E2F0
void FETU_DrawFlagCol(uint, uint, float, float, float, float);

//0014E450
CFTTTexture *FETU_CheckKitCache(int a1, uint *pa2, TKitCache **ppKitCache);

//0014E4C4
CFTTTexture *FETU_GetKit(int a1, uint *pa2);

//0014E508
CFTTTexture *FETU_CreateKitIcon(int, uint *);

//0014E7E0
void FETU_BlitTextureCol(CFTTTexture *, CFTTTexture *,
                         int, int, int,
                         int, int, int,
                         uint);

//0014E974
CFTTTexture *FETU_CreateFlagTexture(int ar0, uint ar1,
                                    uint ar2,
                                    EFTTTexFormat er3);

//0014EA40
CFTTTexture *FETU_GetFlag(int r0_ai, uint r1_ai, uint r2_au, bool r3_b, EFTTTexFormat eFormat);

//0014EB24
CFTTTexture *FETU_GetFlag(CTeam *r0_pTeam, bool r1_b, EFTTTexFormat r2_efromat);

//0014EB40
void FETU_ClearKitCache();

//0014EB6C
void FETU_ClearFlagCache();

//0014EB94
void FETU_InitKitCache();

//0014EBAC
void FETU_InitFlagCache();

//0014EBC4
void FETU_DrawWoodBox(float, float, float, float, int, float, float, float);

//0014EE08
void FETU_DrawButton(float, float, float, float, int, float, float, float);

//0014F06C
void FETU_DrawBoxText(char const *, float, float, float, float, int, float, float, float);

//0014F2B4
void FETU_DrawBoxRed(float, float, float, float, int, float, float, float);

//0014F2F0
void FETU_DrawBoxBlue(float, float, float, float, int, float, float, float);

//0014F32C
void FETU_DrawBoxGreen(float, float, float, float, int, float, float, float);

//0014F368
void FETU_DrawBoxRounded(float, float, float, float, int, float, float, float, int);

//001500D8
void FETU_DrawBoxRoundedOutline(float, float, float, float, int, float, float, float, int);

//001504F0
void FETU_DrawLoadingArrow(float, float, float);

//0015058C
void FETU_RenderPitch(int, uint, int, bool);

//0015124C
void FETU_GetTeamLogo(CFTTTexture **, int, int, EFTTTexFormat, CFTTTexLoadOptions const *);

//001512C4
void FETU_GetTeamLogo(TImage *, int);

//00151314
void FETU_DrawLevelNumberBackground(float, float, float, float, int, int, float, float, float, bool, uint, float);

//00151324
void FETU_DrawLevelNumber(float, float, float, float, int, int, float, float, float, bool, uint, TRect);

//00151770
void FETU_DrawObjectiveBox(float, float, float, float, int, int, int *, float, float, float, float, bool, EMedal_Type);

//00151E98
void FETU_DrawSingleMedal(float, float, float, EMedal_Type, bool, bool, uint, int, float, bool);

//00152194
void FETU_DrawClock(float, float, float, bool, bool);

//-------------------------------------------------------------------------------------------------
#endif  //_FETU_H_