DESKTOP-AB9OQPJ\RED-10 %!s(int64=3) %!d(string=hai) anos
pai
achega
dc632aad1e
Modificáronse 8 ficheiros con 420 adicións e 175 borrados
  1. 55 1
      jni/.vscode/settings.json
  2. 115 0
      jni/CGfxCrowd.cpp
  3. 167 104
      jni/CStoryProfile.cpp
  4. 1 1
      jni/CStoryProfile.h
  5. 5 0
      jni/FTTALG.h
  6. 58 53
      jni/FTTArray.h
  7. 4 0
      jni/FTTPair.h
  8. 15 16
      jni/fpoint.h

+ 55 - 1
jni/.vscode/settings.json

@@ -1,6 +1,60 @@
 {
     "files.associations": {
         "xiosbase": "cpp",
-        "iterator": "cpp"
+        "iterator": "cpp",
+        "algorithm": "cpp",
+        "atomic": "cpp",
+        "bit": "cpp",
+        "cctype": "cpp",
+        "clocale": "cpp",
+        "cmath": "cpp",
+        "codecvt": "cpp",
+        "compare": "cpp",
+        "concepts": "cpp",
+        "cstddef": "cpp",
+        "cstdint": "cpp",
+        "cstdio": "cpp",
+        "cstdlib": "cpp",
+        "cstring": "cpp",
+        "ctime": "cpp",
+        "cwchar": "cpp",
+        "exception": "cpp",
+        "fstream": "cpp",
+        "initializer_list": "cpp",
+        "ios": "cpp",
+        "iosfwd": "cpp",
+        "iostream": "cpp",
+        "istream": "cpp",
+        "limits": "cpp",
+        "locale": "cpp",
+        "map": "cpp",
+        "memory": "cpp",
+        "new": "cpp",
+        "ostream": "cpp",
+        "regex": "cpp",
+        "sstream": "cpp",
+        "stdexcept": "cpp",
+        "streambuf": "cpp",
+        "string": "cpp",
+        "system_error": "cpp",
+        "tuple": "cpp",
+        "type_traits": "cpp",
+        "typeinfo": "cpp",
+        "utility": "cpp",
+        "vector": "cpp",
+        "xfacet": "cpp",
+        "xlocale": "cpp",
+        "xlocbuf": "cpp",
+        "xlocinfo": "cpp",
+        "xlocmes": "cpp",
+        "xlocmon": "cpp",
+        "xlocnum": "cpp",
+        "xloctime": "cpp",
+        "xmemory": "cpp",
+        "xstddef": "cpp",
+        "xstring": "cpp",
+        "xtr1common": "cpp",
+        "xtree": "cpp",
+        "xutility": "cpp"
     }
 }

+ 115 - 0
jni/CGfxCrowd.cpp

@@ -20,6 +20,8 @@
 #include "TGame.h"
 #include "XSYS.h"
 #include "memctrl.h"
+#include <algorithm>
+#include "FTTArray.h"
 CGfxCrowd *CGfxCrowd::ms_pInstance = nullptr;
 
 MYCONST uchar byte_2FDF94[] = {0, 0, 0, 0, 1, 1, 1, 1, 3, 3, 3, 3, 4, 4, 4, 4};
@@ -114,6 +116,119 @@ void sub_19ED8C(CFTTMatrix32 &r0_pmatrix, CFTTVector32 *r1_pvector32,
   r0_pmatrix.d[3][2] = s2_f/s0_f;
 }
 
