123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040 |
- #include "CGFXSpec.h"
- #include "CGfxCrowd.h"
- #include "CCrowdNewShader.h"
- #include "CFTTBatchModelManager.h"
- #include "CFTTCamera.h"
- #include "CFTTMaterialManager.h"
- #include "CFTTShaderBuiltInConstants.h"
- #include "CFTTTextureManager.h"
- #include "CGaussianNewShader.h"
- #include "CGfxEnvironmentMap.h"
- #include "CGfxKits.h"
- #include "CGfxPlayer.h"
- #include "CGraphicsTexLoadOptions.h"
- #include "CModelManager.h"
- #include "CPlayerShader.h"
- #include "FTT2D.h"
- #include "GFXSCENE.h"
- #include "Matrix.h"
- #include "TGame.h"
- #include "XSYS.h"
- #include "memctrl.h"
- #include <algorithm>
- #include "FTTArray.h"
- CGfxCrowd *CGfxCrowd::ms_pInstance = nullptr;
- 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,
- 0xD, 0xE, 0xF, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 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,
- 0xD, 0xE, 0xF, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 3, 3, 0x10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 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};
- 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}};
- 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;
- }
- //00189C0C
- ^_-
- //单元测试等级: 游戏运行正常
- //单元测试内容: 启动游戏到第7关
- //单元测试结果: 正常
- //!!!!!!!这里要更新FTTArray头文件 否则函数签名不一致
- void SetupGaussian(FTTArray<FTTPair<float,float>,PointType_16> &r0_parr,float r1_f)
- {
- uchar r7_uc=0;
- float s4_f=r1_f+r1_f;
- float s2_f=r1_f*6.28318548f;
- float s18_f=s4_f*r1_f;
- float s0_f=s2_f*r1_f;
- float s20_f=sqrt(s0_f);
-
- float f_sp1c[0x20];
- while(1){
- //loc_189C72 OK
- //check
- LOGE("SetupGaussian_1");
- float s0_f=s20_f;
- float s24_f=1.0f/s0_f;
- float s2_f=(short)r7_uc*(short)r7_uc;
- s2_f=-s2_f;
- s2_f/=s18_f;
- s0_f=powf(2.71828175f,s2_f);
- s0_f=s24_f*s0_f;
- if(s0_f<=0.00999999978f)
- break;
- //loc_189C4A
- f_sp1c[r7_uc++]=s0_f;
-
- };
- //00189CA8
- //r1=-4 s2=0.0 r2=sp20 s0=sp1c[0]
- s2_f=0.0f;
- int r1_i=r7_uc-1;
- int i=1;
- while(r1_i){
- //loc_189CBE Ok
- LOGE("SetupGaussian_2");
- s2_f=s2_f+ f_sp1c[i];
- i++;
- r1_i--;
- }
- //00189CCE
- s2_f=s2_f+s2_f;
- s0_f=1.0f/(f_sp1c[0]+s2_f);
- //loc_189CF2
- int r0_i=0;
- while(r0_i!=r7_uc){
- //loc_189CE2 OK
- LOGE("SetupGaussian_3");
- f_sp1c[r0_i]=s0_f*f_sp1c[r0_i];
- r0_i++;
- }
- //00189CF6
- uchar r4_uc=r7_uc-1;
- //loc_189D38
- while(r4_uc!=1){
- //loc_189CFC
- if(r4_uc!=0){
- //00189CFE OK
- LOGE("SetupGaussian_4");
- s0_f=f_sp1c[r4_uc];
- s4_f=r4_uc-1;
- s2_f=f_sp1c[r4_uc-1];
- s2_f=s2_f+s0_f;
- s0_f/=s2_f;
- s0_f+=s4_f;
- FTTPair<float, float> pair_sp14;
- pair_sp14.m_t1=s0_f;
- pair_sp14.m_t2=s2_f;
- r0_parr.Insert(std::move(pair_sp14));
- r4_uc-=2;
- }else{
- //loc_189D64
- break;
- }
- }
- if(r4_uc==1){
- //00189D3E
- LOGE("SetupGaussian_5");
- s4_f=f_sp1c[r4_uc];
- s2_f=f_sp1c[0];
- float s6_f=s4_f+s2_f*0.5f;
- s0_f=s4_f/s6_f;
- FTTPair<float, float> pair_sp14;
- pair_sp14.m_t1=s0_f;
- pair_sp14.m_t2=s6_f;
- //!!!!!!!这里的函数签名不对要注意修改
- r0_parr.Insert(std::move(pair_sp14));
- }else if(r4_uc==0){
- //loc_189D64 OK
- LOGE("SetupGaussian_6");
- FTTPair<float, float> pair_sp14;
- pair_sp14.m_t1=0;
- pair_sp14.m_t2=f_sp1c[0];
- r0_parr.Insert(std::move(pair_sp14));
- }
- //00189D74
- FTTArray<FTTPair<float,float>,PointType_16>::Iterator it_spc(r0_parr.array_0);
- //it_spc.m_buf=&r0_parr;
- FTTArray<FTTPair<float,float>,PointType_16>::Iterator it_sp4(r0_parr.array_0+r0_parr.m_count);
- //it_sp4.m_buf=&r0_parr+r0_parr.m_count;
- //FTTALG::Reverse<FTTArray<FTTPair<float,float>,16u>::Iterator>(FTTArray<FTTPair<float,float>,16u>::Iterator,FTTArray<FTTPair<float,float>,16u>::Iterator)
- // FTTALG::Reverse<FTTArray<FTTPair<float,float>,16u>::Iterator>(FTTArray<FTTPair<float,float>,16u>::Iterator,FTTArray<FTTPair<float,float>,16u>::Iterator)
- FTTALG::Reverse(it_spc,it_sp4);
- LOGE("SetupGaussian_end");
- }
- 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;
- // i2 = 0;
- // //.text:00185E2E B loc_185E58
- // for (int iR6 = 0; iR6 < pModel0->us_10; iR6++) { // loc_185E30
- // bool b = i3 == -1;
- // // text:00185E32 IT NE
- // if (i3 != -1)
- // b = i3 == iR6;
- // //.text:00185E36 BNE loc_185E54
- // if (b) {
- // uint iR7 = pModel0->u_28.list_C[iR6].field_4;
- // //.text:00185E40 CBZ R7, loc_185E4C
- // if (iR7) {
- // iR1 += iR7 - 2;
- // i2 = iR1;
- // }
- // // loc_185E4C
- // iR1 += pModel0->u_28.list_C[iR6].field_6;
- // i2 = iR1;
- // }
- // // loc_185E54
- // }
- // //.text:00185E5E BCC loc_185E30
- // pUS1 = new ushort[iR1 * 3];
- // int offsetR9 = 0;
- // int posR7 = 0;
- // // LOGE("pppp");
- // //.text:00185E86 B loc_185F9A
- // for (int iR6 = 0; iR6 < pModel0->us_10; iR6++) { // loc_185E88
- // bool b = i3 == -1;
- // //.text:00185E8A IT NE
- // if (i3 != -1)
- // b = i3 == iR6;
- // int sizeR12;
- // //.text:00185E8E BNE loc_185EDE
- // if (b) { //.text:00185E90
- // memcpy(&pUS1[3 * offsetR9],
- // (char *)&pModel0->u_24.pmodel_union_struct_2[posR7],
- // 6 * pModel0->u_28.list_C[iR6].field_6);
- // sizeR12 = pModel0->u_28.list_C[iR6].field_6;
- // int lenR3 = pModel0->u_28.list_C[iR6].field_4;
- // offsetR9 += sizeR12;
- // int sLR, eR0;
- // //.text:00185ED0 CBZ R3, loc_185EF0
- // if (lenR3) { //.text:00185ED2
- // sLR = pModel0->u_28.list_C[iR6].field_2;
- // eR0 = pModel0->u_28.list_C[iR6].field_0;
- // //.text:00185EDC B loc_185EF6
- // } else { // loc_185EF0
- // eR0 = 0;
- // sLR = 0;
- // }
- // // loc_185EF6
- // //.text:00185EFC BCS loc_185F92
- // for (int iR2 = 2; iR2 < lenR3; iR2++) {
- // int iR3 = 3 * offsetR9;
- // pUS1[iR3] = eR0;
- // //.text:00185F0C BNE loc_185F26
- // if (iR2 << 31) { // loc_185F26
- // pUS1[iR3 + 1] = (&pModel0->u_28.list_C[iR6].field_0)[iR2];
- // pUS1[iR3 + 2] = sLR;
- // } else { //.text:00185F0E
- // pUS1[iR3 + 1] = sLR;
- // pUS1[iR3 + 2] = (&pModel0->u_28.list_C[iR6].field_0)[iR2];
- // }
- // // loc_185F3E
- // //.text:00185F62 BEQ loc_185F72
- // if (pUS1[3 * offsetR9] == pUS1[3 * offsetR9 + 1]
- // //.text:00185F70 BNE loc_185F8C
- // || pUS1[3 * offsetR9 + 1] == pUS1[3 * offsetR9 + 2] || pUS1[3 *
- // offsetR9] == pUS1[3 * offsetR9 + 2]) {
- // --i2;
- // } else { // loc_185F8C
- // ++offsetR9;
- // }
- // eR0 = sLR;
- // sLR = (&pModel0->u_28.list_C[iR6].field_0)[iR2];
- // }
- // } else { // oc_185EDE
- // sizeR12 = pModel0->u_28.list_C[iR6].field_6;
- // }
- // posR7 += sizeR12;
- // } //.text:00185FA0 BCC.W loc_185E88
- // }
- //-------------------------------------------------------------------------------------------------
- // 0019691C 经过单元测试功能正常 (前5关)
- CGfxCrowd::CGfxCrowd() {
- // pRender2Tex_9C = nullptr;
- // pRender2Tex_A0 = nullptr;
- // pRender2Tex_A4 = nullptr;
- // b_CBB4 = false;
- // // 001969D0
- // CFTTTexParam var_28(1);
- // dCrowdNewShaderID_CBBC[0] =
- // CCrowdNewShader::s_tInstance.CreateMat(ECrowdNewShader_Quads_1,
- // ECrowdNewShader_Alphatest_0,
- // var_28,
- // ECrowdNewShader_CullMode_1);
- // // 001969E4
- // dCrowdNewShaderID_CBBC[1] =
- // CCrowdNewShader::s_tInstance.CreateMat(ECrowdNewShader_Quads_1,
- // ECrowdNewShader_Alphatest_1,
- // var_28,
- // ECrowdNewShader_CullMode_1);
- // // 001969F8
- // dCrowdNewShaderID_CBBC[2] =
- // CCrowdNewShader::s_tInstance.CreateMat(ECrowdNewShader_Quads_0,
- // ECrowdNewShader_Alphatest_0,
- // var_28,
- // ECrowdNewShader_CullMode_1);
- }
- //-------------------------------------------------------------------------------------------------
- // 00196A10
- CGfxCrowd::~CGfxCrowd() {
- Shut();
- for (int r5 = 0; r5 != 3; r5++) { // loc_196A48
- // loc_196A3C
- FTT_pMtlL->ReleaseMaterial(dCrowdNewShaderID_CBBC[r5]);
- }
- // 00196A4C
- }
- //-------------------------------------------------------------------------------------------------
- // 001968CC ^_^
- void CGfxCrowd::Initialise() { ms_pInstance = new CGfxCrowd; }
- //-------------------------------------------------------------------------------------------------
- // 001968EC
- void CGfxCrowd::Shutdown() {
- if (CGfxCrowd::ms_pInstance != nullptr) {
- delete CGfxCrowd::ms_pInstance;
- }
- CGfxCrowd::ms_pInstance = nullptr;
- }
- //-------------------------------------------------------------------------------------------------
- // 0019690C
- CGfxCrowd *CGfxCrowd::Get() { return CGfxCrowd::ms_pInstance; }
- //-------------------------------------------------------------------------------------------------
- // 00196AF8
- void CGfxCrowd::Shut() { LOGX("CGfxCrowd::Shut 00196AF8"); }
- //-------------------------------------------------------------------------------------------------
- // 00196E72 ^_^
- void CGfxCrowd::Init() { f_CBB8 = 0; }
- //-------------------------------------------------------------------------------------------------
- // 00197140
- void CGfxCrowd::AddStand(CFTTModel *, CFTTMatrix32) {
- LOGX("CGfxCrowd::AddStand 00197140");
- }
- //-------------------------------------------------------------------------------------------------
- // 00199D4C
- void CGfxCrowd::GetCapacity(CFTTModel *, CFTTMatrix32) {
- LOGX("CGfxCrowd::GetCapacity 00199D4C");
- }
- //-------------------------------------------------------------------------------------------------
- // 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));
- // }
- //-------------------------------------------------------------------------------------------------
- // 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;
- // }
- // // 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 ^_-
- //单元测试等级: 游戏运行正常
- //单元测试内容: 启动游戏到第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 OK
- // sp28=m_st_D0
- LOGE("case 0");
- CrowdTextureCreationData *r1_pdata = new CrowdTextureCreationData;
- 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.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
- tPtrTextureData_D0.pType_0->miCFTTMaterialIndex_0 =
- CGaussianNewShader::s_tInstance.CreateMat(
- EGaussianNewShader_Channel_1, EGaussianNewShader_Blend_1);
- CFTTTexLoadOptions options_sp78 =
- g_tGlobalTexLoadOptions.mTexLoadOptions_4;
- // r9=spd0
- 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].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],
- g_tGlobalTexLoadOptions.mTexLoadOptions_4, 0);
- CGfxKits::LoadKitTeamTextures(
- &tGame.CTeam_2C60[1], &team_textures_spd0[1],
- g_tGlobalTexLoadOptions.mTexLoadOptions_4, 0);
- CGfxKits::BeginBuildKit(0);
-
- CGfxKits::GetTexture(tPtrTextureData_D0.pType_0->texture_4,
- team_textures_spd0, 0, EKitTextureType_0, NULL);
- CGfxKits::GetTexture(tPtrTextureData_D0.pType_0->texture_8,
- team_textures_spd0, 1, EKitTextureType_0, NULL);
- // 0019CCDE
- CGfxKits::GetTexture(tPtrTextureData_D0.pType_0->texture_C,
- &team_textures_spd0[1], 0, EKitTextureType_0, NULL);
- CGfxKits::GetTexture(tPtrTextureData_D0.pType_0->texture_10,
- &team_textures_spd0[1], 1, EKitTextureType_0, NULL);
- CGfxKits::EndBuildKit();
- // 0019CD02
- CGfxKits::FreeKitTeamTextures(team_textures_spd0);
- CGfxKits::FreeKitTeamTextures(&team_textures_spd0[1]);
- // 0019CD0E
- tPtrTextureData_D0.pType_0->model_2C = CModelManager::LoadModel(
- "data/models/crowd/crowd1.FTM", "data/models/crowd/",
- EModelLoadFlags_2, true);
- // 0019CD20
- tPtrTextureData_D0.pType_0->model_30 = CModelManager::LoadModel(
- "data/models/crowd/crowd2.FTM", "data/models/crowd/",
- EModelLoadFlags_2, true);
- // 0019CD34
- tPtrTextureData_D0.pType_0->texture_48 = FTT_pTex->LoadTexture(
- "data/models/Player/Textures/kit_dyn_n.p", options_sp78);
- // 0019CD50
- tPtrTextureData_D0.pType_0->texture_4C = FTT_pTex->LoadTexture(
- "data/models/Player/Textures/kit_dyn_a.p", options_sp78);
- // 0019CD5E
- tPtrTextureData_D0.pType_0->texture_50 = FTT_pTex->LoadTexture(
- "data/models/Player/Textures/atlas_n.png", options_sp78);
- // 0019CD6C
- tPtrTextureData_D0.pType_0->texture_58 = FTT_pTex->LoadTexture(
- "data/models/Player/Textures/atlas_s.png", options_sp78);
- // 0019CD7A
- options_sp78.eMinFilter_18 = EFTTTex_MinFilter_0;
- CFTTTexture *r4_name_texture = CFTTTexture::LoadName(
- "data/models/Crowd/jeans.png", options_sp78, true);
- if (tPtrTextureData_D0.pType_0->name_texture_5C) { // 0019CD98
- delete tPtrTextureData_D0.pType_0->name_texture_5C;
- }
- // 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
- delete tPtrTextureData_D0.pType_0->name_texture_60;
- }
- // loc_19CDBC
- tPtrTextureData_D0.pType_0->name_texture_60 = r4_name_texture;
- r4_name_texture = CFTTTexture::LoadName("data/models/Crowd/jacket.png",
- options_sp78, true);
- if (tPtrTextureData_D0.pType_0->name_texture_64) { // 0019CDD4
- delete tPtrTextureData_D0.pType_0->name_texture_64;
- }
- // loc_19CDDA
- tPtrTextureData_D0.pType_0->name_texture_64 = r4_name_texture;
- GFXSCENE_Apply(NULL);
- CFTTVector32 vrctor32_sp50;
- 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
- // 0019CE48 这里的符号不对 可能会造成内存泄漏
- // FTTUPtr<TCrowdMember []>::operator=(TCrowdMember*)
- 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[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[2] = 0;
- vector32x4_sp120.my[3] = 0;
- CPlayerShader::s_tInstance.SetCinematicLightingSkin(vector32x4_sp120);
- break;
- }
- case 1: {
- // 0019CE84 OK
- LOGE("case 1");
-
- for (int r4_i = 0; r4_i != 0x20; r4_i++) {
- // loc_19CE9E
- float s0_f = XSYS_RandomNoSyncF(0.0799999982f);
- 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_8 = 0;
- tPtrTextureData_D0.pType_0->pmembers_34.pType_0[r4_i]
- .m_cVec32_ADC.float_0 =
- (-6.975f + r4_i * 0.449999988f) + (s0_f - 0.0399999991f);
- }
- // 0019CEDA
- 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);
- break;
- }
- case 2:
- case 4: { // loc_19CFB4 OK
- // sp4c=tPtrTextureData_D0
- 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
- ->pprenderToTexture_38[(uint)r4_member_type]) // 0019CFF4
- delete tPtrTextureData_D0.pType_0
- ->pprenderToTexture_38[(uint)r4_member_type];
- // loc_19CFFA
- 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
- if (r6_u <= 5) { // 0019D00C
- tPtrTextureData_D0.pType_0->pmembers_34.pType_0[r6_u].Setup(
- r4_member_type, r6_u);
- } else {
- // loc_19D012
- tPtrTextureData_D0.pType_0->pmembers_34.pType_0[r6_u].Setup(
- ECrowdMemberType_2, r6_u - 6);
- }
- // 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++) {
- // loc_19D04C
- float s0_f = XSYS_RandomNoSyncF(0.0399999991f);
- 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_8 = 0;
- tPtrTextureData_D0.pType_0->pmembers_34.pType_0[r4_i]
- .m_cVec32_ADC.float_0 =
- (-6.975f + r4_i * 0.449999988f) + (s0_f - 0.0199999996f);
- }
- // 0019D088
- // sp38=unk_2FEFF4
- // sp34=unk_2FF003
- // r1=0
- int r1_i = 0;
- // loc_19D128
- for (int r2_i = 0; r2_i != 0x20; r2_i++) {
- // loc_19D0A2
- // sp44=r2_i
- // sp48=r1
- int r1_i = (int)tPtrTextureData_D0.pType_0->pmembers_34.pType_0[r2_i]
- .m_eCrowdMemberType_0 *
- 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]);
- const uchar *r6_pb =
- &byte_2FF003[tPtrTextureData_D0.pType_0->pmembers_34.pType_0[r2_i]
- .m_eCrowdMemberType_0 *
- 60];
- //
- int r0_i1 = XSYS_RandomNoSync(r4_pb[4]);
- 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
- // sp44=byte_4630E0
- // loc_19D1DC
- for (int r9_i = 0; r9_i != 0x20; r9_i++) {
- // 0019D146
- // loc_19D1D0
- for (int r5_i = 0; r5_i != 0x10; r5_i++) {
- // loc_19D14A
- 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;
- 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
- // check
- tPtrTextureData_D0.pType_0->field_10c[r9_i][r5_i].us_2 = r0_i;
- }
- // 0019D1D4
- }
-
- break;
- }
- case 3:
- case 5: {
- // 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);
- 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 ^_^
- void CGfxCrowd::Render() {
- // LOGI("CGfxCrowd::Render 0019F7E4");
- // if (aVec_8C[0].GetObj() == nullptr || pRender2Tex_9C == nullptr) { //
- // 0019F7EC
- // return;
- // }
- // // 0019F7F4
- // g_pGraphicsDevice->setDepthTest(EFTTDepthTest_8, false);
- // RenderSteward();
- // RenderStatic();
- // RenderDynamic();
- // g_pGraphicsDevice->setDepthTest(EFTTDepthTest_8, true);
- // // 0019F82A
- // for (uint r5 = 0; r5 < vec_64.use_count_C; r5++) { // loc_19F838
- // // loc_19F82C
- // vec_64.GetObj()[r5].GetObj()->Render();
- // }
- // // 0019F83E
- // for (uint r5 = 0; r5 < vec_78.use_count_C; r5++) { // loc_19F838
- // // loc_19F82C
- // vec_78.GetObj()[r5].GetObj()->Render();
- // }
- }
- //-------------------------------------------------------------------------------------------------
- // 0019F85C
- void CGfxCrowd::RenderSteward() {
- LOGX("CGfxCrowd::RenderSteward 0019F85C %p", this);
- }
- //-------------------------------------------------------------------------------------------------
- // 0019F990
- void CGfxCrowd::RenderStatic() {
- LOGX("CGfxCrowd::RenderStatic 0019F990 %p", this);
- }
- //-------------------------------------------------------------------------------------------------
- // 0019FCC8
- void CGfxCrowd::RenderDynamic() {
- LOGX("CGfxCrowd::RenderDynamic 0019FCC8 %p", this);
- }
- //-------------------------------------------------------------------------------------------------
- // 001A101C
- void CGfxCrowd::Process() { LOGI("CGfxCrowd::Process 001A101C"); }
- //-------------------------------------------------------------------------------------------------
- // 001A12C8 ^_^
- void CGfxCrowd::GetCrowdState(float &f1, float &f2, float &f3) {
- // f1 = tCrowd_C0EC[0].f_0;
- // f2 = tCrowd_C0EC[4].f_0;
- // f3 = tCrowd_C0EC[8].f_0;
- }
- //-------------------------------------------------------------------------------------------------
- // 001A12E6 ^_^
- int CGfxCrowd::GetCapacity() { return vec_0.use_count_C; }
- //-------------------------------------------------------------------------------------------------
- // 001A12EA ^_^
- CrowdTextureCreationData *CGfxCrowd::GetTextureCreationData() {
- return tPtrTextureData_D0.pType_0;
- }
- //-------------------------------------------------------------------------------------------------
- // 001A12F0 ^_^
- float CGfxCrowd::GetCrowdValue(ECrowdMemberType eType1) {
- return f_CBC8[eType1];
- }
- //-------------------------------------------------------------------------------------------------
- // 001A12FC ^_^
- void CGfxCrowd::SetCrowdValue(ECrowdMemberType eType1, float f2) {
- f_CBC8[eType1] = f2;
- }
- //-------------------------------------------------------------------------------------------------
|