Audio: Implement CollectBgmPlayer::prepare, SePlayObjWithSave::init, and ShopBgmPlayer::movement - #1283
Conversation
There was a problem hiding this comment.
Pull request overview
This PR completes three small audio-related functions by adding minimal class definitions and implementations that match the original binary’s behavior, and updates the decompilation status entries accordingly.
Changes:
- Added
ShopBgmPlayeras anal::LiveActorand implementedShopBgmPlayer::movement()as a base-call passthrough. - Added
SePlayObjWithSaveand implementedSePlayObjWithSave::init(...)as a base-call passthrough. - Added
CollectBgmPlayerand implementedCollectBgmPlayer::prepare()as an empty function (return-only), then marked all three symbols asMatchingindata/file_list.yml.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Audio/ShopBgmPlayer.h | Declares ShopBgmPlayer actor type and its movement() override. |
| src/Audio/ShopBgmPlayer.cpp | Implements movement() as al::LiveActor::movement() passthrough for matching. |
| src/Audio/SePlayObjWithSave.h | Declares SePlayObjWithSave and minimal al::SePlayObj dependency needed for init(...). |
| src/Audio/SePlayObjWithSave.cpp | Implements init(...) as al::SePlayObj::init(info) passthrough for matching. |
| src/Audio/CollectBgmPlayer.h | Declares CollectBgmPlayer::prepare(). |
| src/Audio/CollectBgmPlayer.cpp | Implements prepare() as an empty function for matching. |
| data/file_list.yml | Updates symbol statuses to Matching for the three implemented functions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
german77
left a comment
There was a problem hiding this comment.
Welcome to the project. Weird that there's an AI response here.
@german77 reviewed 7 files and all commit messages, and made 5 comments.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on DrapNard).
src/Audio/CollectBgmPlayer.h line 6 at r1 (raw file):
public: void prepare(); };
When adding new headers please include all class functions. This avoids some work in the future and is helpful for mod creation. You can use as reference MonsterDruide1/OdysseyDecompTracker#20
Suggestion:
class CollectBgmPlayer : public al::HioNode, public al::ISceneObj {
public:
CollectBgmPlayer();
void init(const al::IUseAudioKeeper*);
void prepare();
void start(const char*, const char*);
void stop(s32);
void isPlaying(const char*, const char*) const;
private:
char filler[0x18];
};
static_assert(sizeof(CollectBgmPlayer) == 0x20);src/Audio/SePlayObjWithSave.h line 6 at r1 (raw file):
class ActorInitInfo; class SePlayObj {
SePlayObj goes into Library/Obj/SePlayObj.h add the remaining functions of this class as well MonsterDruide1/OdysseyDecompTracker#1905
Suggestion:
class SePlayObj : public al::LiveActor {
....
private:
char filler[0x98];
};
static_assert(sizeof(SePlayObj) == 0x1a0);src/Audio/SePlayObjWithSave.h line 15 at r1 (raw file):
public: void init(const al::ActorInitInfo& info); };
Add the remaining functions of this class as well MonsterDruide1/OdysseyDecompTracker#24
Suggestion:
class SePlayObjWithSave : public al::SePlayObj {
public:
void init(const al::ActorInitInfo& info);
};
static_assert(sizeof(SePlayObjWithSave) == 0x1a0);src/Audio/ShopBgmPlayer.h line 10 at r1 (raw file):
void movement() override; };
using al::LiveActor::LiveActor; is not required
Add the remaining functions of this class as well MonsterDruide1/OdysseyDecompTracker#25
Suggestion:
class ShopBgmPlayer : public al::LiveActor {
public:
void movement() override;
private:
char filler[0x10];
};
static_assert(sizeof(SePlayObjWithSave) == 0x118);|
Thanks ! The AI response is because I have copilot education :3 And I use a lot of AI in this PR so I think you can add the label AI to the PR. Also thanks for the suggestion I will work later on it ! |
…t`, and `ShopBgmPlayer::movement`
c6435bb to
30709b1
Compare
german77
left a comment
There was a problem hiding this comment.
@german77 reviewed 3 files, made 1 comment, and resolved 4 discussions.
Reviewable status: 7 of 8 files reviewed, 1 unresolved discussion (waiting on DrapNard).
src/Audio/CollectBgmPlayer.h line 19 at r2 (raw file):
void start(const char* name, const char* situation_name); void stop(s32 fade_frames); void isPlaying(const char* name, const char* situation_name) const;
How do you arrived to these parameter names?
Suggestion:
bool isPlaying(const char* name, const char* situation_name) const;
Implements the following matching audio functions:
Validation:
No unrelated files were modified.
This change is
Report for 1.0 (8d9f865 - 30709b1)
📈 Matched code: 15.18% (+0.00%, +12 bytes)
✅ 3 new matches
Audio/CollectBgmPlayerCollectBgmPlayer::prepare()Audio/SePlayObjWithSaveSePlayObjWithSave::init(al::ActorInitInfo const&)Audio/ShopBgmPlayerShopBgmPlayer::movement()