|
@@ -1,27 +1,30 @@
|
|
|
+#include "CGFXSpec.h"
|
|
|
#include "CGfxCrowd.h"
|
|
|
|
|
|
#include "CCrowdNewShader.h"
|
|
|
-#include "CFTTGraphicsDevice.h"
|
|
|
+#include "CFTTBatchModelManager.h"
|
|
|
+#include "CFTTCamera.h"
|
|
|
#include "CFTTMaterialManager.h"
|
|
|
+#include "CFTTShaderBuiltInConstants.h"
|
|
|
#include "CFTTTextureManager.h"
|
|
|
#include "CGaussianNewShader.h"
|
|
|
-#include "CGfxCharacter.h"
|
|
|
#include "CGfxEnvironmentMap.h"
|
|
|
#include "CGfxKits.h"
|
|
|
#include "CGfxPlayer.h"
|
|
|
#include "CGraphicsTexLoadOptions.h"
|
|
|
#include "CModelManager.h"
|
|
|
-#include "CPBRLighting.h"
|
|
|
#include "CPlayerShader.h"
|
|
|
-#include "FTTALG.h"
|
|
|
+#include "FTT2D.h"
|
|
|
#include "GFXSCENE.h"
|
|
|
#include "Matrix.h"
|
|
|
#include "TGame.h"
|
|
|
#include "XSYS.h"
|
|
|
#include "memctrl.h"
|
|
|
CGfxCrowd *CGfxCrowd::ms_pInstance = nullptr;
|
|
|
-uchar byte_2FEFF4[15] = {5, 4, 0, 0xC, 1, 5, 4, 0, 0xC, 1, 3, 2, 0, 3, 3};
|
|
|
-uchar byte_2FF003[180] = {
|
|
|
+
|
|
|
+MYCONST uchar byte_2FDF94[] = {0, 0, 0, 0, 1, 1, 1, 1, 3, 3, 3, 3, 4, 4, 4, 4};
|
|
|
+MYCONST uchar byte_2FEFF4[15] = {5, 4, 0, 0xC, 1, 5, 4, 0, 0xC, 1, 3, 2, 0, 3, 3};
|
|
|
+MYCONST uchar byte_2FF003[180] = {
|
|
|
3, 3, 0xE, 0xE, 0x10, 0, 0, 0, 0, 0, 0, 0, 2, 3, 6,
|
|
|
0x11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
0, 0, 0, 0, 0, 0, 0, 1, 5, 4, 7, 8, 9, 0xA, 0xC,
|
|
@@ -35,14 +38,86 @@ uchar byte_2FF003[180] = {
|
|
|
0, 0, 0, 0, 0, 0, 3, 4, 0xA, 0, 0, 0, 0, 0, 0,
|
|
|
0, 0, 0, 3, 4, 0xA, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
|
|
|
|
|
+MYCONST uchar byte_2FF0B7[] = {0x12, 0x13, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
|
|
+
|
|
|
+MYCONST uchar byte_2FF0C3[] = {0, 0, 0, 0, 0};
|
|
|
+MYCONST int dword_2FF0C8[] = {0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2,
|
|
|
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2};
|
|
|
|
|
|
-uchar byte_2FDF94[] = {0, 0, 0, 0, 1, 1, 1, 1, 3, 3, 3, 3, 4, 4, 4, 4};
|
|
|
+struct byte5 {
|
|
|
+ uchar b_0;
|
|
|
+ uchar b_1;
|
|
|
+ uchar b_2;
|
|
|
+ uchar b_3;
|
|
|
+ uchar b_4;
|
|
|
+};
|
|
|
+MYCONST byte5 byte5_2FF148[] = {
|
|
|
+ {5, 4, 0, 0xC, 1}, {5, 4, 0, 0xC, 1}, {2, 2, 2, 0, 0}};
|
|
|
|
|
|
-struct Unknow_4630E0
|
|
|
-{
|
|
|
+MYCONST uchar byte_2FF157[] = {
|
|
|
+ 3, 6, 0xE, 0xE, 0x10, 0, 0, 0, 0, 0, 0, 0, 2, 3, 6, 0x11, 0, 0, 0, 0,
|
|
|
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5, 4,
|
|
|
+ 7, 8, 9, 0xA, 0xC, 0xD, 0xE, 0xF, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
+ 3, 6, 0xE, 0xE, 0x10, 0, 0, 0, 0, 0, 0, 0, 2, 3, 6, 0x11, 0, 0, 0, 0,
|
|
|
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5, 4,
|
|
|
+ 7, 8, 9, 0xA, 0xC, 0xD, 0xE, 0xF, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
+ 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0,
|
|
|
+ 0, 0, 0, 0, 4, 0xA, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
+ 0};
|
|
|
+struct Unknow_4630E0 {
|
|
|
uchar byte_4630E0[8];
|
|
|
uchar byte_4630E8[0x10];
|
|
|
} t_4630e0;
|
|
|
+//0019ED8C ^_-
|
|
|
+//单元测试等级: 游戏运行正常
|
|
|
+//单元测试内容: 启动游戏到第10关
|
|
|
+//单元测试结果: 正常
|
|
|
+void sub_19ED8C(CFTTMatrix32 &r0_pmatrix, CFTTVector32 *r1_pvector32,
|
|
|
+ CFTTVector32 *r2_pvector32, CFTTVector32 *r3_pvector32,
|
|
|
+ CFTTVector32 *sp0_pvector32) {
|
|
|
+ // r12=sp0_pvector32
|
|
|
+ float s2_f = sp0_pvector32->float_0 - r3_pvector32->float_0;
|
|
|
+ float s0_f = r2_pvector32->float_0 - r1_pvector32->float_0;
|
|
|
+ r0_pmatrix.d[0][0] = s2_f / s0_f;
|
|
|
+ r0_pmatrix.d[0][1] = 0;
|
|
|
+ r0_pmatrix.d[1][0] = 0;
|
|
|
+ r0_pmatrix.d[2][0] = 0;
|
|
|
+ s2_f = r3_pvector32->float_0 * r2_pvector32->float_0 -
|
|
|
+ sp0_pvector32->float_0 * r1_pvector32->float_0;
|
|
|
+ s0_f = r2_pvector32->float_0 - r1_pvector32->float_0;
|
|
|
+ r0_pmatrix.d[3][0] = s2_f / s0_f;
|
|
|
+
|
|
|
+ s0_f = r2_pvector32->float_4 - r1_pvector32->float_4;
|
|
|
+ r0_pmatrix.d[2][1] = 0;
|
|
|
+ s2_f = sp0_pvector32->float_4 - r3_pvector32->float_4;
|
|
|
+ r0_pmatrix.d[1][1] = s2_f / s0_f;
|
|
|
+
|
|
|
+ s2_f = r3_pvector32->float_4 * r2_pvector32->float_4 -
|
|
|
+ sp0_pvector32->float_4 * r1_pvector32->float_4;
|
|
|
+ ;
|
|
|
+ s0_f = r2_pvector32->float_4 - r1_pvector32->float_4;
|
|
|
+ r0_pmatrix.d[0][2] = 0;
|
|
|
+ r0_pmatrix.d[1][2] = 0;
|
|
|
+ r0_pmatrix.d[3][1] = s2_f / s0_f;
|
|
|
+
|
|
|
+
|
|
|
+ s0_f = r2_pvector32->float_8 - r1_pvector32->float_8;
|
|
|
+ s2_f = sp0_pvector32->float_8 - r3_pvector32->float_8;
|
|
|
+ r0_pmatrix.d[2][2] = s2_f / s0_f;
|
|
|
+ s2_f = r3_pvector32->float_8 * r2_pvector32->float_8-sp0_pvector32->float_8 *r1_pvector32->float_8;
|
|
|
+ s0_f = r2_pvector32->float_8 - r1_pvector32->float_8;
|
|
|
+ r0_pmatrix.d[0][3] = 0;
|
|
|
+ r0_pmatrix.d[1][3] = 0;
|
|
|
+ r0_pmatrix.d[2][3] = 0;
|
|
|
+ r0_pmatrix.d[3][3] = 1.0f;
|
|
|
+ r0_pmatrix.d[3][2] = s2_f/s0_f;
|
|
|
+}
|
|
|
+
|
|
|
+void GaussianBlur(CFTTRenderToTexture *a1, CFTTRenderToTexture *a2,
|
|
|
+ CFTTRenderToTexture *a3, float a4, int a5, bool a6, bool a7) {
|
|
|
+LOGE("GaussianBlur=%x%x%x%x%x%x%x",a1,a2,a3,a4,a5,a6,a7);
|
|
|
+}
|
|
|
// 00185e1a ^_-
|
|
|
// void GetFaceData(TFTTModel *pModel0, ushort *&pUS1, int &i2, int i3) {
|
|
|
// int iR1 = 0;
|
|
@@ -209,69 +284,72 @@ void CGfxCrowd::GetCapacity(CFTTModel *, CFTTMatrix32) {
|
|
|
}
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
|
// 00199E08 ^_^ 经过单元测试,功能正常(前5关)
|
|
|
-void CGfxCrowd::AssessDesirability(TGfxCrowdSeat &tSeat) {
|
|
|
- tSeat.f_18 =
|
|
|
- powf(XSYS_RandomNoSyncF(17.5f), 1.5f) + (20.0f - (tSeat.f_4 + tSeat.f_4));
|
|
|
-}
|
|
|
+// void CGfxCrowd::AssessDesirability(TGfxCrowdSeat &tSeat) {
|
|
|
+// tSeat.f_18 =
|
|
|
+// powf(XSYS_RandomNoSyncF(17.5f), 1.5f) + (20.0f - (tSeat.f_4 + tSeat.f_4));
|
|
|
+// }
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
|
// 00199E3C 经过单元测试,功能正常(前5关)
|
|
|
-void CGfxCrowd::AssessDesirability(TGfxCrowdSeat &tSeat1, bool b2) {
|
|
|
- float fr6 = powf(XSYS_RandomNoSyncF(20.0f), 1.5f);
|
|
|
- float fs16 = -1.0f;
|
|
|
- // 00199E62
|
|
|
- if (b2) {
|
|
|
- // 00199E6A
|
|
|
- fs16 = 1.0;
|
|
|
- }
|
|
|
+// void CGfxCrowd::AssessDesirability(TGfxCrowdSeat &tSeat1, bool b2) {
|
|
|
+// float fr6 = powf(XSYS_RandomNoSyncF(20.0f), 1.5f);
|
|
|
+// float fs16 = -1.0f;
|
|
|
+// // 00199E62
|
|
|
+// if (b2) {
|
|
|
+// // 00199E6A
|
|
|
+// fs16 = 1.0;
|
|
|
+// }
|
|
|
|
|
|
- // 00199E70
|
|
|
- float fs6 = XMATH_ClampFloat(tSeat1.f_8, -60.0f, 60.0f);
|
|
|
- float fs0 = fr6 + (20.0f - (tSeat1.f_4 + tSeat1.f_4));
|
|
|
- float fs8 = 10.0f + (fabs(tSeat1.f_0) * -0.5f);
|
|
|
-
|
|
|
- /*
|
|
|
- 以下写法与原始汇编一致,但是可读性差,我改成逻辑一致,可读性更强的代码
|
|
|
- float32x2_t f32_1{fs8, 0.0f};
|
|
|
- float32x2_t f32_2{0.0f, 0.0f};
|
|
|
- float32x2_t ff32 = vmax_f32(f32_1, f32_2);
|
|
|
- float dfs8 = ff32[0];
|
|
|
- -----
|
|
|
- 我改成直接调用 fmaxf API
|
|
|
- */
|
|
|
-
|
|
|
- tSeat1.f_18 =
|
|
|
- (fs0 + (fs16 * fs6)) + fmaxf(10.0f + (fabs(tSeat1.f_0) * -0.5f), 0.0f);
|
|
|
-}
|
|
|
+// // 00199E70
|
|
|
+// float fs6 = XMATH_ClampFloat(tSeat1.f_8, -60.0f, 60.0f);
|
|
|
+// float fs0 = fr6 + (20.0f - (tSeat1.f_4 + tSeat1.f_4));
|
|
|
+// float fs8 = 10.0f + (fabs(tSeat1.f_0) * -0.5f);
|
|
|
+
|
|
|
+// /*
|
|
|
+// 以下写法与原始汇编一致,但是可读性差,我改成逻辑一致,可读性更强的代码
|
|
|
+// float32x2_t f32_1{fs8, 0.0f};
|
|
|
+// float32x2_t f32_2{0.0f, 0.0f};
|
|
|
+// float32x2_t ff32 = vmax_f32(f32_1, f32_2);
|
|
|
+// float dfs8 = ff32[0];
|
|
|
+// -----
|
|
|
+// 我改成直接调用 fmaxf API
|
|
|
+// */
|
|
|
+
|
|
|
+// tSeat1.f_18 =
|
|
|
+// (fs0 + (fs16 * fs6)) + fmaxf(10.0f + (fabs(tSeat1.f_0) * -0.5f), 0.0f);
|
|
|
+// }
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
|
// 00199ED0
|
|
|
void CGfxCrowd::Distribute(uint) { LOGX("CGfxCrowd::Distribute 00199ED0"); }
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
|
-// 0019CBA0
|
|
|
+// 0019CBA0 ^_-
|
|
|
+//单元测试等级: 游戏运行正常
|
|
|
+//单元测试内容: 启动游戏到第10关
|
|
|
+//单元测试结果: 正常
|
|
|
void CGfxCrowd::UpdateCrowdTextures(uint r1_u) {
|
|
|
// sp30=this
|
|
|
// sp2c=r1_u
|
|
|
+ LOGE("CGfxCrowd::UpdateCrowdTextures=%x",r1_u);
|
|
|
switch (r1_u) {
|
|
|
// sp28=m_st_D0
|
|
|
// r11=m_st_D0
|
|
|
case 0: {
|
|
|
- // loc_19CBE6
|
|
|
+ // loc_19CBE6 OK
|
|
|
// sp28=m_st_D0
|
|
|
-
|
|
|
+ LOGE("case 0");
|
|
|
CrowdTextureCreationData *r1_pdata = new CrowdTextureCreationData;
|
|
|
- r1_pdata->mpFTTAtlasGenerator_194C = 0;
|
|
|
+ r1_pdata->mpFTTAtlasGenerator_194C.pType_0 = 0;
|
|
|
r1_pdata->miCFTTMaterialIndex_0 = -1;
|
|
|
r1_pdata->name_texture_5C = 0;
|
|
|
r1_pdata->name_texture_60 = 0;
|
|
|
r1_pdata->name_texture_64 = 0;
|
|
|
- r1_pdata->pmembers_34 = 0;
|
|
|
- r1_pdata->field_38[0] = 0;
|
|
|
- r1_pdata->field_38[1] = 0;
|
|
|
- r1_pdata->field_40 = 0;
|
|
|
- r1_pdata->field_44 = 0;
|
|
|
+ r1_pdata->pmembers_34.pType_0 = 0;
|
|
|
+ r1_pdata->pprenderToTexture_38[0] = 0;
|
|
|
+ r1_pdata->pprenderToTexture_38[1] = 0;
|
|
|
+ r1_pdata->prenderToTexture_40 = 0;
|
|
|
+ r1_pdata->prenderToTexture_44 = 0;
|
|
|
tPtrTextureData_D0 = r1_pdata;
|
|
|
g_pGraphicsDevice->setDither(false);
|
|
|
// 0019CC38
|
|
|
- // check 返回值 空函数
|
|
|
tPtrTextureData_D0.pType_0->miCFTTMaterialIndex_0 =
|
|
|
CGaussianNewShader::s_tInstance.CreateMat(
|
|
|
EGaussianNewShader_Channel_1, EGaussianNewShader_Blend_1);
|
|
@@ -281,8 +359,12 @@ void CGfxCrowd::UpdateCrowdTextures(uint r1_u) {
|
|
|
TBuildKitTeamTextures team_textures_spd0[2];
|
|
|
for (int r1_i = 0; r1_i < 2; r1_i++) {
|
|
|
// loc_19CC72
|
|
|
- team_textures_spd0[r1_i].pCTeam_0 = 0;
|
|
|
+ //team_textures_spd0[r1_i].pCTeam_0 = 0;
|
|
|
team_textures_spd0[r1_i].filed_4 = -1;
|
|
|
+ // team_textures_spd0[r1_i].pTexture_8 = 0;
|
|
|
+ // team_textures_spd0[r1_i].pTexture_C = 0;
|
|
|
+ // team_textures_spd0[r1_i].pTexture_10=0;
|
|
|
+ // team_textures_spd0[r1_i].pTexture_14=0;
|
|
|
}
|
|
|
CGfxKits::LoadKitTeamTextures(
|
|
|
&tGame.CTeam_2C60[0], &team_textures_spd0[0],
|
|
@@ -291,15 +373,15 @@ void CGfxCrowd::UpdateCrowdTextures(uint r1_u) {
|
|
|
&tGame.CTeam_2C60[1], &team_textures_spd0[1],
|
|
|
g_tGlobalTexLoadOptions.mTexLoadOptions_4, 0);
|
|
|
CGfxKits::BeginBuildKit(0);
|
|
|
- // check 传参
|
|
|
- CGfxKits::GetTexture(tPtrTextureData_D0.pType_0->field_4,
|
|
|
+
|
|
|
+ CGfxKits::GetTexture(tPtrTextureData_D0.pType_0->texture_4,
|
|
|
team_textures_spd0, 0, EKitTextureType_0, NULL);
|
|
|
- CGfxKits::GetTexture(tPtrTextureData_D0.pType_0->field_8,
|
|
|
+ CGfxKits::GetTexture(tPtrTextureData_D0.pType_0->texture_8,
|
|
|
team_textures_spd0, 1, EKitTextureType_0, NULL);
|
|
|
// 0019CCDE
|
|
|
- CGfxKits::GetTexture(tPtrTextureData_D0.pType_0->field_C,
|
|
|
+ CGfxKits::GetTexture(tPtrTextureData_D0.pType_0->texture_C,
|
|
|
&team_textures_spd0[1], 0, EKitTextureType_0, NULL);
|
|
|
- CGfxKits::GetTexture(tPtrTextureData_D0.pType_0->field_10,
|
|
|
+ CGfxKits::GetTexture(tPtrTextureData_D0.pType_0->texture_10,
|
|
|
&team_textures_spd0[1], 1, EKitTextureType_0, NULL);
|
|
|
CGfxKits::EndBuildKit();
|
|
|
// 0019CD02
|
|
@@ -334,6 +416,7 @@ void CGfxCrowd::UpdateCrowdTextures(uint r1_u) {
|
|
|
}
|
|
|
// loc_19CD9E
|
|
|
tPtrTextureData_D0.pType_0->name_texture_5C = r4_name_texture;
|
|
|
+ options_sp78.eMinFilter_18=EFTTTex_MinFilter_0;
|
|
|
r4_name_texture = CFTTTexture::LoadName("data/models/Crowd/steward.png",
|
|
|
options_sp78, true);
|
|
|
if (tPtrTextureData_D0.pType_0->name_texture_60) { // 0019CDB6
|
|
@@ -354,35 +437,37 @@ void CGfxCrowd::UpdateCrowdTextures(uint r1_u) {
|
|
|
vrctor32_sp50.float_0 = 0;
|
|
|
vrctor32_sp50.float_4 = 0.300000012f;
|
|
|
vrctor32_sp50.float_8 = -1.0f;
|
|
|
+ // CFTTVector32
|
|
|
GFXSCENE_vLightDir = Normalize(vrctor32_sp50);
|
|
|
// 0019CDFA
|
|
|
// GFXSCENE_vLightDir=vrctor32_sp120;
|
|
|
CPBRLighting::Get()->Reinitialise(true);
|
|
|
CGfxEnvironmentMap::Get()->SetForced(EEnvMapOverride_1);
|
|
|
// loc_19CE38
|
|
|
- // check new size 0x15E08 以及头部数据
|
|
|
- TCrowdMember *r5_pmember = new TCrowdMember[0x20];
|
|
|
- // 0019CE48 这里的符号不对
|
|
|
+ // 0019CE48 这里的符号不对 可能会造成内存泄漏
|
|
|
// FTTUPtr<TCrowdMember []>::operator=(TCrowdMember*)
|
|
|
- tPtrTextureData_D0.pType_0->pmembers_34 = r5_pmember;
|
|
|
+ LOGE("tPtrTextureData_D0.pType_0->pmembers_34=%x",tPtrTextureData_D0.pType_0->pmembers_34.pType_0);
|
|
|
+ //TCrowdMember* r5_pmem = new TCrowdMember [0x20];
|
|
|
+ //FTTUPtr<TCrowdMember[0x20]> r5_pmem(new TCrowdMember [0x20]);
|
|
|
+ tPtrTextureData_D0.pType_0->pmembers_34= new TCrowdMember [0x20];
|
|
|
CPlayerShader::s_tInstance.SetCinematic(EPlayerShader_Cinematic_1);
|
|
|
CFTTVector32x4 vector32x4_sp120;
|
|
|
vector32x4_sp120.my[0] = 1.0f;
|
|
|
vector32x4_sp120.my[1] = 1.0f;
|
|
|
- vector32x4_sp120.my[0] = 0;
|
|
|
- vector32x4_sp120.my[0] = 0;
|
|
|
-
|
|
|
+ vector32x4_sp120.my[2] = 0;
|
|
|
+ vector32x4_sp120.my[3] = 0;
|
|
|
CPlayerShader::s_tInstance.SetCinematicLightingCloth(vector32x4_sp120);
|
|
|
vector32x4_sp120.my[0] = 1.0f;
|
|
|
vector32x4_sp120.my[1] = 1.0f;
|
|
|
- vector32x4_sp120.my[0] = 0;
|
|
|
- vector32x4_sp120.my[0] = 0;
|
|
|
+ vector32x4_sp120.my[2] = 0;
|
|
|
+ vector32x4_sp120.my[3] = 0;
|
|
|
CPlayerShader::s_tInstance.SetCinematicLightingSkin(vector32x4_sp120);
|
|
|
-
|
|
|
break;
|
|
|
}
|
|
|
case 1: {
|
|
|
- // 0019CE84
|
|
|
+ // 0019CE84 OK
|
|
|
+ LOGE("case 1");
|
|
|
+
|
|
|
for (int r4_i = 0; r4_i != 0x20; r4_i++) {
|
|
|
// loc_19CE9E
|
|
|
float s0_f = XSYS_RandomNoSyncF(0.0799999982f);
|
|
@@ -393,7 +478,7 @@ void CGfxCrowd::UpdateCrowdTextures(uint r1_u) {
|
|
|
|
|
|
tPtrTextureData_D0.pType_0->pmembers_34.pType_0[r4_i]
|
|
|
.m_cVec32_ADC.float_0 =
|
|
|
- (-6.975 + r4_i * 0.449999988f) + (s0_f - 0.0399999991f);
|
|
|
+ (-6.975f + r4_i * 0.449999988f) + (s0_f - 0.0399999991f);
|
|
|
}
|
|
|
// 0019CEDA
|
|
|
CGfxPlayer::SetupBatchConstants();
|
|
@@ -404,20 +489,24 @@ void CGfxCrowd::UpdateCrowdTextures(uint r1_u) {
|
|
|
break;
|
|
|
}
|
|
|
case 2:
|
|
|
- case 4: { // loc_19CFB4
|
|
|
+ case 4: { // loc_19CFB4 OK
|
|
|
// sp4c=tPtrTextureData_D0
|
|
|
- CFTTRenderToTexture r5_ptexture =
|
|
|
+ LOGE("case 2 4");
|
|
|
+
|
|
|
+ CFTTRenderToTexture *r5_prenderToTexture =
|
|
|
g_pGraphicsDevice->createRenderToTexture(
|
|
|
EFTTTexFormat_2, 0x400, 0x400, 0x1, 0x18, EFTTRTTZBufMode_1,
|
|
|
false, EFTTTextureType_0, 1);
|
|
|
ECrowdMemberType r4_member_type = ECrowdMemberType_0;
|
|
|
if (r1_u != 2) r4_member_type = ECrowdMemberType_1;
|
|
|
// 0019CFE0
|
|
|
- if (tPtrTextureData_D0.pType_0[(uint)r4_member_type]
|
|
|
- .texture_38) // 0019CFF4
|
|
|
- delete tPtrTextureData_D0.pType_0[(uint)r4_member_type].texture_38;
|
|
|
+ if (tPtrTextureData_D0.pType_0
|
|
|
+ ->pprenderToTexture_38[(uint)r4_member_type]) // 0019CFF4
|
|
|
+ delete tPtrTextureData_D0.pType_0
|
|
|
+ ->pprenderToTexture_38[(uint)r4_member_type];
|
|
|
// loc_19CFFA
|
|
|
- tPtrTextureData_D0.pType_0[(uint)r4_member_type].texture_38 = r5_ptexture;
|
|
|
+ tPtrTextureData_D0.pType_0->pprenderToTexture_38[(uint)r4_member_type] =
|
|
|
+ r5_prenderToTexture;
|
|
|
// loc_19D022
|
|
|
for (uint r6_u = 0; r6_u != 0x20; r6_u++) {
|
|
|
// loc_19D002
|
|
@@ -431,9 +520,11 @@ void CGfxCrowd::UpdateCrowdTextures(uint r1_u) {
|
|
|
}
|
|
|
// loc_19D018
|
|
|
}
|
|
|
+
|
|
|
// 0019D026
|
|
|
FTTALG::Shuffle(tPtrTextureData_D0.pType_0->pmembers_34.pType_0,
|
|
|
&tPtrTextureData_D0.pType_0->pmembers_34.pType_0[0x20]);
|
|
|
+
|
|
|
// 0019D032
|
|
|
// loc_19D084
|
|
|
for (int r4_i = 0; r4_i != 0x20; r4_i++) {
|
|
@@ -446,7 +537,7 @@ void CGfxCrowd::UpdateCrowdTextures(uint r1_u) {
|
|
|
|
|
|
tPtrTextureData_D0.pType_0->pmembers_34.pType_0[r4_i]
|
|
|
.m_cVec32_ADC.float_0 =
|
|
|
- (-6.975 + r4_i * 0.449999988f) + (s0_f - 0.0199999996f);
|
|
|
+ (-6.975f + r4_i * 0.449999988f) + (s0_f - 0.0199999996f);
|
|
|
}
|
|
|
// 0019D088
|
|
|
// sp38=unk_2FEFF4
|
|
@@ -460,29 +551,28 @@ void CGfxCrowd::UpdateCrowdTextures(uint r1_u) {
|
|
|
// sp48=r1
|
|
|
int r1_i = (int)tPtrTextureData_D0.pType_0->pmembers_34.pType_0[r2_i]
|
|
|
.m_eCrowdMemberType_0 *
|
|
|
- 3;
|
|
|
- uchar *r4_pb = &byte_2FEFF4[r1_i];
|
|
|
+ 5;
|
|
|
+ const uchar *r4_pb = &byte_2FEFF4[r1_i];
|
|
|
int i_sp40 = XSYS_RandomNoSync(byte_2FEFF4[r1_i]);
|
|
|
// sp3c=r4_pb[4]
|
|
|
int r10_i = XSYS_RandomNoSync(r4_pb[1]);
|
|
|
int r5_i = XSYS_RandomNoSync(r4_pb[2]);
|
|
|
int r0_i = XSYS_RandomNoSync(r4_pb[3]);
|
|
|
- uchar *r6_pb =
|
|
|
+ const uchar *r6_pb =
|
|
|
&byte_2FF003[tPtrTextureData_D0.pType_0->pmembers_34.pType_0[r2_i]
|
|
|
.m_eCrowdMemberType_0 *
|
|
|
- 15];
|
|
|
+ 60];
|
|
|
//
|
|
|
int r0_i1 = XSYS_RandomNoSync(r4_pb[4]);
|
|
|
- tPtrTextureData_D0.pType_0->buff_68[r2_i * 5] =
|
|
|
- *[r6_pb + (uchar) i_sp40];
|
|
|
- tPtrTextureData_D0.pType_0->buff_68[r2_i * 5 + 1] =
|
|
|
- *[r6_pb + (uchar)r10_i + 0xC];
|
|
|
- tPtrTextureData_D0.pType_0->buff_68[r2_i * 5 + 2] =
|
|
|
- *[r6_pb + (uchar)r5_i + 0x18];
|
|
|
- tPtrTextureData_D0.pType_0->buff_68[r2_i * 5 + 3] =
|
|
|
- *[r6_pb + (uchar)r0_i + 0x24];
|
|
|
- tPtrTextureData_D0.pType_0->buff_68[r2_i * 5 + 4] =
|
|
|
- *[r6_pb + (uchar)r0_i1 + 0x30];
|
|
|
+ tPtrTextureData_D0.pType_0->buff_68[r2_i][0] = *(r6_pb + (uchar)i_sp40);
|
|
|
+ tPtrTextureData_D0.pType_0->buff_68[r2_i][1] =
|
|
|
+ *(r6_pb + (uchar)r10_i + 0xC);
|
|
|
+ tPtrTextureData_D0.pType_0->buff_68[r2_i][2] =
|
|
|
+ *(r6_pb + (uchar)r5_i + 0x18);
|
|
|
+ tPtrTextureData_D0.pType_0->buff_68[r2_i][3] =
|
|
|
+ *(r6_pb + (uchar)r0_i + 0x24);
|
|
|
+ tPtrTextureData_D0.pType_0->buff_68[r2_i][4] =
|
|
|
+ *(r6_pb + (uchar)r0_i1 + 0x30);
|
|
|
}
|
|
|
// 0019D12C
|
|
|
// sp48=byte_2FDF94
|
|
@@ -491,47 +581,1275 @@ void CGfxCrowd::UpdateCrowdTextures(uint r1_u) {
|
|
|
for (int r9_i = 0; r9_i != 0x20; r9_i++) {
|
|
|
// 0019D146
|
|
|
// loc_19D1D0
|
|
|
- //这个循环数据结构不清晰暂时不处理
|
|
|
- for (int r5_i = 0; r5_i != 0x20; r5_i++) {
|
|
|
+ for (int r5_i = 0; r5_i != 0x10; r5_i++) {
|
|
|
// loc_19D14A
|
|
|
- //check 寻址
|
|
|
- tPtrTextureData_D0.pType_0->field_10c[r5_i].b_0 =
|
|
|
- tPtrTextureData_D0.pType_0->buff_68[r9_i * 5 + byte_2FDF94[r5_i]];
|
|
|
- char r0_b=GetAnim( tPtrTextureData_D0.pType_0->field_10c[r5_i].b_0)->filed_4;
|
|
|
+ tPtrTextureData_D0.pType_0->field_10c[r9_i][r5_i].b_0 =
|
|
|
+ tPtrTextureData_D0.pType_0->buff_68[r9_i][byte_2FDF94[r5_i]];
|
|
|
+ ushort r0_us =
|
|
|
+ GetAnim(tPtrTextureData_D0.pType_0->field_10c[r9_i][r5_i].b_0)
|
|
|
+ ->filed_4;
|
|
|
int r0_i;
|
|
|
- if(r5_i==t_4630e0.byte_4630E0[byte_2FDF94[r5_i]*2]){
|
|
|
- //0019D17A
|
|
|
- //check UXTH
|
|
|
- r0_i= XSYS_RandomNoSync(r0_b);
|
|
|
- }else{//loc_19D182
|
|
|
-
|
|
|
+ int r6_i = t_4630e0.byte_4630E0[byte_2FDF94[r5_i] * 2];
|
|
|
+ if (r5_i == r6_i) {
|
|
|
+ // 0019D17A
|
|
|
+ // check UXTH
|
|
|
+ r0_i = XSYS_RandomNoSync((ushort)r0_us);
|
|
|
+ } else { // loc_19D182
|
|
|
+ float s0_f = t_4630e0.byte_4630E0[byte_2FDF94[r5_i * 2] + 1] - r6_i;
|
|
|
+ float s2_f = r5_i - r6_i;
|
|
|
+ s0_f = s2_f / s0_f;
|
|
|
+ // check UXTH
|
|
|
+ s2_f = r0_us;
|
|
|
+ // check 寻址 s4
|
|
|
+ float s4_f = tPtrTextureData_D0.pType_0->field_10c[r9_i][r6_i].us_2;
|
|
|
+ s4_f += s0_f * s2_f;
|
|
|
+ r0_i = (uint)s4_f % r0_us;
|
|
|
}
|
|
|
- //loc_19D1CA
|
|
|
- tPtrTextureData_D0.pType_0->field_10c[r5_i].us_2=r0_i;
|
|
|
+ // loc_19D1CA
|
|
|
+ // check
|
|
|
+ tPtrTextureData_D0.pType_0->field_10c[r9_i][r5_i].us_2 = r0_i;
|
|
|
}
|
|
|
- //0019D1D4
|
|
|
+ // 0019D1D4
|
|
|
}
|
|
|
+
|
|
|
break;
|
|
|
}
|
|
|
case 3:
|
|
|
case 5: {
|
|
|
- // loc_19D20E
|
|
|
- //check 赋值
|
|
|
- CFTTClearSettings clear_setting_sp120= g_tBlankCanvasClearSettings;
|
|
|
- clear_setting_sp120.field_18=0xFFFFFF;
|
|
|
- int r0_i=0;
|
|
|
- if(r1_u!=3){
|
|
|
- r0_i=1;
|
|
|
- }
|
|
|
- //sp40=tPtrTextureData_D0.pType_0[r0_i].texture_38
|
|
|
- tPtrTextureData_D0.pType_0[r0_i].texture_38->BeginRenderToTexture(clear_setting_sp120);
|
|
|
- //0019D24A
|
|
|
+ // loc_19D20E OK
|
|
|
+ // check 赋值
|
|
|
+ LOGE("case 3_5");
|
|
|
+
|
|
|
+ CFTTClearSettings clear_setting_sp120 = g_tBlankCanvasClearSettings;
|
|
|
+ clear_setting_sp120.dRGBA_8 = 0xFFFFFF;
|
|
|
+ int r0_i = 0;
|
|
|
+ if (r1_u != 3) {
|
|
|
+ r0_i = 1;
|
|
|
+ }
|
|
|
+ // sp40=tPtrTextureData_D0.pType_0[r0_i].texture_38
|
|
|
+ tPtrTextureData_D0.pType_0
|
|
|
+ ->pprenderToTexture_38[r0_i]->BeginRenderToTexture(clear_setting_sp120);
|
|
|
+ // 0019D24A
|
|
|
+ CFTTVector32 vector_sp50;
|
|
|
+ vector_sp50.float_0 = -7.19999981f;
|
|
|
+ vector_sp50.float_4 = -0.100000001f;
|
|
|
+ vector_sp50.float_8 = 0;
|
|
|
+ CFTTVector32 vector_sp114;
|
|
|
+ vector_sp114.float_0 = 7.19999981f;
|
|
|
+ vector_sp114.float_4 = 2.4000001f;
|
|
|
+ vector_sp114.float_8 = 20.0f;
|
|
|
+ CFTTCamera::SetOrthographic(1.0f, 20.0f, 2.4000001f, -0.100000001f,
|
|
|
+ -7.19999981, 7.19999981f);
|
|
|
+ CFTTVector32 vector32_spD0;
|
|
|
+ vector32_spD0.float_0 = 0;
|
|
|
+ vector32_spD0.float_4 = 0;
|
|
|
+ vector32_spD0.float_8 = -10.0f;
|
|
|
+ CFTTCamera::SetPosition(vector32_spD0);
|
|
|
+ vector32_spD0.float_0 = 0;
|
|
|
+ vector32_spD0.float_4 = 0;
|
|
|
+ vector32_spD0.float_8 = 1.0f;
|
|
|
+ CFTTCamera::SetDirection(vector32_spD0, NULL);
|
|
|
+ CFTTCamera::SetViewport(0x400, 0x400, 0);
|
|
|
+ CFTTCamera::ApplyCameraSettings();
|
|
|
+ g_pGraphicsDevice->setDepthTest(EFTTDepthTest_8, true);
|
|
|
+ CFTTShaderBuiltInConstants::SetViewMatrix(CFTTMatrix32::s_matIdentity);
|
|
|
+ CFTTShaderBuiltInConstants::SetProjMatrix(CFTTMatrix32::s_matIdentity);
|
|
|
+ // 0019D2C6
|
|
|
+ // sp3c=GFXPLAYER_pBatch
|
|
|
+ GFXPLAYER_pBatch->cfttbmmmatrixcache_0.field_20 = false;
|
|
|
+ GFXPLAYER_pBatch->Begin();
|
|
|
+ // sp48=r11
|
|
|
+ // sp44=g_pGraphicsDevice
|
|
|
+ // s18=-1.0f
|
|
|
+ // s20=1.0f r10=0 r6=0xaf0 s16=0.0625f
|
|
|
+
|
|
|
+ // loc_19D41E
|
|
|
+ for (int r10_i = 0; r10_i != 0x20; r10_i++) {
|
|
|
+ // loc_19D2F4
|
|
|
+ // loc_19D40C
|
|
|
+ for (int r4_i = 0; r4_i != 0x10; r4_i++) {
|
|
|
+ // loc_19D348
|
|
|
+ // tPtrTextureData_D0
|
|
|
+ float s22_f = (float)r4_i * 0.0625f;
|
|
|
+ float s24_f = (float)(r4_i + 1) * 0.0625f;
|
|
|
+ if (g_pGraphicsDevice->Matrices_FlipsRTT() == 0) {
|
|
|
+ // 0019D36E
|
|
|
+ if (g_pGraphicsDevice->Matrices_FlipsY() == 0) {
|
|
|
+ s24_f = 1.0f - s24_f;
|
|
|
+ s22_f = 1.0f - s22_f;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // loc_19D380
|
|
|
+ float s2_f = s22_f + s22_f - 1.0f;
|
|
|
+ float s0_f = s24_f + s24_f - 1.0f;
|
|
|
+ // spc4=
|
|
|
+ // vector_sp50
|
|
|
+ CFTTMatrix32 matrix32_spd0;
|
|
|
+ CFTTVector32 vector32_spc4;
|
|
|
+
|
|
|
+ vector32_spc4.float_0 = -1.0f;
|
|
|
+ vector32_spc4.float_8 = 0;
|
|
|
+ CFTTVector32 vector32_spb8;
|
|
|
+ vector32_spb8.float_0 = 1.0f;
|
|
|
+ vector32_spb8.float_4 = s2_f;
|
|
|
+ vector32_spb8.float_8 = 1.0f;
|
|
|
+ vector32_spc4.float_4 = s0_f;
|
|
|
|
|
|
+ sub_19ED8C(matrix32_spd0, &vector_sp50, &vector_sp114, &vector32_spc4,
|
|
|
+ &vector32_spb8);
|
|
|
+ // 0019D3BC
|
|
|
+ TSATAnim_TSX *r9_panim =
|
|
|
+ GetAnim(tPtrTextureData_D0.pType_0->field_10c[r10_i][r4_i].b_0);
|
|
|
+
|
|
|
+ TSATAnim_TSX *r3_panim = GetLegAnim(
|
|
|
+ tPtrTextureData_D0.pType_0->field_10c[r10_i][r4_i].b_0);
|
|
|
+ CFTTMatrix32 matrix_sp78 =
|
|
|
+ tPtrTextureData_D0.pType_0->pmembers_34.pType_0[r10_i].Animate(
|
|
|
+ r9_panim, r3_panim,
|
|
|
+ tPtrTextureData_D0.pType_0->field_10c[r10_i][r4_i].us_2);
|
|
|
+ // 0019D3EE
|
|
|
+
|
|
|
+ MatrixMultiply(&matrix_sp78, &matrix32_spd0, &CFTTCamera::s_matView);
|
|
|
+
|
|
|
+ tPtrTextureData_D0.pType_0->pmembers_34.pType_0[r10_i].Render(
|
|
|
+ &matrix_sp78);
|
|
|
+
|
|
|
+ }
|
|
|
+ // 0019D410
|
|
|
+ }
|
|
|
+
|
|
|
+ // 0019D426
|
|
|
+ GFXPLAYER_pBatch->End();
|
|
|
+ CGfxPlayer::FlushPlayerSkins();
|
|
|
+ GFXPLAYER_pBatch->ResetCache(false);
|
|
|
+ GFXPLAYER_pBatch->cfttbmmmatrixcache_0.field_20 = true;
|
|
|
+ // check ptype0
|
|
|
+ tPtrTextureData_D0.pType_0->pprenderToTexture_38[r0_i]->EndRenderToTexture(
|
|
|
+ EFTTRTTCopyMode_0);
|
|
|
+
|
|
|
+ break;
|
|
|
}
|
|
|
+ case 6: {
|
|
|
+ // 0019D470 OK
|
|
|
+ // r8=tPtrTextureData_D0
|
|
|
+ LOGE("case 6");
|
|
|
+ CFTTRenderToTexture *r11_prenderToTexture =
|
|
|
+ g_pGraphicsDevice->createRenderToTexture(
|
|
|
+ EFTTTexFormat_2, 0x200, 0x400, 1, 0, EFTTRTTZBufMode_1, false,
|
|
|
+ EFTTTextureType_0, 1);
|
|
|
+ // 0019D49E
|
|
|
+ CFTTRenderToTexture *prenderToTexture_sp48 =
|
|
|
+ g_pGraphicsDevice->createRenderToTexture(
|
|
|
+ EFTTTexFormat_2, 0x200, 0x400, 1, 0, EFTTRTTZBufMode_1, false,
|
|
|
+ EFTTTextureType_0, 1);
|
|
|
+ // 0019D4C2
|
|
|
+ CFTTRenderToTexture *prenderToTexture_sp44 =
|
|
|
+ g_pGraphicsDevice->createRenderToTexture(
|
|
|
+ EFTTTexFormat_2, 0x200, 0x400, 1, 0, EFTTRTTZBufMode_1, false,
|
|
|
+ EFTTTextureType_0, 1);
|
|
|
+ // 0019D4E4
|
|
|
+ r11_prenderToTexture->BeginRenderToTexture(g_tBlankCanvasClearSettings);
|
|
|
+ FTT2D_Begin();
|
|
|
+ // 0019D4FA
|
|
|
+ FTT2D_SetDefaultMatBlend(EFTT2D_Blend_5);
|
|
|
+ FTT2D_SetTexture(
|
|
|
+ tPtrTextureData_D0.pType_0->pprenderToTexture_38[0]->GetTexture(), 0);
|
|
|
+ // 0019D51A
|
|
|
+ FTT2D_DrawTexturedRect(0, 0, 512.0f, 512.0f, -1, 0, -999999.0f,
|
|
|
+ -999999.0f);
|
|
|
+ // 0019D53C
|
|
|
+ FTT2D_SetTexture(
|
|
|
+ tPtrTextureData_D0.pType_0->pprenderToTexture_38[1]->GetTexture(), 0);
|
|
|
+ FTT2D_DrawTexturedRect(0, 512.0f, 512.0f, 512.0f, -1, 0, -999999.0f,
|
|
|
+ -999999.0f);
|
|
|
+ FTT2D_End();
|
|
|
+ r11_prenderToTexture->EndRenderToTexture(EFTTRTTCopyMode_0);
|
|
|
+ CFTTVector32x4 vector32x4_spd0;
|
|
|
+ vector32x4_spd0.my[0] = 1.0f;
|
|
|
+ vector32x4_spd0.my[1] = 1.0f;
|
|
|
+ vector32x4_spd0.my[2] = 1.0f;
|
|
|
+ vector32x4_spd0.my[3] = 0;
|
|
|
+ CGaussianNewShader::s_tInstance.SetColourMultiplier(vector32x4_spd0);
|
|
|
+ // 0019D58C
|
|
|
+ GaussianBlur(
|
|
|
+ r11_prenderToTexture, prenderToTexture_sp44, prenderToTexture_sp48,
|
|
|
+ 2.0f, tPtrTextureData_D0.pType_0->miCFTTMaterialIndex_0, true, true);
|
|
|
+ FTT2D_Begin();
|
|
|
+ FTT2D_SetDefaultMatBlend(EFTT2D_Blend_5);
|
|
|
+ // 0019D5B0
|
|
|
+ // sp3c=r11
|
|
|
+ FTT2D_SetTexture(r11_prenderToTexture->GetTexture(), 0);
|
|
|
+ // 0019D5C2
|
|
|
+ FTT2D_DrawTexturedRect(0, 0, 512.0f, 1024.0f, -1, 0, -999999.0f,
|
|
|
+ -999999.0f);
|
|
|
+ FTT2D_SetDefaultMatBlend(EFTT2D_Blend_7);
|
|
|
|
|
|
- default:
|
|
|
+ for (int r6_i = 0; r6_i != 0x20; r6_i++) {
|
|
|
+ // loc_19D5E2
|
|
|
+ FTT2D_DrawRect4(0, r6_i * 0x20, 512.0f, 32.0f, -1, -1, 0xFF404040,
|
|
|
+ 0xFF404040, 0, -999999.0f, -999999.0f);
|
|
|
+ }
|
|
|
+ // 0019D612
|
|
|
+ FTT2D_End();
|
|
|
+ //这里check r5_ptexture ptexture_9C的类型
|
|
|
+ CFTTTexture *r5_ptexture =
|
|
|
+ prenderToTexture_sp44->EndRenderToTexture(EFTTRTTCopyMode_2);
|
|
|
+ if (ptexture_9C) { // 0019D62C
|
|
|
+ delete ptexture_9C;
|
|
|
+ }
|
|
|
+ // loc_19D632
|
|
|
+ ptexture_9C = r5_ptexture;
|
|
|
+
|
|
|
+ switch (GFXSPEC_pSpecification->eCrowdQuality_4C) {
|
|
|
+ case 2:
|
|
|
+ case 3:
|
|
|
+ case 4:
|
|
|
+ // loc_19D654
|
|
|
+ r5_ptexture->SetMinFilter(EFTTTex_MinFilter_5);
|
|
|
+ break;
|
|
|
+
|
|
|
+ case 1:
|
|
|
+ default:
|
|
|
+ r5_ptexture->SetMinFilter(EFTTTex_MinFilter_4);
|
|
|
+ // 0019D65A
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ // 0019D664
|
|
|
+ CFTTTexParam parm;
|
|
|
+ // check 这里传参
|
|
|
+ parm.setTexture(ptexture_9C);
|
|
|
+
|
|
|
+ CCrowdNewShader::s_tInstance.SetDiffuse(parm, dCrowdNewShaderID_CBBC[0]);
|
|
|
+ if (tPtrTextureData_D0.pType_0->pprenderToTexture_38[0]) {
|
|
|
+ // 0019D688
|
|
|
+ delete tPtrTextureData_D0.pType_0->pprenderToTexture_38[0];
|
|
|
+ }
|
|
|
+ // loc_19D68E
|
|
|
+ tPtrTextureData_D0.pType_0->pprenderToTexture_38[0] = NULL;
|
|
|
+ if (tPtrTextureData_D0.pType_0->pprenderToTexture_38[1]) {
|
|
|
+ // 0019D6B0
|
|
|
+ delete tPtrTextureData_D0.pType_0->pprenderToTexture_38[1];
|
|
|
+ }
|
|
|
+ // loc_19D69E
|
|
|
+ tPtrTextureData_D0.pType_0->pprenderToTexture_38[1] = NULL;
|
|
|
+ delete prenderToTexture_sp44;
|
|
|
+ if (prenderToTexture_sp48) {
|
|
|
+ // 0019D6B0
|
|
|
+ delete prenderToTexture_sp48;
|
|
|
+ }
|
|
|
+ // loc_19D6B6
|
|
|
+ if (r11_prenderToTexture) {
|
|
|
+ delete r11_prenderToTexture;
|
|
|
+ }
|
|
|
+ // loc_19D6C0
|
|
|
+
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case 7: {
|
|
|
+ // 0019D724 OK
|
|
|
+ LOGE("case 7");
|
|
|
+ CFTTRenderToTexture *r4_prenderToTexture =
|
|
|
+ g_pGraphicsDevice->createRenderToTexture(
|
|
|
+ EFTTTexFormat_2, 0x100, 0x200, 0x1, 0x18, EFTTRTTZBufMode_1,
|
|
|
+ false, EFTTTextureType_0, 1);
|
|
|
+ if (tPtrTextureData_D0.pType_0->prenderToTexture_40) {
|
|
|
+ // 0019D758
|
|
|
+ delete tPtrTextureData_D0.pType_0->prenderToTexture_40;
|
|
|
+ }
|
|
|
+ // loc_19D75E
|
|
|
+ tPtrTextureData_D0.pType_0->prenderToTexture_40 = r4_prenderToTexture;
|
|
|
+ // s16=-1.5f r8=r0=0.0799999982f s18=-0.0399999991f r6=0xAE4
|
|
|
+ // loc_19D7AA
|
|
|
+ for (int r4_i = 0; r4_i != 4; r4_i++) {
|
|
|
+ // loc_19D776
|
|
|
+ float s0_f = XSYS_RandomNoSyncF(0.0799999982f);
|
|
|
+ float s2_f = (float)r4_i - 1.5f;
|
|
|
+ s0_f -= 0.0399999991f;
|
|
|
+ tPtrTextureData_D0.pType_0->pmembers_34.pType_0[r4_i]
|
|
|
+ .m_cVec32_ADC.float_8 = 0;
|
|
|
+ tPtrTextureData_D0.pType_0->pmembers_34.pType_0[r4_i]
|
|
|
+ .m_cVec32_ADC.float_4 = 0;
|
|
|
+ tPtrTextureData_D0.pType_0->pmembers_34.pType_0[r4_i]
|
|
|
+ .m_cVec32_ADC.float_0 = s2_f + s0_f;
|
|
|
+ }
|
|
|
+ // 0019D7AE
|
|
|
+ CFTTClearSettings clearSetting_spd0 = g_tBlankCanvasClearSettings;
|
|
|
+ clearSetting_spd0.dRGBA_8 = 0xFFFFFF;
|
|
|
+ CGfxPlayer::SetupBatchConstants();
|
|
|
+ CPlayerShader::s_tInstance.SetShadowMap(EPlayerShader_ShadowMap_0);
|
|
|
+ CPlayerShader::s_tInstance.SetBlendMode(EPlayerShader_BlendMode_0);
|
|
|
+ CPlayerShader::s_tInstance.SetModel(EPlayerShader_Model_0);
|
|
|
+ CPlayerShader::s_tInstance.SetQuality(EPlayerShader_Quality_2);
|
|
|
+ tPtrTextureData_D0.pType_0->prenderToTexture_40->BeginRenderToTexture(
|
|
|
+ clearSetting_spd0);
|
|
|
+ tPtrTextureData_D0.pType_0->prenderToTexture_40->EndRenderToTexture(
|
|
|
+ EFTTRTTCopyMode_0);
|
|
|
+
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case 8: { // loc_19D832 OK
|
|
|
+ LOGE("case 8");
|
|
|
+ for (int r4_i = 0; r4_i != 4; r4_i++) {
|
|
|
+ // loc_19D836
|
|
|
+ // check 寻址
|
|
|
+ tPtrTextureData_D0.pType_0->pmembers_34.pType_0[r4_i].Setup(
|
|
|
+ ECrowdMemberType_2, 0xff);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 0019D84E
|
|
|
+ FTTALG::Shuffle(tPtrTextureData_D0.pType_0->pmembers_34.pType_0,
|
|
|
+ &tPtrTextureData_D0.pType_0->pmembers_34.pType_0[4]);
|
|
|
+ // loc_19D870
|
|
|
+ for (int r5_i = 0; r5_i != 4; r5_i++) {
|
|
|
+ uchar r0_b = XSYS_RandomNoSync(3);
|
|
|
+ tPtrTextureData_D0.pType_0->byte_108[r5_i] = byte_2FF0B7[r0_b];
|
|
|
+ }
|
|
|
+ // 0019D874
|
|
|
+ // sp44= tPtrTextureData_D0.pType_0->buff_90e
|
|
|
+ //r8=byte_2FF0C3
|
|
|
+ //r9=byte_4630E0
|
|
|
+ // loc_19D92A
|
|
|
+ for (int r1_i = 0; r1_i != 4; r1_i++) {
|
|
|
+ // loc_19D88A
|
|
|
+
|
|
|
+ // sp48=r1_i
|
|
|
+ for (int r6_i = 0; r6_i != 4; r6_i++) {
|
|
|
+ // loc_19D89C
|
|
|
+ // r1=byte_2FF0C3[r6_i]
|
|
|
+ // check
|
|
|
+ uint r4_u = t_4630e0.byte_4630E0[byte_2FF0C3[r6_i] * 2];
|
|
|
+ tPtrTextureData_D0.pType_0->data_90c[r1_i][r6_i].b_0 =
|
|
|
+ tPtrTextureData_D0.pType_0->byte_108[r1_i];
|
|
|
+ uint r5_u = t_4630e0.byte_4630E0[byte_2FF0C3[r6_i] * 2 + 1];
|
|
|
+ ushort r0_us =
|
|
|
+ GetAnim(tPtrTextureData_D0.pType_0->byte_108[r1_i])->filed_4;
|
|
|
+
|
|
|
+ if (r6_i == r4_u) {
|
|
|
+ // 0019D8BE
|
|
|
+ r0_us = XSYS_RandomNoSync(r0_us);
|
|
|
+ } else {
|
|
|
+ // loc_19D8C6
|
|
|
+ float s0_f = r5_u - r4_u;
|
|
|
+ float s2_f = r6_i - r4_u;
|
|
|
+ s0_f = s2_f / s0_f;
|
|
|
+ s2_f = r0_us;
|
|
|
+ float s4_f = tPtrTextureData_D0.pType_0->data_90c[r1_i][r4_u].us_2 +
|
|
|
+ s0_f * s2_f;
|
|
|
+ r0_us = ((uint)s4_f) % r0_us;
|
|
|
+ }
|
|
|
+ // loc_19D912
|
|
|
+ tPtrTextureData_D0.pType_0->data_90c[r1_i][r6_i].us_2 = r0_us;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case 9: { // loc_19D94A OK
|
|
|
+ LOGE("case 9");
|
|
|
+ CFTTClearSettings clear_setting_sp78 = g_tBlankCanvasClearSettings;
|
|
|
+ clear_setting_sp78.dRGBA_8 = 0xFFFFFF;
|
|
|
+ tPtrTextureData_D0.pType_0->prenderToTexture_40->BeginRenderToTexture(
|
|
|
+ clear_setting_sp78);
|
|
|
+ //0019D978
|
|
|
+ CFTTVector32 vector_sp50;
|
|
|
+ vector_sp50.float_0 = -2.0f;
|
|
|
+ vector_sp50.float_4 = -0.100000001f;
|
|
|
+ vector_sp50.float_8 = 0;
|
|
|
+
|
|
|
+ CFTTVector32 vector_sp114;
|
|
|
+ vector_sp114.float_0 = 2.0f;
|
|
|
+ vector_sp114.float_4 = 3.0f;
|
|
|
+ vector_sp114.float_8 = 20.0f;
|
|
|
+
|
|
|
+ CFTTCamera::SetOrthographic(1.0f, 20.0f, 3.0f, -0.100000001f, -2.0f,
|
|
|
+ 2.0f);
|
|
|
+ CFTTVector32 vector32_spd0;
|
|
|
+ vector32_spd0.float_0 = 0;
|
|
|
+ vector32_spd0.float_4 = 0;
|
|
|
+ vector32_spd0.float_8 = -10.0f;
|
|
|
+ CFTTCamera::SetPosition(vector32_spd0);
|
|
|
+ vector32_spd0.float_0 = 0;
|
|
|
+ vector32_spd0.float_4 = 0;
|
|
|
+ vector32_spd0.float_8 = 1.0f;
|
|
|
+ CFTTCamera::SetDirection(vector32_spd0, NULL);
|
|
|
+ CFTTCamera::SetViewport(0x100, 0x200, 0);
|
|
|
+ CFTTCamera::ApplyCameraSettings();
|
|
|
+ g_pGraphicsDevice->setDepthTest(EFTTDepthTest_8, true);
|
|
|
+
|
|
|
+ // s16=0.25f s18=-1.0f r9= tPtrTextureData_D0.pType_0->data_90c
|
|
|
+ // s20=1.0f r4=g_pGraphicsDevice R6=sp120
|
|
|
+ // sp44=g_pGraphicsDevice
|
|
|
+ // loc_19DB34
|
|
|
+
|
|
|
+ for (int r5_i = 0; r5_i != 4; r5_i++) {
|
|
|
+ // loc_19DA00
|
|
|
+ float s0_f = (float)r5_i;
|
|
|
+ float s2_f = (float)(r5_i+1);
|
|
|
+ // check 虚函数顺序
|
|
|
+ float s24_f = s2_f * 0.25f;
|
|
|
+ float s22_f = s0_f * 0.25f;
|
|
|
+ if (g_pGraphicsDevice->Matrices_FlipsRTT() == 0) {
|
|
|
+ // 0019DA28
|
|
|
+ if (g_pGraphicsDevice->Matrices_FlipsY() == 0) {
|
|
|
+ s24_f = 1.0f - s24_f;
|
|
|
+ s22_f = 1.0f - s22_f;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // loc_19DA3A
|
|
|
+ s2_f = s22_f + s22_f;
|
|
|
+ s0_f = s24_f + s24_f;
|
|
|
+
|
|
|
+ CFTTMatrix32 mat32_spd0;
|
|
|
+ CFTTVector32 vector32_spc4;
|
|
|
+ CFTTVector32 vector32_spb8;
|
|
|
+ vector32_spc4.float_0 = -1.0f;
|
|
|
+ vector32_spc4.float_4 = s0_f - 1.0f;
|
|
|
+ vector32_spc4.float_8 = 0;
|
|
|
+
|
|
|
+ vector32_spb8.float_0 = 1.0f;
|
|
|
+ vector32_spb8.float_4 = s2_f - 1.0f;
|
|
|
+ vector32_spb8.float_8 = 1.0f;
|
|
|
+ // check mat32_spd0 是否是传出参数
|
|
|
+ sub_19ED8C(mat32_spd0, &vector_sp50, &vector_sp114, &vector32_spc4,
|
|
|
+ &vector32_spb8);
|
|
|
+ CFTTShaderBuiltInConstants::SetProjMatrix(mat32_spd0);
|
|
|
+ GFXPLAYER_pBatch->Begin();
|
|
|
+ // loc_19DB12
|
|
|
+ for (int r10_i = 0; r10_i != 4; r10_i++) {
|
|
|
+ // loc_19DAD4
|
|
|
+ // check 寻址
|
|
|
+
|
|
|
+ TSATAnim_TSX *r5_panim =
|
|
|
+ GetAnim(tPtrTextureData_D0.pType_0->data_90c[r10_i][r5_i].b_0);
|
|
|
+
|
|
|
+ TSATAnim_TSX *r3_plegAnim =
|
|
|
+ GetLegAnim(tPtrTextureData_D0.pType_0->data_90c[r10_i][r5_i].b_0);
|
|
|
+
|
|
|
+ CFTTMatrix32 mat32_sp120 =
|
|
|
+ tPtrTextureData_D0.pType_0->pmembers_34.pType_0[r10_i].Animate(
|
|
|
+ r5_panim, r3_plegAnim,
|
|
|
+ tPtrTextureData_D0.pType_0->data_90c[r10_i][r5_i].us_2);
|
|
|
+
|
|
|
+ tPtrTextureData_D0.pType_0->pmembers_34.pType_0[r10_i].Render(NULL);
|
|
|
+
|
|
|
+ }
|
|
|
+ // 0019DB18
|
|
|
+ GFXPLAYER_pBatch->End();
|
|
|
+ CGfxPlayer::FlushPlayerSkins();
|
|
|
+ GFXPLAYER_pBatch->ResetCache(false);
|
|
|
+ }
|
|
|
+ // 0019DB3A
|
|
|
+ tPtrTextureData_D0.pType_0->prenderToTexture_40->EndRenderToTexture(
|
|
|
+ EFTTRTTCopyMode_0);
|
|
|
+ LOGE("9 end");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case 10: {
|
|
|
+ // loc_19DB64 OK
|
|
|
+ LOGE("case 10");
|
|
|
+ CFTTRenderToTexture *r11_prenderToTexture =
|
|
|
+ g_pGraphicsDevice->createRenderToTexture(EFTTTexFormat_2, 0x80, 0x100,
|
|
|
+ 0x1, 0, EFTTRTTZBufMode_1,
|
|
|
+ false, EFTTTextureType_0, 1);
|
|
|
+ // 0019DB8E
|
|
|
+ // r10=r11
|
|
|
+ CFTTRenderToTexture *prenderToTexture_sp48 =
|
|
|
+ g_pGraphicsDevice->createRenderToTexture(EFTTTexFormat_2, 0x80, 0x100,
|
|
|
+ 0x1, 0, EFTTRTTZBufMode_1,
|
|
|
+ false, EFTTTextureType_0, 1);
|
|
|
+ CFTTRenderToTexture *r9_prenderToTexture =
|
|
|
+ g_pGraphicsDevice->createRenderToTexture(EFTTTexFormat_2, 0x80, 0x100,
|
|
|
+ 0x1, 0, EFTTRTTZBufMode_1,
|
|
|
+ false, EFTTTextureType_0, 1);
|
|
|
+ // 0019DBD2
|
|
|
+ r11_prenderToTexture->BeginRenderToTexture(g_tBlankCanvasClearSettings);
|
|
|
+ FTT2D_Begin();
|
|
|
+ FTT2D_SetDefaultMatBlend(EFTT2D_Blend_5);
|
|
|
+ FTT2D_SetTexture(
|
|
|
+ tPtrTextureData_D0.pType_0->prenderToTexture_40->GetTexture(), 0);
|
|
|
+ // 0019DBFC
|
|
|
+ FTT2D_DrawTexturedRect(0, 0, 128.0f, 256.0f, -1, 0, -999999.0f,
|
|
|
+ -999999.0f);
|
|
|
+ FTT2D_End();
|
|
|
+ r11_prenderToTexture->EndRenderToTexture(EFTTRTTCopyMode_0);
|
|
|
+ // 0019DC2A
|
|
|
+ CFTTVector32x4 vector32x4_spd0;
|
|
|
+ vector32x4_spd0.my[0] = 1.0f;
|
|
|
+ vector32x4_spd0.my[1] = 1.0f;
|
|
|
+ vector32x4_spd0.my[2] = 1.0f;
|
|
|
+ vector32x4_spd0.my[3] = 0;
|
|
|
+
|
|
|
+ CGaussianNewShader::s_tInstance.SetColourMultiplier(vector32x4_spd0);
|
|
|
+ GaussianBlur(
|
|
|
+ r11_prenderToTexture, r9_prenderToTexture, prenderToTexture_sp48,
|
|
|
+ 2.0f, tPtrTextureData_D0.pType_0->miCFTTMaterialIndex_0, true, true);
|
|
|
+ FTT2D_Begin();
|
|
|
+ FTT2D_SetDefaultMatBlend(EFTT2D_Blend_5);
|
|
|
+ FTT2D_SetTexture(r11_prenderToTexture->GetTexture(), 0);
|
|
|
+ FTT2D_DrawTexturedRect(0, 0, 128.0f, 256.0f, -1, 0, -999999.0f,
|
|
|
+ -999999.0f);
|
|
|
+ FTT2D_End();
|
|
|
+ CFTTTexture *r5_ptexture =
|
|
|
+ r9_prenderToTexture->EndRenderToTexture(EFTTRTTCopyMode_2);
|
|
|
+ if (ptexture_A0) { // 0019DCA8
|
|
|
+ delete ptexture_A0;
|
|
|
+ }
|
|
|
+ // loc_19DCAE
|
|
|
+ ptexture_A0 = r5_ptexture;
|
|
|
+ switch (GFXSPEC_pSpecification->eCrowdQuality_4C) {
|
|
|
+ case 2:
|
|
|
+ case 3:
|
|
|
+ case 4:
|
|
|
+ // loc_19DCD2
|
|
|
+ r5_ptexture->SetMinFilter(EFTTTex_MinFilter_5);
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ // 0019E904
|
|
|
+ r5_ptexture->SetMinFilter(EFTTTex_MinFilter_4);
|
|
|
+ // loc_19E908
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ // 0019E90E
|
|
|
+ CFTTTexParam parm;
|
|
|
+ // check 这里传参
|
|
|
+ parm.setTexture(ptexture_A0);
|
|
|
+ LOGE("PARM.SIZE=%x",sizeof(parm));
|
|
|
+
|
|
|
+ CCrowdNewShader::s_tInstance.SetDiffuse(parm, dCrowdNewShaderID_CBBC[1]);
|
|
|
+ if (tPtrTextureData_D0.pType_0->prenderToTexture_40) {
|
|
|
+ // 0019E930
|
|
|
+ delete tPtrTextureData_D0.pType_0->prenderToTexture_40;
|
|
|
+ }
|
|
|
+ // 0019E936
|
|
|
+ tPtrTextureData_D0.pType_0->prenderToTexture_40 = 0;
|
|
|
+ if (r9_prenderToTexture) {
|
|
|
+ // 0019E940
|
|
|
+ delete r9_prenderToTexture;
|
|
|
+ }
|
|
|
+ // loc_19E94A
|
|
|
+ if (prenderToTexture_sp48) {
|
|
|
+ delete prenderToTexture_sp48;
|
|
|
+ }
|
|
|
+ // loc_19E954
|
|
|
+ if (r11_prenderToTexture) {
|
|
|
+ // 0019E95C
|
|
|
+ delete r11_prenderToTexture;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case 15: {
|
|
|
+ // loc_19E9C0 OK
|
|
|
+ // check 虚函数
|
|
|
+ LOGE("case 15");
|
|
|
+ g_pGraphicsDevice->setDither(true);
|
|
|
+ FTT_pTex->ReleaseTexture(tPtrTextureData_D0.pType_0->texture_48);
|
|
|
+ FTT_pTex->ReleaseTexture(tPtrTextureData_D0.pType_0->texture_4C);
|
|
|
+ FTT_pTex->ReleaseTexture(tPtrTextureData_D0.pType_0->texture_50);
|
|
|
+ FTT_pTex->ReleaseTexture(tPtrTextureData_D0.pType_0->texture_58);
|
|
|
+ FTT_pTex->ReleaseTexture(tPtrTextureData_D0.pType_0->texture_4);
|
|
|
+ FTT_pTex->ReleaseTexture(tPtrTextureData_D0.pType_0->texture_8);
|
|
|
+ FTT_pTex->ReleaseTexture(tPtrTextureData_D0.pType_0->texture_C);
|
|
|
+ FTT_pTex->ReleaseTexture(tPtrTextureData_D0.pType_0->texture_10);
|
|
|
+ CModelManager::FreeModel(tPtrTextureData_D0.pType_0->model_2C);
|
|
|
+ CModelManager::FreeModel(tPtrTextureData_D0.pType_0->model_30);
|
|
|
+ FTT_pMtlL->ReleaseMaterial(
|
|
|
+ tPtrTextureData_D0.pType_0->miCFTTMaterialIndex_0);
|
|
|
+ tPtrTextureData_D0.pType_0->miCFTTMaterialIndex_0 = -1;
|
|
|
+ tPtrTextureData_D0 = NULL;
|
|
|
+ CPlayerShader::s_tInstance.SetCinematic(EPlayerShader_Cinematic_0);
|
|
|
+ CGfxEnvironmentMap::Get()->SetForced(EEnvMapOverride_0);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case 11:
|
|
|
+ case 12:
|
|
|
+ case 13:
|
|
|
+ case 14:
|
|
|
+ {
|
|
|
+ // check eCrowdQuality_4C
|
|
|
+ // 0019CBC0
|
|
|
+ LOGE("case default GFXSPEC_pSpecification->eCrowdQuality_4C=%x",GFXSPEC_pSpecification->eCrowdQuality_4C);
|
|
|
+ if (GFXSPEC_pSpecification->eCrowdQuality_4C) {
|
|
|
+ // 0019CBD0
|
|
|
+ // loc_19CF04
|
|
|
+ switch (r1_u) {
|
|
|
+ case 11: {
|
|
|
+ // loc_19DCDA
|
|
|
+ LOGE("case 11");
|
|
|
+ CFTTRenderToTexture *r4_prenderToTexture =
|
|
|
+ g_pGraphicsDevice->createRenderToTexture(
|
|
|
+ EFTTTexFormat_2, 0x800, 0x800, 0x1, 0x18, EFTTRTTZBufMode_1,
|
|
|
+ false, EFTTTextureType_0, 1);
|
|
|
+ // 0019DD0C
|
|
|
+ if (tPtrTextureData_D0.pType_0->prenderToTexture_44) // 0019DD0E
|
|
|
+ delete tPtrTextureData_D0.pType_0->prenderToTexture_44;
|
|
|
+
|
|
|
+ tPtrTextureData_D0.pType_0->prenderToTexture_44 =
|
|
|
+ r4_prenderToTexture;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case 12: {
|
|
|
+ // loc_19DD1C
|
|
|
+ LOGE("case 12");
|
|
|
+ for (uchar r5_uc = 0; r5_uc != 0x20; r5_uc++) {
|
|
|
+ // loc_19DD22
|
|
|
+ if (r5_uc <= 4) {
|
|
|
+ // 0019DD26
|
|
|
+ tPtrTextureData_D0.pType_0->pmembers_34.pType_0[r5_uc].Setup(
|
|
|
+ ECrowdMemberType_0, r5_uc);
|
|
|
+
|
|
|
+ } else {
|
|
|
+ // loc_19DD32
|
|
|
+ if (r5_uc <= 9) {
|
|
|
+ // /0019DD3C
|
|
|
+ tPtrTextureData_D0.pType_0->pmembers_34.pType_0[r5_uc].Setup(
|
|
|
+ ECrowdMemberType_1, r5_uc - 0x5);
|
|
|
+ } else {
|
|
|
+ // loc_19DD44
|
|
|
+ tPtrTextureData_D0.pType_0->pmembers_34.pType_0[r5_uc].Setup(
|
|
|
+ ECrowdMemberType_2, r5_uc - 0xa);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 0019DD5A
|
|
|
+ for (int r1_i = 0; r1_i != 0x20; r1_i++) {
|
|
|
+ // loc_19DD60
|
|
|
+ tPtrTextureData_D0.pType_0->pmembers_34.pType_0[r1_i]
|
|
|
+ .m_cVec32_ADC.float_0 = 0;
|
|
|
+ tPtrTextureData_D0.pType_0->pmembers_34.pType_0[r1_i]
|
|
|
+ .m_cVec32_ADC.float_4 = 0;
|
|
|
+ tPtrTextureData_D0.pType_0->pmembers_34.pType_0[r1_i]
|
|
|
+ .m_cVec32_ADC.float_8 = 0;
|
|
|
+ }
|
|
|
+ // 0019DD7C
|
|
|
+ // sp48 dword_2FF0C8
|
|
|
+ // sp38=unk_2FF157
|
|
|
+ // r11=byte_2FF148
|
|
|
+ // loc_19DE22
|
|
|
+ for (int r9_i = 0; r9_i != 0x20; r9_i++) {
|
|
|
+ // loc_19DD9C
|
|
|
+ int r6_i = dword_2FF0C8[r9_i];
|
|
|
+ uchar r10_uc = XSYS_RandomNoSync(byte5_2FF148[r6_i].b_0);
|
|
|
+ uchar r4_uc = XSYS_RandomNoSync(byte5_2FF148[r6_i].b_1);
|
|
|
+ uchar r0_uc = XSYS_RandomNoSync(byte5_2FF148[r6_i].b_2);
|
|
|
+ const uchar *r5_puc = &byte_2FF157[r6_i * 60];
|
|
|
+
|
|
|
+ tPtrTextureData_D0.pType_0->buff_68[r9_i][1] =
|
|
|
+ r5_puc[r4_uc + 0xc];
|
|
|
+ tPtrTextureData_D0.pType_0->buff_68[r9_i][0] = r5_puc[r10_uc];
|
|
|
+ tPtrTextureData_D0.pType_0->buff_68[r9_i][2] =
|
|
|
+ r5_puc[r0_uc + 0x18];
|
|
|
+ r4_uc = XSYS_RandomNoSync(byte5_2FF148[r6_i].b_3);
|
|
|
+ r0_uc = XSYS_RandomNoSync(byte5_2FF148[r6_i].b_4);
|
|
|
+ tPtrTextureData_D0.pType_0->buff_68[r9_i][3] =
|
|
|
+ r5_puc[r4_uc + 0x24];
|
|
|
+ tPtrTextureData_D0.pType_0->buff_68[r9_i][4] =
|
|
|
+ r5_puc[r0_uc + 0x30];
|
|
|
+ }
|
|
|
+ // 0019DE28
|
|
|
+ // sp38=0 lr r8 r1
|
|
|
+ // r12=tPtrTextureData_D0
|
|
|
+ // r0 tPtrTextureData_D0.pType_0.2970
|
|
|
+ // loc_19DEDA
|
|
|
+ // check 寻址
|
|
|
+
|
|
|
+ ushort us_sp38 = 0;
|
|
|
+ for (int r8_i = 0; r8_i != 0x20; r8_i++) {
|
|
|
+ // loc_19DE40
|
|
|
+ // r10 = tPtrTextureData_D0.pType_0->buf_2950[r8_i]
|
|
|
+ uchar r3_uc = 0;
|
|
|
+ int r9_i = dword_2FF0C8[r8_i];
|
|
|
+ tPtrTextureData_D0.pType_0->uc_2950[r8_i] = 0;
|
|
|
+ // loc_19DEC6
|
|
|
+ for (int r2_i = 0; r2_i != 5; r2_i++) {
|
|
|
+ // loc_19DE5A
|
|
|
+ if (byte_2FF157[r9_i * 5 + r2_i]) {
|
|
|
+ // 0019DE66
|
|
|
+
|
|
|
+ TGfxCrowdState::uSpan[r8_i][r2_i].b_0 = r3_uc;
|
|
|
+ uchar r6_uc = dword_462764[tPtrTextureData_D0.pType_0
|
|
|
+ ->buff_68[r8_i][r2_i]]
|
|
|
+ .filed_4;
|
|
|
+ TGfxCrowdState::uSpan[r8_i][r2_i].b_1 = r6_uc + r3_uc;
|
|
|
+ // check uxtab
|
|
|
+ uint r1_u = r6_uc + r3_uc;
|
|
|
+ // loc_19DEA0
|
|
|
+ // check 这里
|
|
|
+ while (r3_uc < r1_u) {
|
|
|
+ // loc_19DE9C
|
|
|
+ // check
|
|
|
+ tPtrTextureData_D0.pType_0->buf_2970[r8_i][r3_uc] = r2_i;
|
|
|
+ r3_uc++;
|
|
|
+ }
|
|
|
+ // 0019DEA4
|
|
|
+ tPtrTextureData_D0.pType_0->uc_2950[r8_i] += r6_uc ;
|
|
|
+ r3_uc=r1_u;
|
|
|
+ } else {
|
|
|
+ // loc_19DEB2
|
|
|
+ TGfxCrowdState::uSpan[r8_i][r2_i].b_0 = 0;
|
|
|
+ TGfxCrowdState::uSpan[r8_i][r2_i].b_1 = 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 0019DECA
|
|
|
+ us_sp38++;
|
|
|
+ }
|
|
|
+ // 0019DEE0
|
|
|
+ // r2=tPtrTextureData_D0.pType_0->buf_2970
|
|
|
+ // r11=tPtrTextureData_D0
|
|
|
+ // r10=tPtrTextureData_D0.pType_0.94e
|
|
|
+ // sp40=TGfxCrowdState::uSpan
|
|
|
+ // loc_19E092
|
|
|
+ for (int r5_i = 0; r5_i != 0x20; r5_i++) {
|
|
|
+ // loc_19DF34
|
|
|
+ // sp48=tPtrTextureData_D0.pType_0->buf_2950[r5_i]
|
|
|
+ // sp34=r10=tPtrTextureData_D0.pType_0.94e
|
|
|
+ // sp44=r2=tPtrTextureData_D0.pType_0->buf_2970
|
|
|
+ // loc_19DF4C
|
|
|
+ // r3=r10=tPtrTextureData_D0.pType_0.94e
|
|
|
+ for (int r9_u = 0;
|
|
|
+ r9_u < tPtrTextureData_D0.pType_0->uc_2950[r5_i]; r9_u++) {
|
|
|
+ // 0019DF56
|
|
|
+ // check 寻址以及r4_uc
|
|
|
+ uchar r0_uc = tPtrTextureData_D0.pType_0->buf_2970[r5_i][r9_u];
|
|
|
+ uchar r4_uc = tPtrTextureData_D0.pType_0->buff_68[r5_i][r0_uc];
|
|
|
+ tPtrTextureData_D0.pType_0->buff_94c[r5_i][r9_u].b_0 = r4_uc;
|
|
|
+
|
|
|
+ ushort r1_us = GetAnim(r4_uc)->filed_4;
|
|
|
+ uint r0_u;
|
|
|
+ if (TGfxCrowdState::uSpan[r5_i][r0_uc].b_0 == r9_u) {
|
|
|
+ // 0019DF90
|
|
|
+ // sp3c=tPtrTextureData_D0.pType_0.94e
|
|
|
+ if ((dword_462764[r4_uc].filed_5 |
|
|
|
+ dword_462764[r4_uc].filed_6) == 0) {
|
|
|
+ // 0019DFAE
|
|
|
+ if (dword_462764[r4_uc].filed_7 == 0) {
|
|
|
+ // 0019DFB2
|
|
|
+ if (dword_462764[r4_uc].filed_8) {
|
|
|
+ // loc_19DFBA
|
|
|
+ r0_u =
|
|
|
+ XSYS_RandomNoSync(1 - dword_462764[r4_uc].filed_5);
|
|
|
+ } else {
|
|
|
+ // loc_19E05A
|
|
|
+ // check continue
|
|
|
+ int r10_i = XSYS_RandomNoSync(r1_us);
|
|
|
+ tPtrTextureData_D0.pType_0->buff_94c[r5_i][r9_u].us_2 =
|
|
|
+ r10_i;
|
|
|
+ r10_i += XSYS_RandomNoSync(r1_us);
|
|
|
+ tPtrTextureData_D0.pType_0
|
|
|
+ ->buff_94c[r5_i]
|
|
|
+ [TGfxCrowdState::uSpan[r5_i][r0_uc].b_1]
|
|
|
+ .us_2 = r10_i;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // loc_19DFBA
|
|
|
+ r0_u = XSYS_RandomNoSync(1 - dword_462764[r4_uc].filed_5);
|
|
|
+ // 0019DFC6
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ // loc_19DFBC
|
|
|
+ r0_u = XSYS_RandomNoSync(dword_462764[r4_uc].filed_6 +
|
|
|
+ (1 - dword_462764[r4_uc].filed_5));
|
|
|
+ // 0019DFC6
|
|
|
+ }
|
|
|
+ // 0019DFC6
|
|
|
+ // check
|
|
|
+ tPtrTextureData_D0.pType_0->buff_94c[r5_i][r9_u].us_2 =
|
|
|
+ r0_u + dword_462764[r4_uc].filed_5;
|
|
|
+ // check
|
|
|
+ r0_u = XSYS_RandomNoSync(dword_462764[r4_uc].filed_8 +
|
|
|
+ (1 - dword_462764[r4_uc].filed_7));
|
|
|
+ tPtrTextureData_D0.pType_0
|
|
|
+ ->buff_94c[r5_i][TGfxCrowdState::uSpan[r5_i][r0_uc].b_1]
|
|
|
+ .us_2 = r0_u + dword_462764[r4_uc].filed_7;
|
|
|
+
|
|
|
+ } else {
|
|
|
+ // loc_19DFF4
|
|
|
+ float s0_f = TGfxCrowdState::uSpan[r5_i][r0_uc].b_1 -
|
|
|
+ TGfxCrowdState::uSpan[r5_i][r0_uc].b_0;
|
|
|
+ float s2_f = r9_u - TGfxCrowdState::uSpan[r5_i][r0_uc].b_0;
|
|
|
+ ushort r2_us =
|
|
|
+ tPtrTextureData_D0.pType_0
|
|
|
+ ->buff_94c[r5_i]
|
|
|
+ [TGfxCrowdState::uSpan[r5_i][r0_uc].b_0]
|
|
|
+ .us_2;
|
|
|
+ ushort r0_us =
|
|
|
+ tPtrTextureData_D0.pType_0
|
|
|
+ ->buff_94c[r5_i]
|
|
|
+ [TGfxCrowdState::uSpan[r5_i][r0_uc].b_1]
|
|
|
+ .us_2;
|
|
|
+ // check 这里一堆的数据类型转换
|
|
|
+ float s4_f = r2_us;
|
|
|
+ s0_f = s2_f / s0_f;
|
|
|
+ s2_f = r0_us - r2_us;
|
|
|
+ s4_f = s4_f + s0_f * s2_f;
|
|
|
+ // check 取余函数 以及寻址
|
|
|
+ tPtrTextureData_D0.pType_0->buff_94c[r5_i][r9_u].us_2 =
|
|
|
+ (uint)s4_f % r1_us;
|
|
|
+ }
|
|
|
+ // loc_19E052
|
|
|
+ }
|
|
|
+ // loc_19E086
|
|
|
+ }
|
|
|
+ // 0019E098
|
|
|
+ // check uxth
|
|
|
+ // uint u_sp34=(ushort)us_sp38;
|
|
|
+ FTTVector<TShot> vectoeShot_sp78;
|
|
|
+ vectoeShot_sp78.Resize(us_sp38);
|
|
|
+ // r5=tPtrTextureData_D0.pType_0.94c
|
|
|
+ // r10=f4
|
|
|
+ // loc_19E192
|
|
|
+ // r2=0
|
|
|
+ uint r2_u = 0;
|
|
|
+ for (int r0_i = 0; r0_i != 0x20; r0_i++) {
|
|
|
+ // loc_19E0C4
|
|
|
+ // sp44=tPtrTextureData_D0.pType_0->buf_2950[r0_i]
|
|
|
+ // sp38=r5=tPtrTextureData_D0.pType_0.94c
|
|
|
+ // sp3c=r10=tPtrTextureData_D0.pType_0.f4
|
|
|
+ // uint r8_u=r2_u;
|
|
|
+ for (uint r11_u = 0;
|
|
|
+ r11_u < tPtrTextureData_D0.pType_0->uc_2950[r0_i]; r11_u++) {
|
|
|
+ /// loc_19E0DE
|
|
|
+ // sp48=r2
|
|
|
+ // check 94c 寻址
|
|
|
+ TSATAnim_TSX *r4_panim =
|
|
|
+ GetAnim(tPtrTextureData_D0.pType_0->buff_94c[r0_i][r11_u].b_0);
|
|
|
+ TSATAnim_TSX *r3_plegAnim = GetLegAnim(
|
|
|
+ tPtrTextureData_D0.pType_0->buff_94c[r0_i][r11_u].b_0);
|
|
|
+ CFTTMatrix32 mat_spd0 =
|
|
|
+ tPtrTextureData_D0.pType_0->pmembers_34.pType_0[r0_i]
|
|
|
+ .Animate(
|
|
|
+ r4_panim, r3_plegAnim,
|
|
|
+ tPtrTextureData_D0.pType_0->buff_94c[r0_i][r11_u].us_2);
|
|
|
+ // 0019E10E
|
|
|
+ CFTTVector32 vector32_sp120;
|
|
|
+ vector32_sp120.float_0 = 0.100000001f;
|
|
|
+ vector32_sp120.float_4 = 0.150000006f;
|
|
|
+ vector32_sp120.float_8 = 0.100000001f;
|
|
|
+ // CFTTMatrix32 结构体应该是包含TAABB结构 这里先不改
|
|
|
+ ((TAABB *)&mat_spd0)->Inflate(vector32_sp120);
|
|
|
+ data_d8[r0_i][r11_u].f_0 = mat_spd0.d[0][0];
|
|
|
+ data_d8[r0_i][r11_u].f_4 = mat_spd0.d[0][1];
|
|
|
+ // check
|
|
|
+ data_d8[r0_i][r11_u].f_8 = mat_spd0.d[0][3];
|
|
|
+ data_d8[r0_i][r11_u].f_C = mat_spd0.d[0][1];
|
|
|
+ data_d8[r0_i][r11_u].f_10 = mat_spd0.d[0][0];
|
|
|
+ data_d8[r0_i][r11_u].f_1C = mat_spd0.d[1][0];
|
|
|
+ data_d8[r0_i][r11_u].f_14 = mat_spd0.d[1][0];
|
|
|
+ data_d8[r0_i][r11_u].f_18 = mat_spd0.d[0][3];
|
|
|
+ vectoeShot_sp78.list_0[r2_u].b_0 = r11_u;
|
|
|
+ vectoeShot_sp78.list_0[r2_u].b_1 = r0_i;
|
|
|
+ vectoeShot_sp78.list_0[r2_u].f_4 = mat_spd0.d[0][0];
|
|
|
+ vectoeShot_sp78.list_0[r2_u].f_8 = mat_spd0.d[0][1];
|
|
|
+ vectoeShot_sp78.list_0[r2_u].f_C = mat_spd0.d[0][2];
|
|
|
+ vectoeShot_sp78.list_0[r2_u].f_10 = mat_spd0.d[0][3];
|
|
|
+
|
|
|
+ vectoeShot_sp78.list_0[r2_u].f_14 = mat_spd0.d[1][0];
|
|
|
+ vectoeShot_sp78.list_0[r2_u].f_18 = mat_spd0.d[1][1];
|
|
|
+ //vectoeShot_sp78
|
|
|
+
|
|
|
+ r2_u++;
|
|
|
+ }
|
|
|
+ // 0019E17E
|
|
|
+ }
|
|
|
+ // 0019E196
|
|
|
+ FTTVector<TShot>::Iterator vectorIt_sp70;
|
|
|
+ vectorIt_sp70.list_4 = vectoeShot_sp78.list_0;
|
|
|
+ FTTVector<TShot>::Iterator vectorIt_sp68;
|
|
|
+ vectorIt_sp68.list_4 =
|
|
|
+ vectoeShot_sp78.use_count_C + vectoeShot_sp78.list_0;
|
|
|
+ // check 函数符号以及传参是否使用了栈
|
|
|
+
|
|
|
+ FTTALG::Quicksort<SortShots,FTTVector<TShot>::Iterator>(vectorIt_sp70, vectorIt_sp68);
|
|
|
+
|
|
|
+ FTTAtlasGenerator *r6_pGenerator =
|
|
|
+ new FTTAtlasGenerator(0x800, 0x800, 0x800);
|
|
|
+ tPtrTextureData_D0.pType_0->mpFTTAtlasGenerator_194C =
|
|
|
+ r6_pGenerator;
|
|
|
+
|
|
|
+ float s16_f = us_sp38;
|
|
|
+ float s18_f = 80.0f;
|
|
|
+ // S20=0.25f s22=-10.0f s18=80.0f s24=0.5f s19=0.00048828125f
|
|
|
+ // r0=1950 s26=-5.0f s28=0.75f s30=-1.0f s17=-2.0f
|
|
|
+ // r5 r10 =0
|
|
|
+ // r9=tPtrTextureData_D0.pType_0.1950
|
|
|
+ // for(uint r10_u=0;r10_u<u_sp34;)
|
|
|
+
|
|
|
+ // loc_19E21C
|
|
|
+ uint r5_u = 0;
|
|
|
+ int r10_i = 0;
|
|
|
+ // loc_19E2EA check 符号
|
|
|
+ while (r10_i < us_sp38) {
|
|
|
+ // 0019E2F0
|
|
|
+ int r1_i = s18_f * (vectoeShot_sp78.list_0[r5_u].f_10 -
|
|
|
+ vectoeShot_sp78.list_0[r5_u].f_4);
|
|
|
+ int r2_i = s18_f * (vectoeShot_sp78.list_0[r5_u].f_14 -
|
|
|
+ vectoeShot_sp78.list_0[r5_u].f_8);
|
|
|
+ FTTAtlasGeneratorNode *r0_node =
|
|
|
+ tPtrTextureData_D0.pType_0->mpFTTAtlasGenerator_194C.pType_0
|
|
|
+ ->Insert(r1_i, r2_i);
|
|
|
+ // 0019E32C check
|
|
|
+ tPtrTextureData_D0.pType_0
|
|
|
+ ->buf_1950[vectoeShot_sp78.list_0[r5_u].b_1]
|
|
|
+ [vectoeShot_sp78.list_0[r5_u].b_0] = r0_node;
|
|
|
+
|
|
|
+ if (tPtrTextureData_D0.pType_0
|
|
|
+ ->buf_1950[vectoeShot_sp78.list_0[r5_u].b_1]
|
|
|
+ [vectoeShot_sp78.list_0[r5_u].b_0] == 0) {
|
|
|
+ // 0019E34A
|
|
|
+ tPtrTextureData_D0.pType_0->mpFTTAtlasGenerator_194C.pType_0
|
|
|
+ ->Clear();
|
|
|
+ float s0_f = (float)r10_i / s16_f;
|
|
|
+ float s2_f = -10.0f;
|
|
|
+ if (s0_f >= 0.25f) {
|
|
|
+ // 0019E36C
|
|
|
+ s2_f = -5.0f;
|
|
|
+ if (s0_f >= 0.5f) {
|
|
|
+ // 0019E37A
|
|
|
+ s2_f = - 1.0f;
|
|
|
+ if (s0_f < 0.75f) {
|
|
|
+ s2_f = - 2.0f;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // loc_19E38C
|
|
|
+ s18_f += s2_f;
|
|
|
+ } else {
|
|
|
+ // loc_19E23C
|
|
|
+ int r3_i = tPtrTextureData_D0.pType_0
|
|
|
+ ->buf_1950[vectoeShot_sp78.list_0[r5_u].b_1]
|
|
|
+ [vectoeShot_sp78.list_0[r5_u].b_0]
|
|
|
+ ->field_C;
|
|
|
+ int r12_i = tPtrTextureData_D0.pType_0
|
|
|
+ ->buf_1950[vectoeShot_sp78.list_0[r5_u].b_1]
|
|
|
+ [vectoeShot_sp78.list_0[r5_u].b_0]
|
|
|
+ ->field_10;
|
|
|
+ int lr_i = tPtrTextureData_D0.pType_0
|
|
|
+ ->buf_1950[vectoeShot_sp78.list_0[r5_u].b_1]
|
|
|
+ [vectoeShot_sp78.list_0[r5_u].b_0]
|
|
|
+ ->field_14;
|
|
|
+ int r11_i = tPtrTextureData_D0.pType_0
|
|
|
+ ->buf_1950[vectoeShot_sp78.list_0[r5_u].b_1]
|
|
|
+ [vectoeShot_sp78.list_0[r5_u].b_0]
|
|
|
+ ->field_18;
|
|
|
+ data_d8[vectoeShot_sp78.list_0[r5_u].b_1]
|
|
|
+ [vectoeShot_sp78.list_0[r5_u].b_0]
|
|
|
+ .f_20 = (float)r3_i * 0.00048828125f;
|
|
|
+
|
|
|
+ data_d8[vectoeShot_sp78.list_0[r5_u].b_1]
|
|
|
+ [vectoeShot_sp78.list_0[r5_u].b_0]
|
|
|
+ .f_24 = (float)(r3_i + lr_i) * 0.00048828125f;
|
|
|
+ data_d8[vectoeShot_sp78.list_0[r5_u].b_1]
|
|
|
+ [vectoeShot_sp78.list_0[r5_u].b_0]
|
|
|
+ .f_28 = (float)r2_i * 0.00048828125f;
|
|
|
+ data_d8[vectoeShot_sp78.list_0[r5_u].b_1]
|
|
|
+ [vectoeShot_sp78.list_0[r5_u].b_0]
|
|
|
+ .f_2C = (float)(r12_i + r11_i + 4) * 0.00048828125f;
|
|
|
+
|
|
|
+ r10_i++;
|
|
|
+ r5_u++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ // loc_19E21C
|
|
|
+ r5_u = 0;
|
|
|
+ r10_i = 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case 13: {
|
|
|
+ // loc_19E3B0
|
|
|
+ LOGE("case 13");
|
|
|
+ CFTTClearSettings clearSetting_sp120 = g_tBlankCanvasClearSettings;
|
|
|
+ clearSetting_sp120.dRGBA_8 = 0xFFFFFF;
|
|
|
+ tPtrTextureData_D0.pType_0->prenderToTexture_44
|
|
|
+ ->BeginRenderToTexture(clearSetting_sp120);
|
|
|
+ // 0019E3EC
|
|
|
+ CFTTCamera::SetOrthographic(1.0f, 20.0f, 2.0f, 0, -1.0f, 1.0f);
|
|
|
+ CFTTVector32 vector32_spd0;
|
|
|
+ vector32_spd0.float_0 = 0;
|
|
|
+ vector32_spd0.float_4 = 0;
|
|
|
+ vector32_spd0.float_8 = -10.0f;
|
|
|
+ CFTTCamera::SetPosition(vector32_spd0);
|
|
|
+ vector32_spd0.float_0 = 0;
|
|
|
+ vector32_spd0.float_4 = 0;
|
|
|
+ vector32_spd0.float_8 = 1.0f;
|
|
|
+ CFTTCamera::SetDirection(vector32_spd0, 0);
|
|
|
+ CFTTCamera::SetViewport(0x800, 0x800, 0);
|
|
|
+ CFTTCamera::ApplyCameraSettings();
|
|
|
+ g_pGraphicsDevice->setDepthTest(EFTTDepthTest_8, true);
|
|
|
+ // s18=1.0f r6=sp50 s20=-1.0f s16=0.00048828125f
|
|
|
+ // r5=r11=tPtrTextureData_D0.pType_0
|
|
|
+ // sp44=sp5c
|
|
|
+ // sp3c=GFXPLAYER_pBatch
|
|
|
+ // loc_19E5DE
|
|
|
+ for (int r9_i = 0; r9_i != 0x20; r9_i++) {
|
|
|
+ // loc_19E46A
|
|
|
+
|
|
|
+ GFXPLAYER_pBatch->Begin();
|
|
|
+ // r5=tPtrTextureData_D0.pType_0->buff_94c[r9_i]
|
|
|
+ for (int r8_u = 0; tPtrTextureData_D0.pType_0->uc_2950[r9_i];
|
|
|
+ r8_u++) {
|
|
|
+ // loc_19E484
|
|
|
+ TSATAnim_TSX *r4_panim = GetAnim(
|
|
|
+ tPtrTextureData_D0.pType_0->buff_94c[r9_i][r8_u].b_0);
|
|
|
+ TSATAnim_TSX *r3_panim = GetLegAnim(
|
|
|
+ tPtrTextureData_D0.pType_0->buff_94c[r9_i][r8_u].b_0);
|
|
|
+
|
|
|
+ CFTTMatrix32 mat_sp50 =
|
|
|
+ tPtrTextureData_D0.pType_0->pmembers_34.pType_0[r9_i]
|
|
|
+ .Animate(
|
|
|
+ r4_panim, r3_panim,
|
|
|
+ tPtrTextureData_D0.pType_0->buff_94c[r9_i][r8_u]
|
|
|
+ .us_2);
|
|
|
+ vector32_spd0.float_0 = 0.100000001f;
|
|
|
+ vector32_spd0.float_4 = 0.300000012f;
|
|
|
+ vector32_spd0.float_8 = 0.100000001f;
|
|
|
+ ((TAABB *)&mat_sp50)->Inflate(vector32_spd0);
|
|
|
+ // 0019E4C4
|
|
|
+ int r1_i =
|
|
|
+ tPtrTextureData_D0.pType_0->buf_1950[r9_i][r8_u]->field_C;
|
|
|
+ int r2_i =
|
|
|
+ tPtrTextureData_D0.pType_0->buf_1950[r9_i][r8_u]->field_10;
|
|
|
+ int r3_i =
|
|
|
+ tPtrTextureData_D0.pType_0->buf_1950[r9_i][r8_u]->field_14;
|
|
|
+ int r0_i =
|
|
|
+ tPtrTextureData_D0.pType_0->buf_1950[r9_i][r8_u]->field_18;
|
|
|
+ float s6_f = r1_i;
|
|
|
+ float s4_f = r2_i;
|
|
|
+ float s0_f = r0_i + r2_i;
|
|
|
+ float s2_f = r3_i + r1_i;
|
|
|
+ float s24_f = s0_f * 0.00048828125f;
|
|
|
+ float s22_f = s2_f * 0.00048828125f;
|
|
|
+ float s28_f = s4_f * 0.00048828125f;
|
|
|
+ float s26_f = s6_f * 0.00048828125f;
|
|
|
+
|
|
|
+ if (g_pGraphicsDevice->Matrices_FlipsRTT() ||
|
|
|
+ g_pGraphicsDevice->Matrices_FlipsY()) {
|
|
|
+ // loc_19E51E
|
|
|
+ s24_f = 1.0f - s24_f;
|
|
|
+ s28_f = 1.0f - s28_f;
|
|
|
+ }
|
|
|
+ // loc_19E526
|
|
|
+ s4_f = s24_f + s24_f;
|
|
|
+ s6_f = s22_f + s22_f;
|
|
|
+ s0_f = s28_f + s28_f;
|
|
|
+ s2_f = s26_f + s26_f;
|
|
|
+ CFTTVector32 vector_sp114;
|
|
|
+ vector_sp114.float_8 = 0;
|
|
|
+ mat_sp50.d[0][2]=0;
|
|
|
+ mat_sp50.d[1][1]=20.0f;
|
|
|
+ // sp64= 20f
|
|
|
+ s4_f = s4_f - 1.0f;
|
|
|
+ s6_f = s6_f - 1.0f;
|
|
|
+ s0_f = s0_f - 1.0f;
|
|
|
+ s2_f = s2_f - 1.0f;
|
|
|
+
|
|
|
+ CFTTVector32 vector_spc4;
|
|
|
+ vector_spc4.float_0 = s6_f;
|
|
|
+ vector_spc4.float_4 = s4_f;
|
|
|
+ vector_spc4.float_8 = 1.0f;
|
|
|
+ vector_sp114.float_0 = s2_f;
|
|
|
+ vector_sp114.float_4 = s0_f;
|
|
|
+ CFTTMatrix32 mat32_spd0;
|
|
|
+ sub_19ED8C(mat32_spd0, (CFTTVector32 *)&mat_sp50,
|
|
|
+ (CFTTVector32 *)&mat_sp50.d[0][3], &vector_sp114,
|
|
|
+ &vector_spc4);
|
|
|
+ CFTTShaderBuiltInConstants::SetViewMatrix(
|
|
|
+ CFTTMatrix32::s_matIdentity);
|
|
|
+ CFTTShaderBuiltInConstants::SetProjMatrix(
|
|
|
+ CFTTMatrix32::s_matIdentity);
|
|
|
+ // 0019E58C
|
|
|
+ CFTTMatrix32 mat32_sp78;
|
|
|
+ MatrixMultiply(&mat32_sp78, &mat32_spd0,
|
|
|
+ &CFTTCamera::s_matView);
|
|
|
+ tPtrTextureData_D0.pType_0->pmembers_34.pType_0[r9_i].Render(
|
|
|
+ &mat32_sp78);
|
|
|
+ }
|
|
|
+ // 0019E5BE
|
|
|
+ GFXPLAYER_pBatch->End();
|
|
|
+ CGfxPlayer::FlushPlayerSkins();
|
|
|
+ GFXPLAYER_pBatch->ResetCache(false);
|
|
|
+ }
|
|
|
+ // 0019E5E6
|
|
|
+ tPtrTextureData_D0.pType_0->prenderToTexture_44->EndRenderToTexture(
|
|
|
+ EFTTRTTCopyMode_0);
|
|
|
+ GFXPLAYER_pBatch->cfttbmmmatrixcache_0.field_20 = 1;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case 14: {
|
|
|
+ // loc_19E602
|
|
|
+ LOGE("case 14");
|
|
|
+ CFTTRenderToTexture *r4_prenderToTexture =
|
|
|
+ g_pGraphicsDevice->createRenderToTexture(
|
|
|
+ EFTTTexFormat_2, 0x400, 0x400, 0x1, 0, EFTTRTTZBufMode_1,
|
|
|
+ false, EFTTTextureType_0, 1);
|
|
|
+
|
|
|
+ CFTTRenderToTexture *prenderToTexture_sp44 =
|
|
|
+ g_pGraphicsDevice->createRenderToTexture(
|
|
|
+ EFTTTexFormat_2, 0x400, 0x400, 0x1, 0, EFTTRTTZBufMode_1,
|
|
|
+ false, EFTTTextureType_0, 1);
|
|
|
+
|
|
|
+ CFTTRenderToTexture *r9_prenderToTexture =
|
|
|
+ g_pGraphicsDevice->createRenderToTexture(
|
|
|
+ EFTTTexFormat_2, 0x400, 0x400, 0x1, 0, EFTTRTTZBufMode_1,
|
|
|
+ false, EFTTTextureType_0, 1);
|
|
|
+
|
|
|
+ r4_prenderToTexture->BeginRenderToTexture(
|
|
|
+ g_tBlankCanvasClearSettings);
|
|
|
+ FTT2D_Begin();
|
|
|
+ FTT2D_SetDefaultMatBlend(EFTT2D_Blend_5);
|
|
|
+ FTT2D_SetTexture(
|
|
|
+ tPtrTextureData_D0.pType_0->prenderToTexture_44->GetTexture(),
|
|
|
+ 0);
|
|
|
+ FTT2D_DrawTexturedRect(0, 0, 1024.0f, 1024.0f, -1, 0, -999999.0f,
|
|
|
+ -999999.0f);
|
|
|
+ FTT2D_End();
|
|
|
+ r4_prenderToTexture->EndRenderToTexture(EFTTRTTCopyMode_0);
|
|
|
+ // 0019E6CE
|
|
|
+ CFTTVector32x4 vector32x4_spd0;
|
|
|
+ vector32x4_spd0.my[0] = 1.0f;
|
|
|
+ vector32x4_spd0.my[1] = 1.0f;
|
|
|
+ vector32x4_spd0.my[2] = 1.0f;
|
|
|
+ vector32x4_spd0.my[3] = 0;
|
|
|
+ CGaussianNewShader::s_tInstance.SetColourMultiplier(
|
|
|
+ vector32x4_spd0);
|
|
|
+ // sp3c=r9
|
|
|
+ GaussianBlur(r4_prenderToTexture, r9_prenderToTexture,
|
|
|
+ prenderToTexture_sp44, 2.0f,
|
|
|
+ tPtrTextureData_D0.pType_0->miCFTTMaterialIndex_0,
|
|
|
+ true, true);
|
|
|
+ FTT2D_Begin();
|
|
|
+
|
|
|
+ FTT2D_SetTexture(r4_prenderToTexture->GetTexture(), 0);
|
|
|
+ FTT2D_DrawTexturedRect(0, 0, 1024.0f, 1024.0f, -1, 0, -999999.0f,
|
|
|
+ -999999.0f);
|
|
|
+ FTT2D_SetDefaultMatBlend(EFTT2D_Blend_7);
|
|
|
+ // sp40=r4
|
|
|
+
|
|
|
+ // s16=2.5f s18=192.0f s20=64.0f s22=255.0f
|
|
|
+ // sp48=r11=tPtrTextureData_D0.pType_0
|
|
|
+ // loc_19E8B8
|
|
|
+
|
|
|
+ for (int r10_i = 0; r10_i != 0x20; r10_i++) {
|
|
|
+ // loc_19E754
|
|
|
+ // r8=tPtrTextureData_D0.pType_0.2950[r10_i]
|
|
|
+ for (uint r9_u = 0;
|
|
|
+ r9_u < tPtrTextureData_D0.pType_0->uc_2950[r10_i]; r9_u++) {
|
|
|
+ // loc_19E7A8
|
|
|
+ TSATAnim_TSX *r5_panim = GetAnim(
|
|
|
+ tPtrTextureData_D0.pType_0->buff_94c[r10_i][r9_u].b_0);
|
|
|
+ TSATAnim_TSX *r3_panim = GetLegAnim(
|
|
|
+ tPtrTextureData_D0.pType_0->buff_94c[r10_i][r9_u].b_0);
|
|
|
+ CFTTMatrix32 mat32_spd0 =
|
|
|
+ tPtrTextureData_D0.pType_0->pmembers_34.pType_0[r10_i]
|
|
|
+ .Animate(
|
|
|
+ r5_panim, r3_panim,
|
|
|
+ tPtrTextureData_D0.pType_0->buff_94c[r10_i][r9_u]
|
|
|
+ .us_2);
|
|
|
+ CFTTVector32 vector_sp78;
|
|
|
+ vector_sp78.float_0 = 0.100000001f;
|
|
|
+ vector_sp78.float_4 = 0.300000012f;
|
|
|
+ vector_sp78.float_8 = 0.100000001f;
|
|
|
+ ((TAABB *)&mat32_spd0)->Inflate(vector_sp78);
|
|
|
+ // 0019E7F2
|
|
|
+ float s0_f = mat32_spd0.d[1][0] / 2.5f;
|
|
|
+ int r0_i =
|
|
|
+ tPtrTextureData_D0.pType_0->buf_1950[r10_i][r9_u]->field_C /
|
|
|
+ 2;
|
|
|
+ int r1_i =
|
|
|
+ 0x400 - tPtrTextureData_D0.pType_0->buf_1950[r10_i][r9_u]
|
|
|
+ ->field_10 /
|
|
|
+ 2;
|
|
|
+ int r2_i = tPtrTextureData_D0.pType_0->buf_1950[r10_i][r9_u]
|
|
|
+ ->field_14 /
|
|
|
+ 2;
|
|
|
+ //s8=r3
|
|
|
+ int r3_i = 0 - tPtrTextureData_D0.pType_0->buf_1950[r10_i][r9_u]
|
|
|
+ ->field_18 /
|
|
|
+ 2;
|
|
|
+
|
|
|
+ float s10_f = 64.0f + s0_f * 192.0f;
|
|
|
+ float s2_f = r0_i;
|
|
|
+ float s8_f = r3_i;
|
|
|
+ float s4_f = r1_i;
|
|
|
+ float s6_f = r2_i;
|
|
|
+ s0_f = 255.0f;
|
|
|
+ if (s10_f < 255.0f) {
|
|
|
+ s0_f = s10_f;
|
|
|
+ }
|
|
|
+
|
|
|
+ uint r5_u = s0_f;
|
|
|
+
|
|
|
+ r5_u =
|
|
|
+ ((r5_u | (r5_u * 0x100)) | (r5_u * 0x10000)) | 0xFF000000;
|
|
|
+ FTT2D_DrawRect4(s2_f, s4_f, s6_f, s8_f, 0xFF404040, 0xFF404040,
|
|
|
+ r5_u, r5_u, 0, -999999.0f, -999999.0f);
|
|
|
+ }
|
|
|
+ // 0019E8AA
|
|
|
+ }
|
|
|
+ // 0019E8C0
|
|
|
+ FTT2D_End();
|
|
|
+ CFTTTexture *r4_ptexture =
|
|
|
+ r9_prenderToTexture->EndRenderToTexture(EFTTRTTCopyMode_2);
|
|
|
+ if (ptexture_A4) {
|
|
|
+ // 0019E8DA
|
|
|
+ delete ptexture_A4;
|
|
|
+ }
|
|
|
+ // loc_19E8E0
|
|
|
+ ptexture_A4 = r4_ptexture;
|
|
|
+ switch (GFXSPEC_pSpecification->eCrowdQuality_4C) {
|
|
|
+ case 1:
|
|
|
+ case 2:
|
|
|
+ case 3:
|
|
|
+ case 4:
|
|
|
+ // loc_19E8FE
|
|
|
+
|
|
|
+ // loc_19E96C
|
|
|
+ r4_ptexture->SetMinFilter(EFTTTex_MinFilter_5);
|
|
|
+ break;
|
|
|
+
|
|
|
+ default:
|
|
|
+ // 0019E968
|
|
|
+ // loc_19E96C
|
|
|
+ r4_ptexture->SetMinFilter(EFTTTex_MinFilter_4);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ // 0019E972
|
|
|
+ CFTTTexParam parm;
|
|
|
+ // check 这里传参
|
|
|
+ parm.setTexture(ptexture_A4);
|
|
|
+
|
|
|
+ CCrowdNewShader::s_tInstance.SetDiffuse(parm,
|
|
|
+ dCrowdNewShaderID_CBBC[2]);
|
|
|
+ if (tPtrTextureData_D0.pType_0->prenderToTexture_44) {
|
|
|
+ // 0019E994
|
|
|
+ delete tPtrTextureData_D0.pType_0->prenderToTexture_44;
|
|
|
+ }
|
|
|
+ // loc_19E99A
|
|
|
+ tPtrTextureData_D0.pType_0->prenderToTexture_44 = NULL;
|
|
|
+ delete r9_prenderToTexture;
|
|
|
+ // 0019E9A8
|
|
|
+ if (prenderToTexture_sp44) // 0019E9AA
|
|
|
+ delete prenderToTexture_sp44;
|
|
|
+ // loc_19E9B0
|
|
|
+ if (r4_prenderToTexture) // 0019E9B4
|
|
|
+ delete r4_prenderToTexture;
|
|
|
+ // loc_19E9BA
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
break;
|
|
|
+ }
|
|
|
+ default:
|
|
|
+ break;
|
|
|
}
|
|
|
+ LOGE("end");
|
|
|
}
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
|
// 0019F7E4 ^_^
|