Skip to content

g3d: Add a few ModelObj getters#53

Open
GRAnimated wants to merge 2 commits intoopen-ead:masterfrom
GRAnimated:actor-model-function
Open

g3d: Add a few ModelObj getters#53
GRAnimated wants to merge 2 commits intoopen-ead:masterfrom
GRAnimated:actor-model-function

Conversation

@GRAnimated
Copy link

@GRAnimated GRAnimated commented Jan 16, 2026

Required getters by ActorModelFunction in SMO.


This change is Reviewable

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 2 files and all commit messages, and made 7 comments.
Reviewable status: all files reviewed, 7 unresolved discussions (waiting on @GRAnimated).


include/nn/g3d/ModelObj.h line 20 at r1 (raw file):

    f32 unk;
    f32 radius;
};

I'm not sure of the member variable's meaning, but it's definitely four, not five.

The name is from the function call at 0xb1a2cc.

Suggestion:

struct Sphere {
    f32 x;
    f32 y;
    f32 z;
    f32 radius;
};

include/nn/g3d/ModelObj.h line 48 at r1 (raw file):

    void* _10;
    u8 _18;
    u8 m_ViewDependentModelFlags;

Where did you get that name from? I can't seem to find any usages.


include/nn/g3d/MaterialObj.h line 9 at r1 (raw file):

public:
    struct InitializeArgument {
        s32 CalculateMemorySize();

seems to just set some local variables

Suggestion:

void CalculateMemorySize();

include/nn/g3d/MaterialObj.h line 12 at r1 (raw file):

    };

    void Initialize(const InitializeArgument&, void*, u64);

Suggestion:

bool Initialize(const InitializeArgument&, void*, u64);

include/nn/g3d/MaterialObj.h line 14 at r1 (raw file):

    void Initialize(const InitializeArgument&, void*, u64);
    void InitializeDependPointer();
    void GetBlockBufferAlignment(gfx::TDevice<gfx::ApiVariationNvn8>*) const;

final change is SXTW X0, W8, which proves s64

Suggestion:

s64 GetBlockBufferAlignment(gfx::TDevice<gfx::ApiVariationNvn8>*) const;

include/nn/g3d/MaterialObj.h line 15 at r1 (raw file):

    void InitializeDependPointer();
    void GetBlockBufferAlignment(gfx::TDevice<gfx::ApiVariationNvn8>*) const;
    void CalculateBlockBufferSize(gfx::TDevice<gfx::ApiVariationNvn8>*) const;

Suggestion:

s32 CalculateBlockBufferSize(gfx::TDevice<gfx::ApiVariationNvn8>*) const;

include/nn/g3d/MaterialObj.h line 20 at r1 (raw file):

    void ResetDirtyFlags();
    void SetupBlockBuffer(gfx::TDevice<gfx::ApiVariationNvn8>*,
                          gfx::TMemoryPool<gfx::ApiVariationNvn8>*, s64, u64);

Suggestion:

    bool SetupBlockBuffer(gfx::TDevice<gfx::ApiVariationNvn8>*,
                          gfx::TMemoryPool<gfx::ApiVariationNvn8>*, s64, u64);

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