Skip to content

Name Girahimu 2 functions, fields and constants - #379

Open
patr1k wants to merge 1 commit into
zeldaret:mainfrom
patr1k:girahimu-naming
Open

patr1k wants to merge 1 commit into
zeldaret:mainfrom
patr1k:girahimu-naming

Conversation

@patr1k

@patr1k patr1k commented Nov 30, 2026

Copy link
Copy Markdown

Names the placeholder functions and members used by the second Ghirahim fight (dAcGirahimu2_c), and replaces the magic numbers they relied on with enums. Because much of the fight lives in shared code, the renames also touch dAcGirahimuBase_c, dAcGirahimu_c and dAcObjGirahimuKnife_c.

This is a naming-only change with no change to generated code.

Functions

  • Collision handlers: the per-frame hit reaction handlers are now checkCollision* (Catch, LinkSword, Run, RunAttack, SwordAttack, Evade, Stunned, Escape, SwordGuard, TwoSwordAttack, DualSwordAttack). checkCollisionByMode dispatches to them before the state runs, and applyCollisionModePost runs after it.
  • Base class virtuals: vt_0x1DC–vt_0x230 are named, e.g. updateCommon, checkCollisionCommon, configurePoseShield, setSwordPoseAnm, vanishKnives, changeStateAfterFrontWarp, checkCreateKnife, changeStateNext, setWalkAnm.
  • Girahimu 2: determineNextMove, isCutAlongKnifeLine, setGuardArmPose, configureGuardBodyShield, spawnSpinKnives.
  • Base helpers: walkTowardPlayer, updateSwordTracking, configureRunShield, callback_c::updateSlerpFactor.
  • Knife: shootForward, shootAtPlayer.

symbols.txt is updated to match for all four RELs.

Enums

Enum Class Replaces
CollisionMode_e dAcGirahimuBase_c Raw values of field_0xD6C, now mCollisionMode
Move_e dAcGirahimuBase_c Raw values of mCurrentAttack
KnifeLine_e dAcGirahimu2_c Bits of field_0x2210, now mKnifeLineMask
KnifeFormation_e dAcGirahimu2_c Raw values of mKnifeVolleyState
WaitType_e dAcObjGirahimuKnife_c Raw values of mState

KNIFE_COUNT and KNIFE_VOLLEY_SIZE also replace the literal 15 and 5 used for mKnives.

Fields

  • Base class timers and flags: mTrackSnapTimer, mForceGuardTimer, mHandEffectTimer, mLookAtOverrideTimer, mCatchTimer, mTgDisableTimer, mHandHoldTimer, mPrevWarpScale, mbAngleFollowsRotation, mbSubstateFlag.
  • callback_c: mbTrackSword, mbTrackSwordStart, mbLookAtTarget, mHandRTargetDistance, mHandRRetargetTimer.
  • Girahimu 2: mSpinKnifePhase, mKnifeLineMask.
  • Knife: mOwnerPosition, mOwnerHandPosition, mOwnerRotation, mbVanish, mbSpinning.

Notes for review

  • KNIFE_FORMATION_VERTICAL and KNIFE_FORMATION_VOLLEY are both 2 on purpose: mKnifeVolleyState is reused with a different meaning in each half of the fight.
  • COLLISION_MODE_UNUSED_10 has no handler in either fight.
  • A few names are best guesses from behavior, notably mbSubstateFlag (its meaning depends on the state) and mTgDisableTimer.

Rename placeholder functions and members used by the second Ghirahim fight, including the ones it shares with the base class, the first fight and the knife actor. Replace magic numbers with enums for the collision mode, current move, knife wait type, knife line mask and knife formation.

No change to generated code: the rebuilt objects match the previous build in section contents and relocations.
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.

1 participant