Skip to content

Add 3 GameAudio::Main methods implementation#47

Open
joakim-d wants to merge 4 commits into
doldecomp:mainfrom
joakim-d:gameaudiomain
Open

Add 3 GameAudio::Main methods implementation#47
joakim-d wants to merge 4 commits into
doldecomp:mainfrom
joakim-d:gameaudiomain

Conversation

@joakim-d

@joakim-d joakim-d commented Jul 5, 2026

Copy link
Copy Markdown
  • Implement GameAudio::Main::bootDSP
  • Implement GameAudio::Main::isActive
  • Implement GameAudio::Main::isWaveLoaded

@cristian64 cristian64 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've checked that the three implementations show 100% in objdiff.

@SwareJonge

Copy link
Copy Markdown
Collaborator

Thanks for your first contribution! There are a few things i'd like being addressed and that's mainly that i'd rather have PRs per file/TU now that this project still has many files that have no work done to it(So this will change in the future).
For now i will accept it but also be aware that many implementations of structs are also unfinished so in GameAudio::Main::isActive you wrote return _48[0] & 0x10;
_48 is currently an array in the structure for padding reasons, so that should be an individual member.
So the written code would be return _48 & 0x10; or perhaps rename _48 which you think make sense by observing what it does/affects.

Most of these issues are also kinda on me for not having a contributors guide so my apologies.

@decomp-dev

decomp-dev Bot commented Jul 25, 2026

Copy link
Copy Markdown

Report for MarioClub_us (8a91a6b - 96e2dc3)

📈 Matched code: 45.72% (+0.01%, +168 bytes)

✅ 3 new matches
Unit Item Bytes Before After
main/Inagaki/GameAudioMain GameAudio::Main::isWaveLoaded(GameAudio::Main::WS_ID) +120 3.23% 100.00%
main/Inagaki/GameAudioMain GameAudio::Main::bootDSP() +28 12.50% 100.00%
main/Inagaki/GameAudioMain GameAudio::Main::isActive() +9 33.33% 100.00%
📉 1 regression in an unmatched item
Unit Item Bytes Before After
main/Inagaki/GameAudioMain .sbss -18 70.59% 26.67%

@joakim-d

Copy link
Copy Markdown
Author

Hello and thanks for taking the time to review my PR.
Indeed I had no idea that a whole file/TU was preferred.
I'll try to focus on a whole class now!

I hope my latest changes will match with what you expected.
I changed the name to mState as it looks like this variable tracks some kind of object state.
I think it is used in resetAudio and some other methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants