mirror of https://github.com/AxioDL/metaforce.git
Finish fixing STRG indices
This commit is contained in:
parent
8e2636c14c
commit
9365c35000
|
@ -134,10 +134,11 @@ void CFrontEndUI::SNewFileSelectFrame::FinishedLoading() {
|
||||||
x40_tablegroup_popup = static_cast<CGuiTableGroup*>(x1c_loadedFrame->FindWidget("tablegroup_popup"));
|
x40_tablegroup_popup = static_cast<CGuiTableGroup*>(x1c_loadedFrame->FindWidget("tablegroup_popup"));
|
||||||
x44_model_dash7 = static_cast<CGuiModel*>(x1c_loadedFrame->FindWidget("model_dash7"));
|
x44_model_dash7 = static_cast<CGuiModel*>(x1c_loadedFrame->FindWidget("model_dash7"));
|
||||||
x60_textpane_cancel = static_cast<CGuiTextPane*>(x1c_loadedFrame->FindWidget("textpane_cancel"));
|
x60_textpane_cancel = static_cast<CGuiTextPane*>(x1c_loadedFrame->FindWidget("textpane_cancel"));
|
||||||
FindAndSetPairText(x1c_loadedFrame, "textpane_title", g_MainStringTable->GetString(97));
|
FindAndSetPairText(x1c_loadedFrame, "textpane_title",
|
||||||
|
g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 97 : 92));
|
||||||
CGuiTextPane* proceed = static_cast<CGuiTextPane*>(x1c_loadedFrame->FindWidget("textpane_proceed"));
|
CGuiTextPane* proceed = static_cast<CGuiTextPane*>(x1c_loadedFrame->FindWidget("textpane_proceed"));
|
||||||
if (proceed)
|
if (proceed)
|
||||||
proceed->TextSupport().SetText(g_MainStringTable->GetString(85));
|
proceed->TextSupport().SetText(g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 85 : 79));
|
||||||
x40_tablegroup_popup->SetIsVisible(false);
|
x40_tablegroup_popup->SetIsVisible(false);
|
||||||
x40_tablegroup_popup->SetIsActive(false);
|
x40_tablegroup_popup->SetIsActive(false);
|
||||||
x40_tablegroup_popup->SetVertical(false);
|
x40_tablegroup_popup->SetVertical(false);
|
||||||
|
@ -307,7 +308,8 @@ void CFrontEndUI::SNewFileSelectFrame::HandleActiveChange(CGuiTableGroup* active
|
||||||
tbDetails[i].percent = data->x18_itemPercent;
|
tbDetails[i].percent = data->x18_itemPercent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_touchBar.SetFileSelectPhase(tbDetails.data(), x8_subMenu == ESubMenu::EraseGame, CSlideShow::SlideShowGalleryFlags());
|
m_touchBar.SetFileSelectPhase(tbDetails.data(), x8_subMenu == ESubMenu::EraseGame,
|
||||||
|
CSlideShow::SlideShowGalleryFlags());
|
||||||
} else if (active == x40_tablegroup_popup) {
|
} else if (active == x40_tablegroup_popup) {
|
||||||
if (x8_subMenu == ESubMenu::EraseGamePopup)
|
if (x8_subMenu == ESubMenu::EraseGamePopup)
|
||||||
m_touchBar.SetPhase(CFrontEndUITouchBar::EPhase::EraseBack);
|
m_touchBar.SetPhase(CFrontEndUITouchBar::EPhase::EraseBack);
|
||||||
|
@ -344,8 +346,10 @@ void CFrontEndUI::SNewFileSelectFrame::ActivateEraseGamePopup() {
|
||||||
x8_subMenu = ESubMenu::EraseGamePopup;
|
x8_subMenu = ESubMenu::EraseGamePopup;
|
||||||
HandleActiveChange(x40_tablegroup_popup);
|
HandleActiveChange(x40_tablegroup_popup);
|
||||||
|
|
||||||
x48_textpane_popupadvance.SetPairText(g_MainStringTable->GetString(95));
|
x48_textpane_popupadvance.SetPairText(
|
||||||
x50_textpane_popupcancel.SetPairText(g_MainStringTable->GetString(38));
|
g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 95 : 89));
|
||||||
|
x50_textpane_popupcancel.SetPairText(
|
||||||
|
g_MainStringTable->GetString(38)); // This string is unmodified in PAL/NTSCJ/Trilogy
|
||||||
|
|
||||||
x64_fileSelections[x20_tablegroup_fileselect->GetUserSelection()].x0_base->SetColor(zeus::CColor{1.f, 1.f, 1.f, 0.f});
|
x64_fileSelections[x20_tablegroup_fileselect->GetUserSelection()].x0_base->SetColor(zeus::CColor{1.f, 1.f, 1.f, 0.f});
|
||||||
x44_model_dash7->SetVisibility(false, ETraversalMode::Children);
|
x44_model_dash7->SetVisibility(false, ETraversalMode::Children);
|
||||||
|
@ -384,19 +388,25 @@ void CFrontEndUI::SNewFileSelectFrame::ActivateNewGamePopup() {
|
||||||
PlayAdvanceSfx();
|
PlayAdvanceSfx();
|
||||||
|
|
||||||
if (g_GameState->SystemOptions().GetPlayerBeatNormalMode()) {
|
if (g_GameState->SystemOptions().GetPlayerBeatNormalMode()) {
|
||||||
x48_textpane_popupadvance.SetPairText(g_MainStringTable->GetString(102));
|
x48_textpane_popupadvance.SetPairText(
|
||||||
x50_textpane_popupcancel.SetPairText(g_MainStringTable->GetString(94));
|
g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 102 : 96));
|
||||||
x58_textpane_popupextra.SetPairText(g_MainStringTable->GetString(101));
|
x50_textpane_popupcancel.SetPairText(
|
||||||
|
g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 94 : 88));
|
||||||
|
x58_textpane_popupextra.SetPairText(
|
||||||
|
g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 101 : 95));
|
||||||
CGuiWidget* worker = x40_tablegroup_popup->GetWorkerWidget(2);
|
CGuiWidget* worker = x40_tablegroup_popup->GetWorkerWidget(2);
|
||||||
worker->SetIsSelectable(true);
|
worker->SetIsSelectable(true);
|
||||||
worker->SetVisibility(true, ETraversalMode::Children);
|
worker->SetVisibility(true, ETraversalMode::Children);
|
||||||
x44_model_dash7->SetVisibility(true, ETraversalMode::Children);
|
x44_model_dash7->SetVisibility(true, ETraversalMode::Children);
|
||||||
} else {
|
} else {
|
||||||
x48_textpane_popupadvance.SetPairText(g_MainStringTable->GetString(67));
|
x48_textpane_popupadvance.SetPairText(
|
||||||
x50_textpane_popupcancel.SetPairText(g_MainStringTable->GetString(94));
|
g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 67 : 61));
|
||||||
|
x50_textpane_popupcancel.SetPairText(
|
||||||
|
g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 94 : 88));
|
||||||
x44_model_dash7->SetVisibility(false, ETraversalMode::Children);
|
x44_model_dash7->SetVisibility(false, ETraversalMode::Children);
|
||||||
}
|
}
|
||||||
x60_textpane_cancel->TextSupport().SetText(g_MainStringTable->GetString(82));
|
x60_textpane_cancel->TextSupport().SetText(
|
||||||
|
g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 82 : 76));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrontEndUI::SNewFileSelectFrame::ResetFrame() {
|
void CFrontEndUI::SNewFileSelectFrame::ResetFrame() {
|
||||||
|
@ -436,7 +446,8 @@ void CFrontEndUI::SNewFileSelectFrame::ActivateErase() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
x60_textpane_cancel->TextSupport().SetText(g_MainStringTable->GetString(82));
|
x60_textpane_cancel->TextSupport().SetText(
|
||||||
|
g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 82 : 76));
|
||||||
HandleActiveChange(x20_tablegroup_fileselect);
|
HandleActiveChange(x20_tablegroup_fileselect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -456,13 +467,19 @@ void CFrontEndUI::SNewFileSelectFrame::ClearFrameContents() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StartTextAnimating(x28_textpane_erase.x0_panes[0], g_MainStringTable->GetString(38), 60.f);
|
StartTextAnimating(x28_textpane_erase.x0_panes[0], g_MainStringTable->GetString(38),
|
||||||
StartTextAnimating(x38_textpane_gba.x0_panes[0], g_MainStringTable->GetString(37), 60.f);
|
60.f); // This string is unmodified in PAL/NTSCJ/Trilogy
|
||||||
StartTextAnimating(x30_textpane_cheats.x0_panes[0], g_MainStringTable->GetString(96), 60.f);
|
StartTextAnimating(x38_textpane_gba.x0_panes[0], g_MainStringTable->GetString(37),
|
||||||
|
60.f); // This string is unmodified in PAL/NTSCJ/Trilogy
|
||||||
|
StartTextAnimating(x30_textpane_cheats.x0_panes[0],
|
||||||
|
g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 96 : 90), 60.f);
|
||||||
|
|
||||||
StartTextAnimating(x28_textpane_erase.x0_panes[1], g_MainStringTable->GetString(38), 60.f);
|
StartTextAnimating(x28_textpane_erase.x0_panes[1], g_MainStringTable->GetString(38),
|
||||||
StartTextAnimating(x38_textpane_gba.x0_panes[1], g_MainStringTable->GetString(37), 60.f);
|
60.f); // This string is unmodified in PAL/NTSCJ/Trilogy
|
||||||
StartTextAnimating(x30_textpane_cheats.x0_panes[1], g_MainStringTable->GetString(96), 60.f);
|
StartTextAnimating(x38_textpane_gba.x0_panes[1], g_MainStringTable->GetString(37),
|
||||||
|
60.f); // This string is unmodified in PAL/NTSCJ/Trilogy
|
||||||
|
StartTextAnimating(x30_textpane_cheats.x0_panes[1],
|
||||||
|
g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 96 : 90), 60.f);
|
||||||
|
|
||||||
if (hasSave) {
|
if (hasSave) {
|
||||||
x28_textpane_erase.x0_panes[0]->SetIsSelectable(true);
|
x28_textpane_erase.x0_panes[0]->SetIsSelectable(true);
|
||||||
|
@ -489,6 +506,27 @@ void CFrontEndUI::SNewFileSelectFrame::ClearFrameContents() {
|
||||||
HandleActiveChange(x20_tablegroup_fileselect);
|
HandleActiveChange(x20_tablegroup_fileselect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::u16string GetTimeString(const CGameState::GameFileStateInfo* data) {
|
||||||
|
if (data) {
|
||||||
|
auto pt = std::div(data->x0_playTime, 3600);
|
||||||
|
#if FE_USE_SECONDS_IN_ELAPSED
|
||||||
|
return fmt::format(FMT_STRING(u"{:02d}:{:02d}:{:02d}"), pt.quot, pt.rem / 60, pt.rem % 60);
|
||||||
|
#else
|
||||||
|
return fmt::format(FMT_STRING(u"{:02d}:{:02d}"), pt.quot, pt.rem / 60);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
if (!g_Main->IsUSA() || g_Main->IsTrilogy())
|
||||||
|
return g_MainStringTable->GetString(53);
|
||||||
|
return g_MainStringTable->GetString(52);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::u16string GetElapsedString(const CGameState::GameFileStateInfo* data) {
|
||||||
|
if (!g_Main->IsUSA() || g_Main->IsTrilogy())
|
||||||
|
return g_MainStringTable->GetString(data ? 55 : 54);
|
||||||
|
|
||||||
|
return std::u16string(g_MainStringTable->GetString(data ? 54 : 53));
|
||||||
|
}
|
||||||
|
|
||||||
void CFrontEndUI::SNewFileSelectFrame::SetupFrameContents() {
|
void CFrontEndUI::SNewFileSelectFrame::SetupFrameContents() {
|
||||||
for (size_t i = 0; i < x64_fileSelections.size(); ++i) {
|
for (size_t i = 0; i < x64_fileSelections.size(); ++i) {
|
||||||
SFileMenuOption& option = x64_fileSelections[i];
|
SFileMenuOption& option = x64_fileSelections[i];
|
||||||
|
@ -508,7 +546,11 @@ void CFrontEndUI::SNewFileSelectFrame::SetupFrameContents() {
|
||||||
case 0:
|
case 0:
|
||||||
// Completion percent
|
// Completion percent
|
||||||
if (data) {
|
if (data) {
|
||||||
std::u16string fileStr = g_MainStringTable->GetString((data->x20_hardMode ? 106 : 39) + int(i));
|
int strIdx = (data->x20_hardMode ? 106 : 39);
|
||||||
|
if ((!g_Main->IsUSA() || g_Main->IsTrilogy()))
|
||||||
|
strIdx = (strIdx == 106 ? 100 : 40);
|
||||||
|
|
||||||
|
std::u16string fileStr = g_MainStringTable->GetString(strIdx + int(i));
|
||||||
str = fileStr + fmt::format(FMT_STRING(u" {:02d}%"), data->x18_itemPercent);
|
str = fileStr + fmt::format(FMT_STRING(u" {:02d}%"), data->x18_itemPercent);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -524,38 +566,38 @@ void CFrontEndUI::SNewFileSelectFrame::SetupFrameContents() {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
str = g_MainStringTable->GetString(51);
|
str = g_MainStringTable->GetString(51 + int(!g_Main->IsUSA() || g_Main->IsTrilogy()));
|
||||||
break;
|
break;
|
||||||
#if FE_USE_SECONDS_IN_ELAPSED
|
|
||||||
case 2:
|
|
||||||
// Formatted time
|
|
||||||
if (data) {
|
|
||||||
auto pt = std::div(data->x0_playTime, 3600);
|
|
||||||
str = fmt::format(FMT_STRING(u"{:02d}:{:02d}:{:02d}"), pt.quot, pt.rem / 60, pt.rem % 60);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
str = g_MainStringTable->GetString(52);
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
// "Elapsed"
|
|
||||||
str = std::u16string(u" ") + std::u16string(g_MainStringTable->GetString(data ? 54 : 53));
|
|
||||||
break;
|
|
||||||
#else
|
|
||||||
case 2:
|
case 2:
|
||||||
// Formatted time
|
#if FE_USE_SECONDS_IN_ELAPSED
|
||||||
if (data) {
|
if (!g_Main->IsUSA() || g_Main->IsTrilogy()) {
|
||||||
auto pt = std::div(data->x0_playTime, 3600);
|
str = GetElapsedString(data);
|
||||||
str = hecl::Char16Format(L"%02d:%02d", pt.quot, pt.rem / 60);
|
} else {
|
||||||
break;
|
str = GetTimeString(data);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
if (!g_Main->IsUSA() || g_Main->IsTrilogy()) {
|
||||||
|
str = GetElapsedString(data);
|
||||||
|
} else {
|
||||||
|
str = GetTimeString(data);
|
||||||
}
|
}
|
||||||
str = g_MainStringTable->GetString(52);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 3:
|
|
||||||
// "Elapsed"
|
|
||||||
str = g_MainStringTable->GetString(data ? 54 : 53);
|
|
||||||
break;
|
|
||||||
#endif
|
#endif
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
#if FE_USE_SECONDS_IN_ELAPSED
|
||||||
|
if (!g_Main->IsUSA() || g_Main->IsTrilogy()) {
|
||||||
|
str = GetTimeString(data);
|
||||||
|
} else {
|
||||||
|
str = std::u16string(u" ") + GetElapsedString(data);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
if (!g_Main->IsUSA() || g_Main->IsTrilogy()) {
|
||||||
|
str = GetTimeString(data);
|
||||||
|
} else {
|
||||||
|
str = std::u16string(u" ") + GetElapsedString(data);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -681,54 +723,54 @@ void CFrontEndUI::SFusionBonusFrame::SGBALinkFrame::SetUIText(EUIType tp) {
|
||||||
|
|
||||||
switch (tp) {
|
switch (tp) {
|
||||||
case EUIType::InsertPak:
|
case EUIType::InsertPak:
|
||||||
instructions = 73; // Insert Game Pak
|
instructions = (g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 73 : 67; // Insert Game Pak
|
||||||
no = 82;
|
no = (g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 82 : 76;
|
||||||
yes = 83;
|
yes = (g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 83 : 77;
|
||||||
pakoutVisible = true;
|
pakoutVisible = true;
|
||||||
circleGbaVisible = true;
|
circleGbaVisible = true;
|
||||||
break;
|
break;
|
||||||
case EUIType::ConnectSocket:
|
case EUIType::ConnectSocket:
|
||||||
instructions = 68; // Connect socket
|
instructions = (g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 68 : 62; // Connect socket
|
||||||
no = 82;
|
no = (g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 82 : 76;
|
||||||
yes = 83;
|
yes = (g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 83 : 77;
|
||||||
cableVisible = true;
|
cableVisible = true;
|
||||||
circleGcVisible = true;
|
circleGcVisible = true;
|
||||||
circleGbaVisible = true;
|
circleGbaVisible = true;
|
||||||
break;
|
break;
|
||||||
case EUIType::PressStartAndSelect:
|
case EUIType::PressStartAndSelect:
|
||||||
instructions = 74; // Hold start and select
|
instructions = (g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 74 : 68; // Hold start and select
|
||||||
no = 82;
|
no = (g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 82 : 76;
|
||||||
yes = 83;
|
yes = (g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 83 : 77;
|
||||||
cableVisible = true;
|
cableVisible = true;
|
||||||
circleStartVisible = true;
|
circleStartVisible = true;
|
||||||
gbaScreenVisible = true;
|
gbaScreenVisible = true;
|
||||||
break;
|
break;
|
||||||
case EUIType::BeginLink:
|
case EUIType::BeginLink:
|
||||||
instructions = 75; // Begin link?
|
instructions = (g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 75 : 69; // Begin link?
|
||||||
no = 82;
|
no = (g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 82 : 76;
|
||||||
yes = 83;
|
yes = (g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 83 : 77;
|
||||||
cableVisible = true;
|
cableVisible = true;
|
||||||
gbaScreenVisible = true;
|
gbaScreenVisible = true;
|
||||||
break;
|
break;
|
||||||
case EUIType::TurnOffGBA:
|
case EUIType::TurnOffGBA:
|
||||||
instructions = 76; // Turn off GBA
|
instructions = (g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 76 : 70; // Turn off GBA
|
||||||
no = 82;
|
no = (g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 82 : 76;
|
||||||
yes = 83;
|
yes = (g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 83 : 77;
|
||||||
cableVisible = true;
|
cableVisible = true;
|
||||||
gbaScreenVisible = true;
|
gbaScreenVisible = true;
|
||||||
circleStartVisible = true;
|
circleStartVisible = true;
|
||||||
break;
|
break;
|
||||||
case EUIType::Linking:
|
case EUIType::Linking:
|
||||||
x4_gbaSupport->StartLink();
|
x4_gbaSupport->StartLink();
|
||||||
instructions = 72; // Linking
|
instructions = (g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 72 : 66; // Linking
|
||||||
cableVisible = true;
|
cableVisible = true;
|
||||||
gbaScreenVisible = true;
|
gbaScreenVisible = true;
|
||||||
connectVisible = true;
|
connectVisible = true;
|
||||||
break;
|
break;
|
||||||
case EUIType::LinkFailed:
|
case EUIType::LinkFailed:
|
||||||
instructions = 69; // Link failed
|
instructions = (g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 69 : 63; // Link failed
|
||||||
no = 82;
|
no = (g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 82 : 76;
|
||||||
yes = 83;
|
yes = (g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 83 : 77;
|
||||||
cableVisible = true;
|
cableVisible = true;
|
||||||
circleGcVisible = true;
|
circleGcVisible = true;
|
||||||
circleGbaVisible = true;
|
circleGbaVisible = true;
|
||||||
|
@ -736,8 +778,8 @@ void CFrontEndUI::SFusionBonusFrame::SGBALinkFrame::SetUIText(EUIType tp) {
|
||||||
gbaScreenVisible = true;
|
gbaScreenVisible = true;
|
||||||
break;
|
break;
|
||||||
case EUIType::LinkCompleteOrLinking:
|
case EUIType::LinkCompleteOrLinking:
|
||||||
yes = 83;
|
yes = (g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 83 : 77;
|
||||||
instructions = x40_linkInProgress + 71; // Complete or linking
|
instructions = x40_linkInProgress + (g_Main->IsUSA() && !g_Main->IsTrilogy() ? 71 : 65); // Complete or linking
|
||||||
cableVisible = true;
|
cableVisible = true;
|
||||||
gbaScreenVisible = true;
|
gbaScreenVisible = true;
|
||||||
break;
|
break;
|
||||||
|
@ -775,8 +817,9 @@ void CFrontEndUI::SFusionBonusFrame::SGBALinkFrame::SetUIText(EUIType tp) {
|
||||||
x0_uiType = tp;
|
x0_uiType = tp;
|
||||||
}
|
}
|
||||||
|
|
||||||
CFrontEndUI::SFusionBonusFrame::SGBALinkFrame::EAction CFrontEndUI::SFusionBonusFrame::SGBALinkFrame::ProcessUserInput(
|
CFrontEndUI::SFusionBonusFrame::SGBALinkFrame::EAction
|
||||||
const CFinalInput& input, bool linkInProgress, CFrontEndUITouchBar::EAction tbAction) {
|
CFrontEndUI::SFusionBonusFrame::SGBALinkFrame::ProcessUserInput(const CFinalInput& input, bool linkInProgress,
|
||||||
|
CFrontEndUITouchBar::EAction tbAction) {
|
||||||
if (linkInProgress != x40_linkInProgress) {
|
if (linkInProgress != x40_linkInProgress) {
|
||||||
x40_linkInProgress = linkInProgress;
|
x40_linkInProgress = linkInProgress;
|
||||||
SetUIText(x0_uiType);
|
SetUIText(x0_uiType);
|
||||||
|
@ -790,9 +833,7 @@ CFrontEndUI::SFusionBonusFrame::SGBALinkFrame::EAction CFrontEndUI::SFusionBonus
|
||||||
case EUIType::LinkFailed:
|
case EUIType::LinkFailed:
|
||||||
case EUIType::LinkCompleteOrLinking:
|
case EUIType::LinkCompleteOrLinking:
|
||||||
case EUIType::TurnOffGBA:
|
case EUIType::TurnOffGBA:
|
||||||
if (input.PA() ||
|
if (input.PA() || input.PSpecialKey(boo::ESpecialKey::Enter) || input.PMouseButton(boo::EMouseButton::Primary) ||
|
||||||
input.PSpecialKey(boo::ESpecialKey::Enter) ||
|
|
||||||
input.PMouseButton(boo::EMouseButton::Primary) ||
|
|
||||||
tbAction == CFrontEndUITouchBar::EAction::Confirm) {
|
tbAction == CFrontEndUITouchBar::EAction::Confirm) {
|
||||||
PlayAdvanceSfx();
|
PlayAdvanceSfx();
|
||||||
SetUIText(NextLinkUI[size_t(x0_uiType)]);
|
SetUIText(NextLinkUI[size_t(x0_uiType)]);
|
||||||
|
@ -874,18 +915,23 @@ void CFrontEndUI::SFusionBonusFrame::FinishedLoading() {
|
||||||
x2c_tablegroup_fusionsuit = static_cast<CGuiTableGroup*>(x24_loadedFrame->FindWidget("tablegroup_fusionsuit"));
|
x2c_tablegroup_fusionsuit = static_cast<CGuiTableGroup*>(x24_loadedFrame->FindWidget("tablegroup_fusionsuit"));
|
||||||
x30_textpane_instructions = FindTextPanePair(x24_loadedFrame, "textpane_instructions");
|
x30_textpane_instructions = FindTextPanePair(x24_loadedFrame, "textpane_instructions");
|
||||||
|
|
||||||
FindAndSetPairText(x24_loadedFrame, "textpane_nes", g_MainStringTable->GetString(66));
|
FindAndSetPairText(x24_loadedFrame, "textpane_nes",
|
||||||
FindAndSetPairText(x24_loadedFrame, "textpane_fusionsuit", g_MainStringTable->GetString(63));
|
g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 66 : 60));
|
||||||
FindAndSetPairText(x24_loadedFrame, "textpane_fusionsuitno", g_MainStringTable->GetString(65));
|
FindAndSetPairText(x24_loadedFrame, "textpane_fusionsuit",
|
||||||
FindAndSetPairText(x24_loadedFrame, "textpane_fusionsuityes", g_MainStringTable->GetString(64));
|
g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 63 : 57));
|
||||||
FindAndSetPairText(x24_loadedFrame, "textpane_title", g_MainStringTable->GetString(100));
|
FindAndSetPairText(x24_loadedFrame, "textpane_fusionsuitno",
|
||||||
|
g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 65 : 59));
|
||||||
|
FindAndSetPairText(x24_loadedFrame, "textpane_fusionsuityes",
|
||||||
|
g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 64 : 58));
|
||||||
|
FindAndSetPairText(x24_loadedFrame, "textpane_title",
|
||||||
|
g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 100 : 94));
|
||||||
|
|
||||||
static_cast<CGuiTextPane*>(x24_loadedFrame->FindWidget("textpane_proceed"))
|
static_cast<CGuiTextPane*>(x24_loadedFrame->FindWidget("textpane_proceed"))
|
||||||
->TextSupport()
|
->TextSupport()
|
||||||
.SetText(g_MainStringTable->GetString(85));
|
.SetText(g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 85 : 79));
|
||||||
static_cast<CGuiTextPane*>(x24_loadedFrame->FindWidget("textpane_cancel"))
|
static_cast<CGuiTextPane*>(x24_loadedFrame->FindWidget("textpane_cancel"))
|
||||||
->TextSupport()
|
->TextSupport()
|
||||||
.SetText(g_MainStringTable->GetString(82));
|
.SetText(g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 82 : 76));
|
||||||
|
|
||||||
x2c_tablegroup_fusionsuit->SetIsActive(false);
|
x2c_tablegroup_fusionsuit->SetIsActive(false);
|
||||||
x2c_tablegroup_fusionsuit->SetIsVisible(false);
|
x2c_tablegroup_fusionsuit->SetIsVisible(false);
|
||||||
|
@ -949,22 +995,27 @@ void CFrontEndUI::SFusionBonusFrame::Update(float dt, CSaveGameScreen* saveUI) {
|
||||||
if (x28_tablegroup_options->GetUserSelection() == 1) {
|
if (x28_tablegroup_options->GetUserSelection() == 1) {
|
||||||
/* Fusion Suit */
|
/* Fusion Suit */
|
||||||
if (x3a_mpNotComplete)
|
if (x3a_mpNotComplete)
|
||||||
instructionStr = g_MainStringTable->GetString(80); // MP not complete
|
instructionStr =
|
||||||
|
g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 80 : 74); // MP not complete
|
||||||
else if (!showFusionSuit)
|
else if (!showFusionSuit)
|
||||||
instructionStr = g_MainStringTable->GetString(78); // To enable fusion suit
|
instructionStr =
|
||||||
|
g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 78 : 72); // To enable fusion suit
|
||||||
} else {
|
} else {
|
||||||
/* NES Metroid */
|
/* NES Metroid */
|
||||||
if (x39_fusionNotComplete)
|
if (x39_fusionNotComplete)
|
||||||
instructionStr = g_MainStringTable->GetString(79); // You have not completed fusion
|
instructionStr = g_MainStringTable->GetString(
|
||||||
|
(g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 79 : 73); // You have not completed fusion
|
||||||
else if (!g_GameState->SystemOptions().GetPlayerBeatFusion())
|
else if (!g_GameState->SystemOptions().GetPlayerBeatFusion())
|
||||||
instructionStr = g_MainStringTable->GetString(77); // To play NES Metroid
|
instructionStr =
|
||||||
|
g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 77 : 71); // To play NES Metroid
|
||||||
}
|
}
|
||||||
|
|
||||||
x30_textpane_instructions.SetPairText(instructionStr);
|
x30_textpane_instructions.SetPairText(instructionStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
CFrontEndUI::SFusionBonusFrame::EAction CFrontEndUI::SFusionBonusFrame::ProcessUserInput(
|
CFrontEndUI::SFusionBonusFrame::EAction
|
||||||
const CFinalInput& input, CSaveGameScreen* sui, CFrontEndUITouchBar::EAction tbAction) {
|
CFrontEndUI::SFusionBonusFrame::ProcessUserInput(const CFinalInput& input, CSaveGameScreen* sui,
|
||||||
|
CFrontEndUITouchBar::EAction tbAction) {
|
||||||
x8_action = EAction::None;
|
x8_action = EAction::None;
|
||||||
|
|
||||||
if (sui)
|
if (sui)
|
||||||
|
@ -1129,15 +1180,18 @@ void CFrontEndUI::SFrontEndFrame::FinishedLoading() {
|
||||||
x1c_gbaPair = FindTextPanePair(x14_loadedFrme, "textpane_gba");
|
x1c_gbaPair = FindTextPanePair(x14_loadedFrme, "textpane_gba");
|
||||||
x1c_gbaPair.SetPairText(g_MainStringTable->GetString(37));
|
x1c_gbaPair.SetPairText(g_MainStringTable->GetString(37));
|
||||||
x24_cheatPair = FindTextPanePair(x14_loadedFrme, "textpane_cheats");
|
x24_cheatPair = FindTextPanePair(x14_loadedFrme, "textpane_cheats");
|
||||||
x24_cheatPair.SetPairText(g_MainStringTable->GetString(96));
|
x24_cheatPair.SetPairText(g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 96 : 90));
|
||||||
|
|
||||||
FindAndSetPairText(x14_loadedFrme, "textpane_start", g_MainStringTable->GetString(67));
|
FindAndSetPairText(x14_loadedFrme, "textpane_start",
|
||||||
FindAndSetPairText(x14_loadedFrme, "textpane_options", g_MainStringTable->GetString(94));
|
g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 67 : 61));
|
||||||
FindAndSetPairText(x14_loadedFrme, "textpane_title", g_MainStringTable->GetString(98));
|
FindAndSetPairText(x14_loadedFrme, "textpane_options",
|
||||||
|
g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 94 : 88));
|
||||||
|
FindAndSetPairText(x14_loadedFrme, "textpane_title",
|
||||||
|
g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 98 : 92));
|
||||||
|
|
||||||
CGuiTextPane* proceed = static_cast<CGuiTextPane*>(x14_loadedFrme->FindWidget("textpane_proceed"));
|
CGuiTextPane* proceed = static_cast<CGuiTextPane*>(x14_loadedFrme->FindWidget("textpane_proceed"));
|
||||||
if (proceed)
|
if (proceed)
|
||||||
proceed->TextSupport().SetText(g_MainStringTable->GetString(85));
|
proceed->TextSupport().SetText(g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 85 : 79));
|
||||||
|
|
||||||
x18_tablegroup_mainmenu->SetMenuAdvanceCallback([this](CGuiTableGroup* caller) { DoAdvance(caller); });
|
x18_tablegroup_mainmenu->SetMenuAdvanceCallback([this](CGuiTableGroup* caller) { DoAdvance(caller); });
|
||||||
x18_tablegroup_mainmenu->SetMenuSelectionChangeCallback(
|
x18_tablegroup_mainmenu->SetMenuSelectionChangeCallback(
|
||||||
|
@ -1220,7 +1274,8 @@ void CFrontEndUI::SFrontEndFrame::HandleActiveChange(CGuiTableGroup* active) {
|
||||||
active->SetColors(zeus::skWhite, zeus::CColor{0.627450f, 0.627450f, 0.627450f, 0.784313f});
|
active->SetColors(zeus::skWhite, zeus::CColor{0.627450f, 0.627450f, 0.627450f, 0.784313f});
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrontEndUI::SFrontEndFrame::DoCancel(CGuiTableGroup* caller) { /* Intentionally empty */ }
|
void CFrontEndUI::SFrontEndFrame::DoCancel(CGuiTableGroup* caller) { /* Intentionally empty */
|
||||||
|
}
|
||||||
|
|
||||||
void CFrontEndUI::SFrontEndFrame::DoSelectionChange(CGuiTableGroup* caller, int oldSel) {
|
void CFrontEndUI::SFrontEndFrame::DoSelectionChange(CGuiTableGroup* caller, int oldSel) {
|
||||||
CSfxManager::SfxStart(SFXfnt_selection_change, 1.f, 0.f, false, 0x7f, false, kInvalidAreaId);
|
CSfxManager::SfxStart(SFXfnt_selection_change, 1.f, 0.f, false, 0x7f, false, kInvalidAreaId);
|
||||||
|
@ -1260,9 +1315,8 @@ CFrontEndUI::SNesEmulatorFrame::SNesEmulatorFrame() {
|
||||||
|
|
||||||
const SObjectTag* deface = g_ResFactory->GetResourceIdByName("FONT_Deface14B");
|
const SObjectTag* deface = g_ResFactory->GetResourceIdByName("FONT_Deface14B");
|
||||||
CGuiTextProperties props(false, true, EJustification::Left, EVerticalJustification::Center);
|
CGuiTextProperties props(false, true, EJustification::Left, EVerticalJustification::Center);
|
||||||
xc_textSupport = std::make_unique<CGuiTextSupport>(deface->id, props, zeus::skWhite, zeus::skBlack,
|
xc_textSupport = std::make_unique<CGuiTextSupport>(deface->id, props, zeus::skWhite, zeus::skBlack, zeus::skWhite, 0,
|
||||||
zeus::skWhite, 0, 0, g_SimplePool,
|
0, g_SimplePool, CGuiWidget::EGuiModelDrawFlags::Alpha);
|
||||||
CGuiWidget::EGuiModelDrawFlags::Alpha);
|
|
||||||
xc_textSupport->SetText(g_MainStringTable->GetString(103));
|
xc_textSupport->SetText(g_MainStringTable->GetString(103));
|
||||||
xc_textSupport->AutoSetExtent();
|
xc_textSupport->AutoSetExtent();
|
||||||
xc_textSupport->ClearRenderBuffer();
|
xc_textSupport->ClearRenderBuffer();
|
||||||
|
@ -1529,7 +1583,8 @@ void CFrontEndUI::SOptionsFrontEndFrame::HandleRightSelectionChange() {
|
||||||
|
|
||||||
void CFrontEndUI::SOptionsFrontEndFrame::SetRightUIText() {
|
void CFrontEndUI::SOptionsFrontEndFrame::SetRightUIText() {
|
||||||
const int userSel = x24_tablegroup_leftmenu->GetUserSelection();
|
const int userSel = x24_tablegroup_leftmenu->GetUserSelection();
|
||||||
const auto& options = GameOptionsRegistry[userSel];
|
const auto& options =
|
||||||
|
(g_Main->IsUSA() && !g_Main->IsTrilogy()) ? GameOptionsRegistry[userSel] : GameOptionsRegistryNew[userSel];
|
||||||
|
|
||||||
for (int i = 0; i < 5; ++i) {
|
for (int i = 0; i < 5; ++i) {
|
||||||
std::string name = fmt::format(FMT_STRING("textpane_right{}"), i);
|
std::string name = fmt::format(FMT_STRING("textpane_right{}"), i);
|
||||||
|
@ -1578,24 +1633,31 @@ void CFrontEndUI::SOptionsFrontEndFrame::FinishedLoading() {
|
||||||
x34_slidergroup_slider->SetSelectionChangedCallback(
|
x34_slidergroup_slider->SetSelectionChangedCallback(
|
||||||
[this](CGuiSliderGroup* caller, float value) { DoSliderChange(caller, value); });
|
[this](CGuiSliderGroup* caller, float value) { DoSliderChange(caller, value); });
|
||||||
|
|
||||||
FindTextPanePair(x1c_loadedFrame, "textpane_double0").SetPairText(x20_loadedPauseStrg->GetString(95)); // Off
|
FindTextPanePair(x1c_loadedFrame, "textpane_double0")
|
||||||
FindTextPanePair(x1c_loadedFrame, "textpane_double1").SetPairText(x20_loadedPauseStrg->GetString(94)); // On
|
.SetPairText(x20_loadedPauseStrg->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 95 : 98)); // Off
|
||||||
FindTextPanePair(x1c_loadedFrame, "textpane_triple0").SetPairText(x20_loadedPauseStrg->GetString(96)); // Mono
|
FindTextPanePair(x1c_loadedFrame, "textpane_double1")
|
||||||
FindTextPanePair(x1c_loadedFrame, "textpane_triple1").SetPairText(x20_loadedPauseStrg->GetString(97)); // Stereo
|
.SetPairText(x20_loadedPauseStrg->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 94 : 97)); // On
|
||||||
FindTextPanePair(x1c_loadedFrame, "textpane_triple2").SetPairText(x20_loadedPauseStrg->GetString(98)); // Dolby
|
FindTextPanePair(x1c_loadedFrame, "textpane_triple0")
|
||||||
|
.SetPairText(x20_loadedPauseStrg->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 96 : 99)); // Mono
|
||||||
|
FindTextPanePair(x1c_loadedFrame, "textpane_triple1")
|
||||||
|
.SetPairText(x20_loadedPauseStrg->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 97 : 100)); // Stereo
|
||||||
|
FindTextPanePair(x1c_loadedFrame, "textpane_triple2")
|
||||||
|
.SetPairText(x20_loadedPauseStrg->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 98 : 101)); // Dolby
|
||||||
|
|
||||||
FindTextPanePair(x1c_loadedFrame, "textpane_title").SetPairText(g_MainStringTable->GetString(99)); // OPTIONS
|
FindTextPanePair(x1c_loadedFrame, "textpane_title")
|
||||||
|
.SetPairText(g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 99 : 93)); // OPTIONS
|
||||||
|
|
||||||
if (CGuiTextPane* proceed = static_cast<CGuiTextPane*>(x1c_loadedFrame->FindWidget("textpane_proceed")))
|
if (CGuiTextPane* proceed = static_cast<CGuiTextPane*>(x1c_loadedFrame->FindWidget("textpane_proceed")))
|
||||||
proceed->TextSupport().SetText(g_MainStringTable->GetString(85));
|
proceed->TextSupport().SetText(g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 85 : 79));
|
||||||
|
|
||||||
if (CGuiTextPane* cancel = static_cast<CGuiTextPane*>(x1c_loadedFrame->FindWidget("textpane_cancel")))
|
if (CGuiTextPane* cancel = static_cast<CGuiTextPane*>(x1c_loadedFrame->FindWidget("textpane_cancel")))
|
||||||
cancel->TextSupport().SetText(g_MainStringTable->GetString(82));
|
cancel->TextSupport().SetText(g_MainStringTable->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 82 : 76));
|
||||||
|
|
||||||
// Visor, Display, Sound, Controller
|
// Visor, Display, Sound, Controller
|
||||||
for (int i = 0; i < 4; ++i) {
|
for (int i = 0; i < 4; ++i) {
|
||||||
const std::string name = fmt::format(FMT_STRING("textpane_filename{}"), i);
|
const std::string name = fmt::format(FMT_STRING("textpane_filename{}"), i);
|
||||||
FindTextPanePair(x1c_loadedFrame, name).SetPairText(x20_loadedPauseStrg->GetString(16 + i));
|
FindTextPanePair(x1c_loadedFrame, name)
|
||||||
|
.SetPairText(x20_loadedPauseStrg->GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 16 : 18 + i));
|
||||||
}
|
}
|
||||||
|
|
||||||
x2c_tablegroup_double->SetVertical(false);
|
x2c_tablegroup_double->SetVertical(false);
|
||||||
|
@ -1766,7 +1828,9 @@ void CFrontEndUI::StartSlideShow(CArchitectureQueue& queue) {
|
||||||
queue.Push(MakeMsg::CreateCreateIOWin(EArchMsgTarget::IOWinManager, 12, 11, std::make_shared<CSlideShow>()));
|
queue.Push(MakeMsg::CreateCreateIOWin(EArchMsgTarget::IOWinManager, 12, 11, std::make_shared<CSlideShow>()));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CFrontEndUI::GetAttractMovieFileName(int idx) { return fmt::format(FMT_STRING("Video/attract{}.thp"), idx); }
|
std::string CFrontEndUI::GetAttractMovieFileName(int idx) {
|
||||||
|
return fmt::format(FMT_STRING("Video/attract{}.thp"), idx);
|
||||||
|
}
|
||||||
|
|
||||||
std::string CFrontEndUI::GetNextAttractMovieFileName() {
|
std::string CFrontEndUI::GetNextAttractMovieFileName() {
|
||||||
std::string ret = GetAttractMovieFileName(xbc_nextAttract);
|
std::string ret = GetAttractMovieFileName(xbc_nextAttract);
|
||||||
|
@ -2091,10 +2155,8 @@ void CFrontEndUI::ProcessUserInput(const CFinalInput& input, CArchitectureQueue&
|
||||||
|
|
||||||
if (x50_curScreen != x54_nextScreen) {
|
if (x50_curScreen != x54_nextScreen) {
|
||||||
if (x54_nextScreen == EScreen::AttractMovie &&
|
if (x54_nextScreen == EScreen::AttractMovie &&
|
||||||
(input.PStart() || input.PA() ||
|
(input.PStart() || input.PA() || input.PSpecialKey(boo::ESpecialKey::Esc) ||
|
||||||
input.PSpecialKey(boo::ESpecialKey::Esc) ||
|
input.PSpecialKey(boo::ESpecialKey::Enter) || input.PMouseButton(boo::EMouseButton::Primary) ||
|
||||||
input.PSpecialKey(boo::ESpecialKey::Enter) ||
|
|
||||||
input.PMouseButton(boo::EMouseButton::Primary) ||
|
|
||||||
touchBarAction == CFrontEndUITouchBar::EAction::Start)) {
|
touchBarAction == CFrontEndUITouchBar::EAction::Start)) {
|
||||||
/* Player wants to return to opening credits from attract movie */
|
/* Player wants to return to opening credits from attract movie */
|
||||||
SetFadeBlackTimer(std::min(1.f, x58_fadeBlackTimer));
|
SetFadeBlackTimer(std::min(1.f, x58_fadeBlackTimer));
|
||||||
|
@ -2102,10 +2164,8 @@ void CFrontEndUI::ProcessUserInput(const CFinalInput& input, CArchitectureQueue&
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (input.PA() || input.PStart() ||
|
if (input.PA() || input.PStart() || input.PSpecialKey(boo::ESpecialKey::Esc) ||
|
||||||
input.PSpecialKey(boo::ESpecialKey::Esc) ||
|
input.PSpecialKey(boo::ESpecialKey::Enter) || input.PMouseButton(boo::EMouseButton::Primary) ||
|
||||||
input.PSpecialKey(boo::ESpecialKey::Enter) ||
|
|
||||||
input.PMouseButton(boo::EMouseButton::Primary) ||
|
|
||||||
touchBarAction == CFrontEndUITouchBar::EAction::Start) {
|
touchBarAction == CFrontEndUITouchBar::EAction::Start) {
|
||||||
if (x50_curScreen == EScreen::OpenCredits && x54_nextScreen == EScreen::Title && x58_fadeBlackTimer > 1.f) {
|
if (x50_curScreen == EScreen::OpenCredits && x54_nextScreen == EScreen::Title && x58_fadeBlackTimer > 1.f) {
|
||||||
/* Player is too impatient to view opening credits */
|
/* Player is too impatient to view opening credits */
|
||||||
|
@ -2116,10 +2176,8 @@ void CFrontEndUI::ProcessUserInput(const CFinalInput& input, CArchitectureQueue&
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (x50_curScreen == EScreen::Title) {
|
if (x50_curScreen == EScreen::Title) {
|
||||||
if (input.PStart() || input.PA() ||
|
if (input.PStart() || input.PA() || input.PSpecialKey(boo::ESpecialKey::Esc) ||
|
||||||
input.PSpecialKey(boo::ESpecialKey::Esc) ||
|
input.PSpecialKey(boo::ESpecialKey::Enter) || input.PMouseButton(boo::EMouseButton::Primary) ||
|
||||||
input.PSpecialKey(boo::ESpecialKey::Enter) ||
|
|
||||||
input.PMouseButton(boo::EMouseButton::Primary) ||
|
|
||||||
touchBarAction == CFrontEndUITouchBar::EAction::Start) {
|
touchBarAction == CFrontEndUITouchBar::EAction::Start) {
|
||||||
if (x58_fadeBlackTimer < 30.f - g_tweakGame->GetPressStartDelay()) {
|
if (x58_fadeBlackTimer < 30.f - g_tweakGame->GetPressStartDelay()) {
|
||||||
/* Proceed to file select UI */
|
/* Proceed to file select UI */
|
||||||
|
|
|
@ -286,7 +286,7 @@ bool CInventoryScreen::HasLeftInventoryItem(int idx) const {
|
||||||
void CInventoryScreen::VActivate() {
|
void CInventoryScreen::VActivate() {
|
||||||
for (int i = 0; i < 5; ++i) {
|
for (int i = 0; i < 5; ++i) {
|
||||||
if (HasLeftInventoryItem(i)) {
|
if (HasLeftInventoryItem(i)) {
|
||||||
if (g_Main->IsUSA()) {
|
if (g_Main->IsUSA() && !g_Main->IsTrilogy()) {
|
||||||
xa8_textpane_categories[i]->TextSupport().SetText(xc_pauseStrg.GetString(i + 10));
|
xa8_textpane_categories[i]->TextSupport().SetText(xc_pauseStrg.GetString(i + 10));
|
||||||
} else {
|
} else {
|
||||||
xa8_textpane_categories[i]->TextSupport().SetText(xc_pauseStrg.GetString(i + 12));
|
xa8_textpane_categories[i]->TextSupport().SetText(xc_pauseStrg.GetString(i + 12));
|
||||||
|
@ -297,7 +297,7 @@ void CInventoryScreen::VActivate() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_Main->IsUSA()) {
|
if (g_Main->IsUSA() && !g_Main->IsTrilogy()) {
|
||||||
x178_textpane_title->TextSupport().SetText(xc_pauseStrg.GetString(9));
|
x178_textpane_title->TextSupport().SetText(xc_pauseStrg.GetString(9));
|
||||||
} else {
|
} else {
|
||||||
x178_textpane_title->TextSupport().SetText(xc_pauseStrg.GetString(11));
|
x178_textpane_title->TextSupport().SetText(xc_pauseStrg.GetString(11));
|
||||||
|
@ -311,12 +311,12 @@ void CInventoryScreen::UpdateTextBody() {
|
||||||
x1ac_textLeaveRequested = false;
|
x1ac_textLeaveRequested = false;
|
||||||
|
|
||||||
const SInventoryItem& sel = InventoryRegistry[x70_tablegroup_leftlog->GetUserSelection()].second[x1c_rightSel];
|
const SInventoryItem& sel = InventoryRegistry[x70_tablegroup_leftlog->GetUserSelection()].second[x1c_rightSel];
|
||||||
std::u16string entryText = xc_pauseStrg.GetString(g_Main->IsUSA() ? sel.entryStrIdx : sel.entryStrIdx + 3);
|
std::u16string entryText = xc_pauseStrg.GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? sel.entryStrIdx : sel.entryStrIdx + 3);
|
||||||
|
|
||||||
if (sel.idx == 23) // Beam combo
|
if (sel.idx == 23) // Beam combo
|
||||||
{
|
{
|
||||||
CPlayerState& playerState = *x4_mgr.GetPlayerState();
|
CPlayerState& playerState = *x4_mgr.GetPlayerState();
|
||||||
if (g_Main->IsUSA()) {
|
if (g_Main->IsUSA() && !g_Main->IsTrilogy()) {
|
||||||
entryText += xc_pauseStrg.GetString(playerState.HasPowerUp(CPlayerState::EItemType::SuperMissile) ? 71 : 65);
|
entryText += xc_pauseStrg.GetString(playerState.HasPowerUp(CPlayerState::EItemType::SuperMissile) ? 71 : 65);
|
||||||
entryText += xc_pauseStrg.GetString(playerState.HasPowerUp(CPlayerState::EItemType::IceSpreader) ? 73 : 65);
|
entryText += xc_pauseStrg.GetString(playerState.HasPowerUp(CPlayerState::EItemType::IceSpreader) ? 73 : 65);
|
||||||
entryText += xc_pauseStrg.GetString(playerState.HasPowerUp(CPlayerState::EItemType::Wavebuster) ? 75 : 65);
|
entryText += xc_pauseStrg.GetString(playerState.HasPowerUp(CPlayerState::EItemType::Wavebuster) ? 75 : 65);
|
||||||
|
@ -467,7 +467,7 @@ void CInventoryScreen::UpdateRightTable() {
|
||||||
CGuiTextPane* title = xd8_textpane_titles[i];
|
CGuiTextPane* title = xd8_textpane_titles[i];
|
||||||
if (i < int(size)) {
|
if (i < int(size)) {
|
||||||
if (HasRightInventoryItem(data[i].idx)) {
|
if (HasRightInventoryItem(data[i].idx)) {
|
||||||
title->TextSupport().SetText(xc_pauseStrg.GetString(g_Main->IsUSA() ? data[i].nameStrIdx : data[i].nameStrIdx + 3));
|
title->TextSupport().SetText(xc_pauseStrg.GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? data[i].nameStrIdx : data[i].nameStrIdx + 3));
|
||||||
x84_tablegroup_rightlog->GetWorkerWidget(i + 1)->SetIsSelectable(true);
|
x84_tablegroup_rightlog->GetWorkerWidget(i + 1)->SetIsSelectable(true);
|
||||||
if (i < minSel)
|
if (i < minSel)
|
||||||
minSel = i;
|
minSel = i;
|
||||||
|
|
|
@ -200,10 +200,11 @@ void CLogBookScreen::UpdateBodyText() {
|
||||||
if (IsArtifactCategorySelected()) {
|
if (IsArtifactCategorySelected()) {
|
||||||
const int headIdx = GetSelectedArtifactHeadScanIndex();
|
const int headIdx = GetSelectedArtifactHeadScanIndex();
|
||||||
if (headIdx >= 0 && g_GameState->GetPlayerState()->HasPowerUp(CPlayerState::EItemType(headIdx + 29))) {
|
if (headIdx >= 0 && g_GameState->GetPlayerState()->HasPowerUp(CPlayerState::EItemType(headIdx + 29))) {
|
||||||
if (g_Main->IsUSA())
|
if (g_Main->IsUSA() && !g_Main->IsTrilogy()) {
|
||||||
accumStr = std::u16string(u"\n\n\n\n\n\n").append(g_MainStringTable->GetString(105));
|
accumStr = std::u16string(u"\n\n\n\n\n\n").append(g_MainStringTable->GetString(105));
|
||||||
else
|
} else {
|
||||||
accumStr = std::u16string(u"\n\n\n\n\n\n").append(g_MainStringTable->GetString(107));
|
accumStr = std::u16string(u"\n\n\n\n\n\n").append(g_MainStringTable->GetString(107));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -179,14 +179,15 @@ bool COptionsScreen::VReady() const { return true; }
|
||||||
|
|
||||||
void COptionsScreen::VActivate() {
|
void COptionsScreen::VActivate() {
|
||||||
for (int i = 0; i < 5; ++i) {
|
for (int i = 0; i < 5; ++i) {
|
||||||
if (g_Main->IsUSA()) {
|
if (g_Main->IsUSA() && !g_Main->IsTrilogy()) {
|
||||||
xa8_textpane_categories[i]->TextSupport().SetText(xc_pauseStrg.GetString(i + 16));
|
xa8_textpane_categories[i]->TextSupport().SetText(xc_pauseStrg.GetString(i + 16));
|
||||||
} else {
|
} else {
|
||||||
xa8_textpane_categories[i]->TextSupport().SetText(xc_pauseStrg.GetString(i + 18));
|
xa8_textpane_categories[i]->TextSupport().SetText(xc_pauseStrg.GetString(i + 18));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
x178_textpane_title->TextSupport().SetText(xc_pauseStrg.GetString(g_Main->IsUSA() ? 15 : 17));
|
x178_textpane_title->TextSupport().SetText(
|
||||||
|
xc_pauseStrg.GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 15 : 17));
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
for (int i=5 ; i<5 ; ++i)
|
for (int i=5 ; i<5 ; ++i)
|
||||||
|
@ -196,7 +197,7 @@ void COptionsScreen::VActivate() {
|
||||||
x174_textpane_body->TextSupport().SetJustification(EJustification::Center);
|
x174_textpane_body->TextSupport().SetJustification(EJustification::Center);
|
||||||
x174_textpane_body->TextSupport().SetVerticalJustification(EVerticalJustification::Bottom);
|
x174_textpane_body->TextSupport().SetVerticalJustification(EVerticalJustification::Bottom);
|
||||||
|
|
||||||
int stringOffset = g_Main->IsUSA() ? 0 : 3;
|
int stringOffset = (g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 0 : 3;
|
||||||
static_cast<CGuiTextPane*>(x190_tablegroup_double->GetWorkerWidget(0))
|
static_cast<CGuiTextPane*>(x190_tablegroup_double->GetWorkerWidget(0))
|
||||||
->TextSupport()
|
->TextSupport()
|
||||||
.SetText(xc_pauseStrg.GetString(95 + stringOffset));
|
.SetText(xc_pauseStrg.GetString(95 + stringOffset));
|
||||||
|
@ -237,8 +238,8 @@ void COptionsScreen::ChangedMode(EMode oldMode) {
|
||||||
void COptionsScreen::UpdateRightTable() {
|
void COptionsScreen::UpdateRightTable() {
|
||||||
CPauseScreenBase::UpdateRightTable();
|
CPauseScreenBase::UpdateRightTable();
|
||||||
const std::pair<int, const SGameOption*>& category =
|
const std::pair<int, const SGameOption*>& category =
|
||||||
g_Main->IsUSA() ? GameOptionsRegistry[x70_tablegroup_leftlog->GetUserSelection()]
|
(g_Main->IsUSA() && !g_Main->IsTrilogy()) ? GameOptionsRegistry[x70_tablegroup_leftlog->GetUserSelection()]
|
||||||
: GameOptionsRegistryNew[x70_tablegroup_leftlog->GetUserSelection()];
|
: GameOptionsRegistryNew[x70_tablegroup_leftlog->GetUserSelection()];
|
||||||
for (int i = 0; i < 5; ++i) {
|
for (int i = 0; i < 5; ++i) {
|
||||||
if (i < category.first) {
|
if (i < category.first) {
|
||||||
xd8_textpane_titles[i]->TextSupport().SetText(xc_pauseStrg.GetString(category.second[i].stringId));
|
xd8_textpane_titles[i]->TextSupport().SetText(xc_pauseStrg.GetString(category.second[i].stringId));
|
||||||
|
|
|
@ -81,7 +81,7 @@ void CPauseScreenBase::InitializeFrameGlue() {
|
||||||
x184_textpane_yicon = static_cast<CGuiTextPane*>(x8_frame.FindWidget("textpane_yicon"));
|
x184_textpane_yicon = static_cast<CGuiTextPane*>(x8_frame.FindWidget("textpane_yicon"));
|
||||||
x188_textpane_ytext = static_cast<CGuiTextPane*>(x8_frame.FindWidget("textpane_ytext"));
|
x188_textpane_ytext = static_cast<CGuiTextPane*>(x8_frame.FindWidget("textpane_ytext"));
|
||||||
x184_textpane_yicon->TextSupport().SetText(fmt::format(FMT_STRING(u"&image={};"), g_tweakPlayerRes->xbc_yButton[0]));
|
x184_textpane_yicon->TextSupport().SetText(fmt::format(FMT_STRING(u"&image={};"), g_tweakPlayerRes->xbc_yButton[0]));
|
||||||
x188_textpane_ytext->TextSupport().SetText(xc_pauseStrg.GetString(g_Main->IsUSA() ? 99 : 102));
|
x188_textpane_ytext->TextSupport().SetText(xc_pauseStrg.GetString((g_Main->IsUSA() && !g_Main->IsTrilogy()) ? 99 : 102));
|
||||||
x188_textpane_ytext->SetColor(g_tweakGuiColors->GetPauseItemAmberColor());
|
x188_textpane_ytext->SetColor(g_tweakGuiColors->GetPauseItemAmberColor());
|
||||||
x18c_slidergroup_slider = static_cast<CGuiSliderGroup*>(x8_frame.FindWidget("slidergroup_slider"));
|
x18c_slidergroup_slider = static_cast<CGuiSliderGroup*>(x8_frame.FindWidget("slidergroup_slider"));
|
||||||
x18c_slidergroup_slider->SetMouseActive(true);
|
x18c_slidergroup_slider->SetMouseActive(true);
|
||||||
|
|
Loading…
Reference in New Issue