summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJordan Longstaff <JordanLongstaff@users.noreply.github.com>2026-01-25 18:39:59 -0500
committerGitHub <noreply@github.com>2026-01-25 23:39:59 +0000
commitfd299cc72b88a3d3a7dd5caa31c5738ec6e08fe1 (patch)
tree08241605429b1c0d105c26d459916cfb4b06e0c8 /src
parenteb5dac74d6435baf85ced9158d3ff915ba8872ca (diff)
Document `BgSpot18Basket` (#2688)
Diffstat (limited to 'src')
-rw-r--r--src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c284
-rw-r--r--src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.h20
2 files changed, 157 insertions, 147 deletions
diff --git a/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c b/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c
index 51bccf7ca..0fb4bc984 100644
--- a/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c
+++ b/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c
@@ -1,3 +1,9 @@
+/*
+ * File: z_bg_spot18_basket.c
+ * Overlay: ovl_Bg_Spot18_Basket
+ * Description: Goron Vase
+ */
+
#include "z_bg_spot18_basket.h"
#include "libc64/qrand.h"
@@ -24,18 +30,18 @@ void BgSpot18Basket_Destroy(Actor* thisx, PlayState* play);
void BgSpot18Basket_Update(Actor* thisx, PlayState* play);
void BgSpot18Basket_Draw(Actor* thisx, PlayState* play);
-void func_808B7BCC(BgSpot18Basket* this, PlayState* play);
-void func_808B7AEC(BgSpot18Basket* this);
-void func_808B7B58(BgSpot18Basket* this);
-void func_808B7BB0(BgSpot18Basket* this);
-void func_808B7D38(BgSpot18Basket* this);
-void func_808B7F74(BgSpot18Basket* this);
-void func_808B818C(BgSpot18Basket* this);
-void func_808B7AFC(BgSpot18Basket* this, PlayState* play);
-void func_808B7B6C(BgSpot18Basket* this, PlayState* play);
-void func_808B7D50(BgSpot18Basket* this, PlayState* play);
-void func_808B7FC0(BgSpot18Basket* this, PlayState* play);
-void func_808B81A0(BgSpot18Basket* this, PlayState* play);
+void BgSpot18Basket_Spinning(BgSpot18Basket* this, PlayState* play);
+void BgSpot18Basket_SetupInactive(BgSpot18Basket* this);
+void BgSpot18Basket_SetupActivation(BgSpot18Basket* this);
+void BgSpot18Basket_SetupSpinning(BgSpot18Basket* this);
+void BgSpot18Basket_SetupExplosionCs(BgSpot18Basket* this);
+void BgSpot18Basket_SetupStopping(BgSpot18Basket* this);
+void BgSpot18Basket_SetupGivingPrize(BgSpot18Basket* this);
+void BgSpot18Basket_Inactive(BgSpot18Basket* this, PlayState* play);
+void BgSpot18Basket_Activation(BgSpot18Basket* this, PlayState* play);
+void BgSpot18Basket_ExplosionCs(BgSpot18Basket* this, PlayState* play);
+void BgSpot18Basket_Stopping(BgSpot18Basket* this, PlayState* play);
+void BgSpot18Basket_GivingPrize(BgSpot18Basket* this, PlayState* play);
ActorProfile Bg_Spot18_Basket_Profile = {
/**/ ACTOR_BG_SPOT18_BASKET,
@@ -87,9 +93,9 @@ static ColliderJntSphInit sJntSphInit = {
sJntSphElementsInit,
};
-static s16 D_808B85C8[] = { 0x8000, 0x2AAA, 0xD555, 0x0000 };
+static s16 sGoronVaseStoppedRotY[] = { 0x8000, 0x2AAA, 0xD555, 0x0000 };
-void func_808B7710(Actor* thisx, PlayState* play) {
+void BgSpot18Basket_InitColliderJntSph(Actor* thisx, PlayState* play) {
BgSpot18Basket* this = (BgSpot18Basket*)thisx;
Collider_InitJntSph(play, &this->colliderJntSph);
@@ -97,8 +103,8 @@ void func_808B7710(Actor* thisx, PlayState* play) {
this->dyna.actor.colChkInfo.mass = MASS_IMMOVABLE;
}
-void func_808B7770(BgSpot18Basket* this, PlayState* play, f32 arg2) {
- static s16 D_808B85D0 = 0;
+void BgSpot18Basket_SpawnDustClouds(BgSpot18Basket* this, PlayState* play, f32 spawnRate) {
+ static s16 spawnPos = 0;
Vec3f acceleration;
Vec3f velocity;
Vec3f position;
@@ -108,14 +114,14 @@ void func_808B7770(BgSpot18Basket* this, PlayState* play, f32 arg2) {
f32 sinValue;
for (i = 0; i != 2; i++) {
- if (arg2 < Rand_ZeroOne()) {
+ if (spawnRate < Rand_ZeroOne()) {
continue;
}
- D_808B85D0 += 0x7530;
+ spawnPos += 0x7530;
- sinValue = Math_SinS(D_808B85D0);
- cosValue = Math_CosS(D_808B85D0);
+ sinValue = Math_SinS(spawnPos);
+ cosValue = Math_CosS(spawnPos);
randomValue = (Rand_ZeroOne() * 35.0f) + 35.0f;
@@ -149,7 +155,7 @@ void BgSpot18Basket_Init(Actor* thisx, PlayState* play) {
CollisionHeader* colHeader = NULL;
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS | DYNA_TRANSFORM_ROT_Y);
- func_808B7710(&this->dyna.actor, play);
+ BgSpot18Basket_InitColliderJntSph(&this->dyna.actor, play);
CollisionHeader_GetVirtual(&gGoronCityVaseCol, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
@@ -160,11 +166,11 @@ void BgSpot18Basket_Init(Actor* thisx, PlayState* play) {
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y;
if (Flags_GetSwitch(play, PARAMS_GET_U(this->dyna.actor.params, 8, 6))) {
- func_808B7BB0(this);
+ BgSpot18Basket_SetupSpinning(this);
return;
}
- func_808B7AEC(this);
+ BgSpot18Basket_SetupInactive(this);
Actor_SpawnAsChild(&play->actorCtx, &this->dyna.actor, play, ACTOR_BG_SPOT18_FUTA, this->dyna.actor.world.pos.x,
this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z, this->dyna.actor.shape.rot.x,
this->dyna.actor.shape.rot.y + 0x1555, this->dyna.actor.shape.rot.z, -1);
@@ -185,50 +191,52 @@ void BgSpot18Basket_Destroy(Actor* thisx, PlayState* play) {
Collider_DestroyJntSph(play, &this->colliderJntSph);
}
-void func_808B7AEC(BgSpot18Basket* this) {
- this->actionFunc = func_808B7AFC;
+void BgSpot18Basket_SetupInactive(BgSpot18Basket* this) {
+ this->actionFunc = BgSpot18Basket_Inactive;
}
-void func_808B7AFC(BgSpot18Basket* this, PlayState* play) {
+void BgSpot18Basket_Inactive(BgSpot18Basket* this, PlayState* play) {
if (Flags_GetSwitch(play, PARAMS_GET_U(this->dyna.actor.params, 8, 6))) {
OnePointCutscene_Init(play, 4220, 80, &this->dyna.actor, CAM_ID_MAIN);
- func_808B7B58(this);
+ BgSpot18Basket_SetupActivation(this);
}
}
-void func_808B7B58(BgSpot18Basket* this) {
- this->actionFunc = func_808B7B6C;
- this->unk_216 = 0;
+void BgSpot18Basket_SetupActivation(BgSpot18Basket* this) {
+ this->actionFunc = BgSpot18Basket_Activation;
+ this->timer = 0;
}
-void func_808B7B6C(BgSpot18Basket* this, PlayState* play) {
- if (this->unk_216 > 20) {
- func_808B7BB0(this);
+void BgSpot18Basket_Activation(BgSpot18Basket* this, PlayState* play) {
+ if (this->timer > 20) {
+ BgSpot18Basket_SetupSpinning(this);
this->dyna.actor.child->parent = NULL;
this->dyna.actor.child = NULL;
}
}
-void func_808B7BB0(BgSpot18Basket* this) {
- this->actionFunc = func_808B7BCC;
- this->unk_210 = this->unk_20C = 0;
+void BgSpot18Basket_SetupSpinning(BgSpot18Basket* this) {
+ this->actionFunc = BgSpot18Basket_Spinning;
+ this->spinRate = this->circleRate = 0;
}
-void func_808B7BCC(BgSpot18Basket* this, PlayState* play) {
+void BgSpot18Basket_Spinning(BgSpot18Basket* this, PlayState* play) {
f32 positionDiff;
Actor* colliderBaseAc;
- Math_StepToS(&this->unk_210, 0x1F4, 0x1E);
+ Math_StepToS(&this->spinRate, 0x1F4, 0x1E);
- this->dyna.actor.shape.rot.y += this->unk_210;
+ this->dyna.actor.shape.rot.y += this->spinRate;
- Math_StepToF(&this->unk_208, 50.0f, 1.5f);
- Math_StepToS(&this->unk_20C, 400, 15);
+ Math_StepToF(&this->circleRadius, 50.0f, 1.5f);
+ Math_StepToS(&this->circleRate, 400, 15);
- this->unk_20E += this->unk_20C;
+ this->circleMoveAngle += this->circleRate;
- this->dyna.actor.world.pos.x = (Math_SinS(this->unk_20E) * this->unk_208) + this->dyna.actor.home.pos.x;
- this->dyna.actor.world.pos.z = (Math_CosS(this->unk_20E) * this->unk_208) + this->dyna.actor.home.pos.z;
+ this->dyna.actor.world.pos.x =
+ (Math_SinS(this->circleMoveAngle) * this->circleRadius) + this->dyna.actor.home.pos.x;
+ this->dyna.actor.world.pos.z =
+ (Math_CosS(this->circleMoveAngle) * this->circleRadius) + this->dyna.actor.home.pos.z;
if (this->colliderJntSph.base.acFlags & AC_HIT) {
colliderBaseAc = this->colliderJntSph.base.ac;
@@ -240,7 +248,7 @@ void func_808B7BCC(BgSpot18Basket* this, PlayState* play) {
if (Math3D_Dist2DSq(colliderBaseAc->world.pos.z, this->colliderJntSph.base.ac->world.pos.x,
this->dyna.actor.world.pos.z, this->dyna.actor.world.pos.x) < SQ(32.0f)) {
OnePointCutscene_Init(play, 4210, 240, &this->dyna.actor, CAM_ID_MAIN);
- func_808B7D38(this);
+ BgSpot18Basket_SetupExplosionCs(this);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
}
}
@@ -249,191 +257,193 @@ void func_808B7BCC(BgSpot18Basket* this, PlayState* play) {
Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG);
}
-void func_808B7D38(BgSpot18Basket* this) {
- this->actionFunc = func_808B7D50;
- this->unk_216 = 0;
- this->unk_214 = 0;
+void BgSpot18Basket_SetupExplosionCs(BgSpot18Basket* this) {
+ this->actionFunc = BgSpot18Basket_ExplosionCs;
+ this->timer = 0;
+ this->pivotAltitude = 0;
}
-void func_808B7D50(BgSpot18Basket* this, PlayState* play) {
- if (this->unk_216 > 120) {
- Math_StepToS(&this->unk_210, 0x3E8, 0x32);
+void BgSpot18Basket_ExplosionCs(BgSpot18Basket* this, PlayState* play) {
+ if (this->timer > 120) {
+ Math_StepToS(&this->spinRate, 0x3E8, 0x32);
} else {
- Math_StepToS(&this->unk_210, 0xBB8, 0x64);
+ Math_StepToS(&this->spinRate, 0xBB8, 0x64);
}
- this->dyna.actor.shape.rot.y += this->unk_210;
+ this->dyna.actor.shape.rot.y += this->spinRate;
- if (this->unk_216 < 70) {
- Math_StepToF(&this->unk_208, 100.0f, 2.0f);
+ if (this->timer < 70) {
+ Math_StepToF(&this->circleRadius, 100.0f, 2.0f);
} else {
- Math_StepToF(&this->unk_208, 0.0f, 2.0f);
+ Math_StepToF(&this->circleRadius, 0.0f, 2.0f);
}
- Math_StepToS(&this->unk_20C, 1000, 20);
+ Math_StepToS(&this->circleRate, 1000, 20);
- this->unk_20E += this->unk_20C;
+ this->circleMoveAngle += this->circleRate;
- this->dyna.actor.world.pos.x = (Math_SinS(this->unk_20E) * this->unk_208) + this->dyna.actor.home.pos.x;
- this->dyna.actor.world.pos.z = (Math_CosS(this->unk_20E) * this->unk_208) + this->dyna.actor.home.pos.z;
+ this->dyna.actor.world.pos.x =
+ (Math_SinS(this->circleMoveAngle) * this->circleRadius) + this->dyna.actor.home.pos.x;
+ this->dyna.actor.world.pos.z =
+ (Math_CosS(this->circleMoveAngle) * this->circleRadius) + this->dyna.actor.home.pos.z;
- this->unk_212 += 0xBB8;
+ this->pivotAzimuth += 0xBB8;
- Math_StepToS(&this->unk_214, 0x5DC, 0x1E);
+ Math_StepToS(&this->pivotAltitude, 0x5DC, 0x1E);
- this->dyna.actor.shape.rot.x = Math_CosS(this->unk_212) * this->unk_214;
- this->dyna.actor.shape.rot.z = -Math_SinS(this->unk_212) * this->unk_214;
+ this->dyna.actor.shape.rot.x = Math_CosS(this->pivotAzimuth) * this->pivotAltitude;
+ this->dyna.actor.shape.rot.z = -Math_SinS(this->pivotAzimuth) * this->pivotAltitude;
- if (this->unk_216 > 140) {
- func_808B7F74(this);
+ if (this->timer > 140) {
+ BgSpot18Basket_SetupStopping(this);
}
- if (this->unk_216 < 80) {
- func_808B7770(this, play, 1.0f);
+ if (this->timer < 80) {
+ BgSpot18Basket_SpawnDustClouds(this, play, 1.0f);
} else {
- func_808B7770(this, play, 0.8f);
+ BgSpot18Basket_SpawnDustClouds(this, play, 0.8f);
}
{
- f32 tempValue2 = (this->unk_210 - 500) * 0.0006f;
- f32 tempValue = CLAMP(tempValue2, 0.0f, 1.5f);
+ f32 freqScale = (this->spinRate - 0x1F4) * 0.0006f;
+ f32 clampedFreqScale = CLAMP(freqScale, 0.0f, 1.5f);
- func_800F436C(&this->dyna.actor.projectedPos, NA_SE_EV_WALL_MOVE_SP - SFX_FLAG, tempValue);
+ func_800F436C(&this->dyna.actor.projectedPos, NA_SE_EV_WALL_MOVE_SP - SFX_FLAG, clampedFreqScale);
}
}
-void func_808B7F74(BgSpot18Basket* this) {
+void BgSpot18Basket_SetupStopping(BgSpot18Basket* this) {
s16 shapeRotY;
shapeRotY = this->dyna.actor.shape.rot.y;
- this->actionFunc = func_808B7FC0;
+ this->actionFunc = BgSpot18Basket_Stopping;
if ((shapeRotY < -0x2E93) || (shapeRotY >= 0x7C19)) {
- this->unk_218 = 2;
+ this->prize = 2;
} else if (shapeRotY < 0x26C2) {
- this->unk_218 = 1;
+ this->prize = 1;
} else {
- this->unk_218 = 0;
+ this->prize = 0;
}
- this->unk_216 = 0;
+ this->timer = 0;
}
-void func_808B7FC0(BgSpot18Basket* this, PlayState* play) {
+void BgSpot18Basket_Stopping(BgSpot18Basket* this, PlayState* play) {
s32 pad;
- s32 tempUnk214;
- s16 arrayValue;
+ s32 tempAltitude;
+ s16 stoppedRotY;
- this->unk_212 += 0xBB8;
+ this->pivotAzimuth += 0xBB8;
- if (this->unk_216 >= 13) {
- tempUnk214 = Math_StepToS(&this->unk_214, 0, 55);
+ if (this->timer >= 13) {
+ tempAltitude = Math_StepToS(&this->pivotAltitude, 0, 55);
} else {
- tempUnk214 = 0;
+ tempAltitude = 0;
}
- this->dyna.actor.shape.rot.x = Math_CosS(this->unk_212) * this->unk_214;
- this->dyna.actor.shape.rot.z = -Math_SinS(this->unk_212) * this->unk_214;
+ this->dyna.actor.shape.rot.x = Math_CosS(this->pivotAzimuth) * this->pivotAltitude;
+ this->dyna.actor.shape.rot.z = -Math_SinS(this->pivotAzimuth) * this->pivotAltitude;
- Math_StepToS(&this->unk_210, 0x1F4, 0xA);
- this->dyna.actor.shape.rot.y += this->unk_210;
+ Math_StepToS(&this->spinRate, 0x1F4, 0xA);
+ this->dyna.actor.shape.rot.y += this->spinRate;
- if (tempUnk214 != 0) {
- arrayValue = D_808B85C8[this->unk_218];
+ if (tempAltitude != 0) {
+ stoppedRotY = sGoronVaseStoppedRotY[this->prize];
- if ((s16)(this->dyna.actor.shape.rot.y - arrayValue) >= 0) {
- this->dyna.actor.shape.rot.y = arrayValue;
+ if ((s16)(this->dyna.actor.shape.rot.y - stoppedRotY) >= 0) {
+ this->dyna.actor.shape.rot.y = stoppedRotY;
- func_808B818C(this);
+ BgSpot18Basket_SetupGivingPrize(this);
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
}
}
- if (this->unk_216 < 30) {
- func_808B7770(this, play, 0.5f);
+ if (this->timer < 30) {
+ BgSpot18Basket_SpawnDustClouds(this, play, 0.5f);
} else {
- func_808B7770(this, play, 0.3f);
+ BgSpot18Basket_SpawnDustClouds(this, play, 0.3f);
}
{
- f32 tempUnk210 = (this->unk_210 - 500) * 0.0006f;
- f32 clampedTempUnk210 = CLAMP(tempUnk210, 0.0f, 1.5f);
+ f32 freqScale = (this->spinRate - 0x1F4) * 0.0006f;
+ f32 clampedFreqScale = CLAMP(freqScale, 0.0f, 1.5f);
- func_800F436C(&this->dyna.actor.projectedPos, NA_SE_EV_WALL_MOVE_SP - SFX_FLAG, clampedTempUnk210);
+ func_800F436C(&this->dyna.actor.projectedPos, NA_SE_EV_WALL_MOVE_SP - SFX_FLAG, clampedFreqScale);
}
}
-void func_808B818C(BgSpot18Basket* this) {
- this->actionFunc = func_808B81A0;
- this->unk_216 = 0;
+void BgSpot18Basket_SetupGivingPrize(BgSpot18Basket* this) {
+ this->actionFunc = BgSpot18Basket_GivingPrize;
+ this->timer = 0;
}
-static s16 D_808B85E4[] = { -0x0FA0, 0x0320, 0x0FA0 };
+static s16 sGoronVaseCollectibleRotY[] = { -0x0FA0, 0x0320, 0x0FA0 };
-void func_808B81A0(BgSpot18Basket* this, PlayState* play) {
+void BgSpot18Basket_GivingPrize(BgSpot18Basket* this, PlayState* play) {
s32 i;
Actor* actor = &this->dyna.actor;
- Vec3f tempVector;
+ Vec3f spawnPos;
EnItem00* collectible;
- if (this->unk_216 == 1) {
- tempVector.x = actor->world.pos.x;
- tempVector.y = actor->world.pos.y + 170.0f;
- tempVector.z = actor->world.pos.z;
+ if (this->timer == 1) {
+ spawnPos.x = actor->world.pos.x;
+ spawnPos.y = actor->world.pos.y + 170.0f;
+ spawnPos.z = actor->world.pos.z;
- if (this->unk_218 == 0) {
- for (i = 0; i < ARRAY_COUNT(D_808B85E4); i++) {
- collectible = Item_DropCollectible(play, &tempVector, ITEM00_BOMBS_A);
+ if (this->prize == 0) {
+ for (i = 0; i < ARRAY_COUNT(sGoronVaseCollectibleRotY); i++) {
+ collectible = Item_DropCollectible(play, &spawnPos, ITEM00_BOMBS_A);
if (collectible != NULL) {
collectible->actor.velocity.y = 11.0f;
- collectible->actor.world.rot.y = D_808B85E4[i];
+ collectible->actor.world.rot.y = sGoronVaseCollectibleRotY[i];
}
}
- } else if (this->unk_218 == 1) {
- for (i = 0; i < ARRAY_COUNT(D_808B85E4); i++) {
- collectible = Item_DropCollectible(play, &tempVector, ITEM00_RUPEE_GREEN);
+ } else if (this->prize == 1) {
+ for (i = 0; i < ARRAY_COUNT(sGoronVaseCollectibleRotY); i++) {
+ collectible = Item_DropCollectible(play, &spawnPos, ITEM00_RUPEE_GREEN);
if (collectible != NULL) {
collectible->actor.velocity.y = 11.0f;
- collectible->actor.world.rot.y = D_808B85E4[i];
+ collectible->actor.world.rot.y = sGoronVaseCollectibleRotY[i];
}
}
- } else if (this->unk_218 == 2) {
- if ((this->unk_21A != 0) || Flags_GetCollectible(play, PARAMS_GET_U(actor->params, 0, 6))) {
- collectible = Item_DropCollectible(play, &tempVector, ITEM00_RUPEE_PURPLE);
+ } else if (this->prize == 2) {
+ if ((this->isHeartPieceGiven) || Flags_GetCollectible(play, PARAMS_GET_U(actor->params, 0, 6))) {
+ collectible = Item_DropCollectible(play, &spawnPos, ITEM00_RUPEE_PURPLE);
if (collectible != NULL) {
collectible->actor.velocity.y = 11.0f;
- collectible->actor.world.rot.y = D_808B85E4[1];
+ collectible->actor.world.rot.y = sGoronVaseCollectibleRotY[1];
}
} else {
- collectible = Item_DropCollectible(play, &tempVector,
+ collectible = Item_DropCollectible(play, &spawnPos,
(PARAMS_GET_U(actor->params, 0, 6) << 8) | ITEM00_HEART_PIECE);
if (collectible != NULL) {
collectible->actor.velocity.y = 11.0f;
- collectible->actor.world.rot.y = D_808B85E4[1];
- this->unk_21A = 1;
+ collectible->actor.world.rot.y = sGoronVaseCollectibleRotY[1];
+ this->isHeartPieceGiven = true;
}
}
- collectible = Item_DropCollectible(play, &tempVector, ITEM00_RUPEE_RED);
+ collectible = Item_DropCollectible(play, &spawnPos, ITEM00_RUPEE_RED);
if (collectible != NULL) {
collectible->actor.velocity.y = 11.0f;
- collectible->actor.world.rot.y = D_808B85E4[0];
+ collectible->actor.world.rot.y = sGoronVaseCollectibleRotY[0];
}
- collectible = Item_DropCollectible(play, &tempVector, ITEM00_RUPEE_BLUE);
+ collectible = Item_DropCollectible(play, &spawnPos, ITEM00_RUPEE_BLUE);
if (collectible != NULL) {
collectible->actor.velocity.y = 11.0f;
- collectible->actor.world.rot.y = D_808B85E4[2];
+ collectible->actor.world.rot.y = sGoronVaseCollectibleRotY[2];
}
}
- } else if (this->unk_216 == 2) {
- if (this->unk_218 == 2) {
+ } else if (this->timer == 2) {
+ if (this->prize == 2) {
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
} else {
Sfx_PlaySfxCentered(NA_SE_SY_TRE_BOX_APPEAR);
}
- } else if (this->unk_216 == 200) {
- func_808B7BB0(this);
+ } else if (this->timer == 200) {
+ BgSpot18Basket_SetupSpinning(this);
}
}
@@ -442,13 +452,13 @@ void BgSpot18Basket_Update(Actor* thisx, PlayState* play) {
BgSpot18Basket* this = (BgSpot18Basket*)thisx;
s32 bgId;
- this->unk_216++;
+ this->timer++;
this->actionFunc(this, play);
this->dyna.actor.floorHeight = BgCheck_EntityRaycastDown4(&play->colCtx, &this->dyna.actor.floorPoly, &bgId,
&this->dyna.actor, &this->dyna.actor.world.pos);
- if (this->actionFunc != func_808B7AFC) {
+ if (this->actionFunc != BgSpot18Basket_Inactive) {
CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderJntSph.base);
- if (this->actionFunc != func_808B7B6C) {
+ if (this->actionFunc != BgSpot18Basket_Activation) {
this->colliderJntSph.base.acFlags &= ~AC_HIT;
CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderJntSph.base);
}
diff --git a/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.h b/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.h
index 6b4c85bce..631847514 100644
--- a/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.h
+++ b/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.h
@@ -13,16 +13,16 @@ typedef struct BgSpot18Basket {
/* 0x0164 */ ColliderJntSph colliderJntSph;
/* 0x0184 */ ColliderJntSphElement colliderJntSphElements[2];
/* 0x0204 */ BgSpot18BasketActionFunc actionFunc;
- /* 0x0208 */ f32 unk_208;
- /* 0x020C */ s16 unk_20C;
- /* 0x020E */ s16 unk_20E;
- /* 0x0210 */ s16 unk_210;
- /* 0x0212 */ s16 unk_212;
- /* 0x0214 */ s16 unk_214;
- /* 0x0216 */ s16 unk_216;
- /* 0x0218 */ s16 unk_218;
- /* 0x021A */ u8 unk_21A;
- /* 0x021B */ u8 unk_21B;
+ /* 0x0208 */ f32 circleRadius;
+ /* 0x020C */ s16 circleRate;
+ /* 0x020E */ s16 circleMoveAngle;
+ /* 0x0210 */ s16 spinRate;
+ /* 0x0212 */ s16 pivotAzimuth;
+ /* 0x0214 */ s16 pivotAltitude;
+ /* 0x0216 */ s16 timer;
+ /* 0x0218 */ s16 prize;
+ /* 0x021A */ u8 isHeartPieceGiven;
+ /* 0x021B */ u8 pad;
} BgSpot18Basket; // size = 0x021C
#endif