DESKTOP-AB9OQPJ\RED-10 3 سال پیش
والد
کامیت
a6b1786cf7

+ 76 - 7
jni/CFTTNavMesh.cpp

@@ -12,7 +12,7 @@
 #include "sub.h"
 
 //#include "TNMNeighbour.h"
-MYSTATIC uint dword_2FED08[0xE] = {0x3243F, 0x1DAC6, 0xFADC, 0x7F57, 0x3FEB,
+const uint dword_2FED08[0xE] = {0x3243F, 0x1DAC6, 0xFADC, 0x7F57, 0x3FEB,
                                    0x1FFD, 0x1000, 0x800, 0x400, 0x200,
                                    0x100, 0x80, 0x40, 0x20};
 
@@ -24,11 +24,10 @@ int Combine(TTDList<TTSPtr<TNMVert>> *a1, TTDList<TTSPtr<TNMVert>> *a2, TTDList<
 }
 
 //00167760 ^_^
-//已测试分支1 2 未调用
 //单元测试等级: 目测游戏表现
-//单元测试内容: 1-5
+//单元测试内容: 1-10
 //单元测试结果: 正常
-//已测试分支 
+//已测试分支 1 5
 void sub_167760(fpoint2<PointType_14> *r0_pfpoint, fpoint2<PointType_14> *r1_pfpoint)
 {
   LOGE("sub_167760");
@@ -41,11 +40,81 @@ void sub_167760(fpoint2<PointType_14> *r0_pfpoint, fpoint2<PointType_14> *r1_pfp
   r0_pfpoint->y_4 = (r0_ull * 0x4000) / (r5_ull);
 }
 
-// 0x00166ce6
+// 00166D24 ^_-
+//单元测试等级: 目测游戏表现
+//单元测试内容: 1-10
+//单元测试结果: 正常
+//已测试分支  1 5
 
-void EarTest(TTDListNode<TTSPtr<TNMVert>> *a1)
+void EarTest(TTDListNode<TTSPtr<TNMVert>> *r0_pdlist_node)
 {
-  LOGE("%x%x", (unsigned)a1, (unsigned)a1->next);
+  //TTSPtr<TNMVert> size=0x8
+  //LOGE("%x%x", (unsigned)a1, (unsigned)a1->next);
+  //sp34=r0_pdlist_node->next->m.pT_0
+  //sp38=
+  
+  TTSPtr<TNMVert> ptr_vert_next_sp34=r0_pdlist_node->next->m;
+  TTSPtr<TNMVert> ptr_vert_cur_sp2c=r0_pdlist_node->m;
+  TTSPtr<TNMVert> ptr_vert_prev_sp24=r0_pdlist_node->prev->m;
+  //r2 r1 r7 =ptr_vert_cur_sp2c ptr_vert_next_sp34 ptr_vert_prev_sp24  .0 
+  //00166D5E
+  //r3 r0  r0_pdlist_node->next  prev
+  
+  //r8 r1  ptr_vert_next_sp34.pT_0->field_0 ptr_vert_next_sp34.pT_0->field_4
+  //r12 lr ptr_vert_next_sp24.pT_0->field_0 ptr_vert_next_sp24.pT_0->field_4
+  //r7 r2 =ptr_vert_cur_sp2c.pT_0->field_0 ptr_vert_cur_sp2c.pT_0->field_4
+ int r3_i= ptr_vert_prev_sp24.pT_0->field_4-ptr_vert_next_sp34.pT_0->field_4;
+ int i_sp8=ptr_vert_prev_sp24.pT_0->field_0-ptr_vert_cur_sp2c.pT_0->field_0;
+ int i_sp18=ptr_vert_next_sp34.pT_0->field_4-ptr_vert_cur_sp2c.pT_0->field_4;
+ int r5_i=ptr_vert_cur_sp2c.pT_0->field_4-ptr_vert_prev_sp24.pT_0->field_4;
+ int r4_i=ptr_vert_next_sp34.pT_0->field_0-ptr_vert_prev_sp24.pT_0->field_0;
+ int r7_i=ptr_vert_cur_sp2c.pT_0->field_0-ptr_vert_next_sp34.pT_0->field_0;
+ //sp4 =ptr_vert_cur_sp2c.0
+ //sp1c=ptr_vert_next_sp34.0
+ //spc=r5
+ //sp8=r6
+ //sp10= ptr_vert_cur_sp2c.pT_0->field_4
+ //sp20= ptr_vert_next_sp34.pT_0->field_0  
+ //sp14 18=ptr_vert_cur_sp2c.pT_0->field_0 r1_i
+
+ 
+ TTDListNode<TTSPtr<TNMVert>>* r3_pnode = r0_pdlist_node->next;
+ TTDListNode<TTSPtr<TNMVert>>* r0_pnode = r0_pdlist_node->prev;
+ //loc_166D9A
+ while(r0_pnode->prev!=r3_pnode){ 
+   LOGE("EarTest_1"); //ok
+   //loc_166D9A
+   r0_pnode=r0_pnode->prev;
+   // r8 r10 r0_pnode->m.pT_0->field_0 r0_pnode->m.pT_0->field_4
+  int r6_i= r0_pnode->m.pT_0->field_4-ptr_vert_prev_sp24.pT_0->field_4;
+  int r9_i=r0_pnode->m.pT_0->field_0-ptr_vert_prev_sp24.pT_0->field_0;
+  int r1_i= ((uint64)r9_i)*r3_i/0x4000 + ((uint64)r6_i)*r4_i/0x4000;
+  if(r1_i>=1){
+    LOGE("EarTest_2");
+    //00166DC8
+    r1_i = r0_pnode->m.pT_0->field_0 -ptr_vert_next_sp34.pT_0->field_0;
+    int r2_i= r0_pnode->m.pT_0->field_4 - ptr_vert_next_sp34.pT_0->field_4;
+    r1_i= ((uint64)r1_i)*i_sp18/0x4000 + ((uint64)r2_i)*r7_i/0x4000;
+    if(r1_i>=1){
+      //00166DF0
+      LOGE("EarTest_3");
+      r1_i= r0_pnode->m.pT_0->field_4-ptr_vert_cur_sp2c.pT_0->field_4;
+      r6_i= r0_pnode->m.pT_0->field_4 -ptr_vert_cur_sp2c.pT_0->field_0;
+      r1_i= ((uint64)r1_i)*i_sp8/0x4000 + ((uint64)r6_i)*r5_i/0x4000;
+      if(r1_i>0){
+        LOGE("EarTest_4");
+        return ;
+      }
+
+    }
+  }
+  
+
+ }
+//loc_166E2C  ok
+LOGE("EarTest_5");
+ptr_vert_cur_sp2c.pT_0->field_9=true;
+  
 }
 
 void Test(){

+ 1 - 0
jni/CFTTNavMesh.h

@@ -56,4 +56,5 @@ public:
 
 void ShutDownMesh();         //00169870
 extern CFTTNavMesh* pNavMesh;                         //003A3C8C
+extern const uint dword_2FED08[0xE];
 #endif  //_CFTTNAVMESH_H_

+ 41 - 8
jni/CFTTPObject.cpp

@@ -18,7 +18,6 @@ CFTTPObject::CFTTPObject(ePhysicsObjectType ePhyObjType_r1,
   , fpointQ_C(cfpointQ_arg4)
 {
   memset(&fpoint3_1C.x_0, 0, 0x68);           //0016A4CA
-
   fpointQQ_54.fpointQ_24.field_C = 0x4000;
   this->field_8C = ePhyObjType_r1;      //0016A4DE
   this->field_90 = eFreePropType_r2;
@@ -32,8 +31,26 @@ CFTTPObject::CFTTPObject(ePhysicsObjectType ePhyObjType_r1,
   this->field_A4 = 0;       //0016A504
 }
 //-------------------------------------------------------------------------------------------------
-//0016DA32
+//0016DA32 ^_^  
+//单元测试等级: 游戏运行正常
+//单元测试内容: 1-5关
+//单元测试结果: 正常
 CFTTPObject::~CFTTPObject() {
+  LOGE("CFTTPObject::~CFTTPObject_0");
+  //loc_16DA48
+  //loc_16DA48
+  for(int r5_i=0;r5_i<uc_9C;r5_i++){
+    //loc_16DA3A
+    if(pprimitive_98[r5_i]){//OK
+      //0016DA40
+      LOGE("CFTTPObject::~CFTTPObject_1");
+      delete pprimitive_98[r5_i];
+    }
+  }
+  if(pprimitive_98){//OK
+    LOGE("CFTTPObject::~CFTTPObject_2");
+    delete[] pprimitive_98;
+  }
 }
 //-------------------------------------------------------------------------------------------------
 //0016C584 ^_-  参数r1原汇编是个栈上的地址还原后汇编为fpoint.var_0
@@ -88,13 +105,29 @@ void CFTTPObject::Cache(fpoint<PointType_18> r1_pfpoint) {
 
 }
 //-------------------------------------------------------------------------------------------------
-//0016C6A4
+//0016C6A4 ^_^
+//单元测试等级: 游戏运行正常
+//单元测试内容: 1-3
+//单元测试结果: 正常
 CFTTPCapsule CFTTPObject::GenerateSweptSphere() {
-  CFTTPCapsule ret;
-  ret.field_0=rand();
-  ret.field_10=rand();
-  ret.field_18=rand();
-  return ret;
+  LOGE("0016C6A4");
+  CFTTPCapsule capsulr_r0;
+  int r2_i=fpoint3_0.x_0;
+  int r3_i=fpoint3_0.y_4;
+  int r12_i=fpoint3_0.z_8;
+  int lr_i=fpoint3_1C.x_0;
+  int r4_i=fpoint3_1C.y_4;
+  int r5_i=fpoint3_1C.z_8;
+
+  capsulr_r0.field_0=(field_3C+0xA3D)>>4;
+  capsulr_r0.field_4=r2_i>>4;
+  capsulr_r0.field_8=r3_i>>4;
+  capsulr_r0.field_c=r12_i>>4;
+  capsulr_r0.field_10=(r2_i+lr_i)>>4;
+  capsulr_r0.field_14=(r3_i+r4_i)>>4;
+  capsulr_r0.field_18=(r12_i+r5_i)>>4;
+
+  return capsulr_r0;
 
 }
 //-------------------------------------------------------------------------------------------------

+ 12 - 1
jni/CFTTPPBox.cpp

@@ -2,7 +2,18 @@
 
 //-------------------------------------------------------------------------------------------------
 //0016A998
-CFTTPPBox::CFTTPPBox(fpoint3<PointType_18>, fpoint3<PointType_18>, fpointQ<PointType_18>) {
+CFTTPPBox::CFTTPPBox(fpoint3<PointType_18>fpoint3_r1, fpoint3<PointType_18>fpoint3_r2, fpointQ<PointType_18>fpointQ_r3) 
+:CFTTPPrimitive(fpoint3_r1,fpointQ_r3)
+{
+
+
+//fpoint3
+  LOGE("%x%x%x",fpoint3_r1.x_0,fpoint3_r1.y_4,fpoint3_r1.z_8);
+  LOGE("%x%x%x",fpoint3_r2.x_0,fpoint3_r2.y_4,fpoint3_r2.z_8);
+  //fpointQ
+  LOGE("%x%x%x%x",fpointQ_r3.field_0,fpointQ_r3.field_4,fpointQ_r3.field_C,fpointQ_r3.field_8);
+  //this
+  LOGE("%x",(uint)this);  
 }
 //-------------------------------------------------------------------------------------------------
 //0016D966

+ 5 - 2
jni/CFTTPPBox.h

@@ -3,18 +3,21 @@
 #define _CFTTPPBOX_H_
 
 #include "common.h"
-
+#include "CFTTPPrimitive.h"
 /*
 0016A998 CFTTPPBox::CFTTPPBox(fpoint3<PointType_18>,fpoint3<PointType_18>,fpointQ<PointType_18>)
 0016D966 CFTTPPBox::~CFTTPPBox()
 0016BF04 CFTTPPBox::DSupport(fpoint3<PointType_26>)
 */
 
-class CFTTPPBox {
+class CFTTPPBox : public CFTTPPrimitive {
 public:
   CFTTPPBox(fpoint3<PointType_18>, fpoint3<PointType_18>, fpointQ<PointType_18>);  //0016A998
   ~CFTTPPBox();                                                                    //0016D966
   void DSupport(fpoint3<PointType_26>);                                            //0016BF04
+  int field_68;
+  int field_6c;
+  int field_70;
 };
 
 #endif  //_CFTTPPBOX_H_

+ 17 - 5
jni/CFTTPPCone.cpp

@@ -2,11 +2,23 @@
 
 //-------------------------------------------------------------------------------------------------
 //0016AA30
-CFTTPPCone::CFTTPPCone(fpoint<PointType_18>,
-                       fpoint<PointType_18>,
-                       fpoint<PointType_18>,
-                       fpoint3<PointType_18>,
-                       fpointQ<PointType_18>) {
+CFTTPPCone::CFTTPPCone(fpoint<PointType_18>fpoint_r1,
+                       fpoint<PointType_18>fpoint_r2,
+                       fpoint<PointType_18>fpoint_r3,
+                       fpoint3<PointType_18>fpoint3_r4,
+                       fpointQ<PointType_18>fpointQ_r5)
+                       :CFTTPPrimitive(fpoint3_r4,fpointQ_r5) {
+                     //fpoint
+  LOGE("%x",fpoint_r1.var_0);
+  LOGE("%x",fpoint_r2.var_0);
+  LOGE("%x",fpoint_r3.var_0);
+
+//fpoint3
+  LOGE("%x%x%x",fpoint3_r4.x_0,fpoint3_r4.y_4,fpoint3_r4.z_8);
+  //fpointQ
+  LOGE("%x%x%x%x",fpointQ_r5.field_0,fpointQ_r5.field_4,fpointQ_r5.field_C,fpointQ_r5.field_8);
+  //this
+  LOGE("%x",(uint)this);      
 }
 //-------------------------------------------------------------------------------------------------
 //0016D96C

+ 5 - 2
jni/CFTTPPCone.h

@@ -3,14 +3,14 @@
 #define _CFTTPPCONE_H_
 
 #include "common.h"
-
+#include "CFTTPPrimitive.h"
 /*
 0016AA30 CFTTPPCone::CFTTPPCone(fpoint<PointType_18>,fpoint<PointType_18>,fpoint<PointType_18>,fpoint3<PointType_18>,fpointQ<PointType_18>)
 0016D96C CFTTPPCone::~CFTTPPCone()
 0016BF50 CFTTPPCone::DSupport(fpoint3<PointType_26>)
 */
 
-class CFTTPPCone {
+class CFTTPPCone :public CFTTPPrimitive{
 public:
   CFTTPPCone(fpoint<PointType_18>,
              fpoint<PointType_18>,
@@ -19,6 +19,9 @@ public:
              fpointQ<PointType_18>);     //0016AA30
   ~CFTTPPCone();                         //0016D96C
   void DSupport(fpoint3<PointType_26>);  //0016BF50
+  int field_68;
+  int field_6C;
+  int field_70;
 };
 
 #endif  //_CFTTPPCONE_H_

+ 2 - 1
jni/CFTTPPCylinder.cpp

@@ -2,7 +2,8 @@
 
 //-------------------------------------------------------------------------------------------------
 //0016A94C
-CFTTPPCylinder::CFTTPPCylinder(fpoint<PointType_18>, fpoint<PointType_18>, fpoint3<PointType_18>, fpointQ<PointType_18>) {
+CFTTPPCylinder::CFTTPPCylinder(fpoint<PointType_18>a1, fpoint<PointType_18>a2, fpoint3<PointType_18>a3, fpointQ<PointType_18>a4)
+:CFTTPPrimitive(a3,a4) {
 }
 //-------------------------------------------------------------------------------------------------
 //0016D970

+ 4 - 2
jni/CFTTPPCylinder.h

@@ -3,14 +3,14 @@
 #define _CFTTPPCYLINDER_H_
 
 #include "common.h"
-
+#include "CFTTPPrimitive.h"
 /*
 0016A94C CFTTPPCylinder::CFTTPPCylinder(fpoint<PointType_18>,fpoint<PointType_18>,fpoint3<PointType_18>,fpointQ<PointType_18>)
 0016D970 CFTTPPCylinder::~CFTTPPCylinder()
 0016C100 CFTTPPCylinder::DSupport(fpoint3<PointType_26>)
 */
 
-class CFTTPPCylinder {
+class CFTTPPCylinder :public CFTTPPrimitive{
 public:
   CFTTPPCylinder(fpoint<PointType_18>,
                  fpoint<PointType_18>,
@@ -18,6 +18,8 @@ public:
                  fpointQ<PointType_18>);  //0016A94C
   ~CFTTPPCylinder();                      //0016D970
   void DSupport(fpoint3<PointType_26>);   //0016C100
+  int field_68;
+  int field_6C;
 };
 
 #endif  //_CFTTPPCYLINDER_H_

+ 2 - 1
jni/CFTTPPPolyhedron.cpp

@@ -2,7 +2,8 @@
 
 //-------------------------------------------------------------------------------------------------
 //0016A9E8
-CFTTPPPolyhedron::CFTTPPPolyhedron(fpoint3<PointType_18> *, uchar, fpoint3<PointType_18>, fpointQ<PointType_18>) {
+CFTTPPPolyhedron::CFTTPPPolyhedron(fpoint3<PointType_18> *a1, uchar a2, fpoint3<PointType_18>a3, fpointQ<PointType_18>a4) 
+:CFTTPPrimitive(a3,a4){
 }
 //-------------------------------------------------------------------------------------------------
 //0016D95E

+ 4 - 2
jni/CFTTPPPolyhedron.h

@@ -3,14 +3,14 @@
 #define _CFTTPPPOLYHEDRON_H_
 
 #include "common.h"
-
+#include "CFTTPPrimitive.h"
 /*
 0016A9E8 CFTTPPPolyhedron::CFTTPPPolyhedron(fpoint3<PointType_18> *,uchar,fpoint3<PointType_18>,fpointQ<PointType_18>)
 0016D95E CFTTPPPolyhedron::~CFTTPPPolyhedron()
 0016C1CC CFTTPPPolyhedron::DSupport(fpoint3<PointType_26>)
 */
 
-class CFTTPPPolyhedron {
+class CFTTPPPolyhedron:public CFTTPPrimitive {
 public:
   CFTTPPPolyhedron(fpoint3<PointType_18> *,
                    uchar,
@@ -18,6 +18,8 @@ public:
                    fpointQ<PointType_18>);  //0016A9E8
   ~CFTTPPPolyhedron();                      //0016D95E
   void DSupport(fpoint3<PointType_26>);     //0016C1CC
+  int field_68;
+  int field_6C;
 };
 
 #endif  //_CFTTPPPOLYHEDRON_H_

+ 11 - 2
jni/CFTTPPSphere.cpp

@@ -7,8 +7,17 @@ CFTTPPSphere::CFTTPPSphere(fpoint<PointType_18> fpoint_r1,
                           fpointQ<PointType_18> fpointQ_r3)
   : CFTTPPrimitive(fpoint3_r2, fpointQ_r3)
   //: m_cPrimitive_0(fpoint3_r2, fpointQ_r3)
-  , fpoint_68(fpoint_r1)
-{}
+{
+  //fpoint
+  LOGE("%x",fpoint_r1.var_0);
+//fpoint3
+  LOGE("%x%x%x",fpoint3_r2.x_0,fpoint3_r2.y_4,fpoint3_r2.z_8);
+  //fpointQ
+  LOGE("%x%x%x%x",fpointQ_r3.field_0,fpointQ_r3.field_4,fpointQ_r3.field_C,fpointQ_r3.field_8);
+  //this
+  LOGE("%x",(uint)this);
+  
+}
 //-------------------------------------------------------------------------------------------------
 //0016D962
 CFTTPPSphere::~CFTTPPSphere() {

+ 0 - 1
jni/CFTTPPSphere.h

@@ -18,7 +18,6 @@ public:
   void DSupport(fpoint3<PointType_26>);                                              //0016BEBE
 public:
 public:
-  //CFTTPPrimitive m_cPrimitive_0;
   fpoint<PointType_18> fpoint_68;
 };
 

+ 49 - 7
jni/CFTTPPrimitive.cpp

@@ -1,8 +1,33 @@
 #include "CFTTPPrimitive.h"
-
+#include "sub.h"
 //-------------------------------------------------------------------------------------------------
 //0016D9D4
-CFTTPPrimitive::CFTTPPrimitive(fpoint3<PointType_18>, fpointQ<PointType_18>) {
+CFTTPPrimitive::CFTTPPrimitive(fpoint3<PointType_18> fpoint3_r1, fpointQ<PointType_18> fpointQ_r2)
+  : fpoint3_8(fpoint3_r1)
+  , fpointQ_14(fpointQ_r2)
+  
+{
+  this->fpoint3_24.x_0=0;  //0016DA14  24
+  this->fpoint3_24.y_4 = 0;
+  this->fpoint3_24.z_8 = 0;
+
+  this->fpointQQ_30.list_0[0] = 0;
+  this->fpointQQ_30.list_0[1] = 0;  //0016DA0C 34
+  this->fpointQQ_30.list_0[2] = 0;
+  this->fpointQQ_30.list_0[3] = 0;
+  this->fpointQQ_30.list_0[4] = 0;
+  this->fpointQQ_30.list_0[5] = 0;  //0016DA04 44
+  this->fpointQQ_30.list_0[6] = 0;
+  this->fpointQQ_30.list_0[7] = 0;
+  this->fpointQQ_30.list_0[8] = 0;  //0016D9FA 50
+/*
+  this->filed_30.field_24 = 0;
+  this->filed_30.field_28 = 0;
+  this->filed_30.field_2C = 0;
+  this->filed_30.field_30 = 0x40000;  //0016DA24
+*/
+  this->fpointQQ_30.fpointQ_24.field_C=0x40000;
+  this->field_64 = 0;
 }
 //-------------------------------------------------------------------------------------------------
 //0016D96A 0016DA30
@@ -12,9 +37,9 @@ CFTTPPrimitive::~CFTTPPrimitive() {
 //0016BE78
 fpoint3<PointType_26> CFTTPPrimitive::Diff(CFTTPPrimitive const* a1 , CFTTPPrimitive const* a2) {
     fpoint3<PointType_18> d;
-    d.y_4 = a1->filed_24[1]-a2->filed_24[1];
-    d.x_0 = a1->filed_24[0]-a2->filed_24[0];
-    d.z_8 = a1->filed_24[2]-a2->filed_24[2];
+    // d.y_4 = a1->filed_24[1]-a2->filed_24[1];
+    // d.x_0 = a1->filed_24[0]-a2->filed_24[0];
+    // d.z_8 = a1->filed_24[2]-a2->filed_24[2];
     return fpoint3<PointType_26>(d);
 }
 //-------------------------------------------------------------------------------------------------
@@ -22,9 +47,26 @@ fpoint3<PointType_26> CFTTPPrimitive::Diff(CFTTPPrimitive const* a1 , CFTTPPrimi
 void CFTTPPrimitive::Support(fpoint3<PointType_26>) {
 }
 //-------------------------------------------------------------------------------------------------
-//0016C378 乱写的
+//0016C378 ^_-  
+//单元测试等级: 游戏运行正常
+//单元测试内容: 1-5关
+//单元测试结果: 正常
 void  CFTTPPrimitive::Cache(fpoint<PointType_18> a) {
-    LOGE("CFTTPPrimitive::Cache this=%x",(uint)this);
+    LOGE("CFTTPPrimitive::Cache");
+    fpointQ<PointType_18> fpointQ_sp20;
+    fpointQ<PointType_18> fpointQ_sp10;
+    sub_16C3E2(fpointQ_sp10,filed_4->fpointQQ_54.fpointQ_24,fpointQ_14);
+    sub_16A88C(fpointQ_sp20,fpointQ_sp10);
+    fpointQQ_30.fpointQ_24=fpointQ_sp20;
+    fpointQQ_30.Cache();
+    fpoint3<PointType_18> fpoint3_sp4;
+    fpoint3_sp4.x_0=fpoint3_8.x_0;
+    fpoint3_sp4.y_4=fpoint3_8.y_4;
+    fpoint3_sp4.z_8=fpoint3_8.z_8;
+    fpoint3<PointType_18> fpoint3_sp20 = filed_4->fpointQQ_54.Multiply(fpoint3_sp4);
+    fpoint3_24.x_0 = fpoint3_sp20.x_0+filed_4->fpoint3_48.x_0;
+    fpoint3_24.y_4 = fpoint3_sp20.y_4+filed_4->fpoint3_48.y_4;
+    fpoint3_24.z_8 = fpoint3_sp20.z_8+filed_4->fpoint3_48.z_8;
     return ;
 }
 //-------------------------------------------------------------------------------------------------

+ 5 - 4
jni/CFTTPPrimitive.h

@@ -37,10 +37,11 @@ public:
 
 //数据结构是一个初步的分析结果,应该还有错误
   CFTTPObject* filed_4;
-  fpoint3<PointType_26> filed_8;
-  fpoint3<PointType_26> filed_14;
-  int filed_20;
-  int filed_24[3];
+  fpoint3<PointType_26> fpoint3_8;
+  fpointQ<PointType_18> fpointQ_14;
+ // int filed_20;
+  //int filed_24[3];
+  fpoint3<PointType_26> fpoint3_24;
   fpointQQ<PointType_18> fpointQQ_30;
 
   // int filed_3C;

+ 1 - 0
jni/CFTTPhysics.cpp

@@ -181,6 +181,7 @@ int CFTTPhysics::Process() {
                 LOGE("CFTTPhysics::Process_branch_8");
                 punk_sp40 = r6_punk;
                 punk_sp44 = r6_punk;
+                
               }
               // loc_16AC02
             }

+ 38 - 1
jni/CStoryCore.cpp

@@ -186,7 +186,44 @@ void CStoryCore::RandomiseSunPos() {
 }
 //---------------------------------------------------------------------------------------------------------
 //001E2520
-void CStoryCore::ProcessText(wchar_t *, int, wchar_t const *, int) {
+void CStoryCore::ProcessText(wchar_t *r0_wp, int r1_i, wchar_t const *r2_wp, int r3_i) {
+  // int r0_size=xstrlen(r2_wp)*2;
+  // int r11_i=r1_i+r0_size+0x20;
+  // //check
+  // wchar_t*r10_wp= new wchar_t[r11_i];
+  // memset(r10_wp,0,r11_i*sizeof(wchar_t));
+
+  // wchar_t*r5_wp=r10_wp;
+  // //loc_1E2562
+
+  // //loc_1E256C
+  // while(r2_wp){
+  //   const wchar_t*r7_substr= xstrstr(r2_wp,L"#");
+  //   if(r7_substr){
+  //     //001E258A
+  //     wchar_t wp_sp10[0x40];
+  //     memset(wp_sp10,0,sizeof(wp_sp10));
+  //     //sp8=r1_i
+  //     switch (r7_substr[1])
+  //     {
+  //     case 'N'{
+  //       break;
+  //     }
+      
+  //     default:
+  //     {
+  //       wp_sp10[0]=r7_substr[0];
+  //       break;
+  //     }
+  //     }
+  //   }else{
+  //     //loc_1E256C
+  //     xstrlcpy(r5_wp,r2_wp,r11_i-(r5_wp-r10_wp))
+  //   }
+  // }
+  // //loc_1E2756
+  // xstrlcpy(r0_wp,r10_wp,r1_i);
+  // delete [] r10_wp;
 }
 //---------------------------------------------------------------------------------------------------------
 //001E2798

+ 735 - 295
jni/FREE.cpp

@@ -1,15 +1,26 @@
 #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"
 // 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"};
+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",
@@ -20,55 +31,43 @@ const char *s_sPropModels_Shadow[3] = {"PKG:/data/env/dressing/cone.ftm",
 CFTTModel *FREE_pPropModelShadow[3];
 
 //-------------------------------------------------------------------------------------------------
-//001D2758
-int FREE_GetLevelFilename(char *, int, char *, bool &) {
-	return 0;
-}
+// 001D2758
+int FREE_GetLevelFilename(char *, int, char *, bool &) { return 0; }
 //-------------------------------------------------------------------------------------------------
-//001D27EC
-void FREE_GetWorldRot(TPoint, TPoint) {
-}
+// 001D27EC
+void FREE_GetWorldRot(TPoint, TPoint) {}
 //-------------------------------------------------------------------------------------------------
-//001D281C
-void FREE_CalcKickAngle(TPoint3D *, TPoint3D, TPoint3D, int, int, int *) {
-}
+// 001D281C
+void FREE_CalcKickAngle(TPoint3D *, TPoint3D, TPoint3D, int, int, int *) {}
 //-------------------------------------------------------------------------------------------------
-//001D2A98
-int FREE_PassCheckPath(CPlayer *, TPoint, TPoint) {
-  return 0;
-}
+// 001D2A98
+int FREE_PassCheckPath(CPlayer *, TPoint, TPoint) { return 0; }
 //-------------------------------------------------------------------------------------------------
-//001D2BC0
-void FREE_ResolveEndPoint(TPoint3D *, TPoint3D *, TPoint *, int *, bool) {
-}
+// 001D2BC0
+void FREE_ResolveEndPoint(TPoint3D *, TPoint3D *, TPoint *, int *, bool) {}
 //-------------------------------------------------------------------------------------------------
-//001D30B8
-void FREE_GetKickPower(EAnimID, int *, int *) {
-}
+// 001D30B8
+void FREE_GetKickPower(EAnimID, int *, int *) {}
 //-------------------------------------------------------------------------------------------------
-//001D30FC
-void FREE_ProcessControls(bool) {
-}
+// 001D30FC
+void FREE_ProcessControls(bool) {}
 //-------------------------------------------------------------------------------------------------
-//001D3EC8
-int FREE_CalcKickTargetTime(int) {
-	return 0;
-}
+// 001D3EC8
+int FREE_CalcKickTargetTime(int) { return 0; }
 //-------------------------------------------------------------------------------------------------
-//001D3EEC
-void FREE_ResetControls() {
-}
+// 001D3EEC
+void FREE_ResetControls() {}
 //-------------------------------------------------------------------------------------------------
-//001D3F24
+// 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;
+// 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;
@@ -165,7 +164,8 @@ void FREE_ControlGetKickLimits(CPlayer* player0, int* pi1, int* pi2, int* pi3) {
     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);
+    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 ;
@@ -209,7 +209,7 @@ void FREE_ControlGetKickLimits(CPlayer* player0, int* pi1, int* pi2, int* pi3) {
   r0_i = r4_i << 1u;
   r1_i = 3;
   r0_i = r0_i / r1_i;
-  int* r1_pi = var_58;
+  int *r1_pi = var_58;
   *r1_pi = r0_i;
   r1_i = var_48.point_0.dx_0;
   // 001D40EA
@@ -221,35 +221,28 @@ void FREE_ControlGetKickLimits(CPlayer* player0, int* pi1, int* pi2, int* pi3) {
   *var_50 = r6_i;
 }
 //-------------------------------------------------------------------------------------------------
-//001D4120
-void FREE_Init() {
-}
+// 001D4120
+void FREE_Init() {}
 //-------------------------------------------------------------------------------------------------
-//001D4160
-void FREE_Shutdown() {
-}
+// 001D4160
+void FREE_Shutdown() {}
 //-------------------------------------------------------------------------------------------------
-//001D41B0
-void FREE_InitGoal(int, bool, bool, bool) {
-}
+// 001D41B0
+void FREE_InitGoal(int, bool, bool, bool) {}
 //-------------------------------------------------------------------------------------------------
-//001D4318
-void FREE_SetupDifficulty() {
-}
+// 001D4318
+void FREE_SetupDifficulty() {}
 //-------------------------------------------------------------------------------------------------
-//001D4424
-void FREE_Initialise() {
-}
+// 001D4424
+void FREE_Initialise() {}
 //-------------------------------------------------------------------------------------------------
-//001D49C0
-void FREE_UpdateCamera(bool) {
-}
+// 001D49C0
+void FREE_UpdateCamera(bool) {}
 //-------------------------------------------------------------------------------------------------
-//001D56CC
-void FREE_ClipPathBounds(TPoint3D *, TPoint3D *, int, int, int, int) {
-}
+// 001D56CC
+void FREE_ClipPathBounds(TPoint3D *, TPoint3D *, int, int, int, int) {}
 //-------------------------------------------------------------------------------------------------
-//001D5718
+// 001D5718
 // void FREE_GameLoop() {
 //   int r0_i = 0;
 //   int r1_i = 0;
@@ -409,284 +402,731 @@ void FREE_ClipPathBounds(TPoint3D *, TPoint3D *, int, int, int, int) {
 //   return;
 // }
 //-------------------------------------------------------------------------------------------------
-//001D58B4
-void FREE_StoreRewindState() {
-}
+// 001D58B4
+void FREE_StoreRewindState() {}
 //-------------------------------------------------------------------------------------------------
-//001D5A3E
-void FREE_UpdateRewindState() {
-}
+// 001D5A3E
+void FREE_UpdateRewindState() {}
 //-------------------------------------------------------------------------------------------------
-//001D5A40
-void FREE_RestoreRewindState() {
-}
+// 001D5A40
+void FREE_RestoreRewindState() {}
 //-------------------------------------------------------------------------------------------------
-//001D5AE4
-void FREE_BeginRewind() {
-}
+// 001D5AE4
+void FREE_BeginRewind() {}
 //-------------------------------------------------------------------------------------------------
-//001D5B30
-int FREE_RewindFrame() {
-  return 0;
-}
+// 001D5B30
+int FREE_RewindFrame() { return 0; }
 //-------------------------------------------------------------------------------------------------
-//001D5C0C
-void FREE_ClipPathBounds(TPoint *, TPoint *, int, int, int, int) {
-}
+// 001D5C0C
+void FREE_ClipPathBounds(TPoint *, TPoint *, int, int, int, int) {}
 //-------------------------------------------------------------------------------------------------
-//001D656C
-void FREE_IdleProcess() {
-}
+// 001D656C
+void FREE_IdleProcess() {}
 //-------------------------------------------------------------------------------------------------
-//001D66F0
-void FREE_SetupKick(TFreeControl *, TPoint3D *) {
-}
+// 001D66F0
+void FREE_SetupKick(TFreeControl *, TPoint3D *) {}
 //-------------------------------------------------------------------------------------------------
-//001D6778
-void FREE_LogicProcess() {
-}
+// 001D6778
+void FREE_LogicProcess() {}
 //-------------------------------------------------------------------------------------------------
-//001D67E8
-int FREE_GetPassTargetPlayer(CPlayer *, int *) {
-	return 0;
-}
+// 001D67E8
+int FREE_GetPassTargetPlayer(CPlayer *, int *) { return 0; }
 //-------------------------------------------------------------------------------------------------
-//001D6918
-void FREE_ProcessShotAnim(CPlayer *) {
-}
+// 001D6918
+void FREE_ProcessShotAnim(CPlayer *) {}
 //-------------------------------------------------------------------------------------------------
-//001D6CD8
-void FREE_ProcessUserTeam() {
-}
+// 001D6CD8
+void FREE_ProcessUserTeam() {}
 //-------------------------------------------------------------------------------------------------
-//001D7D74
-void FREE_ProcessOppoTeam() {
-}
+// 001D7D74
+void FREE_ProcessOppoTeam() {}
 //-------------------------------------------------------------------------------------------------
-//001D848C
-void FREE_ProcessFree() {
-}
+// 001D848C
+void FREE_ProcessFree() {}
 //-------------------------------------------------------------------------------------------------
-//001D86C4
-void FREE_ProcessFail() {
-}
+// 001D86C4
+void FREE_ProcessFail() {}
 //-------------------------------------------------------------------------------------------------
-//001D8884
-void FREE_PlayCommentaryClearance() {
-}
+// 001D8884
+void FREE_PlayCommentaryClearance() {}
 //-------------------------------------------------------------------------------------------------
-//001D8944
-void FREE_PlayCommentaryInterception() {
-}
+// 001D8944
+void FREE_PlayCommentaryInterception() {}
 //-------------------------------------------------------------------------------------------------
-//001D8998
-void FREE_SetupKickAction(TPoint3D, int, int) {
-}
+// 001D8998
+void FREE_SetupKickAction(TPoint3D, int, int) {}
 //-------------------------------------------------------------------------------------------------
-//001D8AD0
-void FREE_CheckGKHandPos(CPlayer *, int) {
-}
+// 001D8AD0
+void FREE_CheckGKHandPos(CPlayer *, int) {}
 //-------------------------------------------------------------------------------------------------
-//001D8B9C
-int FREE_SetupPhaseTransition(bool) {
-  return 0;
-}
+// 001D8B9C
+int FREE_SetupPhaseTransition(bool) { return 0; }
 //-------------------------------------------------------------------------------------------------
-//001D8DB4
-int FREE_PlayerGetUrgency(CPlayer *, int) {
-	return 0;
-}
+// 001D8DB4
+int FREE_PlayerGetUrgency(CPlayer *, int) { return 0; }
 //-------------------------------------------------------------------------------------------------
-//001D8E68
-void FREE_ProcessInProgressCore() {
-}
+// 001D8E68
+void FREE_ProcessInProgressCore() {}
 //-------------------------------------------------------------------------------------------------
-//001D956C
-void FREE_UpdateSuccess() {
-}
+// 001D956C
+void FREE_UpdateSuccess() {}
 //-------------------------------------------------------------------------------------------------
-//001D96E4
-int FREE_ProcessLogic() {
-	return 0;
-}
+// 001D96E4
+int FREE_ProcessLogic() { return 0; }
 //-------------------------------------------------------------------------------------------------
-//001DA0A8
-void FREE_PlayCommentaryPassReceive() {
-}
+// 001DA0A8
+void FREE_PlayCommentaryPassReceive() {}
 //-------------------------------------------------------------------------------------------------
-//001DA208
-void FREE_PlayCommentaryKick() {
-}
+// 001DA208
+void FREE_PlayCommentaryKick() {}
 //-------------------------------------------------------------------------------------------------
-//001DA484
-void FREE_SetComplete() {
-}
+// 001DA484
+void FREE_SetComplete() {}
 //-------------------------------------------------------------------------------------------------
-//001DA5C0
-void FREE_PlayersUpset(int) {
-}
+// 001DA5C0
+void FREE_PlayersUpset(int) {}
 //-------------------------------------------------------------------------------------------------
-//001DA620
-void FREE_PlayersCelebrate() {
-}
+// 001DA620
+void FREE_PlayersCelebrate() {}
 //-------------------------------------------------------------------------------------------------
-//001DA670
-void FREE_CheckCollision() {
-}
+// 001DA670
+void FREE_CheckCollision() {}
 //-------------------------------------------------------------------------------------------------
-//001DA674
+// 001DA674
 //^_^
-void FREE_InitProps(void) {
-}
+void FREE_InitProps(void) {}
 //-------------------------------------------------------------------------------------------------
-//001DA730
-void FREE_UpdateProps() {
-}
+// 001DA730
+void FREE_UpdateProps() {}
 //-------------------------------------------------------------------------------------------------
-//001DA764
-void FREE_ShutdownProps() {
-}
+// 001DA764
+void FREE_ShutdownProps() {}
 //-------------------------------------------------------------------------------------------------
-//001DA7A4
-void FREE_RenderPropShadow(EFreePropType, CFTTMatrix32 *) {
-}
+// 001DA7A4
+void FREE_RenderPropShadow(EFreePropType, CFTTMatrix32 *) {}
 //-------------------------------------------------------------------------------------------------
-//001DA7BC
-void FREE_RenderProp(EFreePropType, CFTTMatrix32 *) {
-}
+// 001DA7BC
+void FREE_RenderProp(EFreePropType, CFTTMatrix32 *) {}
 //-------------------------------------------------------------------------------------------------
-//001DA7D4
-void FREE_RenderPropShadows() {
-}
+// 001DA7D4
+void FREE_RenderPropShadows() {}
 //-------------------------------------------------------------------------------------------------
-//001DA8C0
-void FREE_RenderProps() {
-}
+// 001DA8C0
+void FREE_RenderProps() {}
 //-------------------------------------------------------------------------------------------------
-//001DA9AC
-void FREE_ProcessPropCollision(TFreeProp *) {
-}
+// 001DA9AC
+void FREE_ProcessPropCollision(TFreeProp *) {}
 //-------------------------------------------------------------------------------------------------
-//001DA9AE
-void FREE_ProcessPropCollisions() {
-}
+// 001DA9AE
+void FREE_ProcessPropCollisions() {}
 //-------------------------------------------------------------------------------------------------
-//001DA9B0
+// 001DA9B0
 //^_^
-void FREE_RenderInitOnce() {
-}
+void FREE_RenderInitOnce() {}
 //-------------------------------------------------------------------------------------------------
-//001DA9E0
-void FREE_RenderShutdownOnce() {
-}
+// 001DA9E0
+void FREE_RenderShutdownOnce() {}
 //-------------------------------------------------------------------------------------------------
-//001DAA00
-void FREE_RenderInit() {
-}
+// 001DAA00
+void FREE_RenderInit() {}
 //-------------------------------------------------------------------------------------------------
-//001DAAAC
-void FREE_RenderShutdown() {
-}
+// 001DAAAC
+void FREE_RenderShutdown() {}
 //-------------------------------------------------------------------------------------------------
-//001DAAF4
-void FREE_RenderListBegin(char const *, bool, bool) {
-}
+// 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) {
-}
+// 001DAB84
+void FREE_RenderListEnd() {}
 //-------------------------------------------------------------------------------------------------
-//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;
+// 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;
+
 }
 //-------------------------------------------------------------------------------------------------
-//001DCA14
-void FREE_ReadXMLLevel(TFreeGoal *, CFTTXmlReaderNode) {
-}
-//-------------------------------------------------------------------------------------------------

+ 2 - 9
jni/FREE.h

@@ -115,14 +115,7 @@ extern TFreeInfo FREE_tInfo;
 extern int FREE_iTeam;                        // 00487304
 extern TFreeGoal FREE_tGoal;                  // 0047FCD0
 
-enum EFreePropType {
-  EFreePropType_0,
-  EFreePropType_1,
-  EFreePropType_2,
-  EFreePropType_3,
-  EFreePropType_4,
-  EFreePropType_5,
-};
+
 
 enum EVFEffect {
   EVFEffect_0,
@@ -220,5 +213,5 @@ void FREE_SortPlayersDistance(TFreeGoal *);                                // 00
 int FREE_ReadXML(TFreeGoal *, int);                                        // 001DC848
 bool FREE_ReadXML(TFreeGoal *, char *);                                    // 001DC888
 void FREE_ReadXMLLevel(TFreeGoal *, CFTTXmlReaderNode);                    // 001DCA14
-
+void PhysicsTest();                                                        //00169A80              
 #endif  //_FREE_H_

+ 11 - 2
jni/TFreeControl.h

@@ -5,6 +5,15 @@
 #include "ACT.h"
 #include "global_func.h"
 
+enum EFreePropType {
+  EFreePropType_0,
+  EFreePropType_1,
+  EFreePropType_2,
+  EFreePropType_3,
+  EFreePropType_4,
+  EFreePropType_5,
+};
+
 struct TAnim {
   int m_iTick_0;
   int m_iAnimID_4;
@@ -51,7 +60,7 @@ struct TMoveInfluence {
 
 struct TFreeProp {
   TPoint3D    m_tPoint3D_0;
-  int         m_iType_C;
+  EFreePropType   m_iType_C;
   int         m_iRot_10;
 };
 
@@ -140,7 +149,7 @@ struct TFreeInfo_0
   int field_181C;
   int field_1820;
   int field_1824;
-  int gamestatus_1828;                 //这个变量应该表示游戏的状态
+  uint ugamestatus_1828;                 //这个变量应该表示游戏的状态
   int field_182C;
   int field_1830;
   int field_1834;

+ 2 - 5
jni/TGame.h

@@ -6,7 +6,7 @@
 
 #include "CPlayer.h"
 #include "CTeam.h"
-
+#include "TFreeControl.h"
 struct PlayerSubstitute {
   CPlayer *pCPlayer_0;
   int field_4;
@@ -53,10 +53,7 @@ struct TLogic {
   char field_71;
   char field_72;
   char field_73;
-  char field_74;
-  char field_75;
-  char field_76;
-  char field_77;
+  EFreePropType  freeproptype_74;
   int field_78;
   char field_7C;
   char field_7D;

+ 2 - 2
jni/fpoint.h

@@ -15,7 +15,7 @@ template <uint t>
 class fpoint {
 public:
   int var_0;
-  int test_4;//测试使用
+  //int test_4;//测试使用
 };
 //-------------------------------------------------------------------------------------------------
 template <PointType t>
@@ -116,7 +116,7 @@ public:
   }
   // 0016c4ba //^_-
   void Cache() {
-    LOGE("Cache%x=",this);
+    LOGE("Cache%x=",(uint)this);
     // int tmp_r6 = (int)(((int64)(field_28 * 2) * (int64)field_24) >> 18);
     // int tmp_r5 = (int)(((int64)(field_2C * 2) * (int64)field_30) >> 18);
     // list_0[1] = tmp_r6 - tmp_r5;

+ 135 - 0
jni/sub.cpp

@@ -1,5 +1,10 @@
 #include "sub.h"
 #include "log.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+extern const  uint dword_2FED08[0xE];
 // 0016A88C ^_^
 //单元测试等级: 目测游戏表现
 //单元测试内容: 1-5
@@ -231,4 +236,134 @@ void sub_16C74C(fpoint<PointType_18> &r0_pfpoint,fpoint3<PointType_18> &r1_pfpoi
   r0_pfpoint.var_0 = ((unsigned long long)r1_i * r3_i) / 0x40000 +
                      ((unsigned long long)r4_i * r12_i) / 0x40000 +
                      ((unsigned long long)r2_i * lr_i) / 0x40000;
+}
+
+
+// 0016A57C 
+//已测试分支
+//单元测试内容: 1-10
+//单元测试结果:未调用
+//已测试分支
+void sub_16A57C(int&r0_pi,int&r1_pi){
+  LOGE("sub_16A57C");
+  uint64 ull_sp0;
+  int r10_i=r1_pi;
+  if(r1_pi<=-411776){
+    //0016A592
+    ull_sp0=0xffffffff00000000;
+    r10_i+=823550;
+  }else{//loc_16A5A2
+    if(r1_pi<=411775){
+
+     ull_sp0=0x100000000;
+    }else{
+ 
+      ull_sp0=0xffffffff00000000;
+      r10_i-=823550;
+    }
+    //i_sp0=0;
+  }
+  //loc_16A5B6
+  //loc_16A602
+  int i_sp10;
+  int i_spC;
+  int r8_i=0x40000;
+  uint64 r6r11_ull=0x40000;
+  for(int r9_i=0xE;r9_i!=0;r9_i--){
+    //loc_16A5CA
+    i_sp10=r8_i+0x40000;
+    sub_16A818(&i_sp10,&i_spC);
+    r6r11_ull = (int)(r6r11_ull*i_sp10/0x40000);
+    r8_i/=4;
+  }
+  //0016A60A
+  int r3_i=0x40000;
+  r8_i = 0x40000;
+  //loc_16A686
+  int lr_i=0x0;
+  for(int r1_i=0;r1_i!=0xE;r1_i++){
+    //loc_16A622
+    int r5_i=((r10_i>>31) & 0xFFF80000) | 0x40000;
+    int r0_i= ((int64)r8_i*r5_i)/0x40000;
+    int r2_i=(((uint64)dword_2FED08[r1_i]*r5_i))/0x40000;
+    r10_i-=r2_i;
+    r0_i=(((uint64)r0_i*r3_i))/0x40000;
+    r2_i=((int64)lr_i*r5_i)/0x40000;
+    lr_i+=r0_i;
+    r0_i=((int64)r2_i*r3_i)/0x40000;
+    r8_i-=r0_i;
+    r3_i/=2;
+  }
+  //0016A68A
+
+  r0_pi=(int64)(ull_sp0*lr_i/0x4000)/((int64)r6r11_ull);
+}
+
+// 0016A6CC 
+//已测试分支  
+//单元测试内容: 1-10
+//单元测试结果:未调用
+//已测试分支
+void sub_16A6CC(int&r0_pi,int&r1_pi){
+  uint64 ull_sp0;
+  int r10_i=r1_pi;
+  if(r1_pi<=-411776){
+    //0016A6E2
+    //check
+    LOGE("sub_16A6CC_0");
+    ull_sp0=0xffffffff00000000;
+    r10_i+=823550;
+  }else{//loc_16A6F2
+    if(r1_pi<=411775){
+     LOGE("sub_16A6CC_1");
+     ull_sp0=0x100000000;
+    }else{
+      LOGE("sub_16A6CC_2");
+      ull_sp0=0xffffffff00000000;
+      r10_i-=823550;
+    }
+    //i_sp0=0;
+  }
+  //loc_16A706
+  //loc_16A752
+
+  int i_sp10;
+  int i_spC;
+  int r8_i=0x40000;
+  uint64 r6r11_ull=0x40000;
+  for(int r9_i=0;r9_i!=0xE;r9_i++){
+    //loc_16A71A
+    LOGE("sub_16A6CC_3");
+    i_sp10=r8_i+0x40000;
+    sub_16A818(&i_sp10,&i_spC);
+    r6r11_ull = (int)(r6r11_ull*i_sp10/0x40000);//这里的乘法确定是uint64
+    r8_i/=4;
+  }
+  //0016A758
+  int r2_i=0x40000;
+  int r4_i = 0x40000;
+  int lr_i=0x0;
+  //loc_16A7D4
+  for(int r1_i=0;r1_i!=0xE;r1_i++){
+    //loc_16A774
+    LOGE("sub_16A6CC_4");
+    int r5_i=((r10_i>>31) & 0xFFF80000) | 0x40000;
+    int r0_i= ((uint64)r2_i*r5_i)/0x40000;
+    int r3_i=((uint64)dword_2FED08[r1_i]*r5_i)/0x40000;
+    r10_i-=r3_i;
+    r0_i=((uint64)r0_i*r4_i)/0x40000;
+    r3_i=((uint64)lr_i*r5_i)/0x40000;
+    lr_i+=r0_i;
+    r0_i=((uint64)r3_i*r4_i)/0x40000;
+    r2_i-=r0_i;
+    r4_i/=2;
+  }
+  //0016A7D8
+  r0_pi=(int64)(ull_sp0*r2_i/0x4000)/(int64)(r6r11_ull);
+  int64 base=0;
+  LOGE("r0_pi=%x",r0_pi);
+  // if(GetModuleBase(base,getpid(),"libHero.so")){
+  //   LOGE("geted base=%x",(uint)base);
+  //   p=(void (*)(int&,int&))(base+0x16A6CC);
+  // }
 }

+ 2 - 0
jni/sub.h

@@ -10,4 +10,6 @@ void sub_166CB2(int *r0_pi, fpoint2<PointType_14> *r1_pfpoint);
 void sub_16D8B2(int *r0_pi, fpoint3<PointType_18> &r1_pfpoint3);
 void sub_16C7DC(fpoint3<PointType_18> &r0_pfpoint3,fpoint3<PointType_18> &r1_pfpoint3,fpoint3<PointType_18>&r2_pfpoint3) ;
 void sub_16C74C(fpoint<PointType_18> &r0_pfpoint,fpoint3<PointType_18> &r1_pfpoint3,fpoint3<PointType_18> &r2_pfpoint3);
+void  sub_16A57C(int&,int&);
+void  sub_16A6CC(int&,int&);
 #endif  //_SUB_H_

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

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