Skip to content

[Driver] Implement DriverManager - #72

Open
SwareJonge wants to merge 2 commits into
doldecomp:mainfrom
SwareJonge:driverMgr
Open

[Driver] Implement DriverManager#72
SwareJonge wants to merge 2 commits into
doldecomp:mainfrom
SwareJonge:driverMgr

Conversation

@SwareJonge

Copy link
Copy Markdown
Collaborator

Low quality attempt, missing a lot of information about members at the moment

@decomp-dev

decomp-dev Bot commented Aug 9, 2026

Copy link
Copy Markdown

Report for MarioClub_us (da86f76 - 6434874)

📈 Matched code: 46.61% (+0.11%, +3492 bytes)
📈 Linked code: 41.24% (+0.11%, +3492 bytes)
📈 Matched data: 24.43% (+0.38%, +3572 bytes)
📈 Linked data: 31.80% (+0.39%, +3596 bytes)

✅ 17 new matches
Unit Item Bytes Before After
main/Kawano/driverMgr .rodata +2600 0.00% 100.00%
main/Kawano/driverMgr DriverManager::DriverManager() +1068 0.00% 100.00%
main/Kawano/driverMgr .data +656 0.00% 100.00%
main/Kawano/driverMgr DriverLoader::getAnmFile(int) +444 0.00% 100.00%
main/Kawano/driverMgr DriverLoader::createModelData(int, int) +424 0.00% 100.00%
main/Kawano/driverMgr DriverLoader::getSoundDataFile(int) +340 0.00% 100.00%
main/Kawano/driverMgr DriverLoader::DriverLoader(int) +328 0.00% 100.00%
main/Kawano/driverMgr DriverManager::getFolderName_Sound(int, int) +328 0.00% 100.00%
main/Kawano/driverMgr __sinit_driverMgr_cpp +268 0.00% 100.00%
main/Kawano/driverMgr .sdata2 +264 0.00% 100.00%
main/Kawano/driverMgr DriverManager::~DriverManager() +96 0.00% 100.00%
main/Kawano/driverMgr DriverManager::ptr() +72 0.00% 100.00%
main/Kawano/driverMgr DriverLoader::convAnmIDToKeepID(DriverLoader::AnmEnum) +64 0.00% 100.00%
main/Kawano/driverMgr .bss +48 0.00% 100.00%
main/Kawano/driverMgr DriverManager::SetDriverModelPtr(DriverModel*) +32 0.00% 100.00%
main/Kawano/driverMgr DriverLoader::convSndIDToKeepID(DriverLoader::AnmSoundEnum) +28 0.00% 100.00%
main/Kawano/driverMgr .ctors +4 0.00% 100.00%
📈 2 improvements in unmatched items
Unit Item Bytes Before After
main/Kawano/driverMgr .sdata +13 0.00% 85.71%
main/Kawano/driverMgr .sbss +4 0.00% 50.00%

@joakim-d joakim-d 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.

Not 100% sure but all these members in the class looks weird no?
Why not using an array instead?

Comment thread include/Kawano/driverMgr.h Outdated
Comment on lines +83 to +126
u8 _34;
u8 _35;
u8 _36;
u8 _37;
u8 _38;
u8 _39;
u8 _3a;
u8 _3b;
u8 _3c;
u8 _3d;
u8 _3e;
u8 _3f;
u8 _40;
u8 _41;
u8 _42;
u8 _43;
u8 _44;
u8 _45;
u8 _46;
u8 _47;
u8 _48;
u8 _49;
u8 _4a;
u8 _4b;
u8 _4c;
u8 _4d;
u8 _4e;
u8 _4f;
u8 _50;
u8 _51;
u8 _52;
u8 _53;
u8 _54;
u8 _55;
u8 _56;
u8 _57;
u8 _58;
u8 _59;
u8 _5a;
u8 _5b;
u8 _5c;
u8 _5d;
u8 _5e;
u8 _5f;

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.

Suggested change
u8 _34;
u8 _35;
u8 _36;
u8 _37;
u8 _38;
u8 _39;
u8 _3a;
u8 _3b;
u8 _3c;
u8 _3d;
u8 _3e;
u8 _3f;
u8 _40;
u8 _41;
u8 _42;
u8 _43;
u8 _44;
u8 _45;
u8 _46;
u8 _47;
u8 _48;
u8 _49;
u8 _4a;
u8 _4b;
u8 _4c;
u8 _4d;
u8 _4e;
u8 _4f;
u8 _50;
u8 _51;
u8 _52;
u8 _53;
u8 _54;
u8 _55;
u8 _56;
u8 _57;
u8 _58;
u8 _59;
u8 _5a;
u8 _5b;
u8 _5c;
u8 _5d;
u8 _5e;
u8 _5f;
u8 _34[0x2c];

Why not using an array here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Because I only use arrays when it gets accessed as an array(like in a loop)

@SwareJonge SwareJonge Aug 11, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

They seem to get referenced by DriverModel::updateSetBlendWeight_GetBlendTime(StateEnum)
So I guess those are all related(_3c to _5a)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah okay, I might indeed make it an array, however not the entire range you suggested

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