// TGame - [2020-04-13 11:57:46]
#ifndef _TGAME_H_
#define _TGAME_H_

// 001D5934 TGame::operator=(TGame const&)

#include "CPlayer.h"
#include "CTeam.h"
#include "TFreeControl.h"
struct PlayerSubstitute {
  CPlayer *pCPlayer_0;
  int field_4;
  CPlayer *pCPlayer_8;
  CPlayer *pCPlayer_C;
  CPlayer *pCPlayer_10;
};

struct TLogic {
  int field_0;
  uchar field_4;
  uchar field_5;  //	.text:00176026                 STRB.W          R0, [R1,R12]
  uchar field_6;
  uchar field_7;
  int field_8;
  int field_C;
  int field_10;
  int field_14;
  int field_18;
  int field_1C;
  int field_20;
  int field_24;
  int field_28;
  int field_2C;
  int field_30;
  int field_34;
  int field_38;
  int player_3C;
  int team_40;
  int field_44;
  int field_48;
  int field_4C;
  sint8 field_50;  // 0016DF68 确定的类型
  char field_51;
  char field_52;  // 0016DF7C 确定的类型
  char field_53;
  int field_54;
  int field_58;
  int field_5C;
  int team_60;
  TPoint field_64;  // 0016E03A 确定的类型
  int field_6C;     // 0016E012确定的类型
  char player_70;
  char field_71;
  char field_72;
  char field_73;
  EFreePropType  freeproptype_74;
  int field_78;
  char field_7C;
  char field_7D;
  char field_7E;
  char field_7F;
  char field_80;
  char field_81;
  char field_82;  // 0016DFD8确定的类型
  char field_83;
  char field_84;
  char field_85;
  char field_86;
  char field_87;
  char field_88;
  char field_89;
  char field_8A;
  char field_8B;
  char field_8C;
  char field_8D;
  char field_8E;
  char field_8F;
  char field_90;
  char field_91;
  char field_92;
  char field_93;
  char field_94;
  char field_95;
  char field_96;
  char field_97;
  char field_98;  // 0016DF08确定的类型
  char field_99;
  char field_9A;
  char field_9B;  // 0016E060确定的类型
  char field_9C;  // 0016E060确定的类型
  char field_9D;
  char field_9E;
  char field_9F;
  int field_A0;  // 001D5826确定的类型
  char field_A4[2];
  char field_A6;
  char field_A7;
  char field_A8;
  bool bisRunning_A9;
  char field_AA;
  char field_AB;
  int field_AC;
  int field_B0;
  int field_B4;
  int field_B8;
};

struct struc_250 {
  int field_0;
  int field_4;
};

/* 0x88 */
struct list_11_0x88 {
  struc_250 field_0[11];
};

/* 1548 */
struct TMath {
  short buf_0;
  int filed_4[22];
  int filed_5C[22];
  int buf_B4[22];
  int field_10C[2];
  int field_114[2];
  int field_11c[2];
  CPlayer* field_124[2];  //某种指针， 不是int
  CPlayer* field_12C[2];
  CPlayer *pPlayer_134[2];
  int pPlayer_13C[2];
  bool field_144;
  int8 field_145[2];
  int field_148;
  int field_14C;
  CPlayer *field_150[2];
  int field_158;
  int field_15C;
  int filed_160[22];
  int filed_1B8[2];
  int filed_1C0[2];
  int field_1C8[2];
  int field_1D0[11];
  list_11_0x88 list_1FC[2];
  int field_2AC[22];
  char filed_304[2][11];
  char filed_31A[2];
  int filed_31C;
  char filed_320[4];
  int filed_324;
  int filed_328;
  int field_32C;
  int field_330;
  int field_334[2];
  char field_33C[2];
  char field_33E[2];
  int field_340[11];
  int distance_36C;
  TPoint3D field_370;
  TPoint3D field_37C;
  int field_388[2];
  int field_390;
  int field_394;
  int field_398;
  int field_39C;
  int field_3A0;
};

struct PlayTeam {
  CPlayer *teamlist_0[11];
};

struct TOffside {
  uchar field_0;
  uchar field_1;
  ushort field_2;
  uint32 field_4[2];  // text:0015BCD2                 LDR.W           R0, [R5,R10]		//.text:0015BE98                 STR.W           R1, [R2,R10]  这里判断是数组
  // uint32   field_8;
  uint32 field_C;
  uint32 field_10;
  PlayTeam allplay_14[2];  //.text:0015BB9E                 LDR             R0, [R0,#0x14]
  list_11_0x88 list_6C[2];
  int field_11C;
  int field_120;
  int field_124;
  int field_128;
  int field_12C;
  struc_250 list_130[2];
};

struct TPlayerInfos_st {
  TPlayerInfo TPlayerInfo_0[0x20];
  TPlayerInfo TPlayerInfo_1080[0x20];
};

// 0x6CD8
struct TGame {
  int maybe_sound_0;
  int dCurrentID_4;
  CPlayer *field_8[3];     // 0015B358 确定类型
  PlayTeam allplay_14[2];  // 001749A0 确定11个人的CPlayer* 为一个结构
  CPlayer *field_6C[2];
  CPlayer *field_74[8];
  TPlayerInfos_st TPlayerInfo_94;
  TPlayerInfo TPlayerInfo_2194;
  TPlayerInfo TPlayerInfo_2218;
  uchar buf_229C[2500];
  CTeam CTeam_2C60[2];
  CPlayer CPlayer_3050[33];
  uchar byte_6674;
  TLogic mTLogic_6678;
  TMath mTMath_6734;
  int field_6AD8;
  CPlayer *field_6ADC;
  TOffside mTOffside_6AE0;
  int field_6C20;
  int field_6C24;
  int field_6C28;
  int field_6C2C;
  int field_6C30;
  int field_6C34;
  int field_6C38;
  int field_6C3C;
  int field_6C40[2];  //大小不确定， 先用2个表示
  int field_6C48;
  int field_6C4C;
  int field_6C50;
  int field_6C54;
  int field_6C58;
  int field_6C5C;
  int field_6C60;
  int field_6C64;
  int field_6C68;
  int field_6C6C;
  int field_6C70;
  int field_6C74;
  int field_6C78;
  int field_6C7C;
  int field_6C80;
  int field_6C84;
  int field_6C88;
  int field_6C8C;
  int field_6C90;
  int field_6C94;
  int field_6C98;
  int field_6C9C;
  int m_i_6CA0;
  int m_i_6CA4;
  int field_6CA8;
  int m_i_6CAC;
  TPoint3D m_TPoint3D_6CB0;
  TPoint3D m_TPoint3D_6CBC;
  TPoint3D m_TPoint3D_6CC8;
  uchar m_uc_6CD4;
  uchar field_6CD5;  // 补齐
  uchar field_6CD6;  // 补齐
  uchar field_6CD7;  // 补齐
};

extern TGame tGame;

#endif  //_TGAME_H_