Skip to content

Ragdoll: decompile internal state members at offset 0xc0-0x110#176

Draft
alexgsonic1-pixel wants to merge 2 commits into
zeldaret:masterfrom
alexgsonic1-pixel:pr-ragdoll-v2
Draft

Ragdoll: decompile internal state members at offset 0xc0-0x110#176
alexgsonic1-pixel wants to merge 2 commits into
zeldaret:masterfrom
alexgsonic1-pixel:pr-ragdoll-v2

Conversation

@alexgsonic1-pixel

@alexgsonic1-pixel alexgsonic1-pixel commented Jun 23, 2026

Copy link
Copy Markdown

Fills the 80-byte gap in the Ragdoll class with 17 internal state
members. Adds isChangeable overrides for BlownOff, FreeMove and
StalEnemyBlownOff. Adds 14 isFinished overrides delegating to
isFinishedAS. Updates CSV: 15 U->O, 5 U->W, 2 W->O.


This change is Reviewable

Fills the 80-byte gap in the Ragdoll class with 17 internal state
members. Adds isChangeable overrides for BlownOff, FreeMove and
StalEnemyBlownOff. Adds 14 isFinished overrides delegating to
isFinishedAS. Updates CSV: 15 U->O, 5 U->W, 2 W->O.
@alexgsonic1-pixel alexgsonic1-pixel force-pushed the pr-ragdoll-v2 branch 2 times, most recently from 759bfd0 to 546b909 Compare June 23, 2026 12:33

@Pistonight Pistonight left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the PR but it's not recommended to generate these stubs before we reverse engineer the corresponding system to properly name/implement them. It will add burden to someone who tries to study the system and waste their time when they try to research the non-existent RE history. If you want to take a deeper look, feel free to mark the PR as a draft, and join the discord if you would like more discussions.

@Pistonight made 6 comments.
Reviewable status: 0 of 34 files reviewed, 5 unresolved discussions (waiting on alexgsonic1-pixel).


src/Game/AI/Action/actionGanonBarrierOn.cpp line 30 at r1 (raw file):

bool GanonBarrierOn::isFinished() const {
    return const_cast<GanonBarrierOn*>(this)->isFinishedAS(0, 0);

const_cast is very suspicious - either isFinished is not const or isFinishedAS is const


src/Game/AI/Action/actionGuardianMiniFinalBeamMove.cpp line 26 at r1 (raw file):

bool GuardianMiniFinalBeamMove::isFinished() const {
    return ksys::act::ai::Action::isFinished();

this looks suspicious that it's calling several layers up the base class chain. Are you sure it's not calling the direct base class?


src/Game/AI/Action/actionRagdoll.h line 57 at r1 (raw file):

    const sead::Vector3f* mDownFrontCtrlOffset_s{};
    // ragdoll internal state at offset 0xc0
    sead::Vector3f mRagdollForce{};

how did you figure this out - will be helpful if you explain in the PR description


src/Game/AI/Action/actionRagdoll.h line 71 at r1 (raw file):

    s32 mCounter5{};
    s32 mCounter6{};
    // ragdoll state at offset 0xec: checked by BlownOff::isChangeable()

these comments are not useful (you can put the offset in the placeholder field name)


src/Game/AI/Action/actionStalEnemyBlownOff.h line 79 at r1 (raw file):

    u32 _130_9{};
    // checked by isChangeable(): value > 1 means changeable (offset 0x154)
    s32 mChangeableState2{};

this name also feels weird, maybe it's some kind of enum? have you looked at where this is set - maybe that will hint toward a better name

@alexgsonic1-pixel alexgsonic1-pixel marked this pull request as draft July 1, 2026 18:23
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