Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions UnleashedRecomp/patches/misc_patches.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ void WerehogBattleMusicMidAsmHook(PPCRegister& r11)
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
and force result to zero for Japanese
to display the correct logos. */
Expand Down
7 changes: 6 additions & 1 deletion UnleashedRecomp/ui/game_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,12 @@ const char* GameWindow::GetTitle()
{
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 UNLEASHED";
}
Expand Down
1 change: 1 addition & 0 deletions UnleashedRecomp/user/config_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ CONFIG_DEFINE_HIDDEN("Codes", bool, HomingAttackOnJump, false);
CONFIG_DEFINE_HIDDEN("Codes", bool, HUDToggleKey, false);
CONFIG_DEFINE_HIDDEN("Codes", bool, SaveScoreAtCheckpoints, 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, UseOfficialTitleOnTitleBar, false);

Expand Down
6 changes: 6 additions & 0 deletions UnleashedRecompLib/config/SWA.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1105,3 +1105,9 @@ registers = ["r3"]
name = "DisableBoostFilterMidAsmHook"
address = 0x82B48C9C
registers = ["r11"]

[[midasm_hook]]
name = "UseAlternateTitleMidAsmHook"
address = 0x82580F44
jump_address_on_true = 0x82580F48
jump_address_on_false = 0x82580FA0