Skip to content

nn/ui2d: Improve Pane implementation#55

Open
german77 wants to merge 3 commits intoopen-ead:masterfrom
german77:pane
Open

nn/ui2d: Improve Pane implementation#55
german77 wants to merge 3 commits intoopen-ead:masterfrom
german77:pane

Conversation

@german77
Copy link

@german77 german77 commented Jan 19, 2026

Today I touched some code that interacts with Pane.... Right now as it stands the vtable is broken and the member list is incomplete.

There's still a lot of things wrong and incomplete here. But at least it has the bare minimum for the SMO file I'm implementing. I might add more stuff depending on my progress in SMO and the review time of this PR.


This change is Reviewable

@LynxDev2
Copy link

Did you check that the stuff in #25 isn’t more complete?

@german77
Copy link
Author

I did not. I will check tomorrow if his code matches

@MonsterDruide1
Copy link

Did you look into it? Should I review or wait?

Co-authored-by: ThePixelCoder  <pixelcoder@duck.com>
@german77
Copy link
Author

I added the relevant bits from ThePixelGamer PR. I didn't added everything because I can't verify inlined stuff.

IntrusiveList is copied as is. I did not verify the accuracy of this header as I haven't implemented anything that uses this list. I can clean the header to keep only the necessary parts for Pane to compile

Co-authored-by: ThePixelCoder  <pixelcoder@duck.com>
Copy link

@MonsterDruide1 MonsterDruide1 left a comment

Choose a reason for hiding this comment

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

@MonsterDruide1 reviewed 8 files and all commit messages, and made 6 comments.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @german77).


include/nn/ui2d/Pane.h line 20 at r3 (raw file):

}

namespace nn::ui2d ::detail {

Suggestion:

namespace nn::ui2d::detail {

include/nn/ui2d/Pane.h line 57 at r3 (raw file):

    Pane(const Pane&);

    virtual ~Pane();

Suggestion:

~Pane() override;

include/nn/ui2d/Pane.h line 146 at r3 (raw file):

        detail::SetBit(&mFlags, PaneFlag_InfluencedAlpha, state);
    }
    void SetLocationAdjus(bool state) { detail::SetBit(&mFlags, PaneFlag_LocationAdjust, state); }

Suggestion:

void SetLocationAdjust(bool state) { detail::SetBit(&mFlags, PaneFlag_LocationAdjust, state); }

include/nn/util/util_IntrusiveList.h line 0 at r3 (raw file):
There's not much information to base my review on, so I've just given it a quick pass of "looks right to me".


include/nn/ui2d/Util.h line 29 at r3 (raw file):

void ConvertBlendsToArchiveShaderName(char*, s32, s32);
bool ConvertArchiveShaderNameToBlends(s32*, s32*, const char*);
s32 SearchShaderVariationIndexFromTable(const void*, s32, s32);

last instruction is ldrh = half-word = 16 bit

Suggestion:

s16 SearchShaderVariationIndexFromTable(const void*, s32, s32);

include/nn/ui2d/Util.h line 43 at r3 (raw file):

void DrawNullAndBoundingPane(gfx::CommandBuffer&, DrawInfo&, Material&, const Pane*,
                             const util::Unorm8x4&, const util::Unorm8x4&);
float GetHermiteCurveValue(float, const ResHermiteKey*, s32);

Suggestion:

f32 GetHermiteCurveValue(float, const ResHermiteKey*, s32);

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