//CGfxPitch - [2020-04-13 11:57:46]
#ifndef _CGFXPITCH_H_
#define _CGFXPITCH_H_

#include "CFTTVector32.h"
#include "CFTTMatrix32.h"
#include "CFTTTexture.h"
#include "CFTTRenderHelper.h"
#include "CFTTRenderToTexture.h"
#include "CMatchSetup.h"

/*
001B8228 CGfxPitch::CGfxPitch()
001B8808 CGfxPitch::~CGfxPitch()
001B76B0 CGfxPitch::GetPitchPatternTypeInfo(EPitchPattern)
001B76C4 CGfxPitch::GetPitchTypeList()
001B7708 CGfxPitch::FreePitchTypeList(char **)
001B772C CGfxPitch::GetPatternTexture()
001B7788 CGfxPitch::ResetMagicSpray()
001B7790 CGfxPitch::SetMagicSpray(CFTTVector32)
001B77A4 CGfxPitch::CombineGrassTextures()
001B7988 CGfxPitch::CreateStemTexture()
001B81E8 CGfxPitch::InitMain()
001B8208 CGfxPitch::ShutdownMain()
001B8240 CGfxPitch::InitBase()
001B883C CGfxPitch::ShutdownBase()
001B8ACC CGfxPitch::InitColour(ETimeOfDay,EWeather)
001B8C28 CGfxPitch::InitRenderHelpers()
001B92E4 CGfxPitch::Init(EPitchPattern,int,float)
001B9328 CGfxPitch::InitPattern(EPitchPattern,int)
001B9540 CGfxPitch::Shutdown()
001B955C CGfxPitch::RenderPattern(int,int)
001B9AEC CGfxPitch::RenderWear(int)
001BA1D0 CGfxPitch::RenderGrass(CFTTMatrix32 &)
001BBD20 CGfxPitch::Render(CFTTMatrix32 const*)
001BBD98 CGfxPitch::Update(float)
001BC180 CGfxPitch::UpdateCloud(float)
001BC1A0 CGfxPitch::SetScale(float)
001BC1AC CGfxPitch::GetScale()

0x38
*/

enum EPitchPattern {
  EPitchPattern_0,
  EPitchPattern_1,
  EPitchPattern_2,
  EPitchPattern_3,
  EPitchPattern_4,
  EPitchPattern_5,
  EPitchPattern_6,
  EPitchPattern_7,
};

extern int GFXPITCH_iPitchMaterialNormal;    //00342D20
extern int GFXPITCH_iPitchMaterialSpray;     //00342D24
extern int GFXPITCH_iPitchMaterialLines;     //00342D28
extern int GFXPITCH_iPitchMaterialBlack;     //00342D2C
extern int GFXPITCH_iPitchMaterialStem;      //00342D30
extern int GFXPITCH_iPitchMaterialNormal3D;  //00342D34
extern int GFXPITCH_iPitchMaterialLines3D;   //00342D38

extern CFTTRenderHelper *GFXPITCH_pPitchRenderHelper;        //0047619C
extern CFTTRenderHelper *GFXPITCH_pPitchSprayRenderHelper;   //004761A0
extern CFTTRenderHelper *GFXPITCH_pPitchLineRenderHelper;    //004761A4
extern CFTTRenderHelper *GFXPITCH_p3DPitchRenderHelper;      //004761A8
extern CFTTRenderHelper *GFXPITCH_p3DPitchLineRenderHelper;  //004761AC
extern CFTTRenderHelper *GFXPITCH_p3DStemRenderHelper;       //004761B0
extern int GFXPITCH_iGrassIndex;                             //004761B4
extern int GFXPITCH_iCloudIndex;                             //004761B8
extern CFTTRenderToTexture *GFXPITCH_pPatternRTT;            //004761BC

class CGfxPitch {
public:
  CGfxPitch();                                  //001B8228
  ~CGfxPitch();                                 //001B8808
  void GetPitchPatternTypeInfo(EPitchPattern);  //001B76B0
  void GetPitchTypeList();                      //001B76C4
  void FreePitchTypeList(char **);              //001B7708
  static CFTTTexture *GetPatternTexture();      //001B772C
  void ResetMagicSpray();                       //001B7788
  void SetMagicSpray(CFTTVector32);             //001B7790
  void CombineGrassTextures();                  //001B77A4
  void CreateStemTexture();                     //001B7988
  static void InitMain();                       //001B81E8
  static void ShutdownMain();                   //001B8208
  void InitBase();                              //001B8240
  void ShutdownBase();                          //001B883C
  void InitColour(ETimeOfDay, EWeather);        //001B8ACC
  void InitRenderHelpers();                     //001B8C28
  void Init(EPitchPattern, int, float);         //001B92E4
  void InitPattern(EPitchPattern, int);         //001B9328
  static void Shutdown();                       //001B9540
  void RenderPattern(int, int);                 //001B955C
  void RenderWear(int);                         //001B9AEC
  void RenderGrass(CFTTMatrix32 &);             //001BA1D0
  void Render(CFTTMatrix32 const *);            //001BBD20
  void Update(float);                           //001BBD98
  void UpdateCloud(float);                      //001BC180
  void SetScale(float);                         //001BC1A0
  float GetScale();                             //001BC1AC

  EPitchPattern ePitchPattern_0;
  CFTTVector32 vec32_4;
  int field_10;
  int field_14;
  int field_18;
  int field_1C;
  CFTTTexture *pTexture_20;
  CFTTTexture *pTexture_24;
  CFTTRenderToTexture *pRenderToTexture_28;
  CFTTTexture *pTexture_2C;
  CFTTTexture *pTexture_30;
  ushort dMatId_PitchCircleShader_34;  //.text:001B93F6   LDRH R1, [R4,#0x34] @ dIndex 由此看出是 ushort
  ushort field_36;                     //仅内存对齐用的

  static CGfxPitch *ms_pcInstance;
};

#endif  //_CGFXPITCH_H_