diff --git a/data/file_list.yml b/data/file_list.yml index 3e6398931d..d3748ef811 100644 --- a/data/file_list.yml +++ b/data/file_list.yml @@ -1582,7 +1582,7 @@ Audio/CollectBgmPlayer.o: - offset: 0x008a04 size: 4 label: _ZN16CollectBgmPlayer7prepareEv - status: NotDecompiled + status: Matching - offset: 0x008a08 size: 248 label: _ZN16CollectBgmPlayer5startEPKcS1_ @@ -1695,7 +1695,7 @@ Audio/SePlayObjWithSave.o: - offset: 0x009840 size: 4 label: _ZN17SePlayObjWithSave4initERKN2al13ActorInitInfoE - status: NotDecompiled + status: Matching - offset: 0x009844 size: 120 label: _ZN17SePlayObjWithSave10receiveMsgEPKN2al9SensorMsgEPNS0_9HitSensorES5_ @@ -1721,7 +1721,7 @@ Audio/ShopBgmPlayer.o: - offset: 0x009bb4 size: 4 label: _ZN13ShopBgmPlayer8movementEv - status: NotDecompiled + status: Matching - offset: 0x009bb8 size: 92 label: _ZN13ShopBgmPlayer15exeWaitOnSwitchEv diff --git a/lib/al/Library/Obj/SePlayObj.h b/lib/al/Library/Obj/SePlayObj.h new file mode 100644 index 0000000000..9194630c7e --- /dev/null +++ b/lib/al/Library/Obj/SePlayObj.h @@ -0,0 +1,27 @@ +#pragma once + +#include "Library/LiveActor/LiveActor.h" + +namespace al { +class SePlayObj : public LiveActor { +public: + SePlayObj(const char* name); + void init(const ActorInitInfo& info) override; + void initAfterPlacement() override; + void makeActorAlive() override; + void kill() override; + void movement() override; + void waitSwitch(); + void startPlaying(); + bool isPlaying(); + void exeWaitSwitch(); + void exePlay(); + bool tryPlayStart(); + void exePlayRepeat(); + +private: + char filler[0x98]; +}; + +static_assert(sizeof(SePlayObj) == 0x1a0); +} // namespace al diff --git a/src/Audio/CollectBgmPlayer.cpp b/src/Audio/CollectBgmPlayer.cpp new file mode 100644 index 0000000000..1668f11442 --- /dev/null +++ b/src/Audio/CollectBgmPlayer.cpp @@ -0,0 +1,3 @@ +#include "Audio/CollectBgmPlayer.h" + +void CollectBgmPlayer::prepare() {} diff --git a/src/Audio/CollectBgmPlayer.h b/src/Audio/CollectBgmPlayer.h new file mode 100644 index 0000000000..9f45fdac9e --- /dev/null +++ b/src/Audio/CollectBgmPlayer.h @@ -0,0 +1,25 @@ +#pragma once + +#include + +#include "Library/HostIO/HioNode.h" +#include "Library/Scene/ISceneObj.h" + +namespace al { +class IUseAudioKeeper; +} + +class CollectBgmPlayer : public al::HioNode, public al::ISceneObj { +public: + CollectBgmPlayer(); + void init(const al::IUseAudioKeeper* audio_keeper); + void prepare(); + void start(const char* name, const char* situation_name); + void stop(s32 fade_frames); + void isPlaying(const char* name, const char* situation_name) const; + +private: + char filler[0x18]; +}; + +static_assert(sizeof(CollectBgmPlayer) == 0x20); diff --git a/src/Audio/SePlayObjWithSave.cpp b/src/Audio/SePlayObjWithSave.cpp new file mode 100644 index 0000000000..e74fa580a5 --- /dev/null +++ b/src/Audio/SePlayObjWithSave.cpp @@ -0,0 +1,5 @@ +#include "Audio/SePlayObjWithSave.h" + +void SePlayObjWithSave::init(const al::ActorInitInfo& info) { + al::SePlayObj::init(info); +} diff --git a/src/Audio/SePlayObjWithSave.h b/src/Audio/SePlayObjWithSave.h new file mode 100644 index 0000000000..de8f22f9b6 --- /dev/null +++ b/src/Audio/SePlayObjWithSave.h @@ -0,0 +1,13 @@ +#pragma once + +#include "Library/Obj/SePlayObj.h" + +class SePlayObjWithSave : public al::SePlayObj { +public: + SePlayObjWithSave(const char* name); + void init(const al::ActorInitInfo& info) override; + bool receiveMsg(const al::SensorMsg* message, al::HitSensor* other, + al::HitSensor* self) override; +}; + +static_assert(sizeof(SePlayObjWithSave) == 0x1a0); diff --git a/src/Audio/ShopBgmPlayer.cpp b/src/Audio/ShopBgmPlayer.cpp new file mode 100644 index 0000000000..7d038d4b7d --- /dev/null +++ b/src/Audio/ShopBgmPlayer.cpp @@ -0,0 +1,5 @@ +#include "Audio/ShopBgmPlayer.h" + +void ShopBgmPlayer::movement() { + al::LiveActor::movement(); +} diff --git a/src/Audio/ShopBgmPlayer.h b/src/Audio/ShopBgmPlayer.h new file mode 100644 index 0000000000..7f0233e5f7 --- /dev/null +++ b/src/Audio/ShopBgmPlayer.h @@ -0,0 +1,18 @@ +#pragma once + +#include "Library/LiveActor/LiveActor.h" + +class ShopBgmPlayer : public al::LiveActor { +public: + ShopBgmPlayer(const char* name); + void init(const al::ActorInitInfo& info) override; + void makeActorAlive() override; + void movement() override; + void exeWaitOnSwitch(); + void exePlay(); + +private: + char filler[0x10]; +}; + +static_assert(sizeof(ShopBgmPlayer) == 0x118);