Skip to content

Decompile dSelectCursor_c#83

Open
TheGrop wants to merge 6 commits intomasterfrom
d_selectcursor
Open

Decompile dSelectCursor_c#83
TheGrop wants to merge 6 commits intomasterfrom
d_selectcursor

Conversation

@TheGrop
Copy link
Collaborator

@TheGrop TheGrop commented Nov 1, 2025

No description provided.

user added 3 commits November 1, 2025 00:01
For some reason, the built main.dol doesn't have the same hash though...
Apparently the destructor needs to be explicit, otherwise the function
ordering is wrong. Also aligning the slices.
@decomp-dev
Copy link

decomp-dev bot commented Nov 1, 2025

Report for SMNP01 (e0c6c8b - 09fd9b3)

✅ 2 new matches
Unit Function Bytes Before After
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%


void dSelectCursor_c::SetAlpha(const nw4r::lyt::Pane *pane, int layoutId) {
u8 alpha = pane->GetGlbAlpha();
Layout_c & layout = mLayouts[layoutId];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Layout_c & layout = mLayouts[layoutId];
Layout_c &layout = mLayouts[layoutId];

void SetAlpha(const nw4r::lyt::Pane *pane, int layoutId);

d2d::ResAccMultLoader_c mResLoader;
Layout_c mLayouts[5];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Seemingly these 5 layouts all serve a slightly different purpose. Maybe you can add an enum for the 5 layouts and ideally figure out what they're for exactly? This will probably also resolve the int cast needed if you can use LAYOUT_COUNT instead.

@@ -0,0 +1,239 @@
#include <game/bases/d_SelectCursor.hpp>

ACTOR_PROFILE(SELECT_CURSOR, dSelectCursor_c, 0);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you test if BASE_PROFILE works too? Otherwise ignore this comment.

mLayouts[i].mBase.mDrawOrder = 147;
}

mLayouts[i].mBase.LoopAnimeStartSetup(0);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
mLayouts[i].mBase.LoopAnimeStartSetup(0);
mLayouts[i].mBase.LoopAnimeStartSetup(ANIM_CURSOR);

These `dSelectCursor_c` symbols are no longer needed.
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