瀏覽代碼

0x001bd85c,TPitchLineCircle::Clamp,412,412,must

DESKTOP-AB9OQPJ\RED-10 3 年之前
父節點
當前提交
62dd760dc1
共有 7 個文件被更改,包括 166 次插入83 次删除
  1. 2 1
      jni/.vscode/settings.json
  2. 12 0
      jni/CBall.cpp
  3. 20 0
      jni/CGfxCrowd.cpp
  4. 3 0
      jni/FREE.cpp
  5. 10 0
      jni/PlatformMesh.cpp
  6. 108 82
      jni/TPitchLineCircle.cpp
  7. 11 0
      jni/XMATH.cpp

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

@@ -56,5 +56,6 @@
         "xtr1common": "cpp",
         "xtree": "cpp",
         "xutility": "cpp"
-    }
+    },
+    "docwriter.language": "Chinese"
 }

+ 12 - 0
jni/CBall.cpp

@@ -62,6 +62,18 @@ int CBall::GetPassLength(int, int) {
 }
 //-------------------------------------------------------------------------------------------------
 //00157DA4
+/**
+ * 它计算两点之间的距离。
+ * 
+ * @param pt1 输出向量
+ * @param pt2 球的当前位置
+ * @param pt3 目的地点
+ * @param i4 两点之间的距离
+ * @param i5 空气阻力
+ * @param i6 未知
+ * 
+ * @return 到达目的地的步数。
+ */
 int CBall::SetBallMoveToPos(TPoint3D* pt1, TPoint3D pt2, TPoint3D pt3, int i4, int i5, int i6) {
   TPoint pt_0;
   pt_0.dx_0 = pt3.point_0.dx_0 - pt2.point_0.dx_0;

+ 20 - 0
jni/CGfxCrowd.cpp

@@ -75,6 +75,15 @@ struct Unknow_4630E0 {
 //单元测试等级: 游戏运行正常
 //单元测试内容: 启动游戏到第10关
 //单元测试结果: 正常
+/**
+ * 它计算将输入向量中的四个点映射到输出向量中的四个点的矩阵
+ * 
+ * @param r0_pmatrix 要填充的矩阵
+ * @param r1_pvector32 (0,0,0)
+ * @param r2_pvector32 0x0, 0x0, 0x0, 0x0
+ * @param r3_pvector32 0x0, 0x0, 0x0, 0x0
+ * @param sp0_pvector32 要转换的向量
+ */
 void sub_19ED8C(CFTTMatrix32 &r0_pmatrix, CFTTVector32 *r1_pvector32,
                 CFTTVector32 *r2_pvector32, CFTTVector32 *r3_pvector32,
                 CFTTVector32 *sp0_pvector32) {
@@ -121,6 +130,12 @@ void sub_19ED8C(CFTTMatrix32 &r0_pmatrix, CFTTVector32 *r1_pvector32,
 //单元测试内容: 启动游戏到第7关
 //单元测试结果: 正常
 //!!!!!!!这里要更新FTTArray头文件 否则函数签名不一致
+/**
+ * 该函数用于计算高斯分布
+ * 
+ * @param r0_parr 对数组
+ * @param r1_f 高斯模糊的半径
+ */
 void SetupGaussian(FTTArray<FTTPair<float,float>,PointType_16> &r0_parr,float r1_f)
 {
 
@@ -439,6 +454,11 @@ void CGfxCrowd::Distribute(uint) { LOGX("CGfxCrowd::Distribute 00199ED0"); }
 //单元测试等级: 游戏运行正常
 //单元测试内容: 启动游戏到第10关
 //单元测试结果: 正常
+/**
+ * 它更新了人群纹理。
+ * 
+ * @param r1_u 要更新的纹理编号。
+ */
 void CGfxCrowd::UpdateCrowdTextures(uint r1_u) {
   // sp30=this
   // sp2c=r1_u

+ 3 - 0
jni/FREE.cpp

@@ -93,6 +93,9 @@ void FREE_GetKickPower(EAnimID a1, int *a2, int *a3) {
 // 001D30FC
 uint64 g_count = 0;
 FILE *g_fpsave = fopen("/data/local/tmp/savedata.txt", "r");
+
+
+
 void FREE_ProcessControls(bool b_0) {
   // 001D3110
   g_count++;

+ 10 - 0
jni/PlatformMesh.cpp

@@ -68,6 +68,16 @@ void PlatformMesh_SetIndices(CFTTPlatformMesh *pPlatformMesh1) {
 }
 //---------------------------------------------------------------------------------------------------------------------------------------------
 //0x0021b488 ^_-  测试8关无异常
+/**
+ * 它将 CFTTPlatformMesh 转换为 TFTTModel
+ * 
+ * @param pfTTPlatformMesh1 指向 CFTTPlatformMesh 结构的指针
+ * @param pfTTModel2 指向要创建的模型的指针
+ * @param eMeshModelFlags3 0x1 = 顶点数据,0x2 = 法线,0x4 = 纹理坐标,0x8 = 颜色,0x10 = 骨骼索引,0x20 = 骨骼权重,0x40 =
+ * 骨骼索引和权重
+ * 
+ * @return 指向 TTFTModel 的指针。
+ */
 void PlatformMesh_ToModel(CFTTPlatformMesh* pfTTPlatformMesh1, TFTTModel* pfTTModel2, EMeshModelFlags eMeshModelFlags3)
 {
 	//LOGE("PlatformMesh_ToModel  ");

+ 108 - 82
jni/TPitchLineCircle.cpp

@@ -1,42 +1,49 @@
 #include "TPitchLineCircle.h"
-#include "memctrl.h"
+
 #include <algorithm>
+
+#include "memctrl.h"
 int TPitchLineCircle::s_eType;
 
-void Intersect(float a1,float a2,float a3,float a4,float &a5,float &a6)
-{
-  LOGE("Intersect%x%x%x%x%x%x",a1,a2,a3,a4,a5,a6);
+void Intersect(float a1, float a2, float a3, float a4, float& a5, float& a6) {
+  LOGE("Intersect%x%x%x%x%x%x", a1, a2, a3, a4, a5, a6);
 }
 //-------------------------------------------------------------------------------------------------
-//001BE194 经过单元测试,功能正常
+// 001BE194 经过单元测试,功能正常
 //^_^---
-//001BE1BA开始的三条指令的顺序不同
-//001BE1DE开始的三条指令的顺序不同
+// 001BE1BA开始的三条指令的顺序不同
+// 001BE1DE开始的三条指令的顺序不同
 //寄存器不同
 int LineCircleIntersection(CFTTVector32 cfttvector32_r0_begin,
-                           CFTTVector32 cfttvector32_r3_begin,
-                           float f_arg_8,
+                           CFTTVector32 cfttvector32_r3_begin, float f_arg_8,
                            CFTTVector32 cfttvector32_arg_c_begin,
-                           float f_arg_18,
-                           float* p_f_arg_1c) {
-  LOGE("%x%x%x",cfttvector32_r0_begin.float_0,cfttvector32_r0_begin.float_4,cfttvector32_r0_begin.float_8);
-  LOGE("%x%x%x",cfttvector32_r3_begin.float_0,cfttvector32_r3_begin.float_4,cfttvector32_r3_begin.float_8);
-  LOGE("%x%x%x",cfttvector32_arg_c_begin.float_0,cfttvector32_arg_c_begin.float_4,cfttvector32_arg_c_begin.float_8);
-  LOGE("%f%f%f%x",f_arg_8,f_arg_18,*p_f_arg_1c,p_f_arg_1c);
+                           float f_arg_18, float* p_f_arg_1c) {
+  LOGE("%x%x%x", cfttvector32_r0_begin.float_0, cfttvector32_r0_begin.float_4,
+       cfttvector32_r0_begin.float_8);
+  LOGE("%x%x%x", cfttvector32_r3_begin.float_0, cfttvector32_r3_begin.float_4,
+       cfttvector32_r3_begin.float_8);
+  LOGE("%x%x%x", cfttvector32_arg_c_begin.float_0,
+       cfttvector32_arg_c_begin.float_4, cfttvector32_arg_c_begin.float_8);
+  LOGE("%f%f%f%x", f_arg_8, f_arg_18, *p_f_arg_1c, p_f_arg_1c);
   return rand();
 }
 //-------------------------------------------------------------------------------------------------
-//001BE690
+// 001BE690
 //  TPitchLineCircle::~TPitchLineCircle() {
 //    //delete this;
 //  }
 //-------------------------------------------------------------------------------------------------
-//001BE184
-int TPitchLineCircle::GetType() {
-  return TPitchLineCircle::s_eType;
-}
+// 001BE184
+int TPitchLineCircle::GetType() { return TPitchLineCircle::s_eType; }
 //-------------------------------------------------------------------------------------------------
-//001BD85C
+// 001BD85C
+/**
+ * 它将一个圆圈夹在一条线上。
+ *
+ * @param cVec32_arg1 圆的向量
+ *
+ * @return 一条线和一个圆的交点。
+ */
 void TPitchLineCircle::Clamp(CFTTVector32 cVec32_arg1) {
   float s0 = -0.5f;                // 001BD866
   float s2 = 0.5f;                 // 001BD86C
@@ -46,7 +53,8 @@ void TPitchLineCircle::Clamp(CFTTVector32 cVec32_arg1) {
   float s16 = s4 * s2;             // 001BD88C
   s0 = s6 * s0;                    // 001BD890
   s2 = s6 * s2;                    // 001BD894
-  float s8, s10, s12, s17, s19, s20, s21, s22, s23, s24, s25, s26, s27, s28, s29, s30;
+  float s8, s10, s12, s17, s19, s20, s21, s22, s23, s24, s25, s26, s27, s28,
+      s29, s30;
   int i_sp_20;
   int i_sp_24 = 0;    // 001BD8EC
   uint8 i_sp_28 = 0;  // 001BD8F0
@@ -69,8 +77,8 @@ void TPitchLineCircle::Clamp(CFTTVector32 cVec32_arg1) {
   cVec32_sp_80[0].float_8 = s0;   // 001BD89C 88
 
   cVec32_sp_80[1].float_0 = s16;  // 001BD8A0 8C
-  cVec32_sp_80[1].float_4 = 0;   // 001BD876 90
-  cVec32_sp_80[1].float_8 = s0;  // 001BD8A4 94
+  cVec32_sp_80[1].float_4 = 0;    // 001BD876 90
+  cVec32_sp_80[1].float_8 = s0;   // 001BD8A4 94
 
   cVec32_sp_80[2].float_0 = s16;  // 001BD8A8 98
   cVec32_sp_80[2].float_4 = 0;    // 001BD87C 9C
@@ -118,22 +126,27 @@ void TPitchLineCircle::Clamp(CFTTVector32 cVec32_arg1) {
     float f_r6 = this->vec32_4.float_0;
     float f_r10 = this->vec32_4.float_4;
     float f_r11 = this->vec32_4.float_8;
-    s27 = f_r10;           // 001BD97A
-    s29 = f_r11;           // 001BD97E
-    s0 = s25 - s27;        // 001BD982
-    s25 = f_r6;            // 001BD986                 VMOV            S25, R6 ; vec32_4.float_0
-    s4 = s24 - s25;        // 001BD98A                 VSUB.F32        S4, S24, S25
-    s24 = this->field_14;  // 001BD98E                 VLDR            S24, [R0,#0x92+var_80+2] ; this->field_14
-    s2 = s0 * s0;          // 001BD992                 VMUL.F32        S2, S0, S0
-    s0 = s26 - s29;        // 001BD996                 VSUB.F32        S0, S26, S29
-    s26 = this->field_10;  // 001BD99A                 VLDR            S26, [R0,#0x92+var_84+2] ; this->field_10
-    s2 = s2 + s4 * s4;     // 001BD99E                 VMLA.F32        S2, S4, S4
-    s2 = s2 + s0 * s0;     // 001BD9A2                 VMLA.F32        S2, S0, S0
-    s0 = sqrtf(s2);        // 001BD9B8
+    s27 = f_r10;     // 001BD97A
+    s29 = f_r11;     // 001BD97E
+    s0 = s25 - s27;  // 001BD982
+    s25 = f_r6;      // 001BD986                 VMOV            S25, R6 ;
+                     // vec32_4.float_0
+    s4 = s24 - s25;  // 001BD98A                 VSUB.F32        S4, S24, S25
+    s24 = this->field_14;  // 001BD98E                 VLDR            S24,
+                           // [R0,#0x92+var_80+2] ; this->field_14
+    s2 = s0 * s0;    // 001BD992                 VMUL.F32        S2, S0, S0
+    s0 = s26 - s29;  // 001BD996                 VSUB.F32        S0, S26, S29
+    s26 = this->field_10;  // 001BD99A                 VLDR            S26,
+                           // [R0,#0x92+var_84+2] ; this->field_10
+    s2 = s2 + s4 * s4;  // 001BD99E                 VMLA.F32        S2, S4, S4
+    s2 = s2 + s0 * s0;  // 001BD9A2                 VMLA.F32        S2, S0, S0
+    s0 = sqrtf(s2);     // 001BD9B8
 
     s2 = s23 - s27;  // 001BD9C0                 VSUB.F32        S2, S23, S27
-    // cVec32_sp_60.float_0 = s0;   //001BD9C4                 VSTR            S0, [SP,#0xF0+var_92_vec32_94+2] ; sp+0x60,
-    f_sp_60[0] = s0;    // 001BD9C4                 VSTR            S0, [SP,#0xF0+var_92_vec32_94+2] ; sp+0x60,
+    // cVec32_sp_60.float_0 = s0;   //001BD9C4                 VSTR S0,
+    // [SP,#0xF0+var_92_vec32_94+2] ; sp+0x60,
+    f_sp_60[0] = s0;    // 001BD9C4                 VSTR            S0,
+                        // [SP,#0xF0+var_92_vec32_94+2] ; sp+0x60,
     s4 = s19 - s25;     // 001BD9C8                 VSUB.F32        S4, S19, S25
     s6 = s21 - s29;     // 001BD9CC                 VSUB.F32        S6, S21, S29
     s2 = s2 * s2;       // 001BD9D0                 VMUL.F32        S2, S2, S2
@@ -141,8 +154,10 @@ void TPitchLineCircle::Clamp(CFTTVector32 cVec32_arg1) {
     s2 = s2 + s6 * s6;  // 001BD9D8                 VMLA.F32        S2, S6, S6
     s4 = sqrtf(s2);     // 001BD9EE
     s0 = s17 / s22;     // 001BD9F6                 VDIV.F32        S0, S17, S22
-    // cVec32_sp_60.float_4 = s4;   //001BD9FE                 VSTR            S4, [SP,#0xF0+var_92_vec32_94+6] ; sp+0x64
-    f_sp_60[1] = s4;  // 001BD9FE                 VSTR            S4, [SP,#0xF0+var_92_vec32_94+6] ; sp+0x64
+    // cVec32_sp_60.float_4 = s4;   //001BD9FE                 VSTR S4,
+    // [SP,#0xF0+var_92_vec32_94+6] ; sp+0x64
+    f_sp_60[1] = s4;  // 001BD9FE                 VSTR            S4,
+                      // [SP,#0xF0+var_92_vec32_94+6] ; sp+0x64
 
     int i_r0 = 0;  // 001BD9FC
     while (i_r0 != 2) {
@@ -155,10 +170,12 @@ void TPitchLineCircle::Clamp(CFTTVector32 cVec32_arg1) {
       i_r0++;                // 001BDA26
     }
 
-    s2 = s30 / s22;          // 001BDA2C                 VDIV.F32        S2, S30, S22
-    uint c_r2 = c_sp_5E[0];  // 001BDA30   LDRB.W          R2, [SP,#0xF0+var_92_vec32_94] ; sp_5E
-    uint c_r0 = c_sp_5E[1];  // 001BDA34   LDRB.W          R0, [SP,#0xF0+var_92_vec32_94+1] ; sp_5F
-    s4 = s28 / s22;          // 001BDA3A                 VDIV.F32        S4, S28, S22
+    s2 = s30 / s22;  // 001BDA2C                 VDIV.F32        S2, S30, S22
+    uint c_r2 = c_sp_5E[0];  // 001BDA30   LDRB.W          R2,
+                             // [SP,#0xF0+var_92_vec32_94] ; sp_5E
+    uint c_r0 = c_sp_5E[1];  // 001BDA34   LDRB.W          R0,
+                             // [SP,#0xF0+var_92_vec32_94+1] ; sp_5F
+    s4 = s28 / s22;  // 001BDA3A                 VDIV.F32        S4, S28, S22
     uint c_r1;
 
     if (c_r2 > c_r0) {
@@ -176,9 +193,9 @@ void TPitchLineCircle::Clamp(CFTTVector32 cVec32_arg1) {
       cVec32_sp_68.float_0 = d17_0;                 // 001BDA60
       cVec32_sp_68.float_4 = d17_4;
       cVec32_sp_74.float_8 = f_sp_50[0];  // 001BDA64
-      c_r1 = c_sp_5E[0];                            // 001BDA66
-      c_sp_5E[0] = c_r0 /*c_r0_sp_5F*/;             // 001BDA68
-      f_sp_48[0] = d16_0;                           // 001BDA6C
+      c_r1 = c_sp_5E[0];                  // 001BDA66
+      c_sp_5E[0] = c_r0 /*c_r0_sp_5F*/;   // 001BDA68
+      f_sp_48[0] = d16_0;                 // 001BDA6C
       f_sp_48[1] = d16_4;
       cVec32_sp_74.float_0 = d16_0;  // 001BDA70
       cVec32_sp_74.float_4 = d16_4;
@@ -204,7 +221,10 @@ void TPitchLineCircle::Clamp(CFTTVector32 cVec32_arg1) {
         r0_v38 = 4;
       } else {
         // 001BDAC0
-        r0_v38 = (c_r0 == 2 && c_r1 == 2) ? 5 : -1;
+        if ((c_r0 ^ 2) | (c_r1 ^ 2)) {
+          r0_v38 = -1;
+        } else
+          r0_v38 = 5;
       }
     } else {
       // 001BDA9E
@@ -218,21 +238,24 @@ void TPitchLineCircle::Clamp(CFTTVector32 cVec32_arg1) {
     vec_2.float_0 = LR;
     vec_2.float_4 = s0;
     vec_2.float_8 = s2;
-    i_sp_30 = LineCircleIntersection(cVec32_sp_68, vec_2, s22, this->vec32_4, s26, &f_sp_48[0]);
-    f_sp_44 = LR;  // 001BDB06
-    // 001BDB2E
-    vec_2.float_0 = f_sp_44;
-    vec_2.float_4 = s0;
-    vec_2.float_8 = s2;
-    int ret_r0 = LineCircleIntersection(cVec32_sp_68, vec_2, s22, this->vec32_4, s24, &f_sp_50[0]);
+    i_sp_30 = LineCircleIntersection(cVec32_sp_68, vec_2, s22, this->vec32_4,
+                                     s26, &f_sp_48[0]);
+    // f_sp_44 = LR;  // 001BDB06
+    //  001BDB2E
+    //  vec_2.float_0 = f_sp_44;
+    //  vec_2.float_4 = s0;
+    //  vec_2.float_8 = s2;
+    int ret_r0 = LineCircleIntersection(cVec32_sp_68, vec_2, s22, this->vec32_4,
+                                        s24, &f_sp_50[0]);
 
-    if ((-3 + (uchar)r0_v38 )>= 2) {
+    if (((uint)(-3 + (uchar)r0_v38)) >= 2) {
       // 001BDB48
       if (((uchar)r0_v38) == 5) {
         // 001BDB52
         if ((i_sp_30 != 2) && (ret_r0 != 2)) {
           // if (ret_r0 != 2) {
-          i_sp_24 = i_sp_24 + (((ret_r0 ^ 2) | i_sp_30) != 0);
+          if (((ret_r0 ^ 2) | i_sp_30) != 0) i_sp_24 = i_sp_24 + 1;
+
           /*if ((ret_r0 ^ 2) | ret_sp_30 ) {
             i_sp_24 += 1;
           }*/
@@ -240,7 +263,7 @@ void TPitchLineCircle::Clamp(CFTTVector32 cVec32_arg1) {
         }
       } else {
         // 001BDB6E
-        i_sp_28 = (r0_v38 /*i_sp_3C*/ << 0x18) == 0 ? i_sp_28+1 : i_sp_28;
+        i_sp_28 = (r0_v38 /*i_sp_3C*/ << 0x18) == 0 ? i_sp_28 + 1 : i_sp_28;
       }
     }
   }
@@ -248,26 +271,30 @@ void TPitchLineCircle::Clamp(CFTTVector32 cVec32_arg1) {
   // 001BDB80
   int r1_v45 = s18 <= s20 ? 1 : 0;
   int r2_v46 = s20 <= s16 ? 1 : 0;
-  // int i_r3 = (uint32)((uint8)i_sp_24) != 4 ? 1 : -4 + (uint32)((uint8)i_sp_24);
+  // int i_r3 = (uint32)((uint8)i_sp_24) != 4 ? 1 : -4 +
+  // (uint32)((uint8)i_sp_24);
   uint8 i_r3 = i_sp_24 != 4 ? 1 : -4 + (uchar)i_sp_24;
   // if ((uint32)((uint8)i_sp_28) != 4) {
   if ((uchar)i_sp_28 != 4) {  // 001BDBB8
     r1_v45 &= r2_v46;
     r1_v45 &= i_sp_20;
-    if ((r1_v45 | i_r3)==0) {
+    if ((r1_v45 | i_r3) == 0) {
       this->f_1C = 0;
-      return ;
+      return;
     }
   } else {
-    if (r1_v45 | i_r3) {
+    // if (r1_v45 | i_r3) {
+    //   this->f_1C = 0;
+    //   return;
+    // }
       this->f_1C = 0;
-      return ;
-    }
+      return;
   }
 
   if (r1_v45 == 0) {
     // 001BDBD4
-    s18 = atan2f(((int)this->vec32_4.float_8) ^ 0x80000000, ((int)this->vec32_4.float_0) ^ 0x80000000);
+    s18 = atan2f(-(this->vec32_4.float_8) ,
+                 -(this->vec32_4.float_0) );
     s16 = 6.28318548f;  // 001BDBEA
     s20 = s18 + s16;    // 001BDBF2
 
@@ -282,7 +309,7 @@ void TPitchLineCircle::Clamp(CFTTVector32 cVec32_arg1) {
       s2 = s4 - s2;
       // 001BDC20
       s0 = atan2f(s2, s0);
-      ptrR6_sp68[i_r5] = s0 < 0.0f ? s0+s16 : s0 ;
+      ptrR6_sp68[i_r5] = s0 < 0.0f ? s0 + s16 : s0;
     }
     s0 = -6.28318548f;  // 001BDC4C
     int i_r0 = 0;
@@ -306,6 +333,11 @@ void TPitchLineCircle::Clamp(CFTTVector32 cVec32_arg1) {
           s2 = s8;
         }
         ptrR6_sp68[i_r0] = s2;  // 001BDCB0
+      }else{
+        if (s6 < s4) {
+          s2 = s8;
+        }
+        ptrR6_sp68[i_r0] = s2;  // 001BDCB0
       }
       i_r0++;
     }
@@ -332,31 +364,25 @@ void TPitchLineCircle::Clamp(CFTTVector32 cVec32_arg1) {
   }
 }
 //-------------------------------------------------------------------------------------------------
-//001BE378
-bool TPitchLineCircle::Identical(TPitchLineGen*) {
-  return false;
-}
+// 001BE378
+bool TPitchLineCircle::Identical(TPitchLineGen*) { return false; }
 //-------------------------------------------------------------------------------------------------
-//001BE490
-void TPitchLineCircle::Render() {
-}
+// 001BE490
+void TPitchLineCircle::Render() {}
 //-------------------------------------------------------------------------------------------------
-//001BDDE0
-void TPitchLineCircle::Transform(uchar) {
-}
+// 001BDDE0
+void TPitchLineCircle::Transform(uchar) {}
 //-------------------------------------------------------------------------------------------------
-//001BD846 //^_^
+// 001BD846 //^_^
 void TPitchLineCircle::Translate(CFTTVector32 vec32) {
   CFTTVector32 vec32_14 = vec32;
   vec32_4 -= vec32_14;
 }
 //-------------------------------------------------------------------------------------------------
-//001BDD48 //^_^
-bool TPitchLineCircle::Valid() {
-  return f_1C != 0.0;
-}
+// 001BDD48 //^_^
+bool TPitchLineCircle::Valid() { return f_1C != 0.0; }
 //-------------------------------------------------------------------------------------------------
-//001BE650
+// 001BE650
 TPitchLineGen* TPitchLineCircle::Clone() {
   TPitchLineCircle* pCircle = new TPitchLineCircle;
 

+ 11 - 0
jni/XMATH.cpp

@@ -392,6 +392,17 @@ float XMATH_InterpolateFloat(float, float, float, float, float) {
 //-------------------------------------------------------------------------------------------------
 //001f3e4a ^_^ 调用除法代码不一致  and   bl  blx 经过单元测试,功能正常
 // 001f3e4a ^_^ 调用除法代码不一致  and   bl  blx 经过单元测试,功能正常
+/**
+ * 如果a2不等于a3,则返回a4加上a5和a4的差乘以a1和a2的差除以a3和a2的差,否则返回a4。
+ * 
+ * @param a1 要插入的值
+ * @param a2 0xffffffff
+ * @param a3 0xffffffff
+ * @param a4 分钟
+ * @param a5 0xffffffff
+ * 
+ * @return a4
+ */
 int XMATH_InterpolateClamp(int a1, int a2, int a3, int a4, int a5) {
   int v6;
   int v7;