|
@@ -1,5 +1,10 @@
|
|
|
#include "CUITileHUDText.h"
|
|
|
-
|
|
|
+#include "CFE.h"
|
|
|
+#include "FTTColour.h"
|
|
|
+#include "LOCstring.h"
|
|
|
+#include "CStoryCore.h"
|
|
|
+#include "CFTTColour.h"
|
|
|
+#include "FE2D.h"
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
|
//0013CC98
|
|
|
CUITileHUDText::CUITileHUDText() {
|
|
@@ -19,6 +24,9 @@ void CUITileHUDText::AddText(int, EHudTextType) {
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
|
//0013CE7C
|
|
|
void CUITileHUDText::SetupText() {
|
|
|
+ TileSetFont(0);
|
|
|
+ TileSetFontScale(0.649999976f, -1.0f);
|
|
|
+ return FTTFont_SetAlign(EFontAlign_0);
|
|
|
}
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
|
//0013CEA4
|
|
@@ -43,6 +51,137 @@ void CUITileHUDText::SetWidthOffset(float) {
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
|
//0013D150
|
|
|
void CUITileHUDText::Render() {
|
|
|
+ float s18_f = SCR_WID;
|
|
|
+ float s22_f = f_16C;
|
|
|
+ float s24_f = field_1ac;
|
|
|
+ SetupText();
|
|
|
+ float s0_f = s18_f - s22_f;
|
|
|
+ float s26_f = -60.0f;
|
|
|
+ float s16_f = 0.5f;
|
|
|
+ s22_f -= s24_f;
|
|
|
+ float s17_f = 40.0f;
|
|
|
+ s18_f = 30.0f;
|
|
|
+ float s23_f = 1.29999995f;
|
|
|
+ float s28_f = 4.0f;
|
|
|
+ float s30_f = 15.0f;
|
|
|
+ float r10_f = 0.0f;
|
|
|
+ float s19_f = 13.0f;
|
|
|
+ float s21_f = 0.25f;
|
|
|
+ float s20_f = s0_f * s16_f;
|
|
|
+ s24_f = s20_f + s18_f;
|
|
|
+ wchar_t pwcbuf_sp58[0x200];
|
|
|
+ // float f_sp20 = s20_f;
|
|
|
+ // float f_sp1c = s22_f;
|
|
|
+ int r7_i = 0;
|
|
|
+ // loc_13D448
|
|
|
+ while (r7_i != 4) {
|
|
|
+ // loc_13D1C4
|
|
|
+ if (field_1bc[r7_i].field_4 > -1 || field_1bc[r7_i].field_8[0] != 0) {
|
|
|
+ // loc_13D1DC
|
|
|
+ // float s2_f = field_1bc[r7_i].field_90;
|
|
|
+ if (field_1bc[r7_i].field_8c > 0.0f) {
|
|
|
+ float r11_f = field_1bc[r7_i].field_8c;
|
|
|
+ // float s4_f = f_16C;
|
|
|
+ // float s6_f = field_1ac;
|
|
|
+ // s4_f += s26_f;
|
|
|
+ // float s2_f = s4_f - s2_f;
|
|
|
+ // //LOGE("分支1");
|
|
|
+ float s25_f = f_16C + s26_f - field_1bc[r7_i].field_90 - field_1ac;
|
|
|
+ // float s25_f = s2_f - s6_f;
|
|
|
+ uint r0_u = FTTColour_AddPercentileAlpha(-1, r11_f);
|
|
|
+ FTTFont_SetColour(r0_u, 0);
|
|
|
+ int r6_i = -1;
|
|
|
+ if (field_1bc[r7_i].hudTextType_94 == EHudTextType_1) {
|
|
|
+ //LOGE("分支2");
|
|
|
+ r6_i = -256;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (field_1bc[r7_i].field_4 >= 0) {
|
|
|
+ xsnprintf(pwcbuf_sp58, 0x200, LOCstring(field_1bc[r7_i].field_4));
|
|
|
+ //LOGE("分支3");
|
|
|
+ } else {
|
|
|
+ // loc_13D24A
|
|
|
+ CStoryCore::ProcessText(pwcbuf_sp58, 0x200,
|
|
|
+ LOCstringSD(field_1bc[r7_i].field_8), -1);
|
|
|
+ //LOGE("分支4");
|
|
|
+ }
|
|
|
+ // loc_13D262
|
|
|
+ // float f_sp2c=s25_f;
|
|
|
+ TextDimensions textDimensions_sp50 =
|
|
|
+ TileGetTextDimsWrap(s25_f, pwcbuf_sp58);
|
|
|
+ s25_f = textDimensions_sp50.field_4;
|
|
|
+ // int sp28 = r6_i;
|
|
|
+ r0_u = XMixCol(r6_i, 0xFF000000, 0.349999994f);
|
|
|
+ s25_f += s18_f;
|
|
|
+ s0_f = s25_f + s28_f;
|
|
|
+ FETU_DrawBoxRoundedOutline(s20_f, field_1bc[r7_i].field_0, s22_f, s0_f,
|
|
|
+ r0_u, r10_f, r10_f, r10_f, 3);
|
|
|
+ //sp28=r6
|
|
|
+ r0_u = FTTColour_AddPercentileAlpha(0xA0282828, r11_f);
|
|
|
+
|
|
|
+ FETU_DrawBoxRounded(s20_f, field_1bc[r7_i].field_0, s22_f, s25_f, r0_u,
|
|
|
+ r10_f, r10_f, r10_f, 3);
|
|
|
+ // float f_sp24 = field_1bc[r7_i].field_0;
|
|
|
+
|
|
|
+ r0_u = FTTColour_AddPercentileAlpha(r6_i, r11_f);
|
|
|
+ FETU_DrawBoxRounded(s20_f, field_1bc[r7_i].field_0,
|
|
|
+ field_1bc[r7_i].field_90, s25_f, r0_u, r10_f, r10_f,
|
|
|
+ r10_f, 4);
|
|
|
+ //0013D30C
|
|
|
+ s0_f = f_178;
|
|
|
+ float s2_f = f_17C;
|
|
|
+ float s4_f = f_180;
|
|
|
+ float s8_f = field_1bc[r7_i].field_90;
|
|
|
+ float s10_f = field_1bc[r7_i].field_0;
|
|
|
+ s0_f = s10_f + s30_f;
|
|
|
+ s2_f = s24_f + s8_f;
|
|
|
+ FTTFont_PrintWrapRotUnicode(
|
|
|
+ s2_f, s0_f, EFontWrapType_2,
|
|
|
+ f_16C + s26_f - field_1bc[r7_i].field_90 - field_1ac, SCR_HEI,
|
|
|
+ f_178, f_17C, f_180, pwcbuf_sp58);
|
|
|
+
|
|
|
+ r0_u = FTTColour_AddPercentileAlpha(r6_i, r11_f);
|
|
|
+ float s27_f = field_1bc[r7_i].field_90;
|
|
|
+ s0_f = s20_f + s27_f;
|
|
|
+ s2_f = s22_f - s27_f;
|
|
|
+
|
|
|
+ FETU_DrawBoxRoundedOutline(s0_f, field_1bc[r7_i].field_0, s2_f, s25_f,
|
|
|
+ r0_u, r10_f, r10_f, r10_f, 8);
|
|
|
+
|
|
|
+ TImage image_sp38;
|
|
|
+ if (field_1bc[r7_i].hudTextType_94 != EHudTextType_1) {
|
|
|
+ s27_f = s17_f;
|
|
|
+ if (field_1bc[r7_i].hudTextType_94 == EHudTextType_0) {
|
|
|
+ FETU_GetImage(&image_sp38, "textIcon_Mic.png", false,
|
|
|
+ EFTTTexFormat_19, false, false, true);
|
|
|
+ //LOGE("分支5");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // loc_13D3C6
|
|
|
+ FETU_GetImage(&image_sp38, "textIcon_Tutorial.png", false,
|
|
|
+ EFTTTexFormat_19, false, false, true);
|
|
|
+ s0_f = sinf(field_1bc[r7_i].field_98 * s19_f);
|
|
|
+ s2_f = s0_f * s21_f + s23_f;
|
|
|
+ s27_f = s2_f * s17_f;
|
|
|
+ //LOGE("分支6");
|
|
|
+ }
|
|
|
+ // loc_13D402
|
|
|
+ r0_u = FTTColour_AddPercentileAlpha(0xFF404040, r11_f);
|
|
|
+ s0_f = field_1bc[r7_i].field_90;
|
|
|
+ s2_f = s25_f - s27_f;
|
|
|
+ s4_f = field_1bc[r7_i].field_0;
|
|
|
+ s4_f = s2_f * s16_f + s4_f;
|
|
|
+ s0_f -= s27_f;
|
|
|
+ s2_f = s0_f * s16_f + s20_f;
|
|
|
+ FE2D_DrawTexScaleCol(&image_sp38, s2_f, s4_f, s27_f, s27_f, r0_u);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // loc_13D446
|
|
|
+ r7_i++;
|
|
|
+ // loc_13D446
|
|
|
+ }
|
|
|
+
|
|
|
+ // loc_13D448
|
|
|
}
|
|
|
//-------------------------------------------------------------------------------------------------
|
|
|
//0013D48C
|