Skip to content

[Inagaki] Add GameAudio::GameSoundTable implementation - #70

Merged
SwareJonge merged 1 commit into
doldecomp:mainfrom
joakim-d:reverse_gamesoundtable
Aug 9, 2026
Merged

[Inagaki] Add GameAudio::GameSoundTable implementation#70
SwareJonge merged 1 commit into
doldecomp:mainfrom
joakim-d:reverse_gamesoundtable

Conversation

@joakim-d

@joakim-d joakim-d commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Add GameAudio::GameSoundTable class implementation

@joakim-d joakim-d changed the title Add GameAudio::GameSoundTable implementation [DRAFT][Inagaki] Add GameAudio::GameSoundTable implementation Aug 7, 2026
@decomp-dev

decomp-dev Bot commented Aug 7, 2026

Copy link
Copy Markdown

Report for MarioClub_us (c17c5c3 - a43c9fb)

📈 Matched code: 46.50% (+0.10%, +3100 bytes)
📈 Linked code: 41.13% (+0.11%, +3568 bytes)
📈 Matched data: 24.05% (+0.01%, +80 bytes)
📈 Linked data: 31.42% (+0.03%, +268 bytes)

✅ 17 new matches
Unit Item Bytes Before After
main/Inagaki/GameSoundTable GameAudio::CustomSoundTable::getStreamInfo(JAISoundID, JAIStream*) const +421 0.94% 100.00%
main/Inagaki/GameSoundTable GameAudio::CustomSoundTable::getSoundInfo_(JAISoundID, JAISound*) const +389 1.02% 100.00%
main/Inagaki/GameSoundTable GameAudio::CustomSoundTable::initAudibleSw() +280 1.41% 100.00%
main/Inagaki/GameSoundTable GameAudio::CustomSoundTable::getPriority(JAISoundID) const +269 1.47% 100.00%
main/Inagaki/GameSoundTable GameAudio::CustomSoundTable::getSwBit(JAISoundID) const +237 1.67% 100.00%
main/Inagaki/GameSoundTable GameAudio::CustomSoundTable::getLevelFlag(JAISoundID) const +229 1.72% 100.00%
main/Inagaki/GameSoundTable GameAudio::CustomSoundTable::getBgmSeqResourceID(JAISoundID) const +221 1.79% 100.00%
main/Inagaki/GameSoundTable GameAudio::CustomSoundTable::getAudibleSw(JAISoundID) const +221 1.79% 100.00%
main/Inagaki/GameSoundTable GameAudio::CustomSoundTable::getPTrack(JAISoundID) const +216 1.82% 100.00%
main/Inagaki/GameSoundTable GameAudio::CustomSoundTable::~CustomSoundTable() +172 0.00% 100.00%
main/Inagaki/GameSoundTable GameAudio::CustomSoundTable::getStreamFileEntry(JAISoundID) +156 2.50% 100.00%
main/Inagaki/GameSoundTable GameAudio::CustomSoundTable::getCategory(JAISoundID) const +81 4.76% 100.00%
main/Inagaki/GameSoundTable GameAudio::CustomSoundTable::getSoundType(JAISoundID) const +69 5.56% 100.00%
main/Inagaki/GameSoundTable GameAudio::CustomSoundTable::getSeInfo(JAISoundID, JAISe*) const +53 7.14% 100.00%
main/Inagaki/GameSoundTable .sdata2 +48 0.00% 100.00%
main/Inagaki/GameSoundTable GameAudio::CustomSoundTable::getSeqInfo(JAISoundID, JAISeq*) const +41 9.09% 100.00%
main/Inagaki/GameSoundTable .rodata +32 0.00% 100.00%
📉 1 regression in an unmatched item
Unit Item Bytes Before After
main/Inagaki/GameSoundTable .data -1 97.87% 95.83%

@joakim-d
joakim-d force-pushed the reverse_gamesoundtable branch from 00792d7 to 7e6a16c Compare August 8, 2026 22:13
@joakim-d joakim-d changed the title [DRAFT][Inagaki] Add GameAudio::GameSoundTable implementation [Inagaki] Add GameAudio::GameSoundTable implementation Aug 8, 2026
@joakim-d
joakim-d marked this pull request as ready for review August 8, 2026 22:18
@joakim-d
joakim-d force-pushed the reverse_gamesoundtable branch 2 times, most recently from a7132c6 to bd3e26b Compare August 9, 2026 09:00
@SwareJonge

Copy link
Copy Markdown
Collaborator

Nice job! There are a few minor things that could probably be improved, but i suggest taking a look at Z2SoundInfo from Twilight Princess considering it looks like that was based of MKDD's audio library

Comment thread src/Inagaki/GameSoundTable.cpp Outdated
Comment on lines +15 to +23
static inline bool isValid() {
bool resourceNotNull = false;
if(JASGlobalInstance<JAUSoundTable>::sInstance != NULL
&& JASGlobalInstance<JAUSoundTable>::sInstance->getResource() != NULL)
{
resourceNotNull = true;
}
return resourceNotNull;
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This chould be moved to the header and the temp value resourceNotNull probably isn't needed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done! I looked at TP implementation ;)

Comment thread src/Inagaki/GameSoundTable.cpp Outdated
#line 27
JUT_ASSERT(isValid());

JAUSoundTableItem* tableItem = JASGlobalInstance<JAUSoundTable>::sInstance->getData(soundID);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

for every instance of JASGlobalInstance<JAUSoundTable>::sInstance use JASGlobalInstance<JAUSoundTable>::getInstance() instead

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done!

@joakim-d
joakim-d force-pushed the reverse_gamesoundtable branch from bd3e26b to a43c9fb Compare August 9, 2026 17:55
@SwareJonge
SwareJonge merged commit da86f76 into doldecomp:main Aug 9, 2026
1 check passed
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.

2 participants