mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-25 09:39:00 -05:00
support for pal 1.1 change language option (#3124)
This commit is contained in:
parent
a129371923
commit
b2ad348508
@ -19,6 +19,9 @@
|
||||
"audio_surround": "Sound - Surround",
|
||||
"target_switch": "Targeting Mode - Switch",
|
||||
"target_hold": "Targeting Mode - Hold",
|
||||
"language_english": "Language - English",
|
||||
"language_german": "Language - German",
|
||||
"language_french": "Language - French",
|
||||
"quest_sel_vanilla": "Quest - Original",
|
||||
"quest_sel_mq": "Quest - Master Quest",
|
||||
"quest_sel_randomizer": "Quest - Randomizer",
|
||||
|
@ -19,6 +19,9 @@
|
||||
"audio_surround": "Son - Surround",
|
||||
"target_switch": "Visée - Fixe",
|
||||
"target_hold": "Visée - Maintenue",
|
||||
"language_english": "Langue - Anglaise",
|
||||
"language_german": "Langue - Allemande",
|
||||
"language_french": "Langue - Français",
|
||||
"quest_sel_vanilla": "Quête - Originale",
|
||||
"quest_sel_mq": "Quête - Master Quest",
|
||||
"quest_sel_randomizer": "Quête - Randomizer",
|
||||
|
@ -19,6 +19,9 @@
|
||||
"audio_surround": "Sound - Surround",
|
||||
"target_switch": "Zielerfassung - Einmal drücken",
|
||||
"target_hold": "Zielerfassung - Trigger halten",
|
||||
"language_english": "Sprache - Englisch",
|
||||
"language_german": "Sprache - Deutsch",
|
||||
"language_french": "Sprache - Französisch",
|
||||
"quest_sel_vanilla": "Quest - Original",
|
||||
"quest_sel_mq": "Quest - Master Quest",
|
||||
"quest_sel_randomizer": "Quest - Randomizer",
|
||||
|
@ -44,6 +44,10 @@ static const ALIGN_ASSET(2) char gTitleRandomizerSubtitleTex[] = dgTitleRandomiz
|
||||
#define dgTitleBossRushSubtitleTex "__OTR__objects/object_mag/gTitleBossRushSubtitleTex"
|
||||
static const ALIGN_ASSET(2) char gTitleBossRushSubtitleTex[] = dgTitleBossRushSubtitleTex;
|
||||
|
||||
// overlays
|
||||
#define dgOptionsDividerChangeLangVtx "__OTR__overlays/ovl_file_choose/gOptionsDividerChangeLangVtx"
|
||||
static const ALIGN_ASSET(2) char gOptionsDividerChangeLangVtx[] = dgOptionsDividerChangeLangVtx;
|
||||
|
||||
// textures
|
||||
#define dgDPad "__OTR__textures/parameter_static/gDPad"
|
||||
static const ALIGN_ASSET(2) char gDPadTex[] = dgDPad;
|
||||
@ -78,5 +82,23 @@ static const ALIGN_ASSET(2) char gFileSelBossRushSettingsGERText[] = dgFileSelBo
|
||||
#define dgFileSelRANDButtonTex "__OTR__textures/title_static/gFileSelRANDButtonTex"
|
||||
static const ALIGN_ASSET(2) char gFileSelRANDButtonTex[] = dgFileSelRANDButtonTex;
|
||||
|
||||
#define dgFileSelLangEnglishENGTex "__OTR__textures/title_static/gFileSelLangEnglishENGTex"
|
||||
static const ALIGN_ASSET(2) char gFileSelLangEnglishENGTex[] = dgFileSelLangEnglishENGTex;
|
||||
|
||||
#define dgFileSelLangDeutschGERTex "__OTR__textures/title_static/gFileSelLangDeutschGERTex"
|
||||
static const ALIGN_ASSET(2) char gFileSelLangDeutschGERTex[] = dgFileSelLangDeutschGERTex;
|
||||
|
||||
#define dgFileSelLangFrancaisFRATex "__OTR__textures/title_static/gFileSelLangFrancaisFRATex"
|
||||
static const ALIGN_ASSET(2) char gFileSelLangFrancaisFRATex[] = dgFileSelLangFrancaisFRATex;
|
||||
|
||||
#define dgFileSelLanguageENGTex "__OTR__textures/title_static/gFileSelLanguageENGTex"
|
||||
static const ALIGN_ASSET(2) char gFileSelLanguageENGTex[] = dgFileSelLanguageENGTex;
|
||||
|
||||
#define dgFileSelLanguageFRATex "__OTR__textures/title_static/gFileSelLanguageFRATex"
|
||||
static const ALIGN_ASSET(2) char gFileSelLanguageFRATex[] = dgFileSelLanguageFRATex;
|
||||
|
||||
#define dgFileSelLanguageGERTex "__OTR__textures/title_static/gFileSelLanguageGERTex"
|
||||
static const ALIGN_ASSET(2) char gFileSelLanguageGERTex[] = dgFileSelLanguageGERTex;
|
||||
|
||||
#define dgEmptyTexture "__OTR__textures/virtual/gEmptyTexture"
|
||||
static const ALIGN_ASSET(2) char gEmptyTexture[] = dgEmptyTexture;
|
||||
|
@ -3,18 +3,16 @@
|
||||
<Array Name="D_80811BB0" Count="24" Offset="0xF120" Static="Off">
|
||||
<Vtx/>
|
||||
</Array>
|
||||
<!-- German vertices are combined into one array -->
|
||||
<!-- German headers vertices are combined into one array -->
|
||||
<Array Name="D_80811D30" Count="24" Offset="0xF2A0" Static="Off">
|
||||
<Vtx/>
|
||||
</Array>
|
||||
<!-- <Array Name="D_80811E30" Count="16" Offset="0xF3A0" Static="Off">
|
||||
<Vtx/>
|
||||
</Array> -->
|
||||
<!-- German vertices are combined into one array -->
|
||||
<Array Name="D_80811F30" Count="40" Offset="0xF420" Static="Off">
|
||||
<!-- German options vertices are combined into one array -->
|
||||
<Array Name="D_80811F30" Count="52" Offset="0xF420" Static="Off">
|
||||
<Vtx/>
|
||||
</Array>
|
||||
<!-- <Array Name="D_80812130" Count="32" Offset="0xF6A0" Static="Off">
|
||||
<!-- Not used for PAL N64, instead these vertices are apart of D_80811F30 -->
|
||||
<!-- <Array Name="D_80812130" Count="12" Offset="0xF6A0" Static="Off">
|
||||
<Vtx/>
|
||||
</Array> -->
|
||||
<Array Name="gOptionsDividerTopVtx" Count="4" Offset="0xF8A0" Static="Off">
|
||||
@ -26,6 +24,9 @@
|
||||
<Array Name="gOptionsDividerBottomVtx" Count="4" Offset="0xF920" Static="Off">
|
||||
<Vtx/>
|
||||
</Array>
|
||||
<!-- OTRTODO: Vertices for Choose Language header, options, and divider -->
|
||||
<!-- PAL N64 only -->
|
||||
<Array Name="gOptionsDividerChangeLangVtx" Count="4" Offset="0xF960" Static="Off">
|
||||
<Vtx/>
|
||||
</Array>
|
||||
</File>
|
||||
</Root>
|
||||
|
@ -185,6 +185,28 @@
|
||||
<Texture Name="gFileSelOptionsButtonENGTex" OutName="options_button_eng" Format="ia16" Width="64" Height="16" Offset="0x2FA00"/>
|
||||
<Texture Name="gFileSelOptionsButtonGERTex" OutName="options_button_ger" Format="ia16" Width="64" Height="16" Offset="0x30200"/>
|
||||
|
||||
<!-- PAL N64 Language change options -->
|
||||
<Texture Name="gFileSelLangEnglishENGTex" OutName="language_english_eng" Format="ia8" Width="48" Height="16" Offset="0x6380"/>
|
||||
<Texture Name="gFileSelLangDeutschGERTex" OutName="language_deutsch_ger" Format="ia8" Width="48" Height="16" Offset="0x6680"/>
|
||||
<Texture Name="gFileSelLangFrancaisFRATex" OutName="language_francais_fra" Format="ia8" Width="48" Height="16" Offset="0x6980"/>
|
||||
|
||||
<Texture Name="gFileSelLanguageENGTex" OutName="language_eng" Format="ia8" Width="64" Height="16" Offset="0x6C80"/>
|
||||
<Texture Name="gFileSelLanguageGERTex" OutName="language_ger" Format="ia8" Width="64" Height="16" Offset="0x7080"/>
|
||||
<Texture Name="gFileSelLanguageFRATex" OutName="language_fra" Format="ia8" Width="64" Height="16" Offset="0x7480"/>
|
||||
|
||||
<!-- Unused language textures? -->
|
||||
<Texture Name="gFileSelLangEnglishLargeENGTex" OutName="language_english_large_eng" Format="ia8" Width="80" Height="32" Offset="0x48300"/>
|
||||
<Texture Name="gFileSelLangDeutschLargeGERTex" OutName="language_deutsch_large_ger" Format="ia8" Width="80" Height="32" Offset="0x48D00"/>
|
||||
<Texture Name="gFileSelLangFrancaisLargeFRATex" OutName="language_francias_large_fra" Format="ia8" Width="80" Height="32" Offset="0x49700"/>
|
||||
|
||||
<!-- Unused language textures? -->
|
||||
<Texture Name="gFileSelSelectYourLanguageENGTex" OutName="select_your_language_eng" Format="ia8" Width="160" Height="20" Offset="0x4A1A0"/>
|
||||
<Texture Name="gFileSelSelectYourLanguageGERTex" OutName="select_your_language_ger" Format="ia8" Width="160" Height="20" Offset="0x4AE20"/>
|
||||
<Texture Name="gFileSelSelectYourLanguageFRATex" OutName="select_your_language_fra" Format="ia8" Width="160" Height="20" Offset="0x4BAA0"/>
|
||||
|
||||
<!-- An elongated oval is in this range, but probably unused -->
|
||||
<Texture Name="gFileSelUnkOvalTex" OutName="unknown_oval" Format="ia8" Width="24" Height="68" Offset="0x4C720"/>
|
||||
|
||||
<DList Name="gFileSelWindow1DL" Offset="0x4CD80"/>
|
||||
<DList Name="gFileSelWindow2DL" Offset="0x4CF98"/>
|
||||
<DList Name="gFileSelWindow3DL" Offset="0x4D1A8"/>
|
||||
|
@ -175,6 +175,7 @@ public:
|
||||
DEFINE_HOOK(OnUpdateFileEraseConfirmationSelection, void(uint16_t optionIndex));
|
||||
DEFINE_HOOK(OnUpdateFileAudioSelection, void(uint8_t optionIndex));
|
||||
DEFINE_HOOK(OnUpdateFileTargetSelection, void(uint8_t optionIndex));
|
||||
DEFINE_HOOK(OnUpdateFileLanguageSelection, void(uint8_t optionIndex));
|
||||
DEFINE_HOOK(OnUpdateFileQuestSelection, void(uint8_t questIndex));
|
||||
DEFINE_HOOK(OnUpdateFileBossRushOptionSelection, void(uint8_t optionIndex, uint8_t optionValue));
|
||||
DEFINE_HOOK(OnUpdateFileNameSelection, void(int16_t charCode));
|
||||
|
@ -132,6 +132,10 @@ void GameInteractor_ExecuteOnUpdateFileTargetSelection(uint8_t optionIndex) {
|
||||
GameInteractor::Instance->ExecuteHooks<GameInteractor::OnUpdateFileTargetSelection>(optionIndex);
|
||||
}
|
||||
|
||||
void GameInteractor_ExecuteOnUpdateFileLanguageSelection(uint8_t optionIndex) {
|
||||
GameInteractor::Instance->ExecuteHooks<GameInteractor::OnUpdateFileLanguageSelection>(optionIndex);
|
||||
}
|
||||
|
||||
void GameInteractor_ExecuteOnUpdateFileQuestSelection(uint8_t questIndex) {
|
||||
GameInteractor::Instance->ExecuteHooks<GameInteractor::OnUpdateFileQuestSelection>(questIndex);
|
||||
}
|
||||
|
@ -42,6 +42,7 @@ void GameInteractor_ExecuteOnUpdateFileEraseSelection(uint16_t optionIndex);
|
||||
void GameInteractor_ExecuteOnUpdateFileEraseConfirmationSelection(uint16_t optionIndex);
|
||||
void GameInteractor_ExecuteOnUpdateFileAudioSelection(uint8_t optionIndex);
|
||||
void GameInteractor_ExecuteOnUpdateFileTargetSelection(uint8_t optionIndex);
|
||||
void GameInteractor_ExecuteOnUpdateFileLanguageSelection(uint8_t optionIndex);
|
||||
void GameInteractor_ExecuteOnUpdateFileQuestSelection(uint8_t questIndex);
|
||||
void GameInteractor_ExecuteOnUpdateFileBossRushOptionSelection(uint8_t optionIndex, uint8_t optionValue);
|
||||
void GameInteractor_ExecuteOnUpdateFileNameSelection(int16_t charCode);
|
||||
|
@ -674,7 +674,7 @@ void RegisterOnUpdateMainMenuSelection() {
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnUpdateFileTargetSelection>([](uint8_t optionIndex) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
|
||||
@ -694,6 +694,30 @@ void RegisterOnUpdateMainMenuSelection() {
|
||||
}
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnUpdateFileLanguageSelection>([](uint8_t optionIndex) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
|
||||
switch (optionIndex) {
|
||||
case LANGUAGE_ENG: {
|
||||
auto translation = GetParameritizedText("language_english", TEXT_BANK_FILECHOOSE, nullptr);
|
||||
SpeechSynthesizer::Instance->Speak(translation.c_str(), GetLanguageCode());
|
||||
break;
|
||||
}
|
||||
case LANGUAGE_GER: {
|
||||
auto translation = GetParameritizedText("language_german", TEXT_BANK_FILECHOOSE, nullptr);
|
||||
SpeechSynthesizer::Instance->Speak(translation.c_str(), GetLanguageCode());
|
||||
break;
|
||||
}
|
||||
case LANGUAGE_FRA: {
|
||||
auto translation = GetParameritizedText("language_french", TEXT_BANK_FILECHOOSE, nullptr);
|
||||
SpeechSynthesizer::Instance->Speak(translation.c_str(), GetLanguageCode());
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnUpdateFileQuestSelection>([](uint8_t questIndex) {
|
||||
if (!CVarGetInteger("gA11yTTS", 0)) return;
|
||||
|
||||
|
@ -142,7 +142,8 @@ typedef enum {
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ FS_SETTING_AUDIO,
|
||||
/* 1 */ FS_SETTING_TARGET
|
||||
/* 1 */ FS_SETTING_TARGET,
|
||||
/* 2 */ FS_SETTING_LANGUAGE, // PAL N64 only
|
||||
} SettingIndex;
|
||||
|
||||
typedef enum {
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "file_choose.h"
|
||||
#include "textures/title_static/title_static.h"
|
||||
#include "assets/overlays/ovl_File_Choose/ovl_file_choose.h"
|
||||
#include "assets/soh_assets.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||
|
||||
|
||||
@ -702,6 +703,11 @@ void FileChoose_UpdateOptionsMenu(GameState* thisx) {
|
||||
return;
|
||||
}
|
||||
|
||||
uint8_t languageChanged = 0;
|
||||
uint8_t versionIndex = ResourceMgr_GameHasMasterQuest() && ResourceMgr_GameHasOriginal();
|
||||
uint8_t isPalN64 = ResourceMgr_GetGameRegion(versionIndex) == GAME_REGION_PAL &&
|
||||
ResourceMgr_GetGamePlatform(versionIndex) == GAME_PLATFORM_N64;
|
||||
|
||||
if ((this->stickRelX < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
|
||||
@ -712,6 +718,14 @@ void FileChoose_UpdateOptionsMenu(GameState* thisx) {
|
||||
if (gSaveContext.audioSetting > 0xF0) {
|
||||
gSaveContext.audioSetting = FS_AUDIO_SURROUND;
|
||||
}
|
||||
} else if (sSelectedSetting == FS_SETTING_LANGUAGE) {
|
||||
gSaveContext.language--;
|
||||
|
||||
if (gSaveContext.language > 0xF0) {
|
||||
gSaveContext.language = LANGUAGE_FRA;
|
||||
}
|
||||
|
||||
languageChanged = 1;
|
||||
} else {
|
||||
gSaveContext.zTargetSetting ^= 1;
|
||||
}
|
||||
@ -724,29 +738,75 @@ void FileChoose_UpdateOptionsMenu(GameState* thisx) {
|
||||
if (gSaveContext.audioSetting > FS_AUDIO_SURROUND) {
|
||||
gSaveContext.audioSetting = FS_AUDIO_STEREO;
|
||||
}
|
||||
} else if (sSelectedSetting == FS_SETTING_LANGUAGE) {
|
||||
gSaveContext.language++;
|
||||
|
||||
if (gSaveContext.language > LANGUAGE_FRA) {
|
||||
gSaveContext.language = LANGUAGE_ENG;
|
||||
}
|
||||
|
||||
languageChanged = 1;
|
||||
} else {
|
||||
gSaveContext.zTargetSetting ^= 1;
|
||||
}
|
||||
}
|
||||
|
||||
if ((ABS(this->stickRelY) > 30) || (dpad && CHECK_BTN_ANY(input->press.button, BTN_DDOWN | BTN_DUP))) {
|
||||
// Persist the new language so it is not overridden on the next frame
|
||||
if (languageChanged) {
|
||||
CVarSetInteger("gLanguages", gSaveContext.language);
|
||||
GameInteractor_ExecuteOnSetGameLanguage();
|
||||
}
|
||||
|
||||
// NTSC and GC only has two rows and can just flip the setting bit
|
||||
// Otherwise for PAL 64, handle the additional change language setting
|
||||
if (!isPalN64 && ((ABS(this->stickRelY) > 30) || (dpad && CHECK_BTN_ANY(input->press.button, BTN_DDOWN | BTN_DUP)))) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
sSelectedSetting ^= 1;
|
||||
} else if (isPalN64 && ((this->stickRelY > 30) || (dpad && CHECK_BTN_ANY(input->press.button, BTN_DUP)))) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
sSelectedSetting--;
|
||||
|
||||
if (sSelectedSetting > 0xF0) {
|
||||
sSelectedSetting = FS_SETTING_LANGUAGE;
|
||||
}
|
||||
} else if (isPalN64 && ((this->stickRelY < -30) || (dpad && CHECK_BTN_ANY(input->press.button, BTN_DDOWN)))) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
sSelectedSetting++;
|
||||
|
||||
if (sSelectedSetting > FS_SETTING_LANGUAGE) {
|
||||
sSelectedSetting = FS_SETTING_AUDIO;
|
||||
}
|
||||
} else if (CHECK_BTN_ALL(input->press.button, BTN_A)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
sSelectedSetting ^= 1;
|
||||
if (isPalN64) {
|
||||
sSelectedSetting++;
|
||||
|
||||
if (sSelectedSetting > FS_SETTING_LANGUAGE) {
|
||||
sSelectedSetting = FS_SETTING_AUDIO;
|
||||
}
|
||||
} else {
|
||||
sSelectedSetting ^= 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (sSelectedSetting == FS_SETTING_AUDIO) {
|
||||
if (sLastOptionButtonIndex != gSaveContext.audioSetting) {
|
||||
GameInteractor_ExecuteOnUpdateFileAudioSelection(gSaveContext.audioSetting);
|
||||
sLastOptionButtonIndex = gSaveContext.audioSetting;
|
||||
}
|
||||
} else if (sSelectedSetting == FS_SETTING_TARGET) {
|
||||
// offset to detect switching between modes
|
||||
u8 optionOffset = gSaveContext.zTargetSetting + FS_AUDIO_SURROUND + FS_SETTING_TARGET;
|
||||
if (sLastOptionButtonIndex != optionOffset) {
|
||||
GameInteractor_ExecuteOnUpdateFileTargetSelection(gSaveContext.zTargetSetting);
|
||||
sLastOptionButtonIndex = optionOffset;
|
||||
}
|
||||
} else {
|
||||
// offset to detect switching between modes
|
||||
if (sLastOptionButtonIndex != FS_BTN_SELECT_QUIT + gSaveContext.zTargetSetting + 1) {
|
||||
GameInteractor_ExecuteOnUpdateFileTargetSelection(gSaveContext.zTargetSetting);
|
||||
sLastOptionButtonIndex = FS_BTN_SELECT_QUIT + gSaveContext.zTargetSetting + 1;
|
||||
u8 optionOffset = gSaveContext.language + FS_AUDIO_SURROUND + FS_TARGET_HOLD + FS_SETTING_LANGUAGE;
|
||||
if (sLastOptionButtonIndex != optionOffset) {
|
||||
GameInteractor_ExecuteOnUpdateFileLanguageSelection(gSaveContext.language);
|
||||
sLastOptionButtonIndex = optionOffset;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -778,6 +838,11 @@ static OptionsMenuTextureInfo gOptionsMenuHeaders[] = {
|
||||
{ 128, 128, 128 },
|
||||
16,
|
||||
},
|
||||
{
|
||||
{ gFileSelLanguageENGTex, gFileSelLanguageGERTex, gFileSelLanguageFRATex },
|
||||
{ 64, 64, 64 },
|
||||
16,
|
||||
},
|
||||
};
|
||||
|
||||
static OptionsMenuTextureInfo gOptionsMenuSettings[] = {
|
||||
@ -811,6 +876,21 @@ static OptionsMenuTextureInfo gOptionsMenuSettings[] = {
|
||||
{ 48, 80, 48 },
|
||||
16,
|
||||
},
|
||||
{
|
||||
{ gFileSelLangEnglishENGTex, gFileSelLangEnglishENGTex, gFileSelLangEnglishENGTex },
|
||||
{ 48, 48, 48 },
|
||||
16,
|
||||
},
|
||||
{
|
||||
{ gFileSelLangDeutschGERTex, gFileSelLangDeutschGERTex, gFileSelLangDeutschGERTex },
|
||||
{ 48, 48, 48 },
|
||||
16,
|
||||
},
|
||||
{
|
||||
{ gFileSelLangFrancaisFRATex, gFileSelLangFrancaisFRATex, gFileSelLangFrancaisFRATex },
|
||||
{ 48, 48, 48 },
|
||||
16,
|
||||
},
|
||||
};
|
||||
|
||||
void FileChoose_DrawOptionsImpl(GameState* thisx) {
|
||||
@ -943,12 +1023,22 @@ void FileChoose_DrawOptionsImpl(GameState* thisx) {
|
||||
}
|
||||
}
|
||||
|
||||
// Draw the change language header
|
||||
if (isPalN64) {
|
||||
gDPLoadTextureBlock(POLY_OPA_DISP++, gOptionsMenuHeaders[i].texture[gSaveContext.language], G_IM_FMT_IA,
|
||||
G_IM_SIZ_8b, gOptionsMenuHeaders[i].width[gSaveContext.language],
|
||||
gOptionsMenuHeaders[i].height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
||||
gSP1Quadrangle(POLY_OPA_DISP++, vtx, vtx + 2, vtx + 3, vtx + 1, 0);
|
||||
}
|
||||
|
||||
if (gSaveContext.language == LANGUAGE_GER && isPalGC) {
|
||||
gSPVertex(POLY_OPA_DISP++, D_80812130, 32, 0);
|
||||
} else {
|
||||
// PAL N64 has extra german vertices combined in the regular array instead of a dedicated array
|
||||
if (isPalN64) {
|
||||
gSPVertex(POLY_OPA_DISP++, D_80811F30, 40, 0);
|
||||
gSPVertex(POLY_OPA_DISP++, D_80811F30, 52, 0);
|
||||
} else {
|
||||
gSPVertex(POLY_OPA_DISP++, D_80811F30, 32, 0);
|
||||
}
|
||||
@ -981,7 +1071,7 @@ void FileChoose_DrawOptionsImpl(GameState* thisx) {
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
|
||||
if (i == (gSaveContext.zTargetSetting + 4)) {
|
||||
if (sSelectedSetting != FS_SETTING_AUDIO) {
|
||||
if (sSelectedSetting == FS_SETTING_TARGET) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, cursorPrimRed, cursorPrimGreen, cursorPrimBlue,
|
||||
this->titleAlpha[0]);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, cursorEnvRed, cursorEnvGreen, cursorEnvBlue, 0xFF);
|
||||
@ -998,7 +1088,7 @@ void FileChoose_DrawOptionsImpl(GameState* thisx) {
|
||||
G_IM_SIZ_8b, gOptionsMenuSettings[i].width[gSaveContext.language],
|
||||
gOptionsMenuSettings[i].height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
// Pal N64 German vertices for z target options are offset an by 8
|
||||
// Pal N64 German vertices for z target options are offset by 8
|
||||
if (gSaveContext.language == LANGUAGE_GER && isPalN64) {
|
||||
gSP1Quadrangle(POLY_OPA_DISP++, vtx + 8, vtx + 2 + 8, vtx + 3 + 8, vtx + 1 + 8, 0);
|
||||
} else {
|
||||
@ -1030,6 +1120,33 @@ void FileChoose_DrawOptionsImpl(GameState* thisx) {
|
||||
|
||||
vtx += 4;
|
||||
|
||||
// Draw the language options
|
||||
if (isPalN64) {
|
||||
for (; i < 9; i++, vtx += 4) {
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
|
||||
if (i == (gSaveContext.language + 6)) {
|
||||
if (sSelectedSetting == FS_SETTING_LANGUAGE) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, cursorPrimRed, cursorPrimGreen, cursorPrimBlue,
|
||||
this->titleAlpha[0]);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, cursorEnvRed, cursorEnvGreen, cursorEnvBlue, 0xFF);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, this->titleAlpha[0]);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
|
||||
}
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 120, 120, 120, this->titleAlpha[0]);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
|
||||
}
|
||||
|
||||
gDPLoadTextureBlock(POLY_OPA_DISP++, gOptionsMenuSettings[i].texture[gSaveContext.language], G_IM_FMT_IA,
|
||||
G_IM_SIZ_8b, gOptionsMenuSettings[i].width[gSaveContext.language],
|
||||
gOptionsMenuSettings[i].height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
gSP1Quadrangle(POLY_OPA_DISP++, vtx, vtx + 2, vtx + 3, vtx + 1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// blue divider lines
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 255, 255, this->titleAlpha[0]);
|
||||
@ -1064,6 +1181,17 @@ void FileChoose_DrawOptionsImpl(GameState* thisx) {
|
||||
gSP1Quadrangle(POLY_OPA_DISP++, 0, 2, 3, 1, 0);
|
||||
Matrix_Pop();
|
||||
|
||||
// Draw the divider for change language header
|
||||
if (isPalN64) {
|
||||
Matrix_Push();
|
||||
Matrix_Translate(0.0f, 0.3f, 0.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(this->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPVertex(POLY_OPA_DISP++, gOptionsDividerChangeLangVtx, 4, 0);
|
||||
gSP1Quadrangle(POLY_OPA_DISP++, 0, 2, 3, 1, 0);
|
||||
Matrix_Pop();
|
||||
}
|
||||
|
||||
CLOSE_DISPS(this->state.gfxCtx);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user