Skip to content

Gold Skulltula/Skullwalltula (En_Sw, En_Si, Obj_Makekinsuta)#2729

Open
djevangelia wants to merge 4 commits into
zeldaret:mainfrom
djevangelia:skulltula
Open

Gold Skulltula/Skullwalltula (En_Sw, En_Si, Obj_Makekinsuta)#2729
djevangelia wants to merge 4 commits into
zeldaret:mainfrom
djevangelia:skulltula

Conversation

@djevangelia
Copy link
Copy Markdown

Documentation of Gold Skulltula and Skullwalltula.
I didn't go into much into the maths of Gold Skulltula positioning and poly selection. I don't understand the bit fixing in EnSw_Init either (Skullwalltula seem to have all param bits set to 0).

Copy link
Copy Markdown
Contributor

@mzxrules mzxrules left a comment

Choose a reason for hiding this comment

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

might do more later.

}

s32 func_80AFB748(EnSi* this, PlayState* play) {
s32 EnSi_RemoveAC(EnSi* this, PlayState* play) {
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.

RemoveAC isn't really an appropriate name.

The way collision_check colliders work is that the actor has to pass them to the collision_check engine by calling CollisionCheck_SetAT/AC/OC every update cycle for them to be "active". Then on next update cycle, the AT-AC collisions and OC collisions are processed, with the results becoming available to the actors through the collider struct.

When CollisionCheck_SetAT/AC/OC is called, the appropriate AT/AC/OC_HIT flags are zeroed on the collider. But you'll often see the flag manually being zeroed immediately after being checked. I believe the reason for this pattern is that there will be cases in some actors where a collider won't always be active, and so you see it get zeroed so that it doesn't get double processed, simplifying logic.

So it's not really that the collider is being "removed". To me it looks like this code might be some incomplete codeblock for detecting hookshot/boomerang collision

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I see, I couldn't figure this one out, why remove the AC hit flag. Any name suggestion?

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.

I'd suggest HandleACHit but idk 🤷

Comment on lines +124 to +127
/**
* Pulled by Hookshot towards player, give item when detached
*/
void EnSi_Action_HookshotPull(EnSi* this, PlayState* play) {
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
/**
* Pulled by Hookshot towards player, give item when detached
*/
void EnSi_Action_HookshotPull(EnSi* this, PlayState* play) {
/**
* Pulled by Hookshot or Boomerang towards player, give item when detached
*/
void EnSi_HookshotPull(EnSi* this, PlayState* play) {

Despite the flag names, this should also handle being collected by the boomerang. Additionally, we typically don't use Action to name actionFuncs

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Will add Boomerang comment, forgot about that. I assume the function still can be Hookshot-named like the flag? As changing it to something like FetchToken isn't as clear.

For action functions, I see, is it something decided upon? I'm OK with changing it (especially for En_Si and Obj_Makekinsuta which are so short), but personally I find it so helpful when looking at new actors that the first thing I do is rename all action functions into Actor_Action_address/name to get a clear view of the state flow.

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.

yeah the pattern overall is <ActorName>_<ActionName>, with rare exceptions when the actor is complicated like player

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I guess I don't see the positive aspects of cramming everything into ActorName_Function vs separating ActorName_Action_Function and ActorName_Function, where the separation heavily reflects the game logic...
In any case, I'll wait for comments on En_Sw with its many action functions of two different categories.

Comment thread include/save.h Outdated
Comment thread src/overlays/actors/ovl_En_Sw/z_en_sw.c Outdated
Comment thread src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c Outdated
djevangelia and others added 3 commits April 8, 2026 10:28
Co-authored-by: mzxrules <mzxrules@gmail.com>
Co-authored-by: mzxrules <mzxrules@gmail.com>
Co-authored-by: mzxrules <mzxrules@gmail.com>
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