+//00189C0C
+^_-
+//单元测试等级: 游戏运行正常
+//单元测试内容: 启动游戏到第7关
+//单元测试结果: 正常
+//!!!!!!!这里要更新FTTArray头文件 否则函数签名不一致
+void SetupGaussian(FTTArray<FTTPair<float,float>,PointType_16> &r0_parr,float r1_f)
+{
+
+  uchar r7_uc=0;
+  float s4_f=r1_f+r1_f;
+  float s2_f=r1_f*6.28318548f;
+  float s18_f=s4_f*r1_f;
+  float s0_f=s2_f*r1_f;
+  float s20_f=sqrt(s0_f);
+  
+  float f_sp1c[0x20];
+  while(1){
+    //loc_189C72 OK
+    //check
+    LOGE("SetupGaussian_1");
+    float s0_f=s20_f;
+    float s24_f=1.0f/s0_f;
+    float s2_f=(short)r7_uc*(short)r7_uc;
+    s2_f=-s2_f;
+    s2_f/=s18_f;
+    s0_f=powf(2.71828175f,s2_f);
+    s0_f=s24_f*s0_f;
+    if(s0_f<=0.00999999978f)
+      break;
+    //loc_189C4A
+    f_sp1c[r7_uc++]=s0_f;
+    
+
+  };
+  //00189CA8
+  //r1=-4 s2=0.0 r2=sp20 s0=sp1c[0]
+   s2_f=0.0f;
+  int r1_i=r7_uc-1;
+  int i=1;
+  while(r1_i){
+    //loc_189CBE  Ok
+    LOGE("SetupGaussian_2");
+   s2_f=s2_f+ f_sp1c[i];
+   i++;
+   r1_i--;
+  }
+  //00189CCE
+  s2_f=s2_f+s2_f;
+  s0_f=1.0f/(f_sp1c[0]+s2_f);
+  //loc_189CF2
+  int r0_i=0;
+  while(r0_i!=r7_uc){
+    //loc_189CE2  OK 
+    LOGE("SetupGaussian_3");
+    f_sp1c[r0_i]=s0_f*f_sp1c[r0_i];
+    r0_i++;
+  }
+  //00189CF6
+  uchar r4_uc=r7_uc-1;
+  //loc_189D38
+  while(r4_uc!=1){
+    //loc_189CFC
+    if(r4_uc!=0){
+      //00189CFE  OK
+      LOGE("SetupGaussian_4");
+      s0_f=f_sp1c[r4_uc];
+      s4_f=r4_uc-1;
+      s2_f=f_sp1c[r4_uc-1];
+      s2_f=s2_f+s0_f;
+      s0_f/=s2_f;
+      s0_f+=s4_f;
+      FTTPair<float, float> pair_sp14;
+      pair_sp14.m_t1=s0_f;
+      pair_sp14.m_t2=s2_f;
+      r0_parr.Insert(std::move(pair_sp14));
+      r4_uc-=2;
+    }else{
+      //loc_189D64
+      break;
+    }
+  }
+  if(r4_uc==1){
+    //00189D3E
+    LOGE("SetupGaussian_5");
+    s4_f=f_sp1c[r4_uc];
+    s2_f=f_sp1c[0];
+    float s6_f=s4_f+s2_f*0.5f;
+    s0_f=s4_f/s6_f;
+    FTTPair<float, float> pair_sp14;
+      pair_sp14.m_t1=s0_f;
+      pair_sp14.m_t2=s6_f;
+      //!!!!!!!这里的函数签名不对要注意修改
+    r0_parr.Insert(std::move(pair_sp14));
+  }else if(r4_uc==0){
+    //loc_189D64  OK
+    LOGE("SetupGaussian_6");
+    FTTPair<float, float> pair_sp14;
+      pair_sp14.m_t1=0;
+      pair_sp14.m_t2=f_sp1c[0];
+    r0_parr.Insert(std::move(pair_sp14));
+  }
+  //00189D74
+  FTTArray<FTTPair<float,float>,PointType_16>::Iterator it_spc(r0_parr.array_0);
+  //it_spc.m_buf=&r0_parr;
+  FTTArray<FTTPair<float,float>,PointType_16>::Iterator it_sp4(r0_parr.array_0+r0_parr.m_count);
+  //it_sp4.m_buf=&r0_parr+r0_parr.m_count;
+  //FTTALG::Reverse<FTTArray<FTTPair<float,float>,16u>::Iterator>(FTTArray<FTTPair<float,float>,16u>::Iterator,FTTArray<FTTPair<float,float>,16u>::Iterator)
+ // FTTALG::Reverse<FTTArray<FTTPair<float,float>,16u>::Iterator>(FTTArray<FTTPair<float,float>,16u>::Iterator,FTTArray<FTTPair<float,float>,16u>::Iterator)
+  FTTALG::Reverse(it_spc,it_sp4);
+  LOGE("SetupGaussian_end");
+}
+
 void GaussianBlur(CFTTRenderToTexture *a1, CFTTRenderToTexture *a2,
                   CFTTRenderToTexture *a3, float a4, int a5, bool a6, bool a7) {
 LOGE("GaussianBlur=%x%x%x%x%x%x%x",a1,a2,a3,a4,a5,a6,a7);

+ 167 - 104
jni/CStoryProfile.cpp

@@ -1,68 +1,158 @@
 #include "CStoryProfile.h"
-#include "XSYS.h"
+
 #include "CFTTTime.h"
 #include "CMyProfile.h"
+#include "XSYS.h"
 #include "memctrl.h"
 
 TStoryProfileData CStoryProfile::m_tData;
 
-void TMoveClubs::Serialize(CFTTSerialize &pCFTTSerializer1) {
-}
+void TMoveClubs::Serialize(CFTTSerialize &pCFTTSerializer1) {}
 
-//001E7384
-void TStoryProfileData::Serialize(CFTTSerialize &pCFTTSerializer1) {
-}
+// 001E7384
+void TStoryProfileData::Serialize(CFTTSerialize &pCFTTSerializer1) {}
 
 //-------------------------------------------------------------------------------------------------
-//001E356A
+// 001E356A
 void CStoryProfile::SetStageStars(int dr1, int dr2) {
   filed_0->SetStageStars(dr1, dr2);
 }
 //-------------------------------------------------------------------------------------------------
-//001E35BA
+// 001E35BA
 void CStoryProfile::SetStageComplete(int dr1, int dr2, bool br3) {
   filed_0->SetStageComplete(dr1, dr2, br3, true, true);
 }
 //-------------------------------------------------------------------------------------------------
-//001E75B0 经过单元测试,功能正常
+// 001E75B0 经过单元测试,功能正常
 //???汇编不一样,而且还去除了一些不必要的代码
-void CStoryProfile::Init() {
-}
+void CStoryProfile::Init() {}
 //-------------------------------------------------------------------------------------------------
-//001E7688 经过单元测试,功能正常
+// 001E7688 经过单元测试,功能正常
 //???2个short赋值被优化成了一个str。
-void CStoryProfile::SetTrialsClub() {
-}
-//-------------------------------------------------------------------------------------------------
-//001E76B8
-void CStoryProfile::Exit() {
-}
-//-------------------------------------------------------------------------------------------------
-//001E76D0
-void CStoryProfile::Serialize(CFTTSerialize &a2, bool a3) {
-}
-//-------------------------------------------------------------------------------------------------
-//001E7700
-int CStoryProfile::GetRandomLeague(ELeague dr1, ELeague dr2) {
-  return 0;
+void CStoryProfile::SetTrialsClub() {}
+//-------------------------------------------------------------------------------------------------
+// 001E76B8
+void CStoryProfile::Exit() {}
+//-------------------------------------------------------------------------------------------------
+// 001E76D0
+void CStoryProfile::Serialize(CFTTSerialize &a2, bool a3) {}
+//-------------------------------------------------------------------------------------------------
+// 001E7700 ^_-
+//单元测试等级: 游戏运行正常
+//单元测试内容: 选择俱乐部调用
+//单元测试结果: 正常
+ELeague CStoryProfile::GetRandomLeague(ELeague r1_league, ELeague r2_league) {
+  int r0_i = 4;
+  ELeague r4_league=r1_league;
+  ELeague r5_league=r2_league;
+  if (r1_league < ELeague_0) {
+    r0_i = 5;
+  }
+  if (r2_league >= ELeague_0) {
+    r0_i -= 1;
+  }
+  r0_i = XSYS_Random(r0_i);
+  ELeague r12_eleague = ELeague_neg1;
+  if (r5_league != ELeague_5) r12_eleague = ELeague_5;
+  if (r4_league == ELeague_5) r12_eleague = ELeague_neg1;
+  ELeague lr_league = ELeague_neg1;
+  if (r5_league != ELeague_3) lr_league = ELeague_3;
+  // 001E7738
+  if (r4_league == ELeague_3) lr_league = ELeague_neg1;
+  // 001E773E
+  r2_league = ELeague_neg1;
+  ELeague r3_league = ELeague_neg1;
+  if (r5_league != ELeague_4) r2_league = ELeague_4;
+  // 001E774C
+  if (r4_league == ELeague_4) r2_league = ELeague_neg1;
+  // 001E7752
+  if (r5_league != ELeague_2) r3_league = ELeague_2;
+  if (r4_league == ELeague_2) r3_league = ELeague_neg1;
+  if (r5_league == ELeague_0)
+    r5_league=ELeague_1;
+  if(r4_league==ELeague_0)
+     r4_league=ELeague_1;
+  r4_league=(ELeague)(-(r4_league|r5_league));
+  // r2_league=ELeague_0;
+  int r5_i = 0;
+  r1_league = ELeague_neg1;
+  // loc_1E7770
+  // check 符号
+  while (r1_league == ELeague_neg1 && r5_i < 5) {
+    // check 符号
+    if (r0_i > r5_i) {
+      // 001E777C
+      r1_league = ELeague_neg1;
+      // loc_1E7780
+      r5_i++;
+    } else {
+      //loc_1E7784
+      switch (r5_i & 0x7FFFFFFF) {
+        case 0:{
+          //loc_1E7796
+          r1_league=r4_league;
+         // loc_1E7780
+          r5_i++;
+          break;
+        }
+        case 1:{
+          //loc_1E779A
+          r1_league=r3_league;
+         // loc_1E7780
+          r5_i++;
+          break;
+        }
+        case 2:{
+          //loc_1E779E
+          r1_league=r2_league;
+         // loc_1E7780
+          r5_i++;
+          break;
+        }
+        case 3:{
+          //loc_1E77A2
+          r1_league=lr_league;
+         // loc_1E7780
+          r5_i++;
+          break;
+        }
+        case 4:{
+          //loc_1E77A6
+          r1_league=r12_eleague;
+         // loc_1E7780
+          r5_i++;
+          break;
+        }
+
+        default: {
+          // 001E777C
+           r1_league = ELeague_neg1;
+          // loc_1E7780
+          r5_i++;
+          break;
+        }
+      }
+    }
+  }
+
+  // loc_1E77AA
+  return r1_league;
+  
 }
 //-------------------------------------------------------------------------------------------------
-//001E77B0
-int CStoryProfile::GetStartingCountry() {
-  return 0;
-}
+// 001E77B0
+int CStoryProfile::GetStartingCountry() { return 0; }
 //-------------------------------------------------------------------------------------------------
-//001E782C
-int CStoryProfile::GetPossibleStartingClubs(int, int *, int) {
-  return 0;
-}
+// 001E782C
+int CStoryProfile::GetPossibleStartingClubs(int, int *, int) { return 0; }
 //-------------------------------------------------------------------------------------------------
-//001E78F4
-int CStoryProfile::GetPossibleNewClubs(int, bool, int, int *, int, ELeague, bool, bool) {
+// 001E78F4
+int CStoryProfile::GetPossibleNewClubs(int, bool, int, int *, int, ELeague,
+                                       bool, bool) {
   return 0;
 }
 //-------------------------------------------------------------------------------------------------
-//001E7A00
+// 001E7A00
 int CStoryProfile::GetHaveChangedTeamOnStage(int) {
   float v = sinf(23.0);
   if (v > 120.0) {
@@ -73,92 +163,65 @@ int CStoryProfile::GetHaveChangedTeamOnStage(int) {
   return 1;
 }
 //-------------------------------------------------------------------------------------------------
-//001E7A2C
-void CStoryProfile::SetStageClubTeam(int, int) {
-}
+// 001E7A2C
+void CStoryProfile::SetStageClubTeam(int, int) {}
 //-------------------------------------------------------------------------------------------------
-//001E7A8C
-void CStoryProfile::SetOppoClubTeams(bool) {
-}
+// 001E7A8C
+void CStoryProfile::SetOppoClubTeams(bool) {}
 //-------------------------------------------------------------------------------------------------
-//001E7BE0
-ushort CStoryProfile::GetStageClubTeam(int) {
-  return 0;
-}
+// 001E7BE0
+ushort CStoryProfile::GetStageClubTeam(int) { return 0; }
 //-------------------------------------------------------------------------------------------------
-//001E7C10
-ushort CStoryProfile::GetClubTeam() {
-  return 0;
-}
+// 001E7C10
+ushort CStoryProfile::GetClubTeam() { return 0; }
 //-------------------------------------------------------------------------------------------------
-//001E7C28
-void CStoryProfile::SetOppoNationalTeams() {
-}
+// 001E7C28
+void CStoryProfile::SetOppoNationalTeams() {}
 //-------------------------------------------------------------------------------------------------
-//001E7D04
-int CStoryProfile::GetNumOppoTeams(int, int) {
-  return 0;
-}
+// 001E7D04
+int CStoryProfile::GetNumOppoTeams(int, int) { return 0; }
 //-------------------------------------------------------------------------------------------------
-//001E7D64
-bool CStoryProfile::SetupNextStage() {
-  return 0;
-}
+// 001E7D64
+bool CStoryProfile::SetupNextStage() { return 0; }
 //-------------------------------------------------------------------------------------------------
-//001E7E18
+// 001E7E18
 void CStoryProfile::SetSeason(int dr1) {
-//  CStoryProfile::m_tData.field_18 = dr1;
+  //  CStoryProfile::m_tData.field_18 = dr1;
 }
 //-------------------------------------------------------------------------------------------------
-//001E7E28
-int CStoryProfile::GetOppoTeam(int, int, int, int, TTeamInfo *) {
-  return 0;
-}
+// 001E7E28
+int CStoryProfile::GetOppoTeam(int, int, int, int, TTeamInfo *) { return 0; }
 //-------------------------------------------------------------------------------------------------
-//001E7F64
-void CStoryProfile::ApplyUserPlayer(TPlayerInfo *) {
-}
+// 001E7F64
+void CStoryProfile::ApplyUserPlayer(TPlayerInfo *) {}
 //-------------------------------------------------------------------------------------------------
-//001E7F9C
-void CStoryProfile::UseGoldenBoot() {
-}
+// 001E7F9C
+void CStoryProfile::UseGoldenBoot() {}
 //-------------------------------------------------------------------------------------------------
-//001E7FB4
-void CStoryProfile::UseRewind() {
-}
+// 001E7FB4
+void CStoryProfile::UseRewind() {}
 //-------------------------------------------------------------------------------------------------
-//001E7FD8
-void CStoryProfile::EnergyUse(int) {
-}
+// 001E7FD8
+void CStoryProfile::EnergyUse(int) {}
 //-------------------------------------------------------------------------------------------------
-//001E8090
-void CStoryProfile::EnergyIncrease(int, bool) {
-}
+// 001E8090
+void CStoryProfile::EnergyIncrease(int, bool) {}
 //-------------------------------------------------------------------------------------------------
-//001E80C4
-void CStoryProfile::SetTimeSinceReboot() {
-}
+// 001E80C4
+void CStoryProfile::SetTimeSinceReboot() {}
 //-------------------------------------------------------------------------------------------------
-//001E80DC ^_^
-void CStoryProfile::CheckEnergyFallback() {
-  return;
-}
+// 001E80DC ^_^
+void CStoryProfile::CheckEnergyFallback() { return; }
 //-------------------------------------------------------------------------------------------------
-//001E8114
-void CStoryProfile::EnergyCheckRestore() {
-}
+// 001E8114
+void CStoryProfile::EnergyCheckRestore() {}
 //-------------------------------------------------------------------------------------------------
-//001E82C4
-int CStoryProfile::EnergyGetRestoreSecs() {
-  return 0;
-}
+// 001E82C4
+int CStoryProfile::EnergyGetRestoreSecs() { return 0; }
 //-------------------------------------------------------------------------------------------------
-//001E830C
-int CStoryProfile::SecondsToFullEnergy(int a1, int a2) {
-  return 10;
-}
+// 001E830C
+int CStoryProfile::SecondsToFullEnergy(int a1, int a2) { return 10; }
 //-------------------------------------------------------------------------------------------------
-//001E8360
-void CStoryProfile::GetDescription(wchar_t *, int) {
-}
+// 001E8360
+void CStoryProfile::GetDescription(wchar_t *, int) {}
 //-------------------------------------------------------------------------------------------------

+ 1 - 1
jni/CStoryProfile.h

@@ -111,7 +111,7 @@ public:
   static void SetTrialsClub();                                               // 001E7688
   void Exit();                                                               // 001E76B8
   void Serialize(CFTTSerialize &, bool);                                     // 001E76D0
-  int GetRandomLeague(ELeague, ELeague);                                     // 001E7700
+  ELeague GetRandomLeague(ELeague, ELeague);                                     // 001E7700
   int GetStartingCountry();                                                  // 001E77B0
   int GetPossibleStartingClubs(int, int *, int);                             // 001E782C
   int GetPossibleNewClubs(int, bool, int, int *, int, ELeague, bool, bool);  // 001E78F4

+ 5 - 0
jni/FTTALG.h

@@ -90,6 +90,11 @@ namespace FTTALG {
     LOGE("Shuffle=%x%x",a1,a2);
   }
 
+  template <typename Iterator>
+  void  Reverse(Iterator a1,Iterator a2){
+    LOGE("Reverse=%x%x",&a1,&a2);
+  }
+
   template <typename T,typename TVecIterator>
   void  Quicksort(TVecIterator a1,TVecIterator a2){
     LOGE("Quicksort=%x%x",&a1,&a2);

+ 58 - 53
jni/FTTArray.h

@@ -38,7 +38,7 @@ struct TypeData {
   void *data;
 };
 
-template <class T, int N>
+template <class T, uint N>
 class FTTArray {
 public:
   FTTArray(int a2) {
@@ -49,100 +49,105 @@ public:
   // return new Iterator<T>(&array_0[0]);
   //}
 
-  T *Insert(T &a2) {
-    int v2;     //r2
-    float v3;   //r12
-    T *result;  //r0
-    float v5;   //r2
-
-    v2 = m_count;
-    m_count = v2 + 1;
-    v3 = array_0[v2].field_0;
-    array_0[v2].field_0 = a2->field_0;
-    result = &array_0[v2];
-    a2->field_0 = v3;
-    v5 = result->field_4;
-    result->field_4 = a2->field_4;
-    a2->field_4 = v5;
-    return result;
+  T *Insert(T &&a2) {
+    // int v2;     //r2
+    // float v3;   //r12
+    // T *result;  //r0
+    // float v5;   //r2
+
+    // v2 = m_count;
+    // m_count = v2 + 1;
+    // v3 = array_0[v2].field_0;
+    // array_0[v2].field_0 = a2->field_0;
+    // result = &array_0[v2];
+    // a2->field_0 = v3;
+    // v5 = result->field_4;
+    // result->field_4 = a2->field_4;
+    // a2->field_4 = v5;
+    // return result;
+    LOGE("Insertthis=%x,a2=%x",this,&a2);
+    return ((T*)rand());
   }
 
   class Iterator {
   public:
     Iterator(T *p_data) : m_buf(p_data) {
     }
-
-    bool operator!=(Iterator const &a1) {
+    //0018A31A
+    virtual T *operator++() {
+      m_buf++;
+      return m_buf;
+    }
+    
+    virtual bool operator!=(Iterator const &a1) {
       return m_buf != a1.m_buf;
     }
 
     //0018A32E
-    T *operator*() {
+    virtual T *operator*() {
       return m_buf;
     }
 
-    //0018A384
-    //FTTArray<FTTPair<float,float>,16u>::Iterator::operator+(long const&)
-    TypeData operator+(int *a3) {
-      T *v3 = m_buf + *a3;
+    //0018A332
+   virtual T *operator->() {
+      return m_buf;
+    }
+
+    //0018A338
+    virtual TypeData operator+=(int *a3) {
+      m_buf += *a3;
       TypeData result;
       result.len = sizeof(T);
-      result.data = (void *)v3;
+      result.data = (void *)m_buf;
       return result;
     }
 
-  //0018A31A
-    T *operator++() {
-      m_buf++;
-      return m_buf;
-    }
+    
+    
 
-    //0018A338
-    TypeData operator+=(int *a3) {
+    //0018A358
+    virtual TypeData operator-=(int *a3) {
       m_buf += *a3;
+
       TypeData result;
       result.len = sizeof(T);
       result.data = (void *)m_buf;
       return result;
     }
 
-    //0018A3BC
-    int operator-(Iterator const &a2) {
-      return m_buf - a2.m_buf;
+    
+    //0018A378
+    virtual T *operator[](int *a2) {
+      return m_buf + *a2;
     }
 
-    //0018A3A0
-    TypeData operator-(int *a3) {
-      T *v3 = m_buf - *a3;
-
+    //0018A384
+    //FTTArray<FTTPair<float,float>,16u>::Iterator::operator+(long const&)
+    virtual TypeData operator+(int *a3) {
+      T *v3 = m_buf + *a3;
       TypeData result;
       result.len = sizeof(T);
       result.data = (void *)v3;
       return result;
     }
 
-    //0018A358
-    TypeData operator-=(int *a3) {
-      m_buf += *a3;
+    //0018A3A0
+    virtual TypeData operator-(int *a3) {
+      T *v3 = m_buf - *a3;
 
       TypeData result;
       result.len = sizeof(T);
-      result.data = (void *)m_buf;
+      result.data = (void *)v3;
       return result;
     }
-
-    //0018A332
-    T *operator->() {
-      return m_buf;
+    
+    //0018A3BC
+    virtual int operator-(Iterator const &a2) {
+      return m_buf - a2.m_buf;
     }
 
-    //0018A378
-    T *operator[](int *a2) {
-      return m_buf + *a2;
-    }
 
-  private:
-    int m_unuse;
+  public:
     T *m_buf;
   };
 

+ 4 - 0
jni/FTTPair.h

@@ -33,6 +33,10 @@ template <typename T1, typename T2>
 class FTTPair {
 public:
   FTTPair(){};
+  // FTTPair(FTTPair&&parm){
+  //   m_t1=parm.m_t1;
+  //   m_t2=parm.m_t2;
+  // };
   FTTPair(T1 a1, T2 a2) : m_t1(a1), m_t2(a2){};
 
   inline void swap(FTTPair<T1, T2>& a) {

+ 15 - 16
jni/fpoint.h

@@ -7,29 +7,30 @@
 enum PointType : uint {
   PointType_0,
   PointType_14 = 14,
+  PointType_16 = 16,
   PointType_18 = 18,
   PointType_26 = 26,
 };
 //-------------------------------------------------------------------------------------------------
 template <uint t>
 class fpoint {
-public:
+ public:
   int var_0;
-  //int test_4;//测试使用
+  // int test_4;//测试使用
 };
 //-------------------------------------------------------------------------------------------------
 template <PointType t>
 class fpoint2 {
-public:
+ public:
   int x_0;
   int y_4;
 };
 //-------------------------------------------------------------------------------------------------
 template <uint t>
 class fpoint3 {
-public:
+ public:
   fpoint3() {
-    //x_0 = y_4 = z_8 = 0;
+    // x_0 = y_4 = z_8 = 0;
   }
   // 0016bea2 //^-^
   template <uint t1>
@@ -51,7 +52,7 @@ public:
 //-------------------------------------------------------------------------------------------------
 template <uint t>
 class fpointQ {
-public:
+ public:
   // 0016c652 //^_-
   fpointQ<t>& __attribute__((noinline)) operator+=(const fpointQ<t>& pt1) {
     /*
@@ -84,18 +85,16 @@ public:
 //-------------------------------------------------------------------------------------------------
 template <uint t>
 class fpointQQ {
-public:
+ public:
   fpointQQ() {
-    for (int i = 0; i < 9; ++i)
-      list_0[i] = 0;
-    //field_24 = field_28 = field_2C = field_30 = 0;
+    for (int i = 0; i < 9; ++i) list_0[i] = 0;
+    // field_24 = field_28 = field_2C = field_30 = 0;
   }
   // 0016da5e //^_-
   fpointQQ(const fpointQQ<t>& pt1) {
     int i = 0;
     // 16da6c
-    for (i = 0; i < 9; ++i)
-      list_0[i] = pt1.list_0[i];
+    for (i = 0; i < 9; ++i) list_0[i] = pt1.list_0[i];
     /*
     这几行赋值语句被优化成向量运算代码了
     原始汇编:ldr	r2, [r1, #36]
@@ -112,11 +111,11 @@ public:
     // field_28 = pt1.field_28;
     // field_2C = pt1.field_2C;
     // field_30 = pt1.field_30;
-    fpointQ_24=pt1.fpointQ_24;
+    fpointQ_24 = pt1.fpointQ_24;
   }
   // 0016c4ba //^_-
   void Cache() {
-    LOGE("Cache%x=",(uint)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;
@@ -126,8 +125,8 @@ public:
     // list_0[2] = tmp_r8 + tmp_r7;
 
     // int tmp_r4 = (int)(((int64)field_30 * (int64)(field_24 * 2)) >> 18);
-    // int tmp_r1 = 0x40000 - (int)(((int64)(field_24 * 2) * (int64)field_24) >> 18);
-    // tmp_r5 = (int)(((int64)(field_2C * 2) * (int64)field_28) >> 18);
+    // int tmp_r1 = 0x40000 - (int)(((int64)(field_24 * 2) * (int64)field_24) >>
+    // 18); tmp_r5 = (int)(((int64)(field_2C * 2) * (int64)field_28) >> 18);
 
     // list_0[5] = tmp_r5 - tmp_r4;
     // list_0[6] = tmp_r7 - tmp_r8;