From 2cfb7258d1dfc3cbc18200ce3157327c5bb953be Mon Sep 17 00:00:00 2001 From: Ethan Date: Fri, 13 Sep 2024 06:57:12 +0900 Subject: [PATCH] Fix some accidental uninitialized globals in effects --- src/effects/chomp_drop.c | 2 +- src/effects/damage_stars.c | 2 +- src/effects/flame.c | 10 +++++----- src/effects/recover.c | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/effects/chomp_drop.c b/src/effects/chomp_drop.c index 21e503b3e1..64ce7a903a 100644 --- a/src/effects/chomp_drop.c +++ b/src/effects/chomp_drop.c @@ -40,7 +40,7 @@ EffectInstance* chomp_drop_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4 data->unk_18 = arg6; data->unk_34 = 1.0f; data->unk_20 = arg7; - data->unk_38 = rand_int(0x168); + data->unk_38 = rand_int(360); data->unk_40 = arg9; data->unk_44 = 0; data->unk_3C = arg5; diff --git a/src/effects/damage_stars.c b/src/effects/damage_stars.c index e0f626d105..5e55044b99 100644 --- a/src/effects/damage_stars.c +++ b/src/effects/damage_stars.c @@ -19,7 +19,7 @@ u8 D_E0030E90[] = { 254, 213, 172 }; -f32 D_E0030EB4; +f32 D_E0030EB4 = 0.0f; void damage_stars_init(EffectInstance* effect); void damage_stars_update(EffectInstance* effect); diff --git a/src/effects/flame.c b/src/effects/flame.c index 9fb5441cc8..7c5b76e1e7 100644 --- a/src/effects/flame.c +++ b/src/effects/flame.c @@ -21,7 +21,7 @@ FlamePreset FlamePresets[] = { .colorScale = { 255, 109, 255 }, .keyCenter = 92, .envColor = { 102, 191, 255 }, - .primIntensity = 75, + .primIntensity = 75, .sizeScale = 50, .dlist = D_09000800_3543B0, }, @@ -29,7 +29,7 @@ FlamePreset FlamePresets[] = { .colorScale = { 255, 255, 255 }, .keyCenter = 0, .envColor = { 255, 32, 0 }, - .primIntensity = 75, + .primIntensity = 75, .sizeScale = 100, .dlist = D_09000800_3543B0, }, @@ -37,7 +37,7 @@ FlamePreset FlamePresets[] = { .colorScale = { 255, 0, 255 }, .keyCenter = 92, .envColor = { 107, 168, 255 }, - .primIntensity = 75, + .primIntensity = 75, .sizeScale = 10, .dlist = D_09000800_3543B0, }, @@ -45,13 +45,13 @@ FlamePreset FlamePresets[] = { .colorScale = { 255, 255, 255 }, .keyCenter = 244, .envColor = { 247, 175, 175 }, - .primIntensity = 22, + .primIntensity = 22, .sizeScale = 30, .dlist = D_09000800_3543B0, }, }; -s32 LastFlameRenderFrame; +s32 LastFlameRenderFrame = 0; void flame_init(EffectInstance* effect); void flame_update(EffectInstance* effect); diff --git a/src/effects/recover.c b/src/effects/recover.c index 71519a5754..7b4aff2a5b 100644 --- a/src/effects/recover.c +++ b/src/effects/recover.c @@ -87,14 +87,14 @@ EffectInstance* recover_main(s32 type, f32 posX, f32 posY, f32 posZ, s32 duratio if (i == 1) { part->pos.x = 0.0f; part->unk_34 = 0; - part->scaleX = 0.0f;; - part->scaleY = 0.0f;; + part->scaleX = 0.0f; + part->scaleY = 0.0f; part->vel.y = 1.4f; } else { part->vel.y = 1.4f; part->unk_34 = i + 10; - part->scaleX = 0.0f;; - part->scaleY = 0.0f;; + part->scaleX = 0.0f; + part->scaleY = 0.0f; part->pos.x = ((i & 1) * 2 - 1) * ((i - 1) >> 1) * 4; } part->timeLeft = 0;