123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242 |
- #include "CUIMsgRewind.h"
- #include "FETU.h"
- #include "FESU.h"
- #include "LOCstring.h"
- #include "FREE.h"
- #include "FE2D.h"
- #include "CStoryCore.h"
- #include "FEU.h"
- #include "TStoryConfig.h"
- //-------------------------------------------------------------------------------------------------
- //001354C0
- CUIMsgRewind::CUIMsgRewind() {
- }
- //-------------------------------------------------------------------------------------------------
- //00135554
- void CUIMsgRewind::Render() {
- // 00135554
- wchar_t var_D8_sp228[64];
- TImage var_2D8_sp28;
- TRect rc_2E8;
- float s0_f = 24.0;
- float s22_f = 0.5;
- float s28_f = this->field_14;
- // 47AEA8 - 0x477E90 =3018
- float s26_f = this->field_10;
- float s30_f = this->field_8;
- float r5_f = s26_f;
- float s17_f = this->field_C;
- s0_f = s28_f + s0_f;
- int r8_i = MP_cMyProfile.m_TProfileData.m_CGameSettings_2b80.filed_0.filed_0;
- float s20_f = s26_f * s22_f;
- // 00135596
- if (r8_i == 11) {
- // 0013559C
- s28_f = s0_f;
- }
- // 001355A0
- float s19_f = this->field_24;
- float s18_f = s28_f * s22_f;
- float s21_f = this->field_28;
- float s16_f = s30_f - s20_f;
- float s23_f = this->field_1C;
- float s24_f = s17_f - s18_f;
- RenderBox(s16_f, s24_f, s26_f, s28_f);
- RenderBorder(s16_f, s24_f, s26_f, s28_f);
- RenderOptions();
- int r5_i = 1;
- FESU_SetFont(1);
- int r7_i = -1;
- int r6_i = 0;
- FTTFont_SetColour(0xFFFFFFFF, 0);
- int r0_i = FREE_tInfo.filed_0.b_8;
- float r1_f;
- // 00135604
- if (r0_i != 0) {
- // 00135608
- wchar_t *r2_pwc = LOCstring(193);
- xsnprintf(var_D8_sp228, 64, r2_pwc);
- FESU_Capitalize(var_D8_sp228, var_D8_sp228, -1);
- FESU_SetFontScale(0.699999988079071, -1);
- // 0013562E
- if (r8_i == 11) {
- // 00135634
- FESU_SetFontScale(0.5, -1);
- }
- // loc_13563E
- FTTFont_SetAlign(EFontAlign_2);
- s0_f = s26_f * 0.300000012f;
- FESU_SetFontScaleForWidth(var_D8_sp228, s0_f);
- s0_f = -25.0f;
- float s4_f = 82;
- float s2_f = 4;
- float r6_f = -0.5235987901687622;
- s4_f = s16_f + s4_f;
- s0_f = s17_f + s0_f;
- float s25_f = s0_f + s2_f;
- FTTFont_PrintRotUnicode(s4_f, s25_f, r6_f, s4_f, s25_f, var_D8_sp228);
- s0_f = s30_f + s20_f + (float)(-50.0) + (float)(-44.0);
- // loc_13576E
- FTTFont_PrintRotUnicode(s0_f, s25_f, r6_f, s0_f, s25_f, var_D8_sp228);
- } else {
- // loc_1356AE
- FETU_GetImage(&var_2D8_sp28, "credits.png",
- 0, EFTTTexFormat_19,
- 0, 0, 1);
- s0_f = -25.0;
- float s6_f = -50.0;
- float s2_f = s30_f + s20_f;
- float r3_f = 50;
- float s4_f = -8.0;
- float s25_f = s17_f + s0_f;
- s0_f = -20.0;
- s2_f = s2_f + s6_f;
- s4_f = s25_f + s4_f;
- s0_f = s2_f + s0_f;
- float r5_f = s0_f;
- FE2D_DrawTexScaleColRot(&var_2D8_sp28, s0_f, s4_f, r3_f, r3_f, 0xFFFFFFFF, s23_f, s19_f, s21_f);
- FESU_SetFontScale(0.699999988079071, -1);
- FTTFont_SetAlign(EFontAlign_1);
- // 4B0E28 - 0x4AB140
- r0_i = CStoryCore::m_tStageManager.GetPlayableIndex(
- CStoryCore::m_tStageManager.filed_5ce8);
- // 0013572A
- if (r0_i >= 9) {
- // 0013572E
- r0_i = 9;
- }
- // 00135730
- wchar_t *r3_pwc = FESU_GetCommaSeperatedString(STY_tConfig.RewindCosts_5c8[r0_i],
- 3);
- xsnprintf(var_D8_sp228, 64, L"%s", r3_pwc);
- s0_f = -2.0;
- s0_f = s25_f + s0_f;
- // loc_13576E
- FTTFont_PrintRotUnicode(r5_f, s0_f, s23_f, r5_f, s0_f, var_D8_sp228);
- }
- // 00135772
- FTTFont_SetAlign(EFontAlign_2);
- FESU_SetFont(1);
- float r0_f;
- switch (r8_i) {
- case 1:
- case 6: {
- // loc_135796
- r0_f = 0.4000000059604645;
- r1_f = -1;
- FESU_SetFontScale(r0_f, r1_f);
- break;
- }
- case 4:
- case 5: {
- // loc_13579A
- r0_f = 0.47999998927116394;
- r1_f = -1;
- FESU_SetFontScale(r0_f, r1_f);
- break;
- }
- case 2: {
- // loc_13579E
- r0_f = 0.4099999964237213;
- r1_f = -1;
- FESU_SetFontScale(r0_f, r1_f);
- break;
- }
- case 3:
- case 7:
- case 8:
- case 10:
- default: {
- // def_135786
- r1_f = -1;
- r0_f = 0.5f;
- FESU_SetFontScale(r0_f, r1_f);
- break;
- }
- case 9: {
- // loc_1357AA
- r0_f = 0.41999998688697815;
- r1_f = -1;
- FESU_SetFontScale(r0_f, r1_f);
- break;
- }
- case 11: {
- // loc_1357AE
- r0_f = 0.44999998807907104;
- r1_f = -1;
- FESU_SetFontScale(r0_f, r1_f);
- break;
- }
- }
- // loc_1357B2
- wchar_t *r2_pwc = LOCstring(6167);
- wchar_t buf_sp28[0x100];
- xsnprintf(buf_sp28, 256, r2_pwc);
- s0_f = 0.800000012f;
- s0_f = s26_f * s0_f;
- float r6_f = FESU_BalanceWithWrapWidth(buf_sp28, s0_f, 50);
- /*
- * 此处返回类型很可能是TRect的,但为了不影响其它函数,暂时保留TextDimensions类型
- */
- TextDimensions var_2E8_sp18 =
- FTTFont_GetUnicodeTextDimensionsWrap(EFontWrapType_2,
- r6_f, buf_sp28);
- s0_f = s17_f + s18_f;
- float s2_f = var_2E8_sp18.field_4;
- float s4_f = -12.0;
- s0_f = s0_f - s2_f;
- s0_f = s0_f + s4_f;
- FTTFont_PrintWrapRotUnicode(s30_f, s0_f, EFontWrapType_2,
- r6_f, s28_f, s23_f, s19_f, s21_f, buf_sp28);
- rc_2E8.fy_4 = s24_f;
- rc_2E8.fx_0 = s16_f;
- rc_2E8.fWidth_8 = s26_f;
- rc_2E8.fHeight_C = s28_f;
- r0_i = this->filed_84;
- // 00135838
- if (r0_i != 0) {
- // 0013583A
- s0_f = r0_i;
- s2_f = 0.015625;
- s0_f = s0_f * s2_f;
- r0_f = FEU_UpdateHighlightRect(&rc_2E8, s0_f);
- s0_f = rc_2E8.fWidth_8;
- s2_f = rc_2E8.fHeight_C;
- s20_f = s0_f * s22_f;
- s16_f = rc_2E8.fx_0;
- s18_f = s2_f * s22_f;
- s24_f = rc_2E8.fy_4;
- s0_f = r0_f;
- } else {
- // loc_135872
- s0_f = 1.0;
- }
- // loc_135876
- s2_f = s24_f + s18_f;
- s4_f = 160.0;
- float s6_f = -0.5;
- float s10_f = 66.0;
- s4_f = s0_f * s4_f;
- float s8_f = s16_f + s20_f;
- s2_f = s2_f - s18_f;
- s8_f = s8_f + s4_f * s6_f;
- s2_f = s2_f + s0_f * s10_f;
- RenderRewindIcon(s8_f, s2_f, s4_f, s4_f);
- }
- //-------------------------------------------------------------------------------------------------
- //00135918
- void CUIMsgRewind::RenderRewindIcon(float f1, float f2, float f3, float f4) {
- LOGE("CUIMsgRewind::RenderRewindIcon%p%f%f%f%f",this,f1,f2,f3,f4);
- }
- //-------------------------------------------------------------------------------------------------
- //00135B78
- void CUIMsgRewind::Init(EMessageBoxType, wchar_t const *, wchar_t *, int, int, int, int, bool, bool, bool, CMessageBoxHandler_func, void *) {
- }
- //-------------------------------------------------------------------------------------------------
- //00135C10
- int CUIMsgRewind::Process() {
- return rand() % 10;
- }
- //-------------------------------------------------------------------------------------------------
|