1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-23 23:41:24 +00:00

Add "do {} while (0);" to CLOSE_DISPS (#2025)

This commit is contained in:
cadmic 2024-08-10 15:48:27 -07:00 committed by GitHub
parent d495436190
commit 9eec8af498
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
58 changed files with 37 additions and 159 deletions

View file

@ -901,20 +901,18 @@ void EnRr_Draw(Actor* thisx, PlayState* play) {
s32 offIndex;
this->actor.colorFilterTimer++;
if ((effectTimer & 1) != 0) {
return;
}
if ((effectTimer & 1) == 0) {
segIndex = 4 - (effectTimer >> 2);
offIndex = (effectTimer >> 1) & 3;
segIndex = 4 - (effectTimer >> 2);
offIndex = (effectTimer >> 1) & 3;
effectPos.x = this->effectPos[segIndex].x + sEffectOffsets[offIndex].x + Rand_CenteredFloat(10.0f);
effectPos.y = this->effectPos[segIndex].y + sEffectOffsets[offIndex].y + Rand_CenteredFloat(10.0f);
effectPos.z = this->effectPos[segIndex].z + sEffectOffsets[offIndex].z + Rand_CenteredFloat(10.0f);
if (this->actor.colorFilterParams & 0x4000) {
EffectSsEnFire_SpawnVec3f(play, &this->actor, &effectPos, 100, 0, 0, -1);
} else {
EffectSsEnIce_SpawnFlyingVec3f(play, &this->actor, &effectPos, 150, 150, 150, 250, 235, 245, 255, 3.0f);
effectPos.x = this->effectPos[segIndex].x + sEffectOffsets[offIndex].x + Rand_CenteredFloat(10.0f);
effectPos.y = this->effectPos[segIndex].y + sEffectOffsets[offIndex].y + Rand_CenteredFloat(10.0f);
effectPos.z = this->effectPos[segIndex].z + sEffectOffsets[offIndex].z + Rand_CenteredFloat(10.0f);
if (this->actor.colorFilterParams & 0x4000) {
EffectSsEnFire_SpawnVec3f(play, &this->actor, &effectPos, 100, 0, 0, -1);
} else {
EffectSsEnIce_SpawnFlyingVec3f(play, &this->actor, &effectPos, 150, 150, 150, 250, 235, 245, 255, 3.0f);
}
}
}
}