mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-12 19:04:38 +00:00
Match retail effects files in code (#1690)
* Match code effects files * Poke jenkins
This commit is contained in:
parent
3be307bf35
commit
8f481b648d
4 changed files with 28 additions and 24 deletions
|
@ -114,7 +114,6 @@ s32 EffectShieldParticle_Update(void* thisx) {
|
|||
|
||||
void EffectShieldParticle_GetColors(EffectShieldParticle* this, Color_RGBA8* primColor, Color_RGBA8* envColor) {
|
||||
s32 halfDuration = this->duration * 0.5f;
|
||||
f32 ratio;
|
||||
|
||||
if (halfDuration == 0) {
|
||||
primColor->r = this->primColorStart.r;
|
||||
|
@ -126,7 +125,8 @@ void EffectShieldParticle_GetColors(EffectShieldParticle* this, Color_RGBA8* pri
|
|||
envColor->b = this->envColorStart.b;
|
||||
envColor->a = this->envColorStart.a;
|
||||
} else if (this->timer < halfDuration) {
|
||||
ratio = this->timer / (f32)halfDuration;
|
||||
f32 ratio = this->timer / (f32)halfDuration;
|
||||
|
||||
primColor->r = this->primColorStart.r + (this->primColorMid.r - this->primColorStart.r) * ratio;
|
||||
primColor->g = this->primColorStart.g + (this->primColorMid.g - this->primColorStart.g) * ratio;
|
||||
primColor->b = this->primColorStart.b + (this->primColorMid.b - this->primColorStart.b) * ratio;
|
||||
|
@ -136,7 +136,8 @@ void EffectShieldParticle_GetColors(EffectShieldParticle* this, Color_RGBA8* pri
|
|||
envColor->b = this->envColorStart.b + (this->envColorMid.b - this->envColorStart.b) * ratio;
|
||||
envColor->a = this->envColorStart.a + (this->envColorMid.a - this->envColorStart.a) * ratio;
|
||||
} else {
|
||||
ratio = (this->timer - halfDuration) / (f32)halfDuration;
|
||||
f32 ratio = (this->timer - halfDuration) / (f32)halfDuration;
|
||||
|
||||
primColor->r = this->primColorMid.r + (this->primColorEnd.r - this->primColorMid.r) * ratio;
|
||||
primColor->g = this->primColorMid.g + (this->primColorEnd.g - this->primColorMid.g) * ratio;
|
||||
primColor->b = this->primColorMid.b + (this->primColorEnd.b - this->primColorMid.b) * ratio;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue