mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-12-19 14:32:19 +00:00
Added code to force the alternate game title (#1249)
This commit is contained in:
parent
7f9ce5037e
commit
8ca5f1bf53
4 changed files with 23 additions and 1 deletions
|
|
@ -53,6 +53,16 @@ void WerehogBattleMusicMidAsmHook(PPCRegister& r11)
|
||||||
r11.u8 = 3;
|
r11.u8 = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool UseAlternateTitleMidAsmHook()
|
||||||
|
{
|
||||||
|
auto isSWA = Config::Language == ELanguage::Japanese;
|
||||||
|
|
||||||
|
if (Config::UseAlternateTitle)
|
||||||
|
isSWA = !isSWA;
|
||||||
|
|
||||||
|
return isSWA;
|
||||||
|
}
|
||||||
|
|
||||||
/* Hook function that gets the game region
|
/* Hook function that gets the game region
|
||||||
and force result to zero for Japanese
|
and force result to zero for Japanese
|
||||||
to display the correct logos. */
|
to display the correct logos. */
|
||||||
|
|
|
||||||
|
|
@ -282,7 +282,12 @@ const char* GameWindow::GetTitle()
|
||||||
{
|
{
|
||||||
if (Config::UseOfficialTitleOnTitleBar)
|
if (Config::UseOfficialTitleOnTitleBar)
|
||||||
{
|
{
|
||||||
return Config::Language == ELanguage::Japanese
|
auto isSWA = Config::Language == ELanguage::Japanese;
|
||||||
|
|
||||||
|
if (Config::UseAlternateTitle)
|
||||||
|
isSWA = !isSWA;
|
||||||
|
|
||||||
|
return isSWA
|
||||||
? "SONIC WORLD ADVENTURE"
|
? "SONIC WORLD ADVENTURE"
|
||||||
: "SONIC UNLEASHED";
|
: "SONIC UNLEASHED";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,7 @@ CONFIG_DEFINE_HIDDEN("Codes", bool, HomingAttackOnJump, false);
|
||||||
CONFIG_DEFINE_HIDDEN("Codes", bool, HUDToggleKey, false);
|
CONFIG_DEFINE_HIDDEN("Codes", bool, HUDToggleKey, false);
|
||||||
CONFIG_DEFINE_HIDDEN("Codes", bool, SaveScoreAtCheckpoints, false);
|
CONFIG_DEFINE_HIDDEN("Codes", bool, SaveScoreAtCheckpoints, false);
|
||||||
CONFIG_DEFINE_HIDDEN("Codes", bool, SkipIntroLogos, false);
|
CONFIG_DEFINE_HIDDEN("Codes", bool, SkipIntroLogos, false);
|
||||||
|
CONFIG_DEFINE_HIDDEN("Codes", bool, UseAlternateTitle, false);
|
||||||
CONFIG_DEFINE_HIDDEN("Codes", bool, UseArrowsForTimeOfDayTransition, false);
|
CONFIG_DEFINE_HIDDEN("Codes", bool, UseArrowsForTimeOfDayTransition, false);
|
||||||
CONFIG_DEFINE_HIDDEN("Codes", bool, UseOfficialTitleOnTitleBar, false);
|
CONFIG_DEFINE_HIDDEN("Codes", bool, UseOfficialTitleOnTitleBar, false);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1105,3 +1105,9 @@ registers = ["r3"]
|
||||||
name = "DisableBoostFilterMidAsmHook"
|
name = "DisableBoostFilterMidAsmHook"
|
||||||
address = 0x82B48C9C
|
address = 0x82B48C9C
|
||||||
registers = ["r11"]
|
registers = ["r11"]
|
||||||
|
|
||||||
|
[[midasm_hook]]
|
||||||
|
name = "UseAlternateTitleMidAsmHook"
|
||||||
|
address = 0x82580F44
|
||||||
|
jump_address_on_true = 0x82580F48
|
||||||
|
jump_address_on_false = 0x82580FA0
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue