1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-27 23:36:22 +00:00

[Doc] actor En_Bombf (Bombflower) - just the last unk (#1378)

* name last unk in EnBombfType

* rename to isActive

* isEnabled with comment

* rename to isFuseEnabled
This commit is contained in:
krm01 2022-10-14 15:44:49 -07:00 committed by GitHub
parent 22b78f169f
commit f82b9bd208
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View file

@ -90,7 +90,7 @@ void EnBombf_Init(Actor* thisx, PlayState* play) {
EnBombf* this = (EnBombf*)thisx; EnBombf* this = (EnBombf*)thisx;
Actor_SetScale(thisx, 0.01f); Actor_SetScale(thisx, 0.01f);
this->unk_200 = 1; this->isFuseEnabled = true;
Collider_InitCylinder(play, &this->bombCollider); Collider_InitCylinder(play, &this->bombCollider);
Collider_InitJntSph(play, &this->explosionCollider); Collider_InitJntSph(play, &this->explosionCollider);
Collider_SetCylinder(play, &this->bombCollider, thisx, &sCylinderInit); Collider_SetCylinder(play, &this->bombCollider, thisx, &sCylinderInit);
@ -172,7 +172,7 @@ void EnBombf_GrowBomb(EnBombf* this, PlayState* play) {
bombFlower = (EnBombf*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOMBF, this->actor.world.pos.x, bombFlower = (EnBombf*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOMBF, this->actor.world.pos.x,
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0); this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0);
if (bombFlower != NULL) { if (bombFlower != NULL) {
bombFlower->unk_200 = 1; bombFlower->isFuseEnabled = true;
bombFlower->timer = 0; bombFlower->timer = 0;
this->timer = 180; this->timer = 180;
this->actor.flags &= ~ACTOR_FLAG_0; this->actor.flags &= ~ACTOR_FLAG_0;
@ -320,7 +320,7 @@ void EnBombf_Update(Actor* thisx, PlayState* play) {
s32 pad[2]; s32 pad[2];
EnBombf* this = (EnBombf*)thisx; EnBombf* this = (EnBombf*)thisx;
if ((this->unk_200 != 0) && (this->timer != 0)) { if ((this->isFuseEnabled) && (this->timer != 0)) {
this->timer--; this->timer--;
} }
@ -369,7 +369,7 @@ void EnBombf_Update(Actor* thisx, PlayState* play) {
if ((this->bombCollider.base.acFlags & AC_HIT) || ((this->bombCollider.base.ocFlags1 & OC1_HIT) && if ((this->bombCollider.base.acFlags & AC_HIT) || ((this->bombCollider.base.ocFlags1 & OC1_HIT) &&
(this->bombCollider.base.oc->category == ACTORCAT_ENEMY))) { (this->bombCollider.base.oc->category == ACTORCAT_ENEMY))) {
this->unk_200 = 1; this->isFuseEnabled = true;
this->timer = 0; this->timer = 0;
} else { } else {
// if a lit stick touches the bomb, set timer to 100 // if a lit stick touches the bomb, set timer to 100
@ -378,7 +378,7 @@ void EnBombf_Update(Actor* thisx, PlayState* play) {
} }
} }
if (this->unk_200 != 0) { if (this->isFuseEnabled) {
dustAccel.y = 0.2f; dustAccel.y = 0.2f;
effPos = thisx->world.pos; effPos = thisx->world.pos;
effPos.y += 25.0f; effPos.y += 25.0f;

View file

@ -15,7 +15,7 @@ typedef struct EnBombf {
/* 0x01B8 */ ColliderJntSphElement explosionColliderItems[1]; /* 0x01B8 */ ColliderJntSphElement explosionColliderItems[1];
/* 0x01F8 */ s16 timer; /* 0x01F8 */ s16 timer;
/* 0x01FC */ EnBombfActionFunc actionFunc; /* 0x01FC */ EnBombfActionFunc actionFunc;
/* 0x0200 */ s32 unk_200; /* 0x0200 */ s32 isFuseEnabled; // enables the ability to ignite and tick down to explode
/* 0x0204 */ u8 bumpOn; /* 0x0204 */ u8 bumpOn;
/* 0x0206 */ s16 flashSpeedScale; /* 0x0206 */ s16 flashSpeedScale;
/* 0x0208 */ f32 flashIntensity; /* 0x0208 */ f32 flashIntensity;