From bb4babbe150ef47f7ccd05562cbf8816433ad876 Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Thu, 5 Aug 2021 05:26:49 -0500 Subject: I did it (#888) Co-authored-by: petrie911 --- src/code/z_eff_blure.c | 47 +++++++++++++++++++++-------------------------- 1 file changed, 21 insertions(+), 26 deletions(-) (limited to 'src/code') diff --git a/src/code/z_eff_blure.c b/src/code/z_eff_blure.c index 2e351fbac..2b70b4cb8 100644 --- a/src/code/z_eff_blure.c +++ b/src/code/z_eff_blure.c @@ -189,8 +189,6 @@ void EffectBlure_Init2(void* thisx, void* initParamsx) { void EffectBlure_Destroy(void* thisx) { } -#ifdef NON_MATCHING -// single register swap (saved vs temp register) s32 EffectBlure_Update(void* thisx) { EffectBlure* this = (EffectBlure*)thisx; s32 i; @@ -204,28 +202,28 @@ s32 EffectBlure_Update(void* thisx) { } while (true) { - if (this->elements[0].state != 0) { - break; - } - - for (i = 0; i < 15; i++) { - this->elements[i] = this->elements[i + 1]; - } - - this->elements[i].state = 2; - this->elements[i].p1.x = 0; - this->elements[i].p1.y = 0; - this->elements[i].p1.z = 0; - this->elements[i].p2.x = 0; - this->elements[i].p2.y = 0; - this->elements[i].p2.z = 0; - this->elements[i].flags = 0; - this->elements[i].timer = 0; + if (this->elements[0].state == 0) { + for (i = 0; i < 15; i++) { + this->elements[i] = this->elements[i + 1]; + } - this->numElements--; - if (this->numElements <= 0) { - this->numElements = 0; - return 0; + this->elements[i].state = 2; + this->elements[i].p1.x = 0; + this->elements[i].p1.y = 0; + this->elements[i].p1.z = 0; + this->elements[i].p2.x = 0; + this->elements[i].p2.y = 0; + this->elements[i].p2.z = 0; + this->elements[i].flags = 0; + this->elements[i].timer = 0; + + this->numElements--; + if (this->numElements <= 0) { + this->numElements = 0; + return 0; + } + } else { + break; } } @@ -263,9 +261,6 @@ s32 EffectBlure_Update(void* thisx) { this->addAngle += this->addAngleChange; return 0; } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_blure/EffectBlure_Update.s") -#endif void EffectBlure_UpdateFlags(EffectBlureElement* elem) { Vec3f sp64; -- cgit v1.2.3