CGfxPlayer.cpp 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. #include "CGfxPlayer.h"
  2. #include "CPlayerShader.h"
  3. #include "CFTTBatchModelBin.h"
  4. #include "CGFXSpec.h"
  5. #include "CFTTBatchModelManager.h"
  6. #include "memctrl.h"
  7. #include "CGfxKits.h"
  8. #include "CMatchSetup.h"
  9. #include "TGame.h"
  10. //0033F40C
  11. int GFXPLAYER_spBatchBinMats[8] = {-1, -1, -1, -1, -1, -1, -1, -1};
  12. int GFXPLAYER_iKitTextureID[7];
  13. //0045FC68
  14. CFTTBatchModelBin *GFXPLAYER_spBatchBins[8];
  15. //0045FC88
  16. HashNode HashNode_45FC88[8] = {
  17. {-1, 0x28000, FTTHash("torso"), 0, 0, 0, 1},
  18. {-1, 0x40000, FTTHash("suit"), 0, 0, 0, 0},
  19. {-1, 0x20000, FTTHash("kit"), 0, 0, 0, 0},
  20. {-1, 0x4000, FTTHash("kit_a"), 0, 0, 0, 0},
  21. {-1, 0x4000, FTTHash("atlas_a"), 1, 0, 0, 1},
  22. {-1, 0x60000, FTTHash("atlas"), 1, 0, 0, 1},
  23. {-1, 0x10000, FTTHash("hair"), 1, 1, 0, 2},
  24. {6, 0x10000, FTTHash("hair_x"), 1, 1, 0, 2},
  25. };
  26. //002FEEEC
  27. int s_ePerCharacterMat[8] = {2, 2, 2, 2, 0, 1, 2, 2};
  28. //0045FBD8
  29. int GFXPLAYER_iNumCharacters;
  30. //0045DC28
  31. CGfxCharacter *GFXPLAYER_pPlayer[33];
  32. //0045EBE4
  33. CFTTAABB32 GFXPLAYER_tPlayerAABBV[33];
  34. //0045F94C
  35. CFTTAABB32 GFXPLAYER_tShadowMapAABB[4];
  36. //0045E4EC
  37. bool GFXPLAYER_bPlayerVisible[33];
  38. //0045E50D
  39. bool GFXPLAYER_bPlayerShadowVisible[35];
  40. //0045F298
  41. CFTTAABB32 GFXPLAYER_tPlayerAABBL[33];
  42. int CGfxPlayer::ms_iHairMatList[33];
  43. int CGfxPlayer::ms_iNumHairMats;
  44. //-------------------------------------------------------------------------------------------------
  45. //00186800
  46. void CGfxPlayer::LoadBuildKitTextures() {
  47. }
  48. //-------------------------------------------------------------------------------------------------
  49. //00186848
  50. void CGfxPlayer::FreeBuildKitTextures() {
  51. }
  52. //-------------------------------------------------------------------------------------------------
  53. //00186868
  54. // 00186868 经过单元测试,功能正常,每个分支都走到了
  55. void CGfxPlayer::InitKits(int i0) {
  56. switch (i0) {
  57. case 0:
  58. // loc_186886
  59. CGfxKits::BeginBuildKit(0);
  60. break;
  61. case 1:
  62. // loc_186890
  63. CGfxKits::GetTexture(GFXPLAYER_iKitTextureID[0], &GFXPLAYER_tGameKitTextures[tGame.mTLogic_6678.field_0], CMatchSetup::ms_tInfo.field_18[0], EKitTextureType_0, nullptr);
  64. break;
  65. case 2:
  66. // loc_1868B2
  67. CGfxKits::GetTexture(GFXPLAYER_iKitTextureID[1], &GFXPLAYER_tGameKitTextures[tGame.mTLogic_6678.field_0^1], CMatchSetup::ms_tInfo.field_18[1], EKitTextureType_0, nullptr);
  68. break;
  69. case 3:
  70. // loc_1868E6
  71. CGfxKits::GetTexture(GFXPLAYER_iKitTextureID[2], &GFXPLAYER_tGameKitTextures[tGame.mTLogic_6678.field_0], CMatchSetup::ms_tInfo.field_20[0], EKitTextureType_1, nullptr);
  72. CGfxKits::GetTexture(GFXPLAYER_iKitTextureID[3], &GFXPLAYER_tGameKitTextures[tGame.mTLogic_6678.field_0^1], CMatchSetup::ms_tInfo.field_20[1], EKitTextureType_1, nullptr);
  73. break;
  74. case 4:
  75. // loc_186934
  76. CGfxKits::GetTexture(GFXPLAYER_iKitTextureID[4], 0, CMatchSetup::ms_tInfo.field_20[2], EKitTextureType_2, 0);
  77. CGfxKits::GetTexture(GFXPLAYER_iKitTextureID[5], &GFXPLAYER_tGameKitTextures[tGame.mTLogic_6678.field_0], CMatchSetup::ms_tInfo.field_18[0], EKitTextureType_3, nullptr);
  78. break;
  79. case 5:
  80. CGfxKits::GetTexture(GFXPLAYER_iKitTextureID[6], &GFXPLAYER_tGameKitTextures[tGame.mTLogic_6678.field_0^1], CMatchSetup::ms_tInfo.field_18[1], EKitTextureType_4, nullptr);
  81. CGfxKits::EndBuildKit();
  82. break;
  83. default:
  84. break;
  85. }
  86. }
  87. //-------------------------------------------------------------------------------------------------
  88. //001869E8 -_-
  89. void CGfxPlayer::InitBatchManager() {
  90. LOGI("CGfxPlayer::InitBatchManager End");
  91. }
  92. //-------------------------------------------------------------------------------------------------
  93. //00186B68
  94. void CGfxPlayer::ShutdownBatchManager() {
  95. }
  96. //-------------------------------------------------------------------------------------------------
  97. //00186BD4
  98. void CGfxPlayer::SetupBatchConstants() {
  99. LOGE("CGfxPlayer::SetupBatchConstants");
  100. }
  101. //-------------------------------------------------------------------------------------------------
  102. //00186D48
  103. void CGfxPlayer::InitPlayersGame() {
  104. LOGE("CGfxPlayer::InitPlayersGame");
  105. }
  106. //-------------------------------------------------------------------------------------------------
  107. //00186F9C
  108. void CGfxPlayer::ReInitialisePlayer(int a0, int a1, int a2) {
  109. //empty
  110. }
  111. //-------------------------------------------------------------------------------------------------
  112. //00186FA0
  113. void CGfxPlayer::RenderProps() {
  114. }
  115. //-------------------------------------------------------------------------------------------------
  116. //00186FEC
  117. void CGfxPlayer::RenderPlayerOpaque(int) {
  118. }
  119. //-------------------------------------------------------------------------------------------------
  120. //00187338
  121. void CGfxPlayer::GetFrustumCullingSphere(CFTTSphere32 &, int, bool) {
  122. }
  123. //-------------------------------------------------------------------------------------------------
  124. //001873C0
  125. void CGfxPlayer::RenderPlayerAlphaTested(bool) {
  126. }
  127. //-------------------------------------------------------------------------------------------------
  128. //001874A8
  129. void CGfxPlayer::RenderPlayerTranslucent(bool) {
  130. }
  131. //-------------------------------------------------------------------------------------------------
  132. //00187598
  133. void CGfxPlayer::FlushPlayerSkins() {
  134. LOGE("CGfxPlayer::FlushPlayerSkins");
  135. }
  136. //-------------------------------------------------------------------------------------------------
  137. //00187604
  138. void CGfxPlayer::FreeKits() {
  139. }
  140. //-------------------------------------------------------------------------------------------------
  141. //0018763C
  142. void CGfxPlayer::FreePlayers() {
  143. }
  144. //-------------------------------------------------------------------------------------------------
  145. //00187684
  146. void CGfxPlayer::UpdateProps() {
  147. }
  148. //-------------------------------------------------------------------------------------------------
  149. //00187790
  150. void CGfxPlayer::AnimatePlayer(CPlayer *) {
  151. }
  152. //-------------------------------------------------------------------------------------------------
  153. //001877D4
  154. void CGfxPlayer::AnimatePlayer(CGfxCharacter *, CFTTMatrix32 *) {
  155. }
  156. //-------------------------------------------------------------------------------------------------
  157. //001877F8
  158. void CGfxPlayer::SkinPlayers() {
  159. }
  160. //-------------------------------------------------------------------------------------------------
  161. //00187D04
  162. void CGfxPlayer::SwapTeamKits() {
  163. }
  164. //-------------------------------------------------------------------------------------------------
  165. //00187EB4
  166. void CGfxPlayer::GetKitFileName(int) {
  167. }
  168. //-------------------------------------------------------------------------------------------------
  169. //00187EC0
  170. void CGfxPlayer::AddPlayer(CGfxCharacter *) {
  171. }
  172. //-------------------------------------------------------------------------------------------------
  173. //00187EE0
  174. void CGfxPlayer::RemovePlayer(CGfxCharacter *) {
  175. }
  176. //-------------------------------------------------------------------------------------------------