From 6fa1293b7a5d922f1a71fba6ec3eea8c9c2799bc Mon Sep 17 00:00:00 2001 From: EpochFlame Date: Tue, 26 Sep 2023 21:01:52 -0400 Subject: [PATCH] attempt to fix demo initiate --- include/JSystem/JAudio/JAI/JAISound.h | 1 - include/JSystem/JAudio/JAI/JAInter.h | 28 ++++++++++------------ include/JSystem/JAudio/JAI/JAInter/SeMgr.h | 1 - src/utilityU/PSMainSide_Demo.cpp | 4 ++-- 4 files changed, 15 insertions(+), 19 deletions(-) diff --git a/include/JSystem/JAudio/JAI/JAISound.h b/include/JSystem/JAudio/JAI/JAISound.h index 23a6eae09..b05c221a9 100644 --- a/include/JSystem/JAudio/JAI/JAISound.h +++ b/include/JSystem/JAudio/JAI/JAISound.h @@ -13,7 +13,6 @@ namespace JAInter { struct Actor; struct MoveParaSet; -struct SoundInfo; } // namespace JAInter /** diff --git a/include/JSystem/JAudio/JAI/JAInter.h b/include/JSystem/JAudio/JAI/JAInter.h index efe2d9887..14f4ea8fe 100644 --- a/include/JSystem/JAudio/JAI/JAInter.h +++ b/include/JSystem/JAudio/JAI/JAInter.h @@ -18,7 +18,19 @@ namespace JAInter { struct Actor; struct DummyVec; struct SeqUpdateData; -struct SoundInfo; +struct SoundInfo { + int unk1; // _00 + union count_t { + unsigned long v1; + unsigned char v2[4]; + unsigned short v3[2]; + } count; // _04 + f32 pitch; // _08 + union volume_t { + unsigned long v1; + unsigned char v2[2]; + } volume; // _0C +}; namespace SequenceMgr { struct CustomHeapInfo { @@ -284,20 +296,6 @@ struct SeqParameter : MoveParaSet { JASOuterParam mOuterParam; // _62C }; -struct SoundInfo { - int unk1; // _00 - union count_t { - unsigned long v1; - unsigned char v2[4]; - unsigned short v3[2]; - } count; // _04 - f32 pitch; // _08 - union volume_t { - unsigned long v1; - unsigned char v2[2]; - } volume; // _0C -}; - namespace SoundTable { void init(u8*, u32); SoundInfo* getInfoPointer(u32); diff --git a/include/JSystem/JAudio/JAI/JAInter/SeMgr.h b/include/JSystem/JAudio/JAI/JAInter/SeMgr.h index eed46ae8a..a68dbcacf 100644 --- a/include/JSystem/JAudio/JAI/JAInter/SeMgr.h +++ b/include/JSystem/JAudio/JAI/JAInter/SeMgr.h @@ -13,7 +13,6 @@ struct Actor; struct LinkSound; struct MoveParaSet; struct SeqUpdateData; -struct SoundInfo; namespace SeMgr { /** @fabricatedName */ diff --git a/src/utilityU/PSMainSide_Demo.cpp b/src/utilityU/PSMainSide_Demo.cpp index 33c8b7e79..38db192d8 100644 --- a/src/utilityU/PSMainSide_Demo.cpp +++ b/src/utilityU/PSMainSide_Demo.cpp @@ -446,7 +446,7 @@ PSSystem::BgmSeq* Demo::initiate(DemoArg demoArg, u8* unk) init.setDefault("s11_dopebin_first_r", 0xc0011008); if (!streq("s01_dayend", init.mName)) { - bool is_key = demoArg.mPelletName && streq(demoArg.mPelletName, "key"); + bool is_key = demoArg.mName && streq(demoArg.mName, "key"); init.setDefault("s17_suck_equipment", demoArg.mBgmID, !is_key); init.setDefault("s17_suck_equipment", 0xc0011007, is_key); @@ -601,7 +601,7 @@ PSSystem::BgmSeq* Demo::initiate(DemoArg demoArg, u8* unk) } else if (streq("x20_blackman", init.mName) || streq("x03_find_red_onyon", init.mName)) { mDoStartWithAudio = false; } else if (streq("s01_dayend", init.mName)) { - switch ((u32)demoArg.mPelletName) { + switch ((u32)demoArg.mName) { case 1: mSoundID = PSSE_PL_DAYEND_KAISAN_LUI; break;