Skip to content

Decompile dWiiStrapScreen_c#97

Open
yomcube wants to merge 5 commits intoNSMBW-Community:masterfrom
yomcube:d_logo_screen
Open

Decompile dWiiStrapScreen_c#97
yomcube wants to merge 5 commits intoNSMBW-Community:masterfrom
yomcube:d_logo_screen

Conversation

@yomcube
Copy link
Copy Markdown
Contributor

@yomcube yomcube commented Feb 28, 2026

TODO: match data, match stack offsets in createLayout(), cleanup, documentation

@yomcube yomcube changed the title Decompile dLogoScreen_c Decompile dWiiStrapScreen_c Feb 28, 2026
@decomp-dev
Copy link
Copy Markdown

decomp-dev bot commented Apr 11, 2026

Report for SMNP01 (a6f256f - 3091e9a)

📈 Matched code: 3.44% (+0.02%, +1172 bytes)
📈 Linked code: 3.45% (+0.02%, +1172 bytes)
📈 Matched data: 1.09% (+0.02%, +392 bytes)
📈 Linked data: 1.98% (+0.02%, +448 bytes)

✅ 14 new matches
Unit Item Bytes Before After
dol/bases/d_WiiStrapScreen.cpp dWiiStrapScreen_c::createLayout() +600 0.00% 100.00%
dol/bases/d_WiiStrapScreen.cpp .data +392 0.00% 100.00%
dol/bases/d_WiiStrapScreen.cpp dWiiStrapScreen_c::~dWiiStrapScreen_c() +104 0.00% 100.00%
dol/bases/d_WiiStrapScreen.cpp dWiiStrapScreen_c::create() +96 0.00% 100.00%
dol/bases/d_WiiStrapScreen.cpp dWiiStrapScreen_c::execute() +96 0.00% 100.00%
dol/bases/d_WiiStrapScreen.cpp dWiiStrapScreen_c::preExecute() +80 0.00% 100.00%
dol/bases/d_WiiStrapScreen.cpp dWiiStrapScreen_c::dWiiStrapScreen_c() +76 0.00% 100.00%
dol/bases/d_WiiStrapScreen.cpp dWiiStrapScreen_c::draw() +64 0.00% 100.00%
dol/bases/d_WiiStrapScreen.cpp dWiiStrapScreen_c_classInit() +48 0.00% 100.00%
dol/bases/d_WiiStrapScreen.cpp dWiiStrapScreen_c::doDelete() +8 0.00% 100.00%
runtime/global_destructor_chain.c __register_global_object -4 100.00% 100.00%
runtime/global_destructor_chain.c __register_global_object -4 100.00% 100.00%
runtime/global_destructor_chain.c __destroy_global_chain -12 100.00% 100.00%
runtime/global_destructor_chain.c __destroy_global_chain -12 100.00% 100.00%
🥀 2 broken matches
Unit Item Bytes Before After
runtime/global_destructor_chain.c .dtors -4 100.00% 0.00%
runtime/global_destructor_chain.c .dtors -4 100.00% 0.00%
📈 4 improvements in unmatched items
Unit Item Bytes Before After
dol/bases/d_WiiStrapScreen.cpp .sdata +45 0.00% 94.51%
runtime/global_destructor_chain.c .sbss +5 0.00% 66.67%
runtime/global_destructor_chain.c .sbss +5 0.00% 66.67%
dol/bases/d_WiiStrapScreen.cpp .sbss2 +4 0.00% 50.00%
📉 2 regressions in unmatched items
Unit Item Bytes Before After
runtime/global_destructor_chain.c .bss -5 66.67% 0.00%
runtime/global_destructor_chain.c .bss -5 66.67% 0.00%

@RootCubed RootCubed marked this pull request as ready for review April 11, 2026 06:19
@RootCubed RootCubed requested a review from CLF78 April 11, 2026 08:38

/// @brief Displays the Wii Strap safety warning screen.
/// @details Loops between the two images that show the safety warning and how to put on the strap.
/// Note that pressing a button to advance from the screen is handled by dScBoot_c.
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
/// Note that pressing a button to advance from the screen is handled by dScBoot_c.
/// @note The button press to advance from this screen is handled by dScBoot_c.

Comment on lines +10 to +12
dWiiStrapScreen_c::dWiiStrapScreen_c() {
mHasLoadedLayout = false;
}
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.

No ctor initializer?

Comment on lines +58 to +75
char filename[100];
memset(filename, 0, 100);
strncat(filename, "wiiStrap_", 99);
switch (dGameCom::GetLanguageHBM()) {
default:
strncat(filename, "EngEU_00", 99); break;
case SC_LANG_FR:
strncat(filename, "FraEU_00", 99); break;
case SC_LANG_DE:
strncat(filename, "GerEU_00", 99); break;
case SC_LANG_IT:
strncat(filename, "ItaEU_00", 99); break;
case SC_LANG_SP:
strncat(filename, "SpaEU_00", 99); break;
case SC_LANG_NL:
strncat(filename, "NedEU_00", 99); break;
}
strncat(filename, ".brlyt", 99);
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.

Please use a constant to make the string lengths derived from the array size.

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