123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173 |
- #include "FREE.h"
- #include "memctrl.h"
- #include "CBall.h"
- #include "CFTTPObject.h"
- #include "CFTTPPBox.h"
- #include "CFTTPPCone.h"
- #include "CFTTPPCylinder.h"
- #include "CFTTPPPolyhedron.h"
- #include "CFTTPPSphere.h"
- #include "CFTTPhysics.h"
- #include "CModelManager.h"
- #include "fpoint.h"
- #include "sub.h"
- #include "CPlayerManager.h"
- // FREE_tInfo 0x1D20
- // FREE_tGoal 0x7634
- TFreeInfo FREE_tInfo;
- CFTTModel *FREE_pStarModel;
- int FREE_iPropWeather;
- const char *s_sPropModels_SNOW[3] = {
- "PKG:/data/env/dressing/cone_snow.ftm",
- "PKG:/data/env/dressing/mannequin_snow.ftm",
- "PKG:/data/env/dressing/rebounder.ftm"};
- CFTTModel *FREE_pPropModel[3];
- const char *s_sPropModels[3] = {"PKG:/data/env/dressing/cone.ftm",
- "PKG:/data/env/dressing/mannequin.ftm",
- "PKG:/data/env/dressing/rebounder.ftm"};
- const char *s_sPropModels_Shadow[3] = {"PKG:/data/env/dressing/cone.ftm",
- "PKG:/data/env/dressing/mannequin_s.ftm",
- "PKG:/data/env/dressing/rebounder.ftm"};
- CFTTModel *FREE_pPropModelShadow[3];
- //-------------------------------------------------------------------------------------------------
- // 001D2758
- int FREE_GetLevelFilename(char *, int, char *, bool &) { return 0; }
- //-------------------------------------------------------------------------------------------------
- // 001D27EC
- void FREE_GetWorldRot(TPoint, TPoint) {}
- //-------------------------------------------------------------------------------------------------
- // 001D281C
- void FREE_CalcKickAngle(TPoint3D *, TPoint3D, TPoint3D, int, int, int *) {}
- //-------------------------------------------------------------------------------------------------
- // 001D2A98
- int FREE_PassCheckPath(CPlayer *, TPoint, TPoint) { return 0; }
- //-------------------------------------------------------------------------------------------------
- // 001D2BC0
- void FREE_ResolveEndPoint(TPoint3D *, TPoint3D *, TPoint *, int *, bool) {}
- //-------------------------------------------------------------------------------------------------
- // 001D30B8
- void FREE_GetKickPower(EAnimID, int *, int *) {}
- //-------------------------------------------------------------------------------------------------
- // 001D30FC
- void FREE_ProcessControls(bool) {}
- //-------------------------------------------------------------------------------------------------
- // 001D3EC8
- int FREE_CalcKickTargetTime(int) { return 0; }
- //-------------------------------------------------------------------------------------------------
- // 001D3EEC
- void FREE_ResetControls() {}
- //-------------------------------------------------------------------------------------------------
- // 001D3F24
- int FREE_PassIsLowKick(TFreeControl *, TPoint3D *, TPoint3D *, int) {
- return 0;
- }
- //-------------------------------------------------------------------------------------------------
- // 001D3FA8
- void FREE_ControlGetKickLimits(CPlayer *player0, int *pi1, int *pi2, int *pi3) {
-
- int *var_58 = pi1;
- int *var_54 = pi2;
- int *var_50 = pi3;
- int var_2C = 0;
- int var_28 = 0;
- TPoint3D var_38;
- TPoint3D var_48;
- int r0_i = player0->tStr32_44.field_10;
- FREE_GetKickPower((EAnimID)r0_i, &var_28, &var_2C);
- var_28 = 100;
- int r4_i = 21627;
- var_48.point_0.dy_4 = XMATH_InterpolateClamp(100, 0, 1600, 0, r4_i);
- r0_i = XMATH_InterpolateClamp(var_2C, 0, 1600, 0, r4_i);
- // 001D3FF0
- if (r0_i < r4_i) {
- // 001D3FF4
- r4_i = r0_i;
- }
- // 001D3FF6
- var_48.dz_8 = r4_i;
- r0_i = 0;
- int r7_i = 163840;
- int r6_i = 0;
- r4_i = 0;
- var_48.point_0.dx_0 = r0_i;
- int r1_i;
- // loc_1D40EA
- while (r7_i != 1998848) {
- // loc_1D4006
- int r2_i = FREE_CalcKickTargetTime(r7_i);
- int r9_i = 4096;
- // r5 = cball
- int r8_i = cBall.ballPosPrev_4.point_0.dx_0;
- int r3_i = cBall.ballPosPrev_4.point_0.dy_4;
- int r10_i = r7_i + r3_i;
- // 356A7C - 0x356A70
- r0_i = cBall.ballPosPrev_4.dz_8;
- int var_3C = r6_i;
- int r11_i;
- // 001D4024
- if (r0_i < 32768) {
- // 001D402A
- TPoint3D tp1;
- // int var_4C = r2_i;
- tp1.point_0.dx_0 = r8_i;
- tp1.point_0.dy_4 = r3_i;
- tp1.dz_8 = r0_i;
- TPoint3D tp2;
- tp2.point_0.dx_0 = r8_i;
- tp2.point_0.dy_4 = r10_i;
- tp2.dz_8 = r9_i;
- /*
- * 描述:此处在连续入栈时STRD和STM有出入
- * 原始汇编: STMEA.W SP, {R0,R8,R10}
- * 自已汇编: STRD.W R10, R8, [SP,#0x78+var_78]
- */
- int var_4C = r2_i;
- r0_i = cBall.SetBallMoveToPosLow(&var_38, tp1, tp2, r2_i, -1);
- r11_i = r7_i;
- r1_i = var_48.point_0.dx_0;
- // 001D404A
- if (r0_i < var_48.dz_8) {
- // 001D4050
- r1_i = r7_i;
- }
- var_48.point_0.dx_0 = r1_i;
- r1_i = var_48.point_0.dy_4;
- // 001D4056
- if (r0_i < r1_i) {
- // 001D405A
- r11_i = r4_i;
- }
- // 001D405C
- if (r4_i != 0) {
- // 001D4060
- r11_i = r4_i;
- }
- // 001D4062
- r2_i = cBall.ballPosPrev_4.point_0.dx_0;
- r3_i = cBall.ballPosPrev_4.point_0.dy_4;
- r1_i = r8_i;
- r0_i = cBall.ballPosPrev_4.dz_8;
- r8_i = r2_i;
- r2_i = var_4C;
- } else {
- // loc_1D4070
- r1_i = r8_i;
- r11_i = r4_i;
- }
- // 001D4076
- TPoint3D var_78;
- var_78.point_0.dx_0 = r8_i;
- var_78.point_0.dy_4 = r3_i;
- var_78.dz_8 = r0_i;
- TPoint3D var_6C;
- var_6C.point_0.dx_0 = r1_i;
- var_6C.point_0.dy_4 = r10_i;
- var_6C.dz_8 = r9_i;
- r4_i = r2_i;
- int r5_i =
- cBall.SetBallMoveToPosSpin(&var_38, 0, -2000, var_78, var_6C, r2_i, 0);
- r0_i = r0_i * 2;
- r1_i = (uint)r0_i / (uint)5u;
- // r0_i = var_38.dz_8 ;
- r0_i = r7_i;
- // 001D40A4
- if (var_38.dz_8 > r1_i) {
- // 001D40AA
- r5_i = XMATH_Mag3D(&var_38);
- r0_i = var_38.dz_8;
- r0_i = r0_i / 49;
- r0_i = r0_i * r7_i;
- r0_i = r0_i / r4_i;
- } // loc_1D40C4
- r4_i = r0_i;
- r1_i = var_48.point_0.dy_4;
- r7_i += 32768;
- // 001D40CC
- if (r5_i < r1_i) {
- // 001D40D0
- r4_i = r11_i;
- }
- // 001D40D2
- if (r11_i != 0) {
- // 001D40D8
- r4_i = r11_i;
- }
- r6_i = var_3C;
- // 001D40DC
- if (r0_i <= r6_i) {
- // 001D40E0
- r0_i = r6_i;
- }
- r1_i = var_48.dz_8;
- // 001D40EA
- if (r5_i < r1_i) {
- // 001D40E8
- r6_i = r0_i;
- }
- } // loc_1D4006
- r0_i = r4_i << 1u;
- r1_i = 3;
- r0_i = r0_i / r1_i;
- int *r1_pi = var_58;
- *r1_pi = r0_i;
- r1_i = var_48.point_0.dx_0;
- // 001D40EA
- if (r1_i >= 1146880) {
- // 001D40F0
- r1_i = 1146880;
- }
- *var_54 = r1_i;
- *var_50 = r6_i;
- }
- //-------------------------------------------------------------------------------------------------
- // 001D4120
- void FREE_Init() {}
- //-------------------------------------------------------------------------------------------------
- // 001D4160
- void FREE_Shutdown() {}
- //-------------------------------------------------------------------------------------------------
- // 001D41B0
- void FREE_InitGoal(int, bool, bool, bool) {}
- //-------------------------------------------------------------------------------------------------
- // 001D4318
- void FREE_SetupDifficulty() {}
- //-------------------------------------------------------------------------------------------------
- // 001D4424
- void FREE_Initialise() {}
- //-------------------------------------------------------------------------------------------------
- // 001D49C0
- void FREE_UpdateCamera(bool) {}
- //-------------------------------------------------------------------------------------------------
- // 001D56CC
- void FREE_ClipPathBounds(TPoint3D *, TPoint3D *, int, int, int, int) {}
- //-------------------------------------------------------------------------------------------------
- // 001D5718
- // void FREE_GameLoop() {
- // int r0_i = 0;
- // int r1_i = 0;
- // int r2_i = 0;
- // // 001D571E
- // if (NIS_Active() != 0) {
- // // 001D5720
- // // NIS_GameLoop();
- // CFreeHUD::Process();
- // // 47F7D8 - 0x47DFB0
- // r0_i = FREE_tInfo.filed_0.gamestatus_1828;
- // // 001D5734
- // if (r0_i == 6) {
- // // 001D5738
- // FREE_ProcessFail();
- // r1_i = FREE_tInfo.filed_0.field_182C;
- // r1_i = r1_i + 1;
- // FREE_tInfo.filed_0.field_182C = r1_i;
- // return;
- // } else {
- // // locret_1D582E
- // return;
- // }
- // }
- // // loc_1D5748
- // // 47F7D8 - 0x47DFB0 = 1828
- // r0_i = FREE_tInfo.filed_0.gamestatus_1828;
- // // 001D5754
- // if (r0_i != 8) {
- // // 001D5758
- // tGame.maybe_sound_0++;
- // }
- // // loc_1D5764
- // // 004877F5
- // NISGOAL_tInfo.field_1 = 0;
- // // 47DFB1 - 0x47DFB0
- // FREE_tInfo.filed_0.b_1 = 1;
- // // 001D5776
- // if (CReplay::Playing() != 0) {
- // // 001D5778
- // CReplay::Play();
- // }
- // // loc_1D577C
- // // 47F7D8 - 0x47DFB0
- // r0_i = FREE_tInfo.filed_0.gamestatus_1828;
- // // 001D5782
- // if (r0_i == 7) {
- // // 47F7DC - 0x47DFB0
- // r1_i = FREE_tInfo.filed_0.field_182C;
- // // 3A27BC - 0x39BB88
- // r2_i = tGame.field_6C34;
- // // 001D5798
- // if (r2_i < r1_i) {
- // // 001D579C
- // r0_i = tGame.mTLogic_6678.field_50;
- // r1_i = FREE_tInfo.filed_0.pFREE_tGoal_1818->m_iUserPlayer_7458;
- // if (r1_i == r0_i) {
- // // 001D57C6
- // CGFXFX::EnableStarPlayerEffects();
- // }
- // } else {
- // // loc_1D57B0
- // r0_i = FREE_tInfo.filed_0.pFREE_tGoal_1818->m_iUserPlayer_7458;
- // r1_i = FREE_tInfo.filed_0.field_1830;
- // if (r1_i == r0_i) {
- // // 001D57C6
- // CGFXFX::EnableStarPlayerEffects();
- // }
- // }
- // }
- // // loc_1D57CA
- // // lostphp.com/hexconvert该网站转换,反编译后与原汇编一致
- // float r0_f = 0.01666666753590107;
- // CGFXFX::Update(r0_f);
- // GFXCAMERA_ApplyIngameSettings(-1, -1);
- // GFXCAMERA_UpdateMatrices();
- // int r4_i = FREE_ProcessLogic();
- // // 47FC60 - 0x47DFB0
- // FREE_UpdateCamera(FREE_tInfo.field_1C9C.field_1CB0 == false);
- // // 001D57F2
- // if (r4_i != 0) {
- // // 001D57F8
- // if (CReplay::Playing() != 0) {
- // // loc_1D57FA
- // CAM_Update();
- // return;
- // }
- // } else {
- // // loc_1D57FA
- // CAM_Update();
- // return;
- // }
- // // loc_1D5802
- // // 3A2208 - 0x39BB88
- // r0_i = tGame.mTLogic_6678.field_8;
- // // 001D580E
- // if (r0_i == 2) {
- // // 001D5812
- // // 3A2238 - 0x39BB88
- // r0_i = tGame.mTLogic_6678.field_38;
- // // 001D5818
- // if (r0_i <= 29) {
- // // 001D581C
- // CReplay::RecordFrame();
- // }
- // } else {
- // // loc_1D5822
- // CReplay::RecordFrame();
- // }
- // // loc_1D5826
- // // 3A22A0 - 0x39BB88
- // r0_i = tGame.mTLogic_6678.field_A0;
- // // 001D582C
- // if (r0_i != 0) {
- // // locret_1D582E
- // return;
- // }
- // // loc_1D5830
- // CPlayerManager::UpdatePlayersLogic();
- // FREE_CheckCollision();
- // cBall.UpdateFrame();
- // // 47F7D8 - 0x47DFB0
- // r0_i = FREE_tInfo.filed_0.gamestatus_1828;
- // // 001D584A
- // if (r0_i != 4) {
- // // 001D584E
- // COL_PlayerCollisions();
- // }
- // // 001D5852
- // PhysicsTest();
- // cBall.CheckEvents();
- // // lostphp.com/hexconvert该网站转换,反编译后与原汇编一致
- // GFXNET::Update(0.01666666753590107f);
- // GL_UpdatePlayMode();
- // GM_CalcPlayerDist();
- // GM_CalcPlayerBallInterceptions();
- // FREE_LogicProcess();
- // // 3A2204 - 0x39BB88
- // r0_i = (uchar)tGame.mTLogic_6678.field_4;
- // // 001D5878
- // if (r0_i == 0) {
- // // 001D587C
- // r0_i = FREE_tInfo.filed_0.gamestatus_1828;
- // // 001D5882
- // if (r0_i >= 4) {
- // // 001D5886
- // CPlayerManager::UpdatePlayers();
- // }
- // // 001D588A
- // COMM_Process();
- // }
- // // loc_1D57FA
- // CAM_Update();
- // return;
- // }
- //-------------------------------------------------------------------------------------------------
- // 001D58B4
- void FREE_StoreRewindState() {
- tGame.mTLogic_6678.field_8=rand()%10;}
- //-------------------------------------------------------------------------------------------------
- // 001D5A3E
- void FREE_UpdateRewindState() {}
- //-------------------------------------------------------------------------------------------------
- // 001D5A40
- void FREE_RestoreRewindState() {}
- //-------------------------------------------------------------------------------------------------
- // 001D5AE4
- void FREE_BeginRewind() {}
- //-------------------------------------------------------------------------------------------------
- // 001D5B30
- int FREE_RewindFrame() { return 0; }
- //-------------------------------------------------------------------------------------------------
- // 001D5C0C
- void FREE_ClipPathBounds(TPoint *, TPoint *, int, int, int, int) {}
- //-------------------------------------------------------------------------------------------------
- // 001D656C
- void FREE_IdleProcess() {
- tGame.mTLogic_6678.field_8=1;
- LOGE("FREE_IdleProcess");
- }
- //-------------------------------------------------------------------------------------------------
- // 001D66F0
- void FREE_SetupKick(TFreeControl *, TPoint3D *) {}
- void COUNTER_UpdateGenericCounters(void)
- {
- LOGE("COUNTER_UpdateGenericCountersrand=%x",rand());
- }
- //-------------------------------------------------------------------------------------------------
- // 001D6778 //^_-
- //单元测试等级:目测游戏表现
- //测试内容:启动游戏到第5关传球射门
- //测试结果: 修复后游戏表现正常
- void FREE_LogicProcess() {
- tGame.mTLogic_6678.field_AC = cBall.ballPosPrev_4.point_0.dx_0;
- tGame.mTLogic_6678.field_B0 = cBall.ballPosPrev_4.point_0.dy_4;
-
- // 001D679E
- if (tGame.mTLogic_6678.field_8 >2&&tGame.mTLogic_6678.field_8<5) {
- // 001D67A2
- FREE_IdleProcess();
- } else {
- // loc_1D67A8
- if (tGame.mTLogic_6678.field_8 == 1) {
- // 001D67AC
- COUNTER_UpdateGenericCounters();
- }
- // loc_1D67B0
- }
- // loc_1D67B0
- if (tGame.mTLogic_6678.field_10 == 0) {
- if (tGame.mTLogic_6678.field_8 != 1) {
- // 001D67C4
- CPlayerManager::SetPlayersWalking(1);
- }
- }
- // loc_1D67C8
- tGame.field_6C34++;
- tGame.field_6C38++;
- }
- //-------------------------------------------------------------------------------------------------
- // 001D67E8
- int FREE_GetPassTargetPlayer(CPlayer *, int *) { return 0; }
- //-------------------------------------------------------------------------------------------------
- // 001D6918
- void FREE_ProcessShotAnim(CPlayer *) {}
- //-------------------------------------------------------------------------------------------------
- // 001D6CD8
- void FREE_ProcessUserTeam() {}
- //-------------------------------------------------------------------------------------------------
- // 001D7D74
- void FREE_ProcessOppoTeam() {}
- //-------------------------------------------------------------------------------------------------
- // 001D848C
- void FREE_ProcessFree() {}
- //-------------------------------------------------------------------------------------------------
- // 001D86C4
- void FREE_ProcessFail() {}
- //-------------------------------------------------------------------------------------------------
- // 001D8884
- void FREE_PlayCommentaryClearance() {}
- //-------------------------------------------------------------------------------------------------
- // 001D8944
- void FREE_PlayCommentaryInterception() {}
- //-------------------------------------------------------------------------------------------------
- // 001D8998
- void FREE_SetupKickAction(TPoint3D, int, int) {}
- //-------------------------------------------------------------------------------------------------
- // 001D8AD0
- void FREE_CheckGKHandPos(CPlayer *, int) {}
- //-------------------------------------------------------------------------------------------------
- // 001D8B9C
- int FREE_SetupPhaseTransition(bool) { return 0; }
- //-------------------------------------------------------------------------------------------------
- // 001D8DB4
- int FREE_PlayerGetUrgency(CPlayer *, int) { return 0; }
- //-------------------------------------------------------------------------------------------------
- // 001D8E68
- void FREE_ProcessInProgressCore() {}
- //-------------------------------------------------------------------------------------------------
- // 001D956C
- void FREE_UpdateSuccess() {}
- //-------------------------------------------------------------------------------------------------
- // 001D96E4
- int FREE_ProcessLogic() { return 0; }
- //-------------------------------------------------------------------------------------------------
- // 001DA0A8
- void FREE_PlayCommentaryPassReceive() {}
- //-------------------------------------------------------------------------------------------------
- // 001DA208
- void FREE_PlayCommentaryKick() {}
- //-------------------------------------------------------------------------------------------------
- // 001DA484
- void FREE_SetComplete() {}
- //-------------------------------------------------------------------------------------------------
- // 001DA5C0
- void FREE_PlayersUpset(int) {}
- //-------------------------------------------------------------------------------------------------
- // 001DA620
- void FREE_PlayersCelebrate() {}
- //-------------------------------------------------------------------------------------------------
- // 001DA670
- void FREE_CheckCollision() {}
- //-------------------------------------------------------------------------------------------------
- // 001DA674
- //^_^
- void FREE_InitProps(void) {}
- //-------------------------------------------------------------------------------------------------
- // 001DA730
- void FREE_UpdateProps() {}
- //-------------------------------------------------------------------------------------------------
- // 001DA764
- void FREE_ShutdownProps() {}
- //-------------------------------------------------------------------------------------------------
- // 001DA7A4
- void FREE_RenderPropShadow(EFreePropType, CFTTMatrix32 *) {}
- //-------------------------------------------------------------------------------------------------
- // 001DA7BC
- void FREE_RenderProp(EFreePropType, CFTTMatrix32 *) {}
- //-------------------------------------------------------------------------------------------------
- // 001DA7D4
- void FREE_RenderPropShadows() {}
- //-------------------------------------------------------------------------------------------------
- // 001DA8C0
- void FREE_RenderProps() {}
- //-------------------------------------------------------------------------------------------------
- // 001DA9AC
- void FREE_ProcessPropCollision(TFreeProp *) {}
- //-------------------------------------------------------------------------------------------------
- // 001DA9AE
- void FREE_ProcessPropCollisions() {}
- //-------------------------------------------------------------------------------------------------
- // 001DA9B0
- //^_^
- void FREE_RenderInitOnce() {}
- //-------------------------------------------------------------------------------------------------
- // 001DA9E0
- void FREE_RenderShutdownOnce() {}
- //-------------------------------------------------------------------------------------------------
- // 001DAA00
- void FREE_RenderInit() {}
- //-------------------------------------------------------------------------------------------------
- // 001DAAAC
- void FREE_RenderShutdown() {}
- //-------------------------------------------------------------------------------------------------
- // 001DAAF4
- void FREE_RenderListBegin(char const *, bool, bool) {}
- //-------------------------------------------------------------------------------------------------
- // 001DAB84
- void FREE_RenderListEnd() {}
- //-------------------------------------------------------------------------------------------------
- // 001DABD4
- void FREE_RenderAddVert(TFVF_PFLOAT_CINT_TFLOAT *, CFTTMatrix32 *) {}
- //-------------------------------------------------------------------------------------------------
- // 001DAC40
- void FREE_RenderStar(TPoint3D, float, float) {}
- //-------------------------------------------------------------------------------------------------
- // 001DACE4
- void FREE_RenderTarget(TPoint3D, int, uint, bool) {}
- //-------------------------------------------------------------------------------------------------
- // 001DAEEC
- void FREE_RenderDottedArc(TPoint3D, int, int, int, int, int, uint) {}
- //-------------------------------------------------------------------------------------------------
- // 001DB0BC
- void FREE_RenderRangeCone() {}
- //-------------------------------------------------------------------------------------------------
- // 001DB3CC
- void FREE_RenderDottedLine(TPoint3D, TPoint3D, int, uint, uint) {}
- //-------------------------------------------------------------------------------------------------
- // 001DB5C0
- void FREE_RenderTutorialLine(TPoint3D const &, TPoint3D const &, int) {}
- //-------------------------------------------------------------------------------------------------
- // 001DB9C8
- void FREE_RenderEditPlayerLine(TPoint3D const &, TPoint3D const &) {}
- //-------------------------------------------------------------------------------------------------
- // 001DBBCC
- void FREE_Render3DOpaque() {}
- //-------------------------------------------------------------------------------------------------
- // 001DBBF0
- void FREE_RenderHeroPlayer(bool) {}
- //-------------------------------------------------------------------------------------------------
- // 001DBEEC
- void FREE_Render3DDecal() {}
- //-------------------------------------------------------------------------------------------------
- // 001DBFC4
- void FREE_RenderPreSelectedPlayer() {}
- //-------------------------------------------------------------------------------------------------
- // 001DC0E0
- void FREE_RenderProcess() {}
- //-------------------------------------------------------------------------------------------------
- // 001DC0E4
- void FREE_AddVisualFeedback(int, EVFEffect, int) {}
- //-------------------------------------------------------------------------------------------------
- // 001DC290
- void FREE_AddVisualFeedback_Pass() {}
- //-------------------------------------------------------------------------------------------------
- // 001DC354
- void FREE_AddVisualFeedback_Goal() {}
- //-------------------------------------------------------------------------------------------------
- // 001DC440
- void FREE_AddVisualFeedback_Fail() {}
- //-------------------------------------------------------------------------------------------------
- // 001DC494
- void FREE_AddVisualFeedback_Offside() {}
- //-------------------------------------------------------------------------------------------------
- // 001DC4C8
- void FREE_SortPlayers(TFreeGoal *) {}
- //-------------------------------------------------------------------------------------------------
- // 001DC664
- void FREE_SortPlayersDistance(TFreeGoal *) {}
- //-------------------------------------------------------------------------------------------------
- // 001DC848
- int FREE_ReadXML(TFreeGoal *, int) { return 0; }
- //-------------------------------------------------------------------------------------------------
- // 001DC888
- bool FREE_ReadXML(TFreeGoal *, char *) { return 0; }
- //-------------------------------------------------------------------------------------------------
- // 001DCA14
- void FREE_ReadXMLLevel(TFreeGoal *, CFTTXmlReaderNode) {}
- //-------------------------------------------------------------------------------------------------
- // 00169A80 ^_-
- //单元测试等级: 游戏运行正常
- //单元测试内容: 1-10关
- //单元测试结果: 正常
- void PhysicsTest() {
- LOGE("PhysicsTest_0");//OK
- fpointQ<PointType_18> fpointq_sp240;
- fpointq_sp240.field_0 = 0;
- fpointq_sp240.field_4 = 0;
- fpointq_sp240.field_8 = 0;
- fpointq_sp240.field_C = 0x40000;
- fpoint3<PointType_18> fpoint3_sp25c;
- fpoint3_sp25c.x_0 = -cBall.point3D_2C.point_0.dx_0 * 8;
- fpoint3_sp25c.y_4 = cBall.point3D_2C.dz_8 * 8;
- fpoint3_sp25c.z_8 = cBall.point3D_2C.point_0.dy_4 * 8;
- CFTTPObject *r6_pobject = new CFTTPObject(
- EPhysicsObjectType_0, EFreePropType_3, 1, fpoint3_sp25c, fpointq_sp240);
- r6_pobject->fpoint3_1C.x_0 =
- -((cBall.ballPosPrev_4.point_0.dx_0 - cBall.point3D_2C.point_0.dx_0) * 8);
- r6_pobject->fpoint3_1C.y_4 =
- (cBall.ballPosPrev_4.dz_8 - cBall.point3D_2C.dz_8) * 8;
- r6_pobject->fpoint3_1C.z_8 =
- (cBall.ballPosPrev_4.point_0.dy_4 - cBall.point3D_2C.point_0.dy_4) * 8;
- r6_pobject->fpointQ_C.field_0 = cBall.quat_68.d3_8 * 64;
- r6_pobject->fpointQ_C.field_4 = cBall.quat_68.d2_4 * 64;
- r6_pobject->fpointQ_C.field_8 = cBall.quat_68.d1_0 * 64;
- r6_pobject->fpointQ_C.field_C = cBall.quat_68.d4_C * 64;
- r6_pobject->fpoint3_28.x_0 = cBall.point3D_1C.point_0.dx_0 * -101;
- r6_pobject->fpoint3_28.y_4 = cBall.point3D_1C.dz_8 * 0x65;
- r6_pobject->fpoint3_28.z_8 = cBall.point3D_1C.point_0.dy_4 * 0x65;
- r6_pobject->field_34 = 0x94D65;
- r6_pobject->field_38 = 0x37D2A4D;
- fpoint<PointType_18> fpoint_sp23c;
- fpoint3<PointType_18> fpoint3_sp230;
- fpointQ<PointType_18> fpointQ_sp220;
- fpointQ_sp220.field_0 = 0;
- fpointQ_sp220.field_4 = 0;
- fpointQ_sp220.field_8 = 0;
- fpointQ_sp220.field_C = 0x40000;
- fpoint3_sp230.x_0 = 0;
- fpoint3_sp230.y_4 = 0;
- fpoint3_sp230.z_8 = 0;
- fpoint_sp23c.var_0 = 0x8000;
- // check 传参是否都是用了栈
- CFTTPPSphere *r0_psphere =
- new CFTTPPSphere(fpoint_sp23c, fpoint3_sp230, fpointQ_sp220);//这里头文件更新
- // 00169B60
- r6_pobject->field_3C = 0x8000;
- r0_psphere->field_64 = 0x8000;
- r6_pobject->field_44 = 0x10000;
- r6_pobject->field_40 = 0x40000;
- r6_pobject->pprimitive_98[r6_pobject->uc_9C++] = r0_psphere;
- r0_psphere->filed_4 = r6_pobject;
- // sp1c=r6_pobject
- CFTTPhysics physics_sp218(0x40);
- fpoint3<PointType_18> *pfpoint3_sp34 = new fpoint3<PointType_18>[0x10];
- // 00169B98
- pfpoint3_sp34[14].z_8 = 0;
- pfpoint3_sp34[15].x_0 = 0;
- pfpoint3_sp34[15].y_4 = 0;
- pfpoint3_sp34[15].z_8 = 0;
- pfpoint3_sp34[13].z_8 = 0;
- pfpoint3_sp34[14].x_0 = 0;
- pfpoint3_sp34[14].y_4 = 0;
- pfpoint3_sp34[14].z_8 = 0;
- pfpoint3_sp34[12].y_4 = 0;
- pfpoint3_sp34[12].z_8 = 0;
- pfpoint3_sp34[13].x_0 = 0;
- pfpoint3_sp34[13].y_4 = 0;
- // 00169C06
- pfpoint3_sp34[11].x_0 = 0;
- pfpoint3_sp34[11].y_4 = 0;
- pfpoint3_sp34[11].z_8 = 0;
- pfpoint3_sp34[12].x_0 = 0;
- // 00169C16
- pfpoint3_sp34[1].y_4 = 0x20000;
- pfpoint3_sp34[2].z_8 = 0x3333;
- pfpoint3_sp34[2].x_0 = 0x18000;
- pfpoint3_sp34[2].y_4 = 0x6AAAA;
- // 00169C2C
- pfpoint3_sp34[2].z_8 = 0x3333;
- pfpoint3_sp34[3].x_0 = 0x10000;
- pfpoint3_sp34[3].y_4 = 0x72AAA;
- pfpoint3_sp34[3].z_8 = 0x3333;
- // 00169C34
- pfpoint3_sp34[4].x_0 = 0xFFFF0000;
- pfpoint3_sp34[4].y_4 = 0x72AAA;
- pfpoint3_sp34[4].z_8 = 0x3333;
- pfpoint3_sp34[4].x_0 = 0xFFFE8000;
- // 00169C3C
- pfpoint3_sp34[4].y_4 = 0x6AAAA;
- pfpoint3_sp34[4].z_8 = 0x3333;
- pfpoint3_sp34[5].x_0 = 0xFFFE8000;
- pfpoint3_sp34[5].y_4 = 0x20000;
- // 00169C44
- pfpoint3_sp34[5].z_8 = 0x3333;
- pfpoint3_sp34[6].x_0 = 0xFFFF0000;
- pfpoint3_sp34[6].y_4 = 0;
- pfpoint3_sp34[6].z_8 = 0x3333;
- // 00169C4C
- pfpoint3_sp34[7].x_0 = 0x10000;
- pfpoint3_sp34[7].y_4 = 0;
- pfpoint3_sp34[7].z_8 = 0xFFFFCCCD;
- pfpoint3_sp34[7].x_0 = 0x18000;
- // 00169C5A
- pfpoint3_sp34[7].y_4 = 0x20000;
- pfpoint3_sp34[7].z_8 = 0xFFFFCCCD;
- pfpoint3_sp34[8].x_0 = 0x18000;
- pfpoint3_sp34[8].y_4 = 0x6AAAA;
- // 00169C60
- pfpoint3_sp34[0].x_0 = 0x10000;
- pfpoint3_sp34[0].y_4 = 0;
- pfpoint3_sp34[0].z_8 = 0x3333;
- pfpoint3_sp34[1].x_0 = 0x18000;
- // 00169C68
- pfpoint3_sp34[14].z_8 = 0xFFFFCCCD;
- pfpoint3_sp34[15].x_0 = 0xFFFF0000;
- pfpoint3_sp34[15].y_4 = 0;
- pfpoint3_sp34[15].z_8 = 0xFFFFCCCD;
- // 00169C6C
- pfpoint3_sp34[13].y_4 = 0x6AAAA;
- pfpoint3_sp34[13].z_8 = 0xFFFFCCCD;
- pfpoint3_sp34[14].x_0 = 0xFFFE8000;
- pfpoint3_sp34[14].y_4 = 0x20000;
- // 00169C74
- pfpoint3_sp34[12].x_0 = 0xFFFF0000;
- pfpoint3_sp34[12].y_4 = 0x72AAA;
- pfpoint3_sp34[12].z_8 = 0xFFFFCCCD;
- pfpoint3_sp34[13].x_0 = 0xFFFE8000;
- // 00169C7C
- pfpoint3_sp34[10].z_8 = 0xFFFFCCCD;
- pfpoint3_sp34[11].x_0 = 0x10000;
- pfpoint3_sp34[11].y_4 = 0x72AAA;
- pfpoint3_sp34[11].z_8 = 0xFFFFCCCD;
- // sp48=FREE_tInfo
- if (FREE_tInfo.filed_0.pFREE_tGoal_1818) {
- // 00169C90
- // loc_16A21E
- LOGE("PhysicsTest_case");
- for (int r2_i = 0;
- r2_i < FREE_tInfo.filed_0.pFREE_tGoal_1818->m_iPropCount_74F0;
- r2_i++) {
- // loc_169CC0
- switch (FREE_tInfo.filed_0.pFREE_tGoal_1818->m_tFreeProp_74F4[r2_i]
- .m_iType_C) {
- case 0: // loc_169EC0
- {
- // check 手机左移
- // sp4c = r2
- // check 运算
- LOGE("PhysicsTest_case_0");
- int r0_i = FREE_tInfo.filed_0.pFREE_tGoal_1818->m_tFreeProp_74F4[r2_i]
- .m_iRot_10 *
- 0x40000 / 0xB4;
- uint64 r3r1_ull = 0x3243F4000;
- long long r1r0_ll = r3r1_ull * r0_i >> 32;
- int r4_i = r1r0_ll / 2;
- int i_sp1b0;
- int i_sp214 = r4_i;
- sub_16A57C(i_sp1b0, i_sp214);
- sub_16A6CC(i_sp214, r4_i);
- fpoint3<PointType_18> fpoint3_spc0;
- fpointQ<PointType_18> fpointQ_spb0;
- // check 乘法
- fpoint3_spc0.x_0 =
- -FREE_tInfo.filed_0.pFREE_tGoal_1818->m_tFreeProp_74F4[r2_i]
- .m_tPoint3D_0.point_0.dx_0 *
- 8;
- fpoint3_spc0.y_4 =
- FREE_tInfo.filed_0.pFREE_tGoal_1818->m_tFreeProp_74F4[r2_i]
- .m_tPoint3D_0.dz_8 *
- 8;
- fpoint3_spc0.z_8 =
- FREE_tInfo.filed_0.pFREE_tGoal_1818->m_tFreeProp_74F4[r2_i]
- .m_tPoint3D_0.point_0.dy_4 *
- 8;
- fpointQ_spb0.field_0 = 0;
- fpointQ_spb0.field_4 = i_sp1b0;
- fpointQ_spb0.field_8 = 0;
- fpointQ_spb0.field_C = i_sp214;
- CFTTPObject *r4_pobject = new CFTTPObject(
- EPhysicsObjectType_2,
- FREE_tInfo.filed_0.pFREE_tGoal_1818->m_tFreeProp_74F4[r2_i]
- .m_iType_C,
- 2, fpoint3_spc0, fpointQ_spb0);
- // 00169F5C
- r4_pobject->field_34 = 0;
- r4_pobject->field_38 = 0;
- r4_pobject->field_3C = 0x40000;
- r4_pobject->field_40 = 0x4000; // dword_16A448
- r4_pobject->field_44 = 0x20000;
- fpoint<PointType_18> fpoint_spac;
- fpoint<PointType_18> fpoint_spa8;
- fpoint<PointType_18> fpoint_spa4;
- fpoint3<PointType_18> fpoint3_sp98;
- fpointQ<PointType_18> fpointQ_sp80;
- fpoint3_sp98.x_0 = 0;
- fpoint_spac.var_0 = 0x3333;
- fpoint_spa8.var_0 = 0x6666;
- fpoint_spa4.var_0 = 0x15555;
- fpointQ_sp80.field_0 = 0;
- fpointQ_sp80.field_4 = 0;
- fpointQ_sp80.field_8 = 0;
- fpointQ_sp80.field_C = 0x40000;
- fpoint3_sp98.y_4 = 0xEAAA;
- fpoint3_sp98.z_8 = 0;
- // fpointQ_sp80
- CFTTPPCone *r5_pcone =
- new CFTTPPCone(fpoint_spac, fpoint_spa8, fpoint_spa4,
- fpoint3_sp98, fpointQ_sp80);
- fpoint3<PointType_18> fpoint3_sp74;
- fpoint3<PointType_18> fpoint3_sp68;
- fpointQ<PointType_18> fpointQ_sp50;
- fpoint3_sp74.x_0 = 0xCCCC;
- fpointQ_sp50.field_0 = 0;
- fpointQ_sp50.field_4 = 0;
- fpointQ_sp50.field_8 = 0;
- fpointQ_sp50.field_C = 0x40000;
- fpoint3_sp74.y_4 = 0x4000;
- fpoint3_sp74.z_8 = 0xCCCC;
- fpoint3_sp68.x_0 = 0;
- fpoint3_sp68.y_4 = 0x2000;
- fpoint3_sp68.z_8 = 0;
- CFTTPPBox *r0_pbox =
- new CFTTPPBox(fpoint3_sp74, fpoint3_sp68, fpointQ_sp50);
- r5_pcone->field_64 = 0x15555;
- r0_pbox->field_64 = 0xCCCC;
- r4_pobject->pprimitive_98[r4_pobject->uc_9C++] = r0_pbox;
- r0_pbox->filed_4 = r4_pobject;
- r4_pobject->pprimitive_98[r4_pobject->uc_9C++] = r5_pcone;
- r5_pcone->filed_4 = r4_pobject;
- physics_sp218.ppobject_0[physics_sp218.object_counts_4++] =
- r4_pobject;
- break;
- }
- case 2: // loc_16A030
- {
- LOGE("PhysicsTest_case_2");
- int r0_i = FREE_tInfo.filed_0.pFREE_tGoal_1818->m_tFreeProp_74F4[r2_i]
- .m_iRot_10 *
- 0x40000 / 0xB4;
- uint64 r3r1_ull = 0x3243F4000;
- long long r1r0_ll = r3r1_ull * r0_i >> 32;
- int r4_i = r1r0_ll / 2;
- int i_sp214;
- int i_sp1b0 = r4_i;
- sub_16A57C(i_sp214, i_sp1b0);
- int i_sp210;
- i_sp1b0 = r4_i;
- sub_16A6CC(i_sp210, i_sp1b0);
- // sp40=i_sp210
- // sp3c=sp214
- fpoint3<PointType_18> fpoint3_sp154;
- fpoint3<PointType_18> fpoint3_sp148;
- fpointQ<PointType_18> fpointQ_sp138;
- fpointQ<PointType_18> fpointQ_sp1b0;
- fpoint3_sp154.x_0 = 0x70000;
- fpoint3_sp154.y_4 = 0x20000;
- fpoint3_sp154.z_8 = 0x6666;
- fpointQ_sp1b0.field_0 = 0x3333;
- fpointQ_sp1b0.field_4 = 0;
- fpointQ_sp1b0.field_8 = 0;
- fpointQ_sp1b0.field_C = 0x40000;
- sub_16A88C(fpointQ_sp138, fpointQ_sp1b0);
- CFTTPPBox *pbox_sp38 =
- new CFTTPPBox(fpoint3_sp154, fpoint3_sp148, fpointQ_sp138);
- // 0016A0DC
- pbox_sp38->field_64 = 0x70000;
- fpoint3<PointType_18> fpoint3_sp12c;
- fpoint3<PointType_18> fpoint3_sp120;
- fpointQ<PointType_18> fpointQ_sp110;
- fpoint3_sp120.x_0 = 0xFFFD0000;
- fpoint3_sp12c.x_0 = 0x6666;
- fpoint3_sp12c.y_4 = 0x20000;
- fpoint3_sp12c.z_8 = 0x15555;
- fpoint3_sp120.y_4 = 0x10000;
- fpoint3_sp120.z_8 = 0xAAAA;
- fpointQ_sp1b0.field_0 = 0x3333;
- fpointQ_sp1b0.field_4 = 0;
- fpointQ_sp1b0.field_8 = 0;
- fpointQ_sp1b0.field_C = 0x40000;
- sub_16A88C(fpointQ_sp110, fpointQ_sp1b0);
- // 0016A120
- CFTTPPBox *r4_pbox =
- new CFTTPPBox(fpoint3_sp12c, fpoint3_sp120, fpointQ_sp110);
- // 0016A122
- fpoint3<PointType_18> fpoint3_sp104;
- fpoint3<PointType_18> fpoint3_spf8;
- fpointQ<PointType_18> fpointQ_spe8;
- fpoint3_sp104.x_0 = 0x6666;
- fpoint3_sp104.y_4 = 0x20000;
- fpoint3_sp104.z_8 = 0x15555;
- fpoint3_spf8.x_0 = 0x30000;
- fpoint3_spf8.y_4 = 0x10000;
- fpoint3_spf8.z_8 = 0xAAAA;
- fpointQ_sp1b0.field_0 = 0x3333;
- fpointQ_sp1b0.field_4 = 0;
- fpointQ_sp1b0.field_8 = 0;
- fpointQ_sp1b0.field_C = 0x40000;
- sub_16A88C(fpointQ_spe8, fpointQ_sp1b0);
- // 0016A164
- CFTTPPBox *r6_pbox =
- new CFTTPPBox(fpoint3_sp104, fpoint3_spf8, fpointQ_spe8);
- // 0016A166
- r4_pbox->field_64 = 0x15555;
- r6_pbox->field_64 = 0x15555;
- fpoint3<PointType_18> fpoint3_spdc;
- fpointQ<PointType_18> fpointQ_spcc;
- fpointQ_spcc.field_4 = i_sp214;
- fpointQ_spcc.field_C = i_sp210;
- fpoint3_spdc.x_0 =
- -FREE_tInfo.filed_0.pFREE_tGoal_1818->m_tFreeProp_74F4[r2_i]
- .m_tPoint3D_0.point_0.dx_0 *
- 8;
- fpoint3_spdc.z_8 =
- FREE_tInfo.filed_0.pFREE_tGoal_1818->m_tFreeProp_74F4[r2_i]
- .m_tPoint3D_0.point_0.dy_4 *
- 8;
- fpoint3_spdc.y_4 =
- FREE_tInfo.filed_0.pFREE_tGoal_1818->m_tFreeProp_74F4[r2_i]
- .m_tPoint3D_0.dz_8 *
- 8;
- fpointQ_spcc.field_0 = 0;
- fpointQ_spcc.field_8 = 0;
- CFTTPObject *r0_pobject = new CFTTPObject(
- EPhysicsObjectType_2,
- FREE_tInfo.filed_0.pFREE_tGoal_1818->m_tFreeProp_74F4[r2_i]
- .m_iType_C,
- 3, fpoint3_spdc, fpointQ_spcc);
- //0016A1B0
- r0_pobject->field_34=0;
- r0_pobject->field_38=0;
- r0_pobject->field_3C=0x70000;
- r0_pobject->field_40=0x30000;
- r0_pobject->field_44=0x4000;
- r0_pobject->field_A0=0x18;
- r0_pobject->pprimitive_98[r0_pobject->uc_9C++]=pbox_sp38;
- pbox_sp38->filed_4=r0_pobject;
- r0_pobject->pprimitive_98[r0_pobject->uc_9C++]=r4_pbox;
- r4_pbox->filed_4=r0_pobject;
- r0_pobject->pprimitive_98[r0_pobject->uc_9C++]=r6_pbox;
- r6_pbox->filed_4=r0_pobject;
- physics_sp218.ppobject_0[physics_sp218.object_counts_4++]=r0_pobject;
- break;
- }
- case 1: // 00169CDA
- {
- // sp4c = r2
- // check 运算
- LOGE("PhysicsTest_case_1");
- int r0_i = FREE_tInfo.filed_0.pFREE_tGoal_1818->m_tFreeProp_74F4[r2_i]
- .m_iRot_10 *
- 0x40000 / 0xB4;
- uint64 r3r1_ull = 0x3243F4000;
- long long r1r0_ll = r3r1_ull * r0_i >> 32;
- int r4_i = r1r0_ll / 2;
- int i_sp214;
- int i_sp210;
- sub_16A57C(i_sp214, r4_i);
- sub_16A6CC(i_sp210, r4_i);
- fpoint3<PointType_18> fpoint3_sp204;
- fpointQ<PointType_18> fpointQ_sp1f4;
- fpointQ_sp1f4.field_0 = 0;
- fpointQ_sp1f4.field_4 = i_sp214;
- fpointQ_sp1f4.field_8 = 0;
- fpointQ_sp1f4.field_C = i_sp210;
- TPoint3D point3D =
- FREE_tInfo.filed_0.pFREE_tGoal_1818->m_tFreeProp_74F4[r2_i]
- .m_tPoint3D_0;
- fpoint3_sp204.x_0 = -point3D.point_0.dx_0 * 8;
- fpoint3_sp204.y_4 = 0x15555 + point3D.dz_8 * 8 + 0x44000;
- fpoint3_sp204.z_8 = point3D.point_0.dy_4 * 8;
- CFTTPObject *r11_pobject = new CFTTPObject(
- EPhysicsObjectType_2,
- FREE_tInfo.filed_0.pFREE_tGoal_1818->m_tFreeProp_74F4[r2_i]
- .m_iType_C,
- 3, fpoint3_sp204, fpointQ_sp1f4);
- int i_sp1b0;
- int i_sp1f0 = 0x7F1AA;
- sub_16A818(&i_sp1b0, &i_sp1f0);
- r11_pobject->field_34 = 0;
- r11_pobject->field_38 = 0;
- r11_pobject->field_3C = i_sp1b0;
- r11_pobject->field_40 = 0x10000;
- r11_pobject->field_44 = 0x10000;
- r11_pobject->field_A0 = 0x18;
- fpoint<PointType_18> fpoint_sp1ec;
- fpoint<PointType_18> fpoint_sp1e8;
- fpoint3<PointType_18> fpoint3_sp1dc;
- fpointQ<PointType_18> fpointQ_sp1cc;
- fpoint_sp1ec.var_0 = 0x10000;
- fpoint3_sp1dc.x_0 = 0;
- fpoint3_sp1dc.y_4 = 0x30000 + 0x15555;
- fpoint3_sp1dc.z_8 = 0;
- fpoint_sp1e8.var_0 = 0x6666;
- fpointQ<PointType_18> fpointQ_sp1b0;
- fpointQ_sp1b0.field_0 = 0x40000;
- fpointQ_sp1b0.field_4 = 0;
- fpointQ_sp1b0.field_8 = 0;
- fpointQ_sp1b0.field_C = 0x40000;
- sub_16A88C(fpointQ_sp1cc, fpointQ_sp1b0);
- // check 前俩个参数传递是否使用栈
- CFTTPPCylinder *r4_pcylinder = new CFTTPPCylinder(
- fpoint_sp1ec, fpoint_sp1e8, fpoint3_sp1dc, fpointQ_sp1cc);
- fpoint3<PointType_18> fpoint3_sp1a4;
- fpoint3<PointType_18> fpoint3_sp198;
- fpointQ<PointType_18> fpointQ_sp180;
- fpoint3_sp1a4.z_8 = 0x6666;
- // 00169DF4
- fpointQ_sp180.field_0 = 0;
- fpointQ_sp180.field_4 = 0;
- fpointQ_sp180.field_8 = 0;
- fpointQ_sp180.field_C = 0x40000;
- fpoint3_sp1a4.x_0 = 0x20000;
- fpoint3_sp1a4.y_4 = 0x20000;
- fpoint3_sp198.x_0 = 0;
- fpoint3_sp198.y_4 = 0xFFFB6AAB;
- fpoint3_sp198.z_8 = 0;
- CFTTPPBox *r5_pbox =
- new CFTTPPBox(fpoint3_sp1a4, fpoint3_sp198, fpointQ_sp180);
- // 00169E14
- fpoint3<PointType_18> fpoint3_sp174;
- fpointQ<PointType_18> fpointQ_sp160;
- fpoint3_sp174.y_4 = 0xFFFB6AAB + 0x10000;
- fpoint3_sp174.x_0 = 0;
- fpoint3_sp174.z_8 = 0;
- fpointQ_sp160.field_0 = 0;
- fpointQ_sp160.field_4 = 0;
- fpointQ_sp160.field_8 = 0;
- fpointQ_sp160.field_C = 0x40000;
- CFTTPPPolyhedron *r0_ppolyhedron = new CFTTPPPolyhedron(
- pfpoint3_sp34, 0x10, fpoint3_sp174, fpointQ_sp160);
- // 00169E32
- r4_pcylinder->field_64 = 0x10000;
- r5_pbox->field_64 = 0x20000;
- r0_ppolyhedron->field_64 = 0xABFFF;
- // 00169E42
- r11_pobject->pprimitive_98[r11_pobject->uc_9C++] = r5_pbox;
- r5_pbox->filed_4 = r11_pobject;
- r11_pobject->pprimitive_98[r11_pobject->uc_9C++] = r0_ppolyhedron;
- r0_ppolyhedron->filed_4 = r11_pobject;
- r11_pobject->pprimitive_98[r11_pobject->uc_9C++] = r4_pcylinder;
- r4_pcylinder->filed_4 = r11_pobject;
- physics_sp218.ppobject_0[physics_sp218.object_counts_4++] =
- r11_pobject;
- break;
- }
- }
- }
- }
- // loc_16A232
- physics_sp218.ppobject_0[physics_sp218.object_counts_4++]= r6_pobject;
- if(physics_sp218.Process()){
- //0016A24E
- //sp18=cBall
- LOGE("PhysicsTest_1");
- cBall.ballPosPrev_4.point_0.dx_0=r6_pobject->fpoint3_0.x_0/(-8);//这里fpoint3_0猜测可能为ballPosPrev_4
- cBall.ballPosPrev_4.point_0.dy_4=r6_pobject->fpoint3_0.z_8/8;
- cBall.ballPosPrev_4.dz_8=r6_pobject->fpoint3_0.y_4/8;
- cBall.ballMovePrev_10.point_0.dx_0=r6_pobject->fpoint3_1C.x_0/(-8);
- cBall.ballMovePrev_10.point_0.dy_4=r6_pobject->fpoint3_1C.z_8/8;
- cBall.ballMovePrev_10.dz_8=r6_pobject->fpoint3_1C.y_4/8;
- fpointQ<PointType_18> fpointQ_sp1b0;
- sub_16A88C(fpointQ_sp1b0,r6_pobject->fpointQ_C);
- //check 除法
- //0016A2AA
- cBall.quat_68.d1_0=fpointQ_sp1b0.field_0/64;
- cBall.quat_68.d2_4=fpointQ_sp1b0.field_4/64;
- cBall.quat_68.d3_8=fpointQ_sp1b0.field_8/64;
- cBall.quat_68.d4_C=fpointQ_sp1b0.field_C/64;
- //check
- cBall.point3D_1C.point_0.dx_0= r6_pobject->fpoint3_28.x_0/(-101);
- cBall.point3D_1C.point_0.dy_4= r6_pobject->fpoint3_28.z_8/101;
- cBall.point3D_1C.dz_8= r6_pobject->fpoint3_28.y_4/101;
- //loc_16A344
- for(int r5_i=0;r5_i<physics_sp218.object_counts_4;r5_i++){
- //loc_16A30C
- if(physics_sp218.ppobject_0[r5_i]->field_9E){
- if(physics_sp218.ppobject_0[r5_i]->field_90!=EFreePropType_3){
- if(FREE_tInfo.filed_0.ugamestatus_1828<=8){
- //check
- if((1<<FREE_tInfo.filed_0.ugamestatus_1828)&0x190){
- LOGE("PhysicsTest_2");
- tGame.field_6C98=0;
- tGame.mTLogic_6678.freeproptype_74= physics_sp218.ppobject_0[r5_i]->field_90;
- }
- }
- }
- }
- }
-
- }
- //loc_16A348
- delete [] pfpoint3_sp34;
- }
- //-------------------------------------------------------------------------------------------------
|