mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-27 12:51:42 +00:00
options_menu: implemented Subtitles
This commit is contained in:
parent
b2c3ba8aca
commit
0f5b71f1d5
3 changed files with 15 additions and 4 deletions
|
|
@ -21,7 +21,7 @@ namespace SWA
|
|||
eVoiceLanguage_Japanese
|
||||
};
|
||||
|
||||
class CApplicationDocument // : public Hedgehog::Base::CSynchronizedObject
|
||||
class CApplicationDocument : public Hedgehog::Base::CSynchronizedObject
|
||||
{
|
||||
public:
|
||||
class CMember
|
||||
|
|
@ -36,12 +36,11 @@ namespace SWA
|
|||
// TODO: Hedgehog::Base::TSynchronizedPtr<CApplicationDocument>
|
||||
static CApplicationDocument* GetInstance();
|
||||
|
||||
xpointer<void> m_pVftable;
|
||||
xpointer<CMember> m_pMember;
|
||||
be<ELanguage> m_Language;
|
||||
be<EVoiceLanguage> m_VoiceLanguage;
|
||||
SWA_INSERT_PADDING(0x0C);
|
||||
be<uint32_t> m_Region;
|
||||
SWA_INSERT_PADDING(0x0D);
|
||||
bool m_Subtitles;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,13 @@ bool DisableEvilControlTutorialMidAsmHook(PPCRegister& r4, PPCRegister& r5)
|
|||
return r4.u32 == 1 && r5.u32 == 1;
|
||||
}
|
||||
|
||||
void ToggleSubtitlesMidAsmHook(PPCRegister& r27)
|
||||
{
|
||||
auto pApplicationDocument = (SWA::CApplicationDocument*)g_memory.Translate(r27.u32);
|
||||
|
||||
pApplicationDocument->m_Subtitles = Config::Subtitles;
|
||||
}
|
||||
|
||||
void WerehogBattleMusicMidAsmHook(PPCRegister& r11)
|
||||
{
|
||||
if (Config::BattleTheme)
|
||||
|
|
|
|||
|
|
@ -501,3 +501,8 @@ name = "CHudPauseMiscInjectOptionsMidAsmHook"
|
|||
address = 0x824B08C0
|
||||
registers = ["r3"]
|
||||
return_on_true = true
|
||||
|
||||
[[midasm_hook]]
|
||||
name = "ToggleSubtitlesMidAsmHook"
|
||||
address = 0x82B9BB74
|
||||
registers = ["r27"]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue