Browse Source

0x001284c0,CFESEditPlayer::SetupEditMode bugfix

DESKTOP-AB9OQPJ\RED-10 3 years ago
parent
commit
4bfa7f8ce2

+ 1 - 0
jni/CFEKeyboard.cpp

@@ -31,6 +31,7 @@ void CFEKeyboard::Setup() {
 //-------------------------------------------------------------------------------------------------
 //00120378
 void CFEKeyboard::Hide() {
+  LOGE("CFEKeyboard::Hide%p",this);
 }
 //-------------------------------------------------------------------------------------------------
 //001203CC

+ 28 - 26
jni/CFESEditPlayer.cpp

@@ -400,7 +400,7 @@ void CFESEditPlayer::Init(void) {
   if (CFE::m_eLastFlowDirection != 2) {
     // 0012821E
     FREE_RenderInit();
-    this->field_F4 = -1;
+    this->editPlayerPos_F4 = -1;
     this->field_F8 = 0;
     this->vector32_FC = s_vCamTarget[0];
     this->field_108 = s_fCamDist[0];
@@ -621,7 +621,7 @@ void CFESEditPlayer::SetUpdateMovement(void) {
 //测试结果: 游戏表现正常无崩溃且无明显变化,检测到日志输出
 //测试分支: 无
 void CFESEditPlayer::SetupHighlight(void) {
-  switch (this->field_F4) {
+  switch (this->editPlayerPos_F4) {
     case 1: {
       // loc_1289E0
       int r1_i = 0;
@@ -1339,7 +1339,7 @@ void CFESEditPlayer::Process() {
 //测试分支: 无
 void CFESEditPlayer::RenderLines(void) {
   // 00129CD0
-  int r0_i = this->field_F4;
+  int r0_i = this->editPlayerPos_F4;
   r0_i = r0_i + 1;
   if (r0_i == 0) {
     CFTTVector32 var_74;
@@ -1568,14 +1568,15 @@ void CFESEditPlayer::SetupEditMode(int i1) {
   // 001284CC
   if (i1 >= -1) {
     // 001284D2
-    this->field_F4 = i1;
+    this->editPlayerPos_F4 = i1;
   }
   CFESEditPlayer::ms_pKeyboard->Hide();
   int r7_i = 1;
   this->m_pUITileManager_4->Reset(1);
   this->m_pUITileManager_4->uy_13D = 0;
   this->m_pUITileManager_4->b_13E = false;
-  int r0_i = this->field_F4;
+  this->m_pUITileManager_4->b_13F = false;
+  int r0_i = this->editPlayerPos_F4;
   this->m_pMsgShopButton_130 = 0;
   this->m_pTileItemSelectors_134[0] = 0;
   this->m_pTileItemSelectors_134[1] = 0;
@@ -1590,15 +1591,16 @@ void CFESEditPlayer::SetupEditMode(int i1) {
     // 0012851E
     int r6_i = 1;
     SNDFE_PlaySFX(1, 0, 1);
-    this->m_pUITileManager_4->ull_90 =
-        this->m_pUITileManager_4->ull_90 & 0xFFFFFFFFFFFFFFFD;
+    this->m_pUITileManager_4->ul_90 =
+        this->m_pUITileManager_4->ul_90 & (~2);
     // 00128540
-    if (this->field_F4 != 0) {
+    if (this->editPlayerPos_F4 != 0) {
       // 00128546
-      this->m_pUITileManager_4->ull_90 =
-          this->m_pUITileManager_4->ull_90 | 0x2000;
-      this->m_pUITileManager_4->ull_98 =
-          this->m_pUITileManager_4->ull_98 & 0xFFFFFFFFFFFFDFFF;
+      this->m_pUITileManager_4->ul_90 =
+          this->m_pUITileManager_4->ul_90 | 0x2000;
+      this->m_pUITileManager_4->ul_98 =
+          this->m_pUITileManager_4->ul_98 & 0xFFFFDFFF;
+          //!!!注意 CUIMsgShopButton 修改注意去更新
       CUIMsgShopButton* r5_pMsgShopButton = new CUIMsgShopButton(116, 76);
       r7_i = 2;
       this->m_pMsgShopButton_130 = r5_pMsgShopButton;
@@ -1610,7 +1612,7 @@ void CFESEditPlayer::SetupEditMode(int i1) {
       float s2_f = r0_i;
       this->m_pUITileManager_4->AddTile(s0_f, s2_f, r5_pMsgShopButton, r6_i, -1,
                                         EHUDPosition_2);
-      r0_i = this->field_F4;
+      r0_i = this->editPlayerPos_F4;
       r1_i = -1;
       this->field_154 = -1;
       switch (r0_i) {
@@ -1689,13 +1691,13 @@ void CFESEditPlayer::SetupEditMode(int i1) {
     // loc_1286F8
   } else {
     // loc_1285E4
-    float s16_f = 1.0;
+    float s16_f = 1.0f;
     int r5_i = 0;
     float var_70[14];
     var_70[0] = -0.699999988079071;
     var_70[1] = -0.30000001192092896;
     var_70[2] = -0.699999988079071;
-    var_70[3] = -5.877471754111438e-39;
+    var_70[3] = -0.0f;
 
     var_70[4] = -0.699999988079071;
     var_70[5] = -0.6000000238418579;
@@ -1727,22 +1729,22 @@ void CFESEditPlayer::SetupEditMode(int i1) {
       s2_f = s2_f * s6_f;
       s0_f = s0_f * s18_f;
       s2_f = s2_f * s18_f;
-      int var_80 = r7_i;
-      r7_i = 1;
+      // int var_80 = r7_i;
+      // r7_i = 1;
       this->m_pUITileManager_4->AddTile(s0_f, s2_f, r3_pUITitleItemSelector,
-                                        var_80, -1, EHUDPosition_0);
+                                        1, -1, EHUDPosition_0);
       r5_i++;
     }
     // 0012869E
     this->field_F8 = 0;
     this->SetUpdateMovement();
-    this->m_pUITileManager_4->ull_90 =
-        this->m_pUITileManager_4->ull_90 & (uint64)0xFFFFFFFFFFFFDFFF;
-    this->m_pUITileManager_4->ull_90 =
-        this->m_pUITileManager_4->ull_90 & (uint64)0xFFFFFFFFFFFFBFFF;
-    this->m_pUITileManager_4->ull_98 =
-        this->m_pUITileManager_4->ull_98 & (uint64)0xFFFFFFFFFFFFFFFD;
-    this->m_pUITileManager_4->ull_90 = this->m_pUITileManager_4->ull_90 | 0x2;
+    this->m_pUITileManager_4->ul_90 =
+        this->m_pUITileManager_4->ul_90 &0xFFFFDFFF;
+    this->m_pUITileManager_4->ul_90 =
+        this->m_pUITileManager_4->ul_90 & (~0x4000u);
+    this->m_pUITileManager_4->ul_98 =
+        this->m_pUITileManager_4->ul_98 & (~2);
+    this->m_pUITileManager_4->ul_90 = this->m_pUITileManager_4->ul_90 | 0x2;
     this->SetupHighlight();
     return;
   }
@@ -2073,7 +2075,7 @@ void AddBoard(CFTTVector32* pVector0, CFTTVector32* pVector1, float* pf2,
 //测试分支: 无
 void CFESEditPlayer::ProcessEditMode(int i1) {
   // 001292E6
-  switch (this->field_F4) {
+  switch (this->editPlayerPos_F4) {
     case -1: {
       // loc_1292F4
       this->m_p3DPlayer_98->field_20C = 0;

+ 1 - 1
jni/CFESEditPlayer.h

@@ -120,7 +120,7 @@ public:
   int field_C8;
   int field_CC;
   wchar_t m_pName_D0[18];
-  int field_F4;
+  int editPlayerPos_F4;
   int field_F8;
   CFTTVector32 vector32_FC;
   

+ 2 - 1
jni/CUIMsgShopButton.cpp

@@ -2,7 +2,8 @@
 
 //-------------------------------------------------------------------------------------------------
 //0014260C
-CUIMsgShopButton::CUIMsgShopButton(int, int) {
+CUIMsgShopButton::CUIMsgShopButton(int a1, int a2) {
+  LOGE("CUIMsgShopButton::CUIMsgShopButton%p%x%x",this,a1,a2);
 }
 //-------------------------------------------------------------------------------------------------
 //0014276C

+ 1 - 0
jni/CUIMsgShopButton.h

@@ -22,6 +22,7 @@ public:
 
   void RenderPost();  // 00142760
   void SetCost(int);  // 00142766
+  uint field_1AC;
 };
 
 #endif  //_CUIMSGSHOPBUTTON_H_

+ 1 - 0
jni/CUITileManager.cpp

@@ -31,6 +31,7 @@ void CUITileManager::AddButton(EUITileAction eAction1) {
 //-------------------------------------------------------------------------------------------------
 //0014712C //^_^
 void CUITileManager::Reset(bool b1) {
+  LOGE("CUITileManager::Reset%p%x",this,b1);
 }
 //-------------------------------------------------------------------------------------------------
 //001472A8 //^_^

+ 5 - 2
jni/CUITileManager.h

@@ -103,8 +103,11 @@ public:
   CUITile *pTile_C[31];
   int dCount_88;
   int dCount_8C;
-  uint64_t ull_90; //??? 此处 001473DE 显示90位置是一个int
-  uint64_t ull_98;
+ // uint64_t ull_90; //??? 此处 001473DE 显示90位置是一个int
+  uint ul_90;
+  uint ul_94;
+  uint ul_98;
+   uint ul_9C;
   int field_A0;
   int field_A4;
   CUITile *pTile_A8;

+ 1 - 0
jni/SNDFE.cpp

@@ -80,5 +80,6 @@ __attribute__((noinline)) void SNDFE_Music_Init() {
 //-------------------------------------------------------------------------------------------------
 //001D1748
 __attribute__((noinline)) void SNDFE_PlaySFX(int d_r0, float f_r1, float f_r2) {
+  LOGE("SNDFE_PlaySFX%x%x%x",d_r0,f_r1,f_r2);
 }
 //-------------------------------------------------------------------------------------------------

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

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