浏览代码

0x001d4424,FREE_Initialise bugfix

DESKTOP-AB9OQPJ\RED-10 3 年之前
父节点
当前提交
8ede18db14

+ 2 - 1
jni/Android.mk

@@ -463,7 +463,8 @@ LOCAL_SRC_FILES :=  ANIMHashName.cpp                        \
                     sub.cpp                                     \
                     TGfxCrowdState.cpp                      \
                     CFESShopHelper.cpp                      \
-                    COL.cpp
+                    COL.cpp                                 \
+                    COMM.cpp
 
 LOCAL_ARM_NEON := true
 LOCAL_CFLAGS   += -fshort-wchar -fvisibility=default  -fomit-frame-pointer -fno-stack-protector

+ 2 - 2
jni/CAnimManager.cpp

@@ -74,8 +74,8 @@ void CAnimManager::InitAnimations() {
 }
 //-------------------------------------------------------------------------------------------------
 //00156490
-int CAnimManager::GetState(int) {
-  return 0;
+int CAnimManager::GetState(int a1) {
+  return rand()+a1;
 }
 //-------------------------------------------------------------------------------------------------
 //001564D8

+ 1 - 0
jni/CBall.cpp

@@ -16,6 +16,7 @@ void CBall::ClampSpeed(int, int) {
 //-------------------------------------------------------------------------------------------------
 //00157648
 void CBall::Stop() {
+  LOGE("CBall::Stop%p",this);
 }
 //-------------------------------------------------------------------------------------------------
 //00157668

+ 6 - 2
jni/CGFXFX.cpp

@@ -479,13 +479,17 @@ void CGFXFX::SwipeAddPoint(TPoint) {}
 void CGFXFX::EnableGoldenBootEffects() {}
 //-------------------------------------------------------------------------------------------------
 // 00184188
-void CGFXFX::ResetGoldenBootEffects() {}
+void CGFXFX::ResetGoldenBootEffects() {
+  LOGE("CGFXFX::ResetGoldenBootEffects");
+}
 //-------------------------------------------------------------------------------------------------
 // 001841EC
 void CGFXFX::EnableStarPlayerEffects() {}
 //-------------------------------------------------------------------------------------------------
 // 00184208
-void CGFXFX::ResetStarPlayerEffects() {}
+void CGFXFX::ResetStarPlayerEffects() {
+  LOGE("CGFXFX::ResetStarPlayerEffects");
+}
 //-------------------------------------------------------------------------------------------------
 // 0018426C
 void CGFXFX::BallTrailSetCol(uint) {}

+ 5 - 1
jni/CGameLoop.cpp

@@ -66,6 +66,7 @@ void CGameLoop::Pause(int a1, EPauseType eType, EFEScreen eScreen) {
 //-------------------------------------------------------------------------------------------------
 //0015A854
 void CGameLoop::PlayerObjectsUpdate() {
+  LOGE("CGameLoop::PlayerObjectsUpdate");
 }
 //-------------------------------------------------------------------------------------------------
 //0015A914
@@ -75,6 +76,7 @@ CPlayer* CGameLoop::ObjectAdd(int, int) {
 //-------------------------------------------------------------------------------------------------
 //0015A950
 void CGameLoop::ObjectsInit() {
+  LOGE("CGameLoop::ObjectsInit");
 }
 //-------------------------------------------------------------------------------------------------
 //0015AB1C
@@ -87,6 +89,7 @@ void CGameLoop::ResetTeamPlayers() {
 //-------------------------------------------------------------------------------------------------
 //0015ABF8
 void CGameLoop::InitGameVars() {
+  LOGE("CGameLoop::InitGameVars");
 }
 //-------------------------------------------------------------------------------------------------
 //0015AF1C
@@ -102,7 +105,8 @@ void CGameLoop::ExcludeAllPlayers() {
 }
 //-------------------------------------------------------------------------------------------------
 //0015AFE0
-void CGameLoop::ExcludePlayer(CPlayer *, bool) {
+void CGameLoop::ExcludePlayer(CPlayer *a1, bool a2) {
+  LOGE("CGameLoop::ExcludePlayer%p%x",a1,a2);
 }
 //-------------------------------------------------------------------------------------------------
 //0015B034

+ 28 - 43
jni/COMM.cpp

@@ -31,9 +31,9 @@ uint COMM_FindFile(const char *cc0) {
   return -1;
 }
 
-int tGame;
-ushort X_iCommCnt[70];
-static short **X_iCommXRef;
+extern int tGame;
+ushort* X_iCommCnt[70];
+// static short **X_iCommXRef;
 /*0x001d243c COMM_PlayCommentary 96*/
 void COMM_PlayCommentary(ECommType eCommType0, int int1, int int2) {
   /*PUSH.W          {R4-R10,LR}
@@ -80,7 +80,7 @@ void COMM_PlayCommentary(ECommType eCommType0, int int1, int int2) {
 			.text:001D248C                 CMP.W           R1, #0x258
 			.text:001D2490                 BGE             loc_1D24E4
 			.text:001D2492                 B               locret_1D2532*/
-      if (tGame - COMM_tInfo.byte_16C[(X_iCommXRef[eCommType0])[int1]] >= 0x258)
+      //if (tGame - COMM_tInfo.byte_16C[(X_iCommXRef[eCommType0])[int1]] >= 0x258)
         return;
     }
   }
@@ -101,23 +101,23 @@ void COMM_PlayCommentary(ECommType eCommType0, int int1, int int2) {
 		text:001D24AC                 LDR             R6, [R0] ; COMM_tInfo*/
 
     r7 = 0xA;
-    do {
-      /*.text:001D24AE                 LDRH.W          R0, [R10,R5,LSL#1]
-			.text:001D24B2                 MOV             R7, R1
-			.text:001D24B4                 BLX             j__Z17XSYS_RandomNoSynci ; XSYS_RandomNoSync(int)
-			.text:001D24B8                 MOV             R2, R0*/
-      r2 = XSYS_RandomNoSync(X_iCommCnt[eCommType0]);
-      /*.text:001D24BA                 LDR.W           R0, [R9]
-			.text:001D24BE                 CBZ             R7, loc_1D24E0*/
-      if (!r7) {
-        break;
-      }
-      /*.text:001D24C0                 CMP.W           R0, #0x258
-			.text:001D24C4                 BLE             loc_1D24E0*/
-      if (tGame <= 0x258) {
-        break;
-      }
-      r7--;
+    // do {
+    //   /*.text:001D24AE                 LDRH.W          R0, [R10,R5,LSL#1]
+		// 	.text:001D24B2                 MOV             R7, R1
+		// 	.text:001D24B4                 BLX             j__Z17XSYS_RandomNoSynci ; XSYS_RandomNoSync(int)
+		// 	.text:001D24B8                 MOV             R2, R0*/
+    //   //r2 = XSYS_RandomNoSync(X_iCommCnt[eCommType0]);
+    //   /*.text:001D24BA                 LDR.W           R0, [R9]
+		// 	.text:001D24BE                 CBZ             R7, loc_1D24E0*/
+    //   if (!r7) {
+    //     break;
+    //   }
+    //   /*.text:001D24C0                 CMP.W           R0, #0x258
+		// 	.text:001D24C4                 BLE             loc_1D24E0*/
+    //   if (tGame <= 0x258) {
+    //     break;
+    //   }
+    //   r7--;
 
       /*
 			.text:001D24C6                 LDR.W           R1, [R4,R5,LSL#2]
@@ -128,7 +128,7 @@ void COMM_PlayCommentary(ECommType eCommType0, int int1, int int2) {
 			.text:001D24D8                 SUBS            R1, R7, #1
 			.text:001D24DA                 CMP.W           R3, #0x258
 			.text:001D24DE                 BLT             loc_1D24AE*/
-    } while (tGame - COMM_tInfo.byte_16C[(X_iCommXRef[eCommType0])[r2]] < 0x258);
+    // } while (tGame - COMM_tInfo.byte_16C[(X_iCommXRef[eCommType0])[r2]] < 0x258);
     ////loc_1D24E0
     /*text:001D24E0                 CMP             R7, #2
 		.text:001D24E2                 BLT             locret_1D2532*/
@@ -177,7 +177,7 @@ void COMM_PlayCommentary(ECommType eCommType0, int int1, int int2) {
 	.text:001D2518                 LDRH.W          R3, [R3,R2,LSL#1]
 	.text:001D251C                 ADD.W           R1, R1, R3,LSL#2
 	.text:001D2520                 STR.W           R0, [R1,#0x16C]*/
-  COMM_tInfo.byte_16C[(X_iCommXRef[eCommType0])[r2]] = tGame;
+  //COMM_tInfo.byte_16C[(X_iCommXRef[eCommType0])[r2]] = tGame;
 
   /*.text:001D2524                 MOV             R1, R2
 	.text:001D2526                 MOV             R0, R5
@@ -278,26 +278,11 @@ void COMM_Process() {
 
 //0x001d2608 COMM_Reset 15
 void COMM_Reset() {
-  /* PUSH            {R4,LR}
-	.text:001D260A                 LDR             R0, =(COMM_tInfo_ptr - 0x1D2614)
-	.text:001D260C                 MOVW            R1, #0x217C
-	.text:001D2610                 ADD             R0, PC  ; COMM_tInfo_ptr
-	.text:001D2612                 LDR             R4, [R0] ; COMM_tInfo
-	.text:001D2614                 MOV             R0, R4
-	.text:001D2616                 BLX             __aeabi_memclr4
-	.text:001D261A                 MOVW            R0, #(dword_47DF94 - 0x47BE20)
-	.text:001D261E                 MOV.W           R1, #0xFFFFFFFF
-	.text:001D2622                 STR             R1, [R4,R0]
-	.text:001D2624                 MOVW            R0, #(dword_47DF90 - 0x47BE20)
-	.text:001D2628                 STR             R1, [R4,R0]
-	.text:001D262A                 MOVW            R0, #(dword_47DF8C - 0x47BE20)
-	.text:001D262E                 STR             R1, [R4,R0]
-	.text:001D2630                 POP             {R4,PC}*/
-
-  memset(&COMM_tInfo, 0, sizeof(COMM_Info));
-  dword_47DF94 = -1;
-  dword_47DF90 = -1;
-  dword_47DF8C = -1;
+  LOGE("COMM_Reset");
+  //memset(&COMM_tInfo, 0, sizeof(COMM_Info));
+  // dword_47DF94 = -1;
+  // dword_47DF90 = -1;
+  // dword_47DF8C = -1;
 }
 
 //0x001d2638 COMM_ResetAfterRewind 11     ^_^

+ 1 - 1
jni/COMM.h

@@ -91,5 +91,5 @@ void COMM_Reset();                                              // 001d2608
 void COMM_ResetAfterRewind();                                   // 001d2638
 void COMM_StopCommentary();                                     // 001d2438
 
-extern short *X_iCommXRef[70];
+extern ushort* X_iCommCnt[70]; 
 #endif  //_COMMON_H_

+ 14 - 6
jni/CPlayer.cpp

@@ -26,7 +26,9 @@ int LOCO_SPEED_SPRINT_AVG = 0x102A;  // 0033E9A8
 
 //-------------------------------------------------------------------------------------------------
 // 0011DE8C
-void CPlayer::SetPos(int i1, int i2) {}
+void CPlayer::SetPos(int i1, int i2) {
+  LOGE("CPlayer::SetPos%p%x%x",this,i1,i2);
+}
 //-------------------------------------------------------------------------------------------------
 // 00125D8C
 void CPlayer::SetPos(TPoint3D r1) {}
@@ -226,7 +228,9 @@ void CPlayer::SetMoveDest(TPoint point1) {
 }
 //-------------------------------------------------------------------------------------------------
 // 0016EBFE
-void CPlayer::SetRotExplicit(int i1) {}
+void CPlayer::SetRotExplicit(int i1) {
+   LOGI("CPlayer::SetRotExplicit %p %d ", this,i1);
+}
 //-------------------------------------------------------------------------------------------------
 // 0016EC02
 __attribute__((noinline)) void CPlayer::SetRot(int r1, bool r2) {
@@ -262,7 +266,9 @@ void CPlayer::SetFace(TPoint point1) {}
 void CPlayer::SetFaceDest() {}
 //-------------------------------------------------------------------------------------------------
 // 0016EC7A
-void CPlayer::Stop(int i1) {}
+void CPlayer::Stop(int i1) {
+   LOGE("CPlayer::SetFace%p%x",this,i1);
+}
 //-------------------------------------------------------------------------------------------------
 // 0016EC8E ^_^
 int CPlayer::GetRotDest() {
@@ -319,7 +325,7 @@ void CPlayer::SetupOfficial() {}
 //-------------------------------------------------------------------------------------------------
 // 0016F044 经过单元测试同,功能正常
 void CPlayer::Reset() {
-  // LOGI("CPlayer::Reset %p", this);
+   LOGI("CPlayer::Reset %p", this);
 }
 //-------------------------------------------------------------------------------------------------
 // 0016F114
@@ -420,7 +426,7 @@ void CPlayer::ActionUpdateDynamic() {
 // 0017012C  //???
 void CPlayer::ActionTendSetupDest(TPoint3D point3D1) {
   TAnimData *r10_pAnimData = GetAnimData();
-  int r1_i = r10_pAnimData->filed_20[s_15A].filed_4;
+  int r1_i = r10_pAnimData->filed_20[s_15A].i_4;
   ushort r0_us =r10_pAnimData->filed_20[s_15A].filed_2;
   r1_i = r1_i * us_122;
   aPoint3D_178[0] = point3D1;
@@ -624,7 +630,9 @@ void CPlayer::UpdateAnimCalcs() {
 void CPlayer::SetTrophyData(ETrophyPos e1, ushort us2, ushort us3) {}
 //-------------------------------------------------------------------------------------------------
 // 001708DE
-__attribute__((noinline)) void CPlayer::ClearBlend() {}
+__attribute__((noinline)) void CPlayer::ClearBlend() {
+  LOGE("CPlayer::ClearBlend%p",this);
+}
 //-------------------------------------------------------------------------------------------------
 // 001708E8 后面的代码好像与
 // NIS的测试环境,通过单元测试,发现后面的代码不写,不影响逻辑

+ 1 - 1
jni/CStoryCore.h

@@ -114,7 +114,7 @@ struct TStoryStages {
   int field_10;  //下面这个结构的数据长度  sidestoryseason len
   TStorySeason *field_14;//sidestoryseason
   int field_18;
-  float f_1C; 
+  int i_1C; 
 };
 
 class CFTTXmlReader;

+ 1 - 1
jni/CStoryProfileStages.cpp

@@ -353,7 +353,7 @@ void CStoryProfileStages::SetStageComplete(int r1_i, int r2_i, bool r3_b, bool b
         }
         // 001E9728
         parms_spA8.uo_20.db_20 = (double)r0_i;
-        parms_spA8.uo_28.db_28 = (double)CStoryCore::m_tStages.f_1C;
+        parms_spA8.uo_28.db_28 = (double)CStoryCore::m_tStages.i_1C;
         parms_spA8.pw_0 = new wchar_t[0x8];
         xsnprintf(parms_spA8.pw_0, 8, L"%i", MP_cMyProfile.GetTotalNumberOfStars());
         if (MP_cMyProfile.isSideStory)

+ 295 - 4
jni/FREE.cpp

@@ -19,6 +19,11 @@
 #include "XSYS.h"
 #include "SNDGAME.h"
 #include "XML.h"
+#include "CGameLoop.h"
+#include "COMM.h"
+#include "GL.h"
+#include "GM.h"
+#include "GFXNET.h"
 int s_iEVFStrings[160] = {
     0x184B, 0x184C, 0x1858, 0, 0, 0, 0, 0, 0, 0,
     0x1859, 0x185A, 0, 0, 0, 0, 0, 0, 0, 0, 0x1854,
@@ -81,7 +86,9 @@ void FREE_ProcessControls(bool) {}
 int FREE_CalcKickTargetTime(int) { return 0; }
 //-------------------------------------------------------------------------------------------------
 // 001D3EEC
-void FREE_ResetControls() {}
+void FREE_ResetControls() {
+  LOGE("FREE_ResetControls");
+}
 //-------------------------------------------------------------------------------------------------
 // 001D3F24
 int FREE_PassIsLowKick(TFreeControl *, TPoint3D *, TPoint3D *, int) {
@@ -297,9 +304,291 @@ void FREE_SetupDifficulty() {
   }
   // locret_1D4410
 }
+void GenerateMesh()
+{
+  LOGE("GenerateMesh");
+}
 //-------------------------------------------------------------------------------------------------
-// 001D4424
-void FREE_Initialise() {}
+// 001D4424 //^_-
+//单元测试等级:目测游戏表现
+//测试内容:启动游戏到第10关传球射门
+//测试结果: 游戏表现正常无崩溃且无明显变化,未检测到日志输出
+//测试分支: 无
+void FREE_Initialise() {
+  // 4B0F74 - 0x4B0F58
+  int r0_i = CStoryCore::m_tStages.i_1C;
+  //qint var_252C = r0_i;
+  XSYS_RandomSetSeed(r0_i);
+  CTeam var_418_sp2120[2];
+  memcpy(var_418_sp2120, tGame.CTeam_2C60, sizeof(tGame.CTeam_2C60));  // 1008
+  TPlayerInfo var_2518_sp20[64];
+  memcpy(var_2518_sp20, &tGame.TPlayerInfo_94, sizeof(tGame.TPlayerInfo_94));  // 8448
+  CGameLoop::InitGameVars();
+
+  COMM_Reset();
+  memcpy(tGame.CTeam_2C60, &var_418_sp2120, sizeof(tGame.CTeam_2C60));
+  memcpy(&tGame.TPlayerInfo_94, var_2518_sp20, sizeof(tGame.TPlayerInfo_94));
+  CGameLoop::ObjectsInit();
+  CGameLoop::PlayerObjectsUpdate();
+  GL_NewPlayMode(EPlayMode_1, 0, 1);
+  GL_NewPlayModeState(EPlayModeState_1);
+  // 0x7450
+  tGame.mTLogic_6678.team_40 = FREE_iTeam;
+  cBall.ballPosPrev_4.point_0.dx_0 = FREE_tInfo.filed_0.pFREE_tGoal_1818->m_tBallPos_744C.point_0.dx_0;
+  cBall.ballPosPrev_4.point_0.dy_4 = FREE_tInfo.filed_0.pFREE_tGoal_1818->m_tBallPos_744C.point_0.dy_4;
+  cBall.ballPosPrev_4.dz_8 = FREE_tInfo.filed_0.pFREE_tGoal_1818->m_tBallPos_744C.dz_8;
+  cBall.Stop();
+  int r2_i = 1000;
+  tGame.mTLogic_6678.field_86 = 0;  
+  tGame.field_6C8C = r2_i;
+  tGame.field_6C90 = r2_i;
+  tGame.field_6C94 = r2_i;
+  tGame.field_6C98 = r2_i;
+  r2_i = 0xFFE50000;
+  CPlayer* r0_player = tGame.allplay_14[FREE_iTeam].teamlist_0[0];
+  r0_player->SetPos(0, r2_i);
+  r0_i = FREE_iTeam ^ 1;
+  r0_player = tGame.allplay_14[r0_i].teamlist_0[0];
+  r0_player->SetPos(0, 0x1B0000);
+  int r4_i = 0;
+  // loc_1D4552
+  while (r4_i != 2) {
+    // loc_1D453A
+    for (int r6_i = 0; r6_i != 11; r6_i++) {
+      // loc_1D453E
+      r0_player = tGame.allplay_14[r4_i].teamlist_0[r6_i];
+      CGameLoop::ExcludePlayer(r0_player, false);
+    }
+    r4_i++;
+  }
+  // 001D4556
+  r0_i = 0;
+  int r1_i = 1;
+  // loc_1D456C
+  while (r0_i != 3) {
+    // loc_1D4560
+    CPlayer* r2_player = tGame.field_8[r0_i];
+    r0_i++;
+    r2_player->tStr32_44.uc_2 = r1_i;
+  }  // loc_1D4560
+  // 001D4570
+  GL_ResetPlayers();
+  // 47F7D0 - 0x47DFB0 = 1820
+  int r5_i = 0;
+  // loc_1D46A2
+  while (r5_i != 2) {
+    // loc_1D4582
+    r0_i = CStoryCore::m_tStages.i_1C;
+    XSYS_RandomSetSeed(r0_i + r5_i);
+    int r8_i = 0;
+    //int var_251C_sp1C = r5_i;
+    // loc_1D468C
+    while (r8_i < (r1_i = FREE_tInfo.filed_0.pFREE_tGoal_1818->m_iTeamPlayerIndex_14[r5_i])) {
+      // loc_1D4594
+      r0_i = (uint)FREE_iTeam ^ (uint)r5_i;
+      TFreePlayer* r4_st = &FREE_tInfo.filed_0.pFREE_tGoal_1818->m_tTeamPlayerInfo_1C[r5_i][r8_i];
+      r1_i = r4_st->filed_0;
+      CPlayer* r5_player = tGame.allplay_14[r0_i].teamlist_0[r1_i];
+      r5_player->Reset();
+      r5_player->SetPos(r4_st->m_tPoint_4);
+      //r0_i = 0;
+      r5_player->ballPosPrev_4.dz_8 = 0;
+      r5_player->SetMoveDest(r4_st->m_tPoint_4);
+
+      r0_i = 0xFFFF;
+      r1_i = 0x168;
+
+      r5_player->tStr58_A0.s_4C = r0_i;
+      int r7_i = r4_st->m_iRot_10;
+      r0_i = r7_i << 14u;
+      int r6_i = r0_i / r1_i;
+      // 001D45EC
+      if (r7_i >= 0) {
+        // 001D45F8
+        r5_player->SetRotExplicit(r6_i);
+        r5_player->SetRot(r6_i, false);
+        r1_i = r6_i;
+        // loc_1D4622
+      } else {
+        // loc_1D4608
+        // var2528 =cball
+        r1_i = r5_player->GetRotPoint(cBall.ballPosPrev_4);
+        r5_player->SetRotExplicit(r1_i);
+        r1_i = -1;
+      }
+      // loc_1D4622
+      r5_player->Stop(r1_i);
+      // int* r10_pi  = &r4_st->m_tAnim_3B4[0].m_iRot_8 ; //3d8
+      r6_i = 0;
+      r5_player->tStr32_44.uc_2 = r6_i;
+      // loc_1D4622
+      while (r6_i < r4_st->m_iNodeAnimSetLoopIndex_3B0)  // field_3CC
+      {
+        // loc_1D4636
+        // 47F7D0 - 0x47DFB0 =1820
+        r0_i = FREE_tInfo.filed_0.field_1820;
+        r1_i = r4_st->m_tAnim_3B4[r6_i].m_iTick_0;
+        // 001D463E
+        if (r0_i == r1_i) {
+          // 001D4642
+          r1_i = r4_st->m_tAnim_3B4[r6_i].m_iAnimID_4;
+          r5_player->SetAnim(r1_i);
+          r0_i =  r4_st->m_tAnim_3B4[r6_i].m_iAnimID_4;
+          r5_player->tStr32_44.field_8 = CAnimManager::GetState(r0_i);
+          // 001D465A
+          if (r4_st->m_tAnim_3B4[r6_i].m_iRot_8 >= 0) {
+            // 001D465E
+            r0_i = r0_i << 14u;
+            r1_i = r0_i / 360;
+            r5_player->SetRot(r1_i, false);
+          }
+        }
+        // loc_1D4672
+        // r10_pi = r10_pi+3;
+        r6_i++;
+      }
+      // loc_1D4678
+      r5_player->ClearBlend();
+      r8_i++;
+    }  // loc_1D468C
+    r5_i++;
+  }  // loc_1D4582
+  // 47F7E0 - 0x47DFB0
+  // r8 = r9 =cball
+  r0_i = FREE_tInfo.filed_0.field_1830;
+  // r1_i = r0_i + 1;
+  if (FREE_tInfo.filed_0.field_1830==-1) {
+    // 001D46B8
+    r0_i = GM_GetPlayerNearestPoint(FREE_iTeam, cBall.ballPosPrev_4.point_0, 0);
+    // 47F7F0 - 0x47DFB0
+    FREE_tInfo.filed_0.field_1830 = r0_i;
+    FREE_tInfo.filed_0.field_1840 = r0_i;
+  }
+  // loc_1D46D2
+   r5_i = FREE_tInfo.filed_0.field_1834;
+  // r1_i = r5_i + 1;
+  // 001D46DA
+  if (FREE_tInfo.filed_0.field_1834 != -1) {
+    // 001D46DE
+    r1_i = FREE_iTeam;
+    CPlayer* r4_player = tGame.allplay_14[r1_i].teamlist_0[r0_i];
+    uint r0_u = CAnimManager::GetState(r5_i);
+    //r2_i = r5_i + r5_i * 32;
+    int r3_i = r4_player->us_122;
+    int r7_i = 0x7454;
+    TAnimData* anims = CAnimManager::s_tAnimData;
+    r1_i = anims[r5_i].filed_20[0].filed_8;
+    r1_i = r3_i * r1_i;
+    TFreeGoal* r3_goal = FREE_tInfo.filed_0.pFREE_tGoal_1818;
+    r2_i = r1_i / 128;
+    r3_goal->m_tBallPos_744C.dz_8 = r2_i;
+    bool b4748 = false;
+    // 001D4704
+    if (r0_u <= 17) {
+      r3_i = 0x30080;  //
+      r7_i = 1;
+      r0_u = (uint)r7_i << (uint)r0_u;
+      // 001D4734
+      if ((r0_u & r3_i) != 0) {
+        // 001D4738
+        tGame.field_6ADC = r4_player;
+        tGame.field_6AD8 = 3;
+
+      } else {
+        // loc_1D4748
+        b4748 = true;
+      }
+    } else {
+      // 001D4746
+      b4748 = true;
+    }
+    if (b4748) {
+      // loc_1D4748
+      tGame.field_6ADC = NULL;
+      tGame.field_6AD8 = 0;
+      cBall.ballPosPrev_4.dz_8 = r2_i;
+      // 001D4754
+      if (r1_i >= 0x100000) {
+        // 001D4758
+        r0_i = CAnimManager::GetActionTime(r5_i, 0, 0x400);
+        r1_i = cBall.ballPosPrev_4.dz_8;
+        LOGE("r0-i=%x",r0_i);
+        r0_i = r1_i + ((int)(r0_i * r0_i*98) >> 1);
+      } else {
+        // loc_1D4790
+        r0_i = 0x1000;
+      }
+      // loc_1D4794
+      cBall.ballPosPrev_4.dz_8 = r0_i;
+    }
+  }
+  // loc_1D4798
+
+  // 66C0
+  tGame.mTLogic_6678.field_48 = 11;
+  // 66FD
+  tGame.mTLogic_6678.field_85 = 0;
+  // 66B8
+  tGame.mTLogic_6678.team_40 = FREE_iTeam;
+  //    //47FC34 - 0x47DFB0
+  //    r4_i = FREE_tInfo.field_1CB4;
+  // 47FC34 - 0x47DFB0  = 1C84
+  FREE_tInfo.field_188C.cBuff_3DC.field_1C = 0;
+  FREE_ResetControls();
+  // 47F7D0 - 0x47DFB0
+  FREE_tInfo.filed_0.field_1820 = 0;  // FREE_tInfo.field_1CB4;//
+  // 47F7CC - 0x47DFB0
+  FREE_tInfo.filed_0.field_181C = 0;  // r4_i;FREE_tInfo.field_1CB4
+  cBallProj.EnsureProj(30);
+  r1_i = cBallProj.field_E4;
+  // 47F7C8 - 0x47DFB0
+  // TFreeGoal* r0_goal = FREE_tInfo.filed_0.pFREE_tGoal_1818;
+  r1_i = ((r1_i + 11) % 512);
+  TPoint3D tp3d;
+  tp3d.point_0.dx_0 = cBallProj.field_E8[r1_i].point3D_0.point_0.dx_0;
+  tp3d.point_0.dy_4 = cBallProj.field_E8[r1_i].point3D_0.point_0.dy_4;
+  tp3d.dz_8 = cBallProj.field_E8[r1_i].point3D_0.dz_8;
+  // r1_i = r1_i +11;
+  r0_i = FREE_tInfo.filed_0.pFREE_tGoal_1818->m_iKickRot_7464;
+  // r1_i = r1_i % 512u;
+  r0_i = (uint)r0_i << 14u;
+  // r1_i = r1_i + r1_i*4;
+  r0_i = r0_i / 360;
+  FREE_SetupKickAction(tp3d, 0, r0_i);  // 44
+  FREE_SetupPhaseTransition(true);
+  r0_i = cBall.ballPosPrev_4.point_0.dx_0;
+  r1_i = cBall.ballPosPrev_4.point_0.dy_4;
+  r2_i = cBall.ballPosPrev_4.dz_8;
+  tGame.m_uc_6CD4 = 0;  // FREE_tInfo.field_1CB4;//r4_i;
+  // 47FC7C - 0x47DFB0
+  FREE_tInfo.field_1C9C.field_1CCC = r0_i;
+  FREE_tInfo.field_1C9C.field_1CD0 = r1_i;
+  FREE_tInfo.field_1C9C.field_1CD4 = r2_i;
+  GFXNET::Reset();
+  FREE_tInfo.filed_0.gamestatus_1828 = 2;
+  // 47F7DC - 0x47DFB0
+  FREE_tInfo.filed_0.field_182C = 0;
+  // 47F80E - 0x47DFB0
+  FREE_tInfo.filed_0.field_185E = 0;
+  // 47F80C - 0x47DFB0
+  FREE_tInfo.filed_0.field_185C = 0;
+  // 47F808 - 0x47DFB0
+  FREE_tInfo.filed_0.field_1858 = 0;
+  // 47F804 - 0x47DFB0
+  FREE_tInfo.filed_0.field_1854[0] = 0;
+  FREE_tInfo.filed_0.field_1854[1] = 0;
+  FREE_tInfo.filed_0.field_1854[2] = 0;
+  FREE_tInfo.filed_0.field_1854[3] = 0;
+  CGFXFX::ResetGoldenBootEffects();
+  CGFXFX::ResetStarPlayerEffects();
+  FREE_ResetControls();
+  r1_i = tGame.mTLogic_6678.field_38;
+  int r7_i = 30;
+  if (r1_i >= 31) {
+    tGame.mTLogic_6678.field_38 = r7_i;
+  }
+  GenerateMesh();
+}
 //-------------------------------------------------------------------------------------------------
 // 001D49C0
 void FREE_UpdateCamera(bool) {}
@@ -623,7 +912,9 @@ void FREE_SetupKickAction(TPoint3D tPoint3D0, int i1, int i2) {
 void FREE_CheckGKHandPos(CPlayer *, int) {}
 //-------------------------------------------------------------------------------------------------
 // 001D8B9C
-int FREE_SetupPhaseTransition(bool) { return 0; }
+int FREE_SetupPhaseTransition(bool a1) { 
+  LOGE("FREE_SetupPhaseTransition");
+  return rand()+a1; }
 //-------------------------------------------------------------------------------------------------
 // 001D8DB4
 int FREE_PlayerGetUrgency(CPlayer *, int) { return 0; }

+ 1 - 0
jni/GFXNET.cpp

@@ -39,6 +39,7 @@ void GFXNET::mRender(bool) {
 //------------------------------------------------------------------------------------------------
 //001B1C80
 void GFXNET::Reset() {
+	LOGE("GFXNET::Reset");
 }
 //------------------------------------------------------------------------------------------------
 //001B1CA8

+ 6 - 3
jni/GL.cpp

@@ -36,6 +36,7 @@ void GL_IdleProcess() {
 //-------------------------------------------------------------------------------------------------
 //00175F20
 void GL_ResetPlayers() {
+	LOGE("GL_ResetPlayers");
 }
 //-------------------------------------------------------------------------------------------------
 //00175F68
@@ -51,12 +52,14 @@ void GL_SetupNewPlayMode(EPlayMode) {
 }
 //-------------------------------------------------------------------------------------------------
 //00176040
-int GL_NewPlayMode(EPlayMode, int, bool) {
-	return 0;
+int GL_NewPlayMode(EPlayMode a1, int a2, bool a3) {
+	LOGE("GL_NewPlayMode%x%x%x",a1,a2,a3);
+	return rand();
 }
 //-------------------------------------------------------------------------------------------------
 //00176070
-void GL_NewPlayModeState(EPlayModeState) {
+void GL_NewPlayModeState(EPlayModeState a1)  {
+	LOGE("GL_NewPlayModeState%x",a1);
 }
 //-------------------------------------------------------------------------------------------------
 //001760B8

+ 3 - 1
jni/GM.cpp

@@ -57,7 +57,9 @@ void GM_CalcPlayerBallInterceptions() {}
 int GM_GetPlayerNearestPoint(int i0, TPoint pt1, int i2, int *i3) { return 0; }
 //-------------------------------------------------------------------------------------------------
 // 00179AD0
-int GM_GetPlayerNearestPoint(int i0, TPoint pt1, int *i2) { return 0; }
+int GM_GetPlayerNearestPoint(int i0, TPoint pt1, int *i2) {
+  LOGE("GM_GetPlayerNearestPoint%d%d%x%p",i0,pt1.dx_0,pt1.dy_4,i2);
+   return rand(); }
 //-------------------------------------------------------------------------------------------------
 // 00179B60
 void GM_GetPlayerNearestPointF(int, TPoint, int, int, int) {}

+ 1 - 1
jni/TAnimData.h

@@ -54,7 +54,7 @@ struct TAnimData_test4 {
 struct TAnimData_C {
   ushort filed_0;
   ushort filed_2;
-  sint32 filed_4;
+  sint32 i_4;
   int filed_8;
 };
 

+ 1 - 1
jni/XSYS.cpp

@@ -131,7 +131,7 @@ void XSYS_RandomSetSeed(char const *pstr) {
 //001F4F8C //^_^
 void XSYS_RandomSetSeed(int seed) {
   //LOGE("seed char* =%x",seed);
-  rand_seed = 0;
+  rand_seed = seed;
 }
 //-------------------------------------------------------------------------------------------------
 //001F4F9C //^_^

文件差异内容过多而无法显示
+ 0 - 0
obj/local/armeabi-v7a/objs/Hero/linker.list


+ 0 - 1
obj/local/armeabi-v7a/objs/cpufeatures/archiver.list.tmp

@@ -1 +0,0 @@
-./obj/local/armeabi-v7a/objs/cpufeatures/cpu-features.o 

部分文件因为文件数量过多而无法显示