diff --git a/include/effect.h b/include/effect.h index 060b6cd0905..782a87ca514 100644 --- a/include/effect.h +++ b/include/effect.h @@ -391,7 +391,7 @@ void EffectSsSibuki_SpawnBurst(struct PlayState* play, Vec3f* pos); void EffectSsSibuki2_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale); void EffectSsGMagma2_Spawn(struct PlayState* play, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 updateRate, s16 drawMode, s16 scale); -void EffectSsStone1_Spawn(struct PlayState* play, Vec3f* pos, s32 arg2); +void EffectSsStone1_Spawn(struct PlayState* play, Vec3f* pos, s32 shortenFadeFlash); void EffectSsHitMark_Spawn(struct PlayState* play, s32 type, s16 scale, Vec3f* pos); void EffectSsHitMark_SpawnFixedScale(struct PlayState* play, s32 type, Vec3f* pos); void EffectSsHitMark_SpawnCustomScale(struct PlayState* play, s32 type, s16 scale, Vec3f* pos); diff --git a/src/code/z_effect_soft_sprite_old_init.c b/src/code/z_effect_soft_sprite_old_init.c index fea0102140d..b8e4c5033f8 100644 --- a/src/code/z_effect_soft_sprite_old_init.c +++ b/src/code/z_effect_soft_sprite_old_init.c @@ -733,11 +733,11 @@ void EffectSsGMagma2_Spawn(PlayState* play, Vec3f* pos, Color_RGBA8* primColor, // EffectSsStone1 Spawn Functions -void EffectSsStone1_Spawn(PlayState* play, Vec3f* pos, s32 arg2) { +void EffectSsStone1_Spawn(PlayState* play, Vec3f* pos, s32 shortenFadeFlash) { EffectSsStone1InitParams initParams; initParams.pos = *pos; - initParams.unk_C = arg2; + initParams.shortenFadeFlash = shortenFadeFlash; EffectSs_Spawn(play, EFFECT_SS_STONE1, 128, &initParams); } diff --git a/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.c b/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.c index bdd99e1e319..9aa5607811c 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.c +++ b/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.c @@ -18,7 +18,7 @@ #include "assets/objects/gameplay_keep/gameplay_keep.h" -#define rReg0 regs[0] +#define rShortenFadeFlash regs[0] u32 EffectSsStone1_Init(PlayState* play, u32 index, EffectSs* this, void* initParamsx); void EffectSsStone1_Draw(PlayState* play, u32 index, EffectSs* this); @@ -53,7 +53,7 @@ u32 EffectSsStone1_Init(PlayState* play, u32 index, EffectSs* this, void* initPa this->pos = pos; this->vec = pos; this->life = 8; - this->rReg0 = initParams->unk_C; + this->rShortenFadeFlash = initParams->shortenFadeFlash; this->draw = EffectSsStone1_Draw; this->update = EffectSsStone1_Update; @@ -85,7 +85,7 @@ void EffectSsStone1_Draw(PlayState* play, u32 index, EffectSs* this) { } void EffectSsStone1_Update(PlayState* play, u32 index, EffectSs* this) { - if ((this->life == 6) && (this->rReg0 != 0)) { + if ((this->life == 6) && this->rShortenFadeFlash) { R_TRANS_FADE_FLASH_ALPHA_STEP = 0; } } diff --git a/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.h b/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.h index c84ab06f9c4..4fd8bb5dc49 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.h +++ b/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.h @@ -6,7 +6,18 @@ typedef struct EffectSsStone1InitParams { /* 0x00 */ Vec3f pos; - /* 0x00 */ s32 unk_C; -} EffectSsStone1InitParams; // size = 0x + + /** + * If this is non-zero, then on the 2nd frame after being spawned, + * the effect will suppress any flash effect from R_TRANS_FADE_FLASH_ALPHA_STEP. + * All current users of EffectSsStone1InitParams set this to 0. + * + * Given that: + * - the only use of R_TRANS_FADE_FLASH_ALPHA_STEP is made by arrows, when they're deku nut "arrows" + * - arrows are the only thing that spawn this effect + * It might be that this parameter was used at some point in development in relation to deku nuts or arrows. + */ + /* 0x0C */ s32 shortenFadeFlash; +} EffectSsStone1InitParams; // size = 0x10 #endif