summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Longstaff <JordanLongstaff@users.noreply.github.com>2026-05-31 11:47:06 -0400
committerGitHub <noreply@github.com>2026-05-31 17:47:06 +0200
commitaa1a86708fdc0b8d91be1ab35454553ec143a986 (patch)
tree52915809bd907c1adcb44cbb55d95cf0ec230684
parente560ff093aac0c48a23388c647f5139da82232bc (diff)
Finish `EnNutsball` documentation (#2763)
* Finish `EnNutsball` documentation * Rename things
-rw-r--r--src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c b/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c
index f52c80e29..618175d55 100644
--- a/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c
+++ b/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c
@@ -29,8 +29,8 @@ void EnNutsball_Destroy(Actor* thisx, PlayState* play);
void EnNutsball_Update(Actor* thisx, PlayState* play);
void EnNutsball_Draw(Actor* thisx, PlayState* play);
-void func_80ABBB34(EnNutsball* this, PlayState* play);
-void func_80ABBBA8(EnNutsball* this, PlayState* play);
+void EnNutsball_WaitForObject(EnNutsball* this, PlayState* play);
+void EnNutsball_Projectile(EnNutsball* this, PlayState* play);
ActorProfile En_Nutsball_Profile = {
/**/ ACTOR_EN_NUTSBALL,
@@ -84,7 +84,7 @@ void EnNutsball_Init(Actor* thisx, PlayState* play) {
if (this->requiredObjectSlot < 0) {
Actor_Kill(&this->actor);
} else {
- this->actionFunc = func_80ABBB34;
+ this->actionFunc = EnNutsball_WaitForObject;
}
}
@@ -94,21 +94,21 @@ void EnNutsball_Destroy(Actor* thisx, PlayState* play) {
Collider_DestroyCylinder(play, &this->collider);
}
-void func_80ABBB34(EnNutsball* this, PlayState* play) {
+void EnNutsball_WaitForObject(EnNutsball* this, PlayState* play) {
if (Object_IsLoaded(&play->objectCtx, this->requiredObjectSlot)) {
this->actor.objectSlot = this->requiredObjectSlot;
this->actor.draw = EnNutsball_Draw;
this->actor.shape.rot.y = 0;
this->timer = 30;
- this->actionFunc = func_80ABBBA8;
+ this->actionFunc = EnNutsball_Projectile;
this->actor.speed = 10.0f;
}
}
-void func_80ABBBA8(EnNutsball* this, PlayState* play) {
+void EnNutsball_Projectile(EnNutsball* this, PlayState* play) {
Player* player = GET_PLAYER(play);
- Vec3s sp4C;
- Vec3f sp40;
+ Vec3s shieldRot;
+ Vec3f impactPos;
this->timer--;
@@ -131,18 +131,18 @@ void func_80ABBBA8(EnNutsball* this, PlayState* play) {
this->collider.base.atFlags |= AT_TYPE_PLAYER;
this->collider.elem.atDmgInfo.dmgFlags = DMG_DEKU_STICK;
- Matrix_MtxFToYXZRotS(&player->shieldMf, &sp4C, 0);
- this->actor.world.rot.y = sp4C.y + 0x8000;
+ Matrix_MtxFToYXZRotS(&player->shieldMf, &shieldRot, 0);
+ this->actor.world.rot.y = shieldRot.y + 0x8000;
this->timer = 30;
return;
}
}
- sp40.x = this->actor.world.pos.x;
- sp40.y = this->actor.world.pos.y + 4;
- sp40.z = this->actor.world.pos.z;
+ impactPos.x = this->actor.world.pos.x;
+ impactPos.y = this->actor.world.pos.y + 4;
+ impactPos.z = this->actor.world.pos.z;
- EffectSsHahen_SpawnBurst(play, &sp40, 6.0f, 0, 7, 3, 15, HAHEN_OBJECT_DEFAULT, 10, NULL);
+ EffectSsHahen_SpawnBurst(play, &impactPos, 6.0f, 0, 7, 3, 15, HAHEN_OBJECT_DEFAULT, 10, NULL);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, NA_SE_EN_OCTAROCK_ROCK);
Actor_Kill(&this->actor);
} else {
@@ -158,7 +158,7 @@ void EnNutsball_Update(Actor* thisx, PlayState* play) {
s32 pad;
if (!(player->stateFlags1 & (PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29)) ||
- (this->actionFunc == func_80ABBB34)) {
+ (this->actionFunc == EnNutsball_WaitForObject)) {
this->actionFunc(this, play);
Actor_MoveXZGravity(&this->actor);