1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117 |
- #include "CGfxCharacter.h"
- #include "CGFXSpec.h"
- #include "CResourceManager.h"
- #include "CModelManager.h"
- #include "CGraphicsTexLoadOptions.h"
- #include "CFTTTextureManager.h"
- #include "CFTTColour.h"
- #include "Matrix.h"
- #include "CFTTGraphicsDevice.h"
- #include "CGfxShadow.h"
- #include "XSYS.h"
- #include "CFTTTexture.h"
- #include "CPlayerShader.h"
- #include "CGfxShadowMapManager.h"
- #include "CGfxShadowMap.h"
- #include "CGfxEnvironmentMap.h"
- #include "CFTTGraphicsDevice.h"
- #include "CPBRLighting.h"
- #include "CMatchSetup.h"
- #include "TGame.h"
- #include "CFTTVector32x4.h"
- #include "CGFXSpec.h"
- #include "CGfxDynNormMap.h"
- #include "CGfxPlayer.h"
- #include "CFTTBatchModelManager.h"
- #include "TFTTCacheLookup.h"
- #include "GFXRENDER.h"
- #include "CLinearDepthShader.h"
- #include "CFTTMaterialManager.h"
- #include "TAnimData.h"
- #include "CFTTCamera.h"
- #include "FTT2D.h"
- #include "FE2D.h"
- #include "global_func.h"
- #include "CShaderSetup.h"
- #include "CLegacyLitShader.h"
- #include "memctrl.h"
- unsigned int s_uHairColours[8] = {0xFF202020, 0xFF64573E, 0xFF3D3323, 0xFFDDD499, 0xFFB1953F, 0xFFB86732, 0xFFB8B8B8, 0xFFFFFFFF};
- bool CGfxCharacter::s_bDefaultModelsLoaded; //003A4ABC
- CFTTModel *CGfxCharacter::s_pDefaultShadowModel[2]; //003A4AC0
- CFTTModel *CGfxCharacter::s_pDefaultBodyModel[50]; //003A4AC8
- //CFTTModel *CGfxCharacter::s_pDefaultHairModel[100]; //003A4B90
- CFTTModel *CGfxCharacter::s_pDefaultHeadModel[40]; //003A4D20
- CFTTModel *CGfxCharacter::s_pPropModel[12]; //003A4DC0
- CAnimLib *CGfxCharacter::s_pAnimLib; //003A4DF0
- int CGfxCharacter::s_iAtlasAmbientTextures[10]; //003A4DF4
- int CGfxCharacter::s_iSkinTextures[12]; //003A4E1C
- int CGfxCharacter::s_iFacialHairTextures[7]; //003A4E4C
- int CGfxCharacter::s_iHairMegaTexture; //003A4E68
- int CGfxCharacter::s_iHairSpecularTexture; //003A4E6C
- int CGfxCharacter::s_iHairNormalTexture; //003A4E70
- int CGfxCharacter::s_iGlovesTextures[5]; //003A4E74
- int CGfxCharacter::s_iBootsTextures[12]; //003A4E88
- float CGfxCharacter::s_fAtlasDiscardAlpha; //003A4EB8
- int CGfxCharacter::s_iCount; //003A4EBC
- int CGfxCharacter::s_iAtlasCount; //003A4EC0
- CFTTRenderToTexture *CGfxCharacter::s_pMegaRTT; //003A4ECC
- CFTTTexture *CGfxCharacter::s_pMegaMippedTex; //003A4ED0
- int CGfxCharacter::s_iWalkDirectionAnimLookUp[8] = {-1, -1, 0x675, -1, 0x677, -1, 0x676, -1}; //0033EC28
- int CGfxCharacter::s_iManagerDiffuseTextures[12] = {-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; //0033EC48
- int CGfxCharacter::s_iManagerSpecularTextures[3] = {-1, 0, 0}; //0033EC78
- int CGfxCharacter::s_iManagerNormalTextures[3] = {-1, 0, 0}; //0033EC84
- int CGfxCharacter::s_iManagerAmbientTextures[3] = {-1, 0, 0}; //0033EC90
- int CGfxCharacter::s_iTorsoSpecularTexture = -1; //0033EC9C
- int CGfxCharacter::s_iTorsoNormalTexture = -1; //0033ECA0
- int CGfxCharacter::s_iKitSpecularTexture = -1; //0033ECA4
- int CGfxCharacter::s_iKitDynamicNormalTexture = -1; //0033ECA8
- int CGfxCharacter::s_iKitDynamicAmbientTexture = -1; //0033ECAC
- int CGfxCharacter::s_iAtlasSpecularTexture = -1; //0033ECB0
- int CGfxCharacter::s_iAtlasNormalTexture = -1; //0033ECB4
- int CGfxCharacter::CHAR_ATLAS_W = 256; //0033ECB8
- int CGfxCharacter::CHAR_ATLAS_H = 256; //0033ECBC
- int CGfxCharacter::CHAR_MEGA_NUM_X = 4; //0033ECC0
- int CGfxCharacter::CHAR_MEGA_NUM_Y = 8; //0033ECC4
- int CGfxCharacter::CHAR_MEGA_W = CGfxCharacter::CHAR_MEGA_NUM_X * CGfxCharacter::CHAR_ATLAS_W; //003A4EC4
- int CGfxCharacter::CHAR_MEGA_H = CGfxCharacter::CHAR_ATLAS_H * CGfxCharacter::CHAR_ATLAS_H; //003A4EC8
- CFTTModel *list_model_3A4BA4[95];
- CFTTModel *list_model_3A4D20[40];
- static OfficialSkinHair_st unk_33EDDC[20] = {
- {0, 0, 1, 0xC, 1, 1},
- {0, 0, 2, 0xC, 1, 0},
- {0, 0, 7, 0xC, 2, 2},
- {0, 0, 1, 2, 2, 1},
- {0, 0, 2, 2, 1, 0},
- {3, 2, 0, 2, 1, 2},
- {4, 3, 0, 2, 2, 1},
- {0, 0, 2, 0xC, 2, 0},
- {1, 1, 2, 0xC, 1, 2},
- {3, 2, 0, 6, 1, 1},
- {4, 3, 0, 6, 2, 0},
- {3, 2, 2, 6, 2, 2},
- {4, 3, 2, 6, 1, 1},
- {0, 0, 1, 0, 1, 0},
- {1, 1, 1, 0, 2, 2},
- {3, 2, 1, 0, 2, 1},
- {4, 3, 1, 0, 1, 0},
- {5, 4, 0, 7, 1, 2},
- {5, 4, 0, 7, 2, 1},
- {5, 4, 0, 7, 2, 0},
- };
- const char *s_sShadowModelFile[] = {
- "data/models/player/body/shadow_1.ftm",
- "data/models/player/body/shadow_2.ftm",
- };
- const char *s_sBodyModelFile[] = {
- "body_skinny_short_1.ftm",
- "body_skinny_short_2.ftm",
- "body_skinny_short_3.ftm",
- "body_skinny_short_4.ftm",
- "body_skinny_short_5.ftm",
- "body_skinny_long_1.ftm",
- "body_skinny_long_2.ftm",
- "body_skinny_long_3.ftm",
- "body_skinny_long_4.ftm",
- "body_skinny_long_5.ftm",
- "body_regular_short_1.ftm",
- "body_regular_short_2.ftm",
- "body_regular_short_3.ftm",
- "body_regular_short_4.ftm",
- "body_regular_short_5.ftm",
- "body_regular_long_1.ftm",
- "body_regular_long_2.ftm",
- "body_regular_long_3.ftm",
- "body_regular_long_4.ftm",
- "body_regular_long_5.ftm",
- "body_stocky_short_1.ftm",
- "body_stocky_short_2.ftm",
- "body_stocky_short_3.ftm",
- "body_stocky_short_4.ftm",
- "body_stocky_short_5.ftm",
- "body_stocky_long_1.ftm",
- "body_stocky_long_2.ftm",
- "body_stocky_long_3.ftm",
- "body_stocky_long_4.ftm",
- "body_stocky_long_5.ftm",
- "mbody_1_1.ftm",
- "mbody_1_1.ftm",
- "mbody_1_2.ftm",
- "mbody_1_2.ftm",
- "mbody_1_2.ftm",
- "mbody_2_1.ftm",
- "mbody_2_1.ftm",
- "mbody_2_2.ftm",
- "mbody_2_2.ftm",
- "mbody_2_2.ftm",
- "mbody_3_1.ftm",
- "mbody_3_1.ftm",
- "mbody_3_2.ftm",
- "mbody_3_2.ftm",
- "mbody_3_2.ftm",
- "torso_0_1.ftm",
- "torso_0_1.ftm",
- "torso_0_2.ftm",
- "torso_0_2.ftm",
- "torso_0_2.ftm",
- };
- const char *s_sPropsModelFile[] = {
- "flag_02.ftm",
- "flag_01.ftm",
- "armband_01.ftm",
- "yellowcard_l.ftm",
- "redcard_l.ftm",
- "yellowcard_r.ftm",
- "redcard_r.ftm",
- "glove_0_1.ftm",
- "glove_0_2.ftm",
- "glove_0_3.ftm",
- "glove_0_4.ftm",
- "glove_0_5.ftm",
- };
- const char *s_sHairModelFile = "data/models/player/hair/hair_%i_%i.ftm";
- const char *s_sHeadModelFile = "data/models/player/head/head_%i_%i.ftm";
- const char *color_list_3230BC[] = {
- "white",
- "white_tan",
- "black_med",
- "black_med",
- "black_dark",
- "asian",
- };
- const char *hair_list_3230D4[7] = {
- "facialhair_moustache",
- "facialhair_goatee",
- "facialhair_chinstrap",
- "facialhair_lightbeard",
- "facialhair_beard",
- "facialhair_chops",
- "facialhair_stubble",
- };
- const char *s_sManagerTexturePrefixes[3] = {
- "ManagerFormal",
- "StylishCoat",
- "Trainningjacket",
- };
- static int dword_17D658[4] = {0, 1, 1, 0};
- const char *aStorsoSPng_0 = "%storso_%s.png";
- const char *aDataModelsPlay = "data/models/player/textures/";
- static const char *off_3230BC[12] = {0};
- static uint32 dword_3A4ED4[4] = {FTTHash("gloves"), 0, 0, 0};
- TSATAnim_TSX* GetAnim(uint a1){
- return CGfxCharacter::s_pAnimLib->GetAnim(a1,true);
- }
- TSATAnim_TSX* GetLegAnim(uint a1){
- return CGfxCharacter::s_pAnimLib->GetAnim(a1,true);
-
- }
- //-------------------------------------------------------------------------------------------------
- //0017D450
- CGfxCharacter::CGfxCharacter(int i1, int i2, int i3, TPlayerInfo *tPlayerInfo4, CPlayer *cPlayer5, int i6, int i7) {
- }
- //-------------------------------------------------------------------------------------------------
- //0017DC4C
- CGfxCharacter::~CGfxCharacter() {
- }
- //-------------------------------------------------------------------------------------------------
- //0017D688 ^_^
- void CGfxCharacter::SetAnimation(int i1, float f2, int i3) {
- }
- //-------------------------------------------------------------------------------------------------
- //0017D69C
- void CGfxCharacter::SetupPlayer(TPlayerInfo *, bool, int, int) {
- }
- //-------------------------------------------------------------------------------------------------
- //0017DD78 ^_^
- void CGfxCharacter::SetTeamID(int a1) {
- }
- //-------------------------------------------------------------------------------------------------
- //0017DD80 //^_^
- void CGfxCharacter::Init() {
- }
- //-------------------------------------------------------------------------------------------------
- //0017DDC0 //^_^ 经过单元测试,功能正常
- void CGfxCharacter::SetMegaAtlasDims(int a0, int a1, int a2, int a3) {
- //LOGI("CGfxCharacter::SetMegaAtlasDims 0017DDC0 entry");
- }
- //-------------------------------------------------------------------------------------------------
- int dword_2FE414[] = {19, 40};
- //0017DEF4
- void CGfxCharacter::LoadDefaultModels() {
- //loc_17E522
- }
- //-------------------------------------------------------------------------------------------------
- //0017E5EC ^_^
- void CGfxCharacter::Shutdown() {
- }
- //-------------------------------------------------------------------------------------------------
- //0017E640
- void CGfxCharacter::DeleteDefaultModels() {
- }
- //-------------------------------------------------------------------------------------------------
- //0017E8DC ^_^
- void CGfxCharacter::SetLOD(int i1, int i2, int i3) {
- }
- //-------------------------------------------------------------------------------------------------
- //0017E8E6 ^_^
- void CGfxCharacter::SetKit(int i1) {
- }
- //-------------------------------------------------------------------------------------------------
- //0017E8EC ^_^
- void CGfxCharacter::SetBootsColour(EPlayerBoots epBoots1) {
- }
- //-------------------------------------------------------------------------------------------------
- //0017E904
- void CGfxCharacter::SetFaceType(int i1) {
- //empty
- }
- //-------------------------------------------------------------------------------------------------
- //0017E906 ^_^
- void CGfxCharacter::SetSkinColour(EPlayerSkinColour epsColour1, int i2) {
- }
- //-------------------------------------------------------------------------------------------------
- //0017E910 ^_-
- void CGfxCharacter::SetFacialHair(EPlayerFacialHair efHair1, EPlayerHairColour ehColour2) {
- }
- //-------------------------------------------------------------------------------------------------
- //0017E960
- void CGfxCharacter::SetHairColour(EPlayerHairColour a1) {
- }
- //-------------------------------------------------------------------------------------------------
- //0017E968 ^_^
- OfficialSkinHair_st *CGfxCharacter::GetOfficialSkinHair() {
- return nullptr;
- }
- //-------------------------------------------------------------------------------------------------
- //0017E984 ^_^
- void CGfxCharacter::UpdateUVs() {
- }
- //-------------------------------------------------------------------------------------------------
- //0017E9C0
- void CGfxCharacter::CreateAtlasTextures(TPlayerInfo *, int, int, int, int) {
- }
- //-------------------------------------------------------------------------------------------------
- //0017F3D4
- void CGfxCharacter::SetBodyXTexture(TPlayerInfo *tPlayerInfo1) {
- //loc_17F4CE
- }
- //-------------------------------------------------------------------------------------------------
- //0017F530 ^_^
- void CGfxCharacter::SetAnimationBlend(int i1, int i2, float f3, float f4, float f5, float f6, int i7, int i8) {
- }
- //-------------------------------------------------------------------------------------------------
- //0017F564 ^_^
- void CGfxCharacter::SetVerts(CFTTModel *cModel1) {
- }
- //-------------------------------------------------------------------------------------------------
- //0017F5B4
- void CGfxCharacter::GenerateSamples(TSATFrameSample *, TCharAnimSpec *) {
- }
- //-------------------------------------------------------------------------------------------------
- //0017F7D8
- // 0017F7D8
- // 0017F7D8
- uint32 CGfxCharacter::GetHeadRot() {
- CFTTVector32 result_spC;
- CFTTVector32 cfttVector32_sp0; //= { 0.0f,1.0f,0.0f };
- cfttVector32_sp0.float_0 = 0.0f;
- cfttVector32_sp0.float_4 = 1.0f;
- cfttVector32_sp0.float_8 = 0.0f;
- VectorMatrixMultiply(&result_spC, &cfttVector32_sp0, &m_SalMatrix_E4[2]); // (char *)this + 0x164);
- float s0 = result_spC.float_0 - m_SalMatrix_E4[2].d[3][0];
- float s2 = result_spC.float_4 - m_SalMatrix_E4[2].d[3][1];
- float s4 = result_spC.float_8 - m_SalMatrix_E4[2].d[3][2];
- result_spC.float_0 = s0;
- result_spC.float_4 = s2;
- result_spC.float_8 = s4;
- s2 = atan2f(s4, s0);
- s0 = (s2 * (float)8192.0) / (float)3.1416;
- return (0x2000 - (int)s0) & 0x3FFF;
- }
- //-------------------------------------------------------------------------------------------------
- //0017F864
- void CGfxCharacter::UpdateMatrix(CFTTMatrix32 *cMatrix32_1) {
- //0017F86E LDR.W R0, [R0,#0x9C]
- }
- //-------------------------------------------------------------------------------------------------
- //0017F91C
- void CGfxCharacter::UpdateMatrices(CFTTMatrix32 *cfttMatrix32_1) {
- //TFTTHierarchyHeader *var_DE8;
- //loc_17FA56
- /*.text:0017FA56
- .text:0017FA56 loc_17FA56 ; CODE XREF: CGfxCharacter::UpdateMatrices(CFTTMatrix32 *)+B6¡üj
- .text:0017FA56 ; CGfxCharacter::UpdateMatrices(CFTTMatrix32 *)+F4¡üj
- .text:0017FA56 ADD.W SP, SP, #0xDD0
- .text:0017FA5A POP.W {R4-R8,PC}
- .text:0017FA5A ; End of function CGfxCharacter::UpdateMatrices(CFTTMatrix32 *)*/
- }
- //-------------------------------------------------------------------------------------------------
- //0017FA70 ^_^
- void CGfxCharacter::SkinShadow() {
- }
- //-------------------------------------------------------------------------------------------------
- //0017FA76 ^_^
- void CGfxCharacter::SkinModels() {
- //locret_17FAB0
- }
- //-------------------------------------------------------------------------------------------------
- // 0017FAB8 ^_- 经过单元测试,功能正常(5,6两关 2022.02.20)
- void CGfxCharacter::RenderBatch(ESHADOWMAP_SAMPLING eShadowMap1, int i2) {
- // 0017FAD2
-
- if (eShadowMap1 == ESHADOWMAP_SAMPLING_1 || eShadowMap1 == ESHADOWMAP_SAMPLING_2) {
- if (eShadowMap1 == ESHADOWMAP_SAMPLING_1) {
- // loc_17FAEA
- CPlayerShader::s_tInstance.SetShadowMap(EPlayerShader_ShadowMap_1);
- } else if (eShadowMap1 == ESHADOWMAP_SAMPLING_2) {
- // 0017FAE4
- CPlayerShader::s_tInstance.SetShadowMap(EPlayerShader_ShadowMap_2);
- }
- // 0017FAF4
- if (CGfxShadowMapManager::ms_pManager->filed_20.ch[0]) {
- // 0017FAFA !!!
- int r0_index=CGfxShadowMapManager::ms_pManager->filed_20.ch[0];
- if(CGfxShadowMapManager::ms_pManager->filed_20.ch[0]>=1){
- r0_index=0;
- }
- CFTTTexParam tTexPar(CGfxShadowMapManager::ms_pManager->filed_4[r0_index]->GetTexture());
- CPlayerShader::s_tInstance.SetShadowMapTex(tTexPar);
- } else {
- // loc_17FB12
- CFTTTexParam tTexPar(((CGfxShadowMap*)(NULL))->GetTexture());
- CPlayerShader::s_tInstance.SetShadowMapTex(tTexPar);
- }
- } else {
- // loc_17FB08
-
- CPlayerShader::s_tInstance.SetShadowMap(EPlayerShader_ShadowMap_0);
- }
- // loc_17FB22
- CFTTModel *pCFTTModel_sp58 = m_BodyModles_4[m_lod_7c.m_lod1];
- CFTTModel *pCFTTModel_sp64 = m_HairModeles_18[m_lod_7c.m_lod2];
- CFTTModel *pCFTTModel_r9 = m_HeaderModles_2c[m_lod_7c.m_lod3];
- // 0017FB3C
- CGfxEnvironmentMap *r11_pCGfxEnvironmentMap = CGfxEnvironmentMap::Get();
- ETimeOfDay r5_eETimeOfDay;
- // 0017FB46
- if (r11_pCGfxEnvironmentMap->GetForced() == EEnvMapOverride_1) {
- // 0017FB4E
-
- r5_eETimeOfDay = ETimeOfDay_0;
- } else if (r11_pCGfxEnvironmentMap->GetForced() == EEnvMapOverride_2 ||
- r11_pCGfxEnvironmentMap->GetForced() == EEnvMapOverride_3) { // loc_17FB52
- // loc_17FB68
-
- r5_eETimeOfDay = ETimeOfDay_1;
- } else {
- // loc_18075E
- // eETimeOfDay_r5 = ETimeOfDay_1; // 00180764 此行是编译优化的结果不需要写出来 Anderson
- if (r11_pCGfxEnvironmentMap->GetForced() == EEnvMapOverride_4 ||
- tGame.mTLogic_6678.bisRunning_A9==0 ||
- CMatchSetup::ms_tInfo.eTimeOfDay_0) {
-
- r5_eETimeOfDay = ETimeOfDay_1; // 0018076C
- } else {
-
- r5_eETimeOfDay = ETimeOfDay_0; // 00180786
- }
- }
- // loc_17FB6A
- int ePlayerLightingQuality_44_sp70 = GFXSPEC_pSpecification->ePlayerLightingQuality_44;
- int var_C0_sp78;
- if (GFXSPEC_pSpecification->bFloatEnvMap_3E &&
- g_pGraphicsDevice->FloatTextureSupported() &&
- g_pGraphicsDevice->TextureLODSupported() &&
- CGfxEnvironmentMap::Get()->GetForced() != EEnvMapOverride_3 &&
- CGfxEnvironmentMap::Get()->GetForced() != EEnvMapOverride_4) {
- var_C0_sp78 = 1;
- CPlayerShader::s_tInstance.SetFloatingPoint(EPlayerShader_FloatingPoint_1);
- } else {
- // loc_17FBB0
- var_C0_sp78 = 0;
- CPlayerShader::s_tInstance.SetFloatingPoint(EPlayerShader_FloatingPoint_0);
- }
- CFTTTexture *pTexture_118_sp20;
- CFTTTexture *pTexture_114_sp24;
- CFTTTexture *pTexture_110_sp28;
- CFTTTexture *pTexture_108_sp30;
- CFTTTexture *pTexture_104_sp34;
- CFTTTexture *pTexture_100_sp38;
- CFTTTexture *pTexture_FC_sp3C;
- CFTTTexture *pTexture_F8_sp40;
- CFTTTexture *pTexture_F0_sp48;
- CFTTTexture *pTexture_EC_sp4C;
- CFTTTexture *pTexture_D0_sp68;
- CFTTTexture *pTexture_CC_sp6C;
- // 0017FBC0
- if (r5_eETimeOfDay != ETimeOfDay_0) {
-
- CPlayerShader::s_tInstance.SetModel(EPlayerShader_Model_1); // 0017FBD2
- CFTTTexParam aTexParam(r11_pCGfxEnvironmentMap->GetDiffuseEnv()); // 0017FBD8 !!!
- CPlayerShader::s_tInstance.SetDiffuseEnv(aTexParam); // 0017FBE6
- aTexParam.setTexture(r11_pCGfxEnvironmentMap->GetBRDFLUT());
- CPlayerShader::s_tInstance.SetBRDFLUT(aTexParam); // 0017FBF6
- pTexture_118_sp20 = nullptr;
- pTexture_114_sp24 = nullptr;
- pTexture_110_sp28 = nullptr;
- pTexture_108_sp30 = nullptr;
- pTexture_104_sp34 = nullptr;
- pTexture_100_sp38 = nullptr;
- pTexture_FC_sp3C = nullptr;
- pTexture_F8_sp40 = nullptr;
- pTexture_F0_sp48 = nullptr;
- pTexture_EC_sp4C = nullptr;
- pTexture_D0_sp68 = nullptr;
- pTexture_CC_sp6C = nullptr;
- } else {
- // loc_17FC28
-
- CPlayerShader::s_tInstance.SetModel(EPlayerShader_Model_0);
- pTexture_EC_sp4C = CPBRLighting::Get()->GetDiffuse(EPBRLightingMat_0); // 0017FC40
- pTexture_CC_sp6C = CPBRLighting::Get()->GetDiffuse(EPBRLightingMat_6); // 0017FC48
- pTexture_FC_sp3C = CPBRLighting::Get()->GetDiffuse(EPBRLightingMat_1); // 0017FC50
- pTexture_108_sp30 = CPBRLighting::Get()->GetDiffuse(EPBRLightingMat_2); // 0017FC58
- pTexture_F8_sp40 = CPBRLighting::Get()->GetDiffuse(EPBRLightingMat_3); // 0017FC60
- pTexture_100_sp38 = CPBRLighting::Get()->GetDiffuse(EPBRLightingMat_4); // 0017FC68
- // 0017FC70
- if (var_C0_sp78) {
- // 0017FC72
- pTexture_F0_sp48 = CPBRLighting::Get()->GetVersatile();
- pTexture_114_sp24 = CPBRLighting::Get()->GetVersatile();
- pTexture_110_sp28 = CPBRLighting::Get()->GetVersatile();
- pTexture_118_sp20 = CPBRLighting::Get()->GetVersatile();
- pTexture_104_sp34 = CPBRLighting::Get()->GetVersatile();
- pTexture_D0_sp68 = CPBRLighting::Get()->GetVersatile();
- } else {
- // loc_17FC9A
- pTexture_F0_sp48 = CPBRLighting::Get()->GetSpecular(EPBRLightingMat_0);
- pTexture_114_sp24 = CPBRLighting::Get()->GetSpecular(EPBRLightingMat_1);
- pTexture_110_sp28 = CPBRLighting::Get()->GetSpecular(EPBRLightingMat_2);
- pTexture_118_sp20 = CPBRLighting::Get()->GetSpecular(EPBRLightingMat_3);
- pTexture_104_sp34 = CPBRLighting::Get()->GetSpecular(EPBRLightingMat_4);
- pTexture_D0_sp68 = CPBRLighting::Get()->GetSpecular(EPBRLightingMat_6);
- }
- }
- // loc_17FCCE
- float fs16 = 0.449999988f;
- float fs18 = 0.550000012f;
- float fs20 = 0.550000012f;
- float fs22 = 0.200000003f;
- //sp7C=this
- //sp60=r9
- //sp54=r11
- if (tGame.mTLogic_6678.bisRunning_A9) { // 0017FCF2
- // 0017FCF6
- if (CMatchSetup::ms_tInfo.eWeather_4) {
- // 0017FD04
- fs20 = 0.5f;
- if (CMatchSetup::ms_tInfo.eWeather_4 == EWeather_2) {
- fs16 = 0.449999988f;
- fs18 = 0.550000012f;
- fs20 = 0.550000012f;
- fs22 = 0.200000003f;
- } else {
- fs16 = 0.400000006f;
- fs18 = 0.400000006f;
- fs22 = 0.100000001f;
- }
- }
- }
- // loc_17FD7C
- float fr9 = powf(fs20, 3.0f);
- CFTTVector32x4 tVec32_60_spD8;
- tVec32_60_spD8.my[0] = fs20; // 0017FD9C
- float s_30 = 1.0f / (fr9 + fr9);
- tVec32_60_spD8.my[2] = s_30 * 0.75f;
- tVec32_60_spD8.my[1] = fs22;
-
- tVec32_60_spD8.my[3] = powf(fs20, 0.10000000149f);
- CFTTVector32x4 tVec32_78_spC0;
- tVec32_78_spC0.my[0] = 0.400000006f; // 0017FDAE
- tVec32_78_spC0.my[1] = 0.009999999776f;
- tVec32_78_spC0.my[2] = 7.812499523163f;
- tVec32_78_spC0.my[3] = 0.912443518639f;
- CFTTVector32x4 tVec32_88_spB0;
- tVec32_88_spB0.my[0] = fs20; // 0017FDCC
- tVec32_88_spB0.my[1] = fs22;
- tVec32_88_spB0.my[2] = 1.0f / (powf(fs20, 3.0f) + powf(fs20, 3.0f));
- tVec32_88_spB0.my[3] = powf(fs20, 0.10000000149f);
- CFTTVector32x4 tVec32_98_spA0;
- tVec32_98_spA0.my[0] = fs20; // 0017FDF6
- tVec32_98_spA0.my[1] = fs22;
- tVec32_98_spA0.my[2] = 1.0f / (powf(fs20, 3.0f) + powf(fs20, 3.0f));
- tVec32_98_spA0.my[3] = powf(fs20, 0.10000000149f);
- CFTTVector32x4 tVec32_A8_sp90;
- tVec32_A8_sp90.my[0] = fs18; // 0017FE2C
- tVec32_A8_sp90.my[1] = 0.028000000864f;
- tVec32_A8_sp90.my[2] = 1.0f / (powf(fs18, 3.0f) + powf(fs18, 3.0f));
- tVec32_A8_sp90.my[3] = powf(fs18, 0.10000000149f);
- CFTTVector32x4 tVec32_B8_sp80;
- tVec32_B8_sp80.my[0] = fs16; // 0017FE58
- tVec32_B8_sp80.my[1] = 0.028000000864f;
- tVec32_B8_sp80.my[2] = 1.0f / (powf(fs16, 3.0) + powf(fs16, 3.0));
- tVec32_B8_sp80.my[3] = powf(fs16, 0.100000001f);
- // 0017FE66
- fs22= tVec32_A8_sp90.my[2];
- float fs26 = 1.0f / (powf(fs16, 3.0) + powf(fs16, 3.0));
- if (ePlayerLightingQuality_44_sp70 <= 0) {
- // 0017FE72
- fs22 = fs22 * 0.75f;
- fs26 = fs26 * 0.75f;
- tVec32_60_spD8.my[2] = tVec32_60_spD8.my[2]* 0.75f;
- tVec32_78_spC0.my[2] = 5.859374523163f;
- tVec32_88_spB0.my[2] = tVec32_88_spB0.my[2] * 0.75f;
- tVec32_98_spA0.my[2] = tVec32_98_spA0.my[2] * 0.75f;
- tVec32_A8_sp90.my[2] = fs22;
- tVec32_B8_sp80.my[2] = fs26;
- }
- // loc_17FE9E
- if (CMatchSetup::ms_tInfo.eWeather_4 == EWeather_1) {
- tVec32_A8_sp90.my[2] = fs22 * 0.25f;
- fs22=tVec32_A8_sp90.my[2];
- }
- float flt_2FEF3C[7] = {8.0f, 8.0f, 8.0f, 8.0f, 8.0f, 8.0f, 0.0f};
- float flt_2FDEA8[8] = {1.0f, 1.0f, 1.0f, 0.5f, 0.75f, 0.75f, 0.5f, 0.25f};
- if ((r5_eETimeOfDay & var_C0_sp78) == 1) { // 0017FEC4
- // 0017FEC8
- tVec32_60_spD8.my[0] = sqrtf(fs20); // 0017FEE4
- tVec32_78_spC0.my[0] = 0.632455527782f; // 0017FEF6
- tVec32_88_spB0.my[0] = tVec32_60_spD8.my[0]; // 0017FF08
- tVec32_98_spA0.my[0] = tVec32_60_spD8.my[0]; // 0017FF24
- tVec32_A8_sp90.my[0] = sqrtf(fs18); // 0017FF40
- tVec32_B8_sp80.my[0] = sqrtf(fs16); // 0017FF68
-
- tVec32_60_spD8.my[2] = 0.75f;
- tVec32_78_spC0.my[2] = 1.0f;
- tVec32_88_spB0.my[2] = 1.0f;
- tVec32_98_spA0.my[2] = 1.0f;
- tVec32_A8_sp90.my[2] = flt_2FEF3C[m_Skincolor1_B8C] * 1.25f;
- tVec32_B8_sp80.my[2] = flt_2FDEA8[m_HairColour_BA4];
- } else {
- // loc_17FF94
- tVec32_A8_sp90.my[2] = flt_2FEF3C[m_Skincolor1_B8C] * fs22;
- tVec32_B8_sp80.my[2] = flt_2FDEA8[m_HairColour_BA4] * fs26;
- }
- // loc_17FFC4
- EPlayerShader_Bin r1_eShader = EPlayerShader_Bin_8;
- int i_r6 = m_Materials_C24[2];
- typedef void (*pfun)(void *, CFTTModel *, int, const CFTTMatrix32 *);
- pfun pFunc_10C_sp2C = NULL;
- // 0017FFD4
- if (GFXSPEC_pSpecification->bDynNormMap_3F) {
- // 0017FFD6
- if ((int)m_lod_7c.m_lod1 < 2) {
- pFunc_10C_sp2C = CGfxDynNormMap::PostSkinCB;
- r1_eShader = EPlayerShader_Bin_3;
- }
- } else {
- // loc_18001C
- pFunc_10C_sp2C = NULL;
- }
- // loc_180020
- CPlayerShader::s_tInstance.SetBin(r1_eShader, i_r6);
- CFTTTexParam tTexParam; // !!!
- tTexParam.setDataEx(m_KitTextureID_B94);
- CPlayerShader::s_tInstance.SetDiffuse(tTexParam, i_r6); // 00180052
- tTexParam.setDataEx(CGfxCharacter::s_iKitSpecularTexture); // !!!
- CPlayerShader::s_tInstance.SetSpecular(tTexParam, i_r6); // 0018006E
- tTexParam.setDataEx(CGfxCharacter::s_iKitDynamicNormalTexture); // !!!
- CPlayerShader::s_tInstance.SetNormal(tTexParam, i_r6); // 0018008C
- tTexParam.setDataEx(CGfxCharacter::s_iKitDynamicAmbientTexture); // !!!
- CPlayerShader::s_tInstance.SetAmbient(tTexParam, i_r6); // 001800AA
- tTexParam.setTexture(pTexture_EC_sp4C); // !!!
- CPlayerShader::s_tInstance.SetDiffRimLightLUT(tTexParam, i_r6); // 001800B6
- tTexParam.setTexture(pTexture_F0_sp48);
- CPlayerShader::s_tInstance.SetSpecLightLUT(tTexParam, i_r6); // 001800C2
- CPlayerShader::s_tInstance.SetPBR(tVec32_60_spD8, i_r6); // 001800CC
- int i_cc0 = m_Materials_C24[3];
- tTexParam.setDataEx(CGfxCharacter::m_KitTextureID_B94); // !!!
- CPlayerShader::s_tInstance.SetDiffuse(tTexParam, m_Materials_C24[3]); // 001800EA
- tTexParam.setTexture(pTexture_CC_sp6C); // !!!
- CPlayerShader::s_tInstance.SetDiffRimLightLUT(tTexParam, m_Materials_C24[3]); // 001800F4
- tTexParam.setTexture(pTexture_D0_sp68); // !!!
- CPlayerShader::s_tInstance.SetSpecLightLUT(tTexParam, m_Materials_C24[3]); // 00180100
- int i_sp44 = i_cc0;
- CPlayerShader::s_tInstance.SetPBR(tVec32_78_spC0, m_Materials_C24[3]); // 0018010C
- //int i_c28 = m_Materials_C24[1];
- tTexParam.setDataEx(m_UnknowTexture_BB4); // !!!
- CPlayerShader::s_tInstance.SetDiffuse(tTexParam, m_Materials_C24[1]); // 00180132
- int r5_i = m_UnknowType_A4 - 1;
- // 00180134
- if (r5_i >= 2) // 3
- r5_i = 2;
- else if (r5_i < 0)
- r5_i = 0;
- //最终r5_i只有可能是 2, 1, 0
- tTexParam.setDataEx(CGfxCharacter::s_iManagerSpecularTextures[r5_i]); // !!!
- CPlayerShader::s_tInstance.SetSpecular(tTexParam, m_Materials_C24[1]); // 0018015C
- tTexParam.setDataEx(CGfxCharacter::s_iManagerNormalTextures[r5_i]); // !!!
- CPlayerShader::s_tInstance.SetNormal(tTexParam, m_Materials_C24[1]); // 0018017C
- tTexParam.setDataEx(CGfxCharacter::s_iManagerAmbientTextures[r5_i]); // !!!
- CPlayerShader::s_tInstance.SetAmbient(tTexParam, m_Materials_C24[1]); // 0018019C
- if (((uint)(m_UnknowType_A4 - 1)) <= 1) {
- LOGE("CGfxCharacter::RenderBatch_29");
- tTexParam.setTexture(pTexture_F8_sp40);
- CPlayerShader::s_tInstance.SetDiffRimLightLUT(tTexParam, m_Materials_C24[1]); // 001801B6
- tTexParam.setTexture(pTexture_118_sp20);
- CPlayerShader::s_tInstance.SetSpecLightLUT(tTexParam, m_Materials_C24[1]); // 001801C2
- CPlayerShader::s_tInstance.SetPBR(tVec32_88_spB0, m_Materials_C24[1]);
- } else {
-
- // loc_1801EC
- tTexParam.setTexture(pTexture_100_sp38);
- CPlayerShader::s_tInstance.SetDiffRimLightLUT(tTexParam, m_Materials_C24[1]);
- tTexParam.setTexture(pTexture_104_sp34);
- CPlayerShader::s_tInstance.SetSpecLightLUT(tTexParam, m_Materials_C24[1]);
- CPlayerShader::s_tInstance.SetPBR(tVec32_98_spA0, m_Materials_C24[1]);
- }
- // 0018020E
- tTexParam.setDataEx(m_UnknowTexture_BB4); // !!!
- CPlayerShader::s_tInstance.SetDiffuse(tTexParam, m_Materials_C24[0]); // 00180230
- tTexParam.setDataEx(CGfxCharacter::s_iTorsoNormalTexture); // !!!
- CPlayerShader::s_tInstance.SetNormal(tTexParam, m_Materials_C24[0]); // 00180254
- tTexParam.setDataEx(CGfxCharacter::s_iTorsoSpecularTexture); // !!!
- CPlayerShader::s_tInstance.SetSpecular(tTexParam, m_Materials_C24[0]); // 00180278
- tTexParam.setTexture(pTexture_FC_sp3C);
- CPlayerShader::s_tInstance.SetDiffRimLightLUT(tTexParam, m_Materials_C24[0]); // 00180290
- tTexParam.setTexture(pTexture_114_sp24);
- CPlayerShader::s_tInstance.SetSpecLightLUT(tTexParam, m_Materials_C24[0]); // 001802A6
- CPlayerShader::s_tInstance.SetPBR(tVec32_A8_sp90, m_Materials_C24[0]); // 001802B6
- tTexParam.setTexture(GetMegaTexture()); // 001802BE
- CPlayerShader::s_tInstance.SetDiffuse(tTexParam, m_Materials_C24[5]); // 001802CA
- tTexParam.setDataEx(CGfxCharacter::s_iAtlasNormalTexture); // !!!
- CPlayerShader::s_tInstance.SetNormal(tTexParam, m_Materials_C24[5]); // 001802EC
- tTexParam.setDataEx(CGfxCharacter::s_iAtlasSpecularTexture); // !!!
- CPlayerShader::s_tInstance.SetSpecular(tTexParam, m_Materials_C24[5]); // 0018030C
- tTexParam.setDataEx(m_AtlasAmbientTexture_B98 ); // !!!
- CPlayerShader::s_tInstance.SetAmbient(tTexParam, m_Materials_C24[5]); // 00180326
- tTexParam.setTexture(pTexture_FC_sp3C);
- CPlayerShader::s_tInstance.SetDiffRimLightLUT(tTexParam, m_Materials_C24[5]); // 00180336
- tTexParam.setTexture(pTexture_114_sp24);
- CPlayerShader::s_tInstance.SetSpecLightLUT(tTexParam, m_Materials_C24[5]); // 00180342
- CPlayerShader::s_tInstance.SetPBR(tVec32_A8_sp90, m_Materials_C24[5]); // 0018034E
- // int v86 = m_Materials_C24[4];
- tTexParam.setTexture(GetMegaTexture()); // 00180358
- CPlayerShader::s_tInstance.SetDiffuse(tTexParam, m_Materials_C24[4]); // 00180364
- // tTexParam.setTexture(GetMegaTexture()); // 00180358
- // CPlayerShader::s_tInstance.SetDiffRimLightLUT(tTexParam, m_Materials_C24[4]); // 00180364
- tTexParam.setTexture(pTexture_CC_sp6C);
- CPlayerShader::s_tInstance.SetDiffRimLightLUT(tTexParam, m_Materials_C24[4]); // 0018036E
- tTexParam.setTexture(pTexture_D0_sp68);
- CPlayerShader::s_tInstance.SetSpecLightLUT(tTexParam, m_Materials_C24[4]); // 00180378
- CPlayerShader::s_tInstance.SetPBR(tVec32_78_spC0, m_Materials_C24[4]); // 00180380
- tTexParam.setDataEx(s_iHairMegaTexture); // !!!
- CPlayerShader::s_tInstance.SetDiffuse(tTexParam, m_Materials_C24[6]); // 001803AA
- tTexParam.setDataEx(CGfxCharacter::s_iHairNormalTexture); // !!!
- CPlayerShader::s_tInstance.SetNormal(tTexParam, m_Materials_C24[6]); // 001803CC
- tTexParam.setDataEx(CGfxCharacter::s_iHairSpecularTexture); // !!!
- CPlayerShader::s_tInstance.SetSpecular(tTexParam, m_Materials_C24[6]); // 001803EC
- tTexParam.setTexture(pTexture_108_sp30);
- CPlayerShader::s_tInstance.SetDiffRimLightLUT(tTexParam, m_Materials_C24[6]); // 001803F8
- tTexParam.setTexture(pTexture_110_sp28);
- CPlayerShader::s_tInstance.SetSpecLightLUT(tTexParam, m_Materials_C24[6]); // 00180406
- CPlayerShader::s_tInstance.SetPBR(tVec32_B8_sp80, m_Materials_C24[6]); // 0018040E
- tTexParam.setTexture(r11_pCGfxEnvironmentMap->GetSpecularEnv(EPBRLightingMat_0)); // 0018041E
- CPlayerShader::s_tInstance.SetSpecularEnv(tTexParam, m_Materials_C24[2]); // 00180430
- tTexParam.setTexture(r11_pCGfxEnvironmentMap->GetSpecularEnv(EPBRLightingMat_0));
- CPlayerShader::s_tInstance.SetSpecularEnv(tTexParam, i_sp44); // 00180442
- tTexParam.setTexture(r11_pCGfxEnvironmentMap->GetSpecularEnv(EPBRLightingMat_1)); // 00180448
- CPlayerShader::s_tInstance.SetSpecularEnv(tTexParam, m_Materials_C24[5]); // 00180454
- tTexParam.setTexture(r11_pCGfxEnvironmentMap->GetSpecularEnv(EPBRLightingMat_0)); // 0018045A
- CPlayerShader::s_tInstance.SetSpecularEnv(tTexParam, m_Materials_C24[4]); // 00180466
- tTexParam.setTexture(r11_pCGfxEnvironmentMap->GetSpecularEnv(EPBRLightingMat_2)); // 0018046C
- CPlayerShader::s_tInstance.SetSpecularEnv(tTexParam, m_Materials_C24[6]); // 0018047C
- tTexParam.setTexture(r11_pCGfxEnvironmentMap->GetSpecularEnv(EPBRLightingMat_0));
- CPlayerShader::s_tInstance.SetSpecularEnv(tTexParam, m_Materials_C24[1]); // 0018048E
- tTexParam.setTexture(r11_pCGfxEnvironmentMap->GetSpecularEnv(EPBRLightingMat_0));
- CPlayerShader::s_tInstance.SetSpecularEnv(tTexParam, m_Materials_C24[0]); // 001804A2
- CGfxPlayer::SetupBatchConstants(); // 001804A8
- for (int ir4 = 0; ir4 != 8; ir4++) { // loc_1804EA
- // 001804DC
-
- GFXPLAYER_spBatchBins[ir4]->SetMaterialID(m_Materials_C24[ir4]);
- }
- // 001804F4
- GFXPLAYER_spBatchBins[7]->SetMaterialID(m_Materials_C24[6]);
- // 00180500
- int d_sp70 = i2 + 1;
- // 001804F4
- TFTTCacheInstance pTFTTCacheLookup_0;
- pTFTTCacheLookup_0.ci_0 = (uint8)i2;
- pTFTTCacheLookup_0.ci_1 = 0;
- if (i2 == -1) {
- LOGE("CGfxCharacter::RenderBatch_34");
- pTFTTCacheLookup_0.ci_0 = pTFTTCacheLookup_0.ci_0;
- pTFTTCacheLookup_0.ci_1 = 0xff;
- }
- GFXPLAYER_pBatch->AddModel(pCFTTModel_sp58,
- m_SalMatrix_E4,
- m_BodyUV_40[m_lod_7c.m_lod1],
- pTFTTCacheLookup_0, // sp 138
- 2, // sp 134
- -1, // sp 130
- pFunc_10C_sp2C, // sp 12C
- nullptr); // 00180558
- GFXPLAYER_pBatch->AddModel(pCFTTModel_sp58,
- m_SalMatrix_E4,
- m_BodyUV_40[m_lod_7c.m_lod1],
- pTFTTCacheLookup_0,
- 3,
- -1,
- nullptr,
- nullptr); // 0018057A
- GFXPLAYER_pBatch->AddModel(pCFTTModel_sp58,
- m_SalMatrix_E4,
- m_BodyUV_40[m_lod_7c.m_lod1],
- pTFTTCacheLookup_0,
- 5,
- -1,
- nullptr,
- nullptr); // 0018059C
- GFXPLAYER_pBatch->AddModel(pCFTTModel_sp58,
- m_SalMatrix_E4,
- m_BodyUV_40[m_lod_7c.m_lod1],
- pTFTTCacheLookup_0,
- 4,
- -1,
- nullptr,
- nullptr); // 001805BE
- GFXPLAYER_pBatch->AddModel(pCFTTModel_sp58,
- m_SalMatrix_E4,
- m_BodyUV_40[m_lod_7c.m_lod1],
- pTFTTCacheLookup_0,
- 0,
- -1,
- nullptr,
- nullptr); // 001805DE
- GFXPLAYER_pBatch->AddModel(pCFTTModel_sp58,
- m_SalMatrix_E4,
- m_BodyUV_40[m_lod_7c.m_lod1],
- pTFTTCacheLookup_0,
- 1,
- -1,
- nullptr,
- nullptr); // 00180606
- int i_CC_sp6C = GFXPLAYER_spBatchBins[6]->GetDrawCalls(); // 00180610
- int ir8 = GFXPLAYER_spBatchBins[7]->GetDrawCalls(); // 0018061A
- if (m_HeaderModles_2c[m_lod_7c.m_lod3] != nullptr) {
- TFTTCacheInstance tCacheLookup;
- tCacheLookup.ci_0 = 0;
- tCacheLookup.ci_1 = 0xFF;
- if (i2 != -1) {
- tCacheLookup.ci_0 = 0;
- tCacheLookup.ci_1 = 0x1;
- }
- tCacheLookup.ci_0 |=pTFTTCacheLookup_0.ci_0;
- tCacheLookup.ci_1 |=pTFTTCacheLookup_0.ci_1;
- GFXPLAYER_pBatch->AddModel(m_HeaderModles_2c[m_lod_7c.m_lod3],
- m_SalMatrix_E4,
- m_HeaderUV_68[m_lod_7c.m_lod3],
- tCacheLookup,
- -1,
- -1,
- nullptr,
- nullptr); // 00180654
- }
- // loc_180658
- if (m_HairModeles_18[m_lod_7c.m_lod2] != nullptr) {
- TFTTCacheInstance tCacheLookup;
- tCacheLookup.ci_0 = 0xff;
- tCacheLookup.ci_1 = 0xff;
- GFXPLAYER_pBatch->AddModel(m_HairModeles_18[m_lod_7c.m_lod2],
- m_SalMatrix_E4,
- m_HairUV_54[m_lod_7c.m_lod2],
- tCacheLookup,
- -1,
- -1,
- nullptr,
- nullptr);
- }
- // loc_180684
- if (GFXRENDER_bIsDepthPass || GFXRENDER_bIsBlackDepthPass) {
- // 00180698
-
- int ir6 = GFXPLAYER_spBatchBins[6]->GetDrawCalls(); // 0018069C
- int ir5 = GFXPLAYER_spBatchBins[7]->GetDrawCalls(); // 001806A6
- if (i_CC_sp6C != ir6 && ir6 != 0) {
- // 001806B6
- LOGE("CGfxCharacter::RenderBatch_38");
- int ir4 = GFXPLAYER_spBatchBins[6]->GetLastMatID();
- CLinearDepthShader::s_tInstance.SetSource(ELinearDepthShader_Source_1, ir4);
- // 001806D6
- tTexParam.setDataEx(CGfxCharacter::s_iHairMegaTexture);
- CLinearDepthShader::s_tInstance.SetDiffuseMaterial(tTexParam, ir4);
- }
- // loc_1806F2
- if (ir8 != ir5 && ir5 != 0) {
- // 001806FA
- LOGE("CGfxCharacter::RenderBatch_39");
- int ir4 = GFXPLAYER_spBatchBins[7]->GetLastMatID(); // 001806FE
- CLinearDepthShader::s_tInstance.SetSource(ELinearDepthShader_Source_1, ir4);
- tTexParam.setDataEx(CGfxCharacter::s_iHairMegaTexture);
- CLinearDepthShader::s_tInstance.SetDiffuseMaterial(tTexParam, ir4);
- }
- }
- // loc_180730
- if (CGfxPlayer::ms_iNumHairMats <= 32) {
- CGfxPlayer::ms_iHairMatList[CGfxPlayer::ms_iNumHairMats++] = m_Materials_C24[6];
- }
- }
- //-------------------------------------------------------------------------------------------------
- //00180860 ^_^
- CFTTTexture *CGfxCharacter::GetMegaTexture() {
- LOGE("CGfxCharacter::GetMegaTexture");
- return (CFTTTexture *)rand();
- }
- //-------------------------------------------------------------------------------------------------
- //001808AC ^_- 经过单元测试,功能正常
- void CGfxCharacter::RenderShadowBatch(int i1) {
- //loc_1809B6
- }
- //-------------------------------------------------------------------------------------------------
- //001809C8 ^_^
- void CGfxCharacter::CreateMippedMegaTexture() {
- return;
- }
- //-------------------------------------------------------------------------------------------------
- //00180A30 ^_^
- void CGfxCharacter::SkinProp() {
- }
- //-------------------------------------------------------------------------------------------------
- //00180A64 ^_- 经过单元测试,功能正常
- void CGfxCharacter::RenderProp(CFTTMatrix32 &cfttMatrix32_1) {
- }
- //-------------------------------------------------------------------------------------------------
- //00180B20
- void CGfxCharacter::RenderShadow(CFTTMatrix32 *cMatrix32_1) {
- }
- //-------------------------------------------------------------------------------------------------
- //00180B70 ^_^
- void CGfxCharacter::GetInfo(CFTTModel *&cModel_1, CFTTMatrix32 &cMatrix32_2) {
- //00180B84 LDR.W R2, [R2,R3,LSL#2]
- }
- //-------------------------------------------------------------------------------------------------
- //00180BD4 ^_^
- void CGfxCharacter::ResetShadowMatrix() {
- }
- //-------------------------------------------------------------------------------------------------
- //00180BF0 ^_^
- void CGfxCharacter::LockVertexBuffers() {
- }
- //-------------------------------------------------------------------------------------------------
- //00180C00 ^_^
- void CGfxCharacter::UnlockVertexBuffers() {
- }
- //-------------------------------------------------------------------------------------------------
- //00180C0C
- int CGfxCharacter::UpdateAnimation(bool b1) {
- return 1;
- }
- //-------------------------------------------------------------------------------------------------
- //00180E00 ^_- 经过单元测试,功能正常
- int CGfxCharacter::GetUVScale(TBinUVScale *uvScale, int i2) {
- return 1;
- }
- //-------------------------------------------------------------------------------------------------
- //00180F28
- void CGfxCharacter::UpdateUVs(CFTTModel **cModel1, int i2, TUV **tuv3) {
- }
- //-------------------------------------------------------------------------------------------------
- //00181148 ^_^
- void CGfxCharacter::SetPlayerIsKeeper(bool a1) {
- }
- //-------------------------------------------------------------------------------------------------
- //0018114E ^_^
- void CGfxCharacter::UpdateBlinking() {
- }
- //-------------------------------------------------------------------------------------------------
- //00181188
- void CGfxCharacter::Blink(bool b1) {
- }
- //-------------------------------------------------------------------------------------------------
- //00181374 ^_^
- void CGfxCharacter::GetHeadInfo(int i1, CFTTModel *&cModel2, CFTTModel *&cModel3, TUV *&tuv4, TUV *&tuv5, int &i6, EPlayerSkinColour &eColor7) {
- }
- //-------------------------------------------------------------------------------------------------
- /*
- --------------------------------------------------------------------------
- 2021.12.17 这几个函数分配给八哥,做外包
- 2021.12.20 八哥完成这几个函数
- 0017e910 CGfxCharacter::SetFacialHair 24
- 0017f564 CGfxCharacter::SetVerts 26
- 00180b20 CGfxCharacter::RenderShadow 28
- 0017e5ec CGfxCharacter::Shutdown 30
- 00180b70 CGfxCharacter::GetInfo 33
- 0017f7d8 CGfxCharacter::GetHeadRot 38
- 001809c8 CGfxCharacter::CreateMippedMegaTexture 41
- 0017f864 CGfxCharacter::UpdateMatrix 47
- 2021.12.20 这几个函数分配给八哥,做外包
- 0017e904 CGfxCharacter::SetFaceType 1
- 0017e960 CGfxCharacter::SetHairColour 2
- 0017e8e6 CGfxCharacter::SetKit 2
- 00181148 CGfxCharacter::SetPlayerIsKeeper 2
- 0017dd78 CGfxCharacter::SetTeamID 2
- 0017fa70 CGfxCharacter::SkinShadow 2
- 0017e8dc CGfxCharacter::SetLOD 3
- 0017e906 CGfxCharacter::SetSkinColour 3
- 00180c00 CGfxCharacter::UnlockVertexBuffers 4
- 00180bf0 CGfxCharacter::LockVertexBuffers 5
- 0017d688 CGfxCharacter::SetAnimation 5
- 0017e8ec CGfxCharacter::SetBootsColour 7
- 0017e968 CGfxCharacter::GetOfficialSkinHair 8
- 00180bd4 CGfxCharacter::ResetShadowMatrix 9
- 00180860 CGfxCharacter::GetMegaTexture 13
- 0017f530 CGfxCharacter::SetAnimationBlend 14
- 00180a30 CGfxCharacter::SkinProp 19
- 0017dd80 CGfxCharacter::Init 20
- 0017fa76 CGfxCharacter::SkinModels 21
- 0018114e CGfxCharacter::UpdateBlinking 21
- 00181374 CGfxCharacter::GetHeadInfo 22
- 0017e984 CGfxCharacter::UpdateUVs 22
- 00180a64 CGfxCharacter::RenderProp 58
- 00180e00 CGfxCharacter::GetUVScale 90
- 001808ac CGfxCharacter::RenderShadowBatch 97
- --------------------------------------------------------------------------
- 未分配
- 0017f3d4 CGfxCharacter::SetBodyXTexture 104
- 0017f91c CGfxCharacter::UpdateMatrices 106
- 0017ddc0 CGfxCharacter::SetMegaAtlasDims 107
- 00180f28 CGfxCharacter::UpdateUVs 109
- 0017dc4c CGfxCharacter::~CGfxCharacter 114
- 00181188 CGfxCharacter::Blink 130
- 00180c0c CGfxCharacter::UpdateAnimation 151
- 0017f5b4 CGfxCharacter::GenerateSamples 168
- 0017d450 CGfxCharacter::CGfxCharacter 177
- 0017e640 CGfxCharacter::DeleteDefaultModels 237
- 0017d69c CGfxCharacter::SetupPlayer 489
- 0017def4 CGfxCharacter::LoadDefaultModels 614
- 0017e9c0 CGfxCharacter::CreateAtlasTextures 712
- 0017fab8 CGfxCharacter::RenderBatch 1208
- */
|