Skip to content

Commit

Permalink
use ASSERT_FX for effects
Browse files Browse the repository at this point in the history
  • Loading branch information
JCog committed Oct 2, 2024
1 parent 4c5b204 commit 3c5abbd
Show file tree
Hide file tree
Showing 133 changed files with 149 additions and 133 deletions.
2 changes: 2 additions & 0 deletions include/effect_shims.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ s32 shim_get_msg_width(s32, u16);
void shim_mdl_get_shroud_tint_params(u8* r, u8* g, u8* b, u8* a);
void shim_sfx_play_sound_at_position(s32 soundID, s32 value2, f32 posX, f32 posY, f32 posZ);
void shim_is_debug_panic(const char* message, const char* file, u32 line, const char* func);
int shim_sprintf(char *s, const char *fmt, ...);

#define guRotateF shim_guRotateF
#define guTranslateF shim_guTranslateF
Expand Down Expand Up @@ -72,5 +73,6 @@ void shim_is_debug_panic(const char* message, const char* file, u32 line, const
#define mdl_get_shroud_tint_params shim_mdl_get_shroud_tint_params
#define sfx_play_sound_at_position shim_sfx_play_sound_at_position
#define is_debug_panic shim_is_debug_panic
#define sprintf shim_sprintf

#endif
6 changes: 4 additions & 2 deletions include/effects_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
#include "effects.h"

// slimmed down assert so that all effects still fit under the TLB page size limit of 0x1000 bytes
#define ASSERT(condition) \
#define ASSERT_FX(condition, effectId) \
if (!(condition)) { \
IS_DEBUG_PANIC("Assert", __FILE__, __LINE__, NULL); \
char assertMsg[11]; \
sprintf(assertMsg, "FX err 0x%02X", effectId); \
IS_DEBUG_PANIC(assertMsg, NULL, 0, NULL); \
}

s32 effect_rand_int(s32);
Expand Down
2 changes: 1 addition & 1 deletion include/functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ void clear_character_set(void);
void clear_trigger_data(void);
void clear_script_list(void);
void clear_entity_data(b32);
void init_effect_data(void);
void check_effect_sizes(void);
void clear_effect_data(void);

void clear_saved_variables(void);
Expand Down
13 changes: 12 additions & 1 deletion src/crash_screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,18 @@ char crashScreenAssertLocation[0x30] = {0};
void crash_screen_set_assert_info(const char* message, const char* file, u32 line, const char* func) {
strncpy(crashScreenAssertMessage, message, sizeof(crashScreenAssertMessage));
crashScreenAssertMessage[sizeof(crashScreenAssertMessage) - 1] = '\0';
sprintf(crashScreenAssertLocation, "%s (%s:%d)", func == NULL ? "Unknown" : func, file, line);

// To make file consistent with standard exceptions, grab only the filename, not the full path.
if (file != NULL) {
const char* slash;
while (slash = strchr(file, '/')) {
if (slash[1] == '\0') {
break;
}
file = slash + 1;
}
}
sprintf(crashScreenAssertLocation, "%s (%s:%d)", func == NULL ? "Unknown" : func, file == NULL ? "Unknown" : file, line);
}

void crash_screen_sleep(s32 ms) {
Expand Down
1 change: 1 addition & 0 deletions src/effect_shims.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@
- shim_mdl_get_shroud_tint_params
- shim_sfx_play_sound_at_position
- shim_is_debug_panic
- shim_sprintf
3 changes: 1 addition & 2 deletions src/effects.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,13 @@ void set_effect_pos_offset(EffectInstance* effect, f32 x, f32 y, f32 z) {
((f32*)data)[3] = z;
}

void init_effect_data(void) {
void check_effect_sizes(void) {
s32 i;

for (i = 0; i < ARRAY_COUNT(gEffectTable); i++) {
s32 size = gEffectTable[i].dmaEnd - gEffectTable[i].dmaStart;
ASSERT_MSG(size <= 0x1000, "Effect 0x%x == 0x%x bytes (0x1000 limit)", i, size);
}
clear_effect_data();
}

void clear_effect_data(void) {
Expand Down
2 changes: 1 addition & 1 deletion src/effects/attack_result_text.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ EffectInstance* attack_result_text_main(s32 type, f32 posX, f32 posY, f32 posZ,

data = effect->data.attackResultText = general_heap_malloc(effect->numParts * sizeof(*data));

ASSERT(data != NULL);
ASSERT_FX(data != NULL, EFFECT_ATTACK_RESULT_TEXT)

data->isVisible = TRUE;
data->unk_20 = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/effects/aura.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void aura_main(s32 type, f32 posX, f32 posY, f32 posZ, f32 scale, EffectInstance

part = effect->data.aura = general_heap_malloc(numParts * sizeof(*part));

ASSERT(effect->data.aura != NULL);
ASSERT_FX(effect->data.aura != NULL, EFFECT_AURA)

part->renderYaw = 0.0f;

Expand Down
2 changes: 1 addition & 1 deletion src/effects/balloon.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ EffectInstance* balloon_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s
effect->data.balloon = data;
part = data;

ASSERT(data != NULL);
ASSERT_FX(data != NULL, EFFECT_BALLOON)

part->unk_00 = arg0;
part->unk_04 = arg1;
Expand Down
2 changes: 1 addition & 1 deletion src/effects/big_smoke_puff.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void big_smoke_puff_main(f32 x, f32 y, f32 z) {
data = general_heap_malloc(effect->numParts * sizeof(*data));
effect->data.bigSmokePuff = data;

ASSERT(data != NULL);
ASSERT_FX(data != NULL, EFFECT_BIG_SMOKE_PUFF)

for (i = 0; i < effect->numParts; i++, data++) {
data->unk_00 = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/effects/big_snowflakes.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void big_snowflakes_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3) {
data = general_heap_malloc(effect->numParts * sizeof(*data));
effect->data.bigSnowflakes = data;

ASSERT(data != NULL);
ASSERT_FX(data != NULL, EFFECT_BIG_SNOWFLAKES)

mem_clear(data, numParts * sizeof(*data));
data->unk_00 = arg0;
Expand Down
2 changes: 1 addition & 1 deletion src/effects/blast.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void blast_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5) {

part = effect->data.blast = general_heap_malloc(numParts * sizeof(*part));

ASSERT(effect->data.blast != NULL);
ASSERT_FX(effect->data.blast != NULL, EFFECT_BLAST)

mem_clear(part, numParts * sizeof(*part));

Expand Down
2 changes: 1 addition & 1 deletion src/effects/bombette_breaking.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ EffectInstance* bombette_breaking_main(s32 type, s32 modelID, s32 treeIndex, f32
effect = create_effect_instance(bpPtr);
effect->numParts = numParts;
effect->data.bombetteBreaking = data = general_heap_malloc(numParts * sizeof(*data));
ASSERT(data != NULL);
ASSERT_FX(data != NULL, EFFECT_BOMBETTE_BREAKING)

data->unk_04 = -sizeY * 0.5;
data->timeLeft = time;
Expand Down
2 changes: 1 addition & 1 deletion src/effects/breaking_junk.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ EffectInstance* breaking_junk_main(s32 arg0, f32 x, f32 y, f32 z, f32 scale, s32

data = effect->data.breakingJunk = general_heap_malloc(numParts * sizeof(*data));

ASSERT(effect->data.breakingJunk != NULL);
ASSERT_FX(effect->data.breakingJunk != NULL, EFFECT_BREAKING_JUNK)

data->unk_00 = arg0;
data->lifeTime = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/effects/bulb_glow.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void bulb_glow_main(s32 arg0, f32 posX, f32 posY, f32 posZ, f32 arg4, EffectInst
effect = create_effect_instance(&bp);
effect->numParts = numParts;
data = effect->data.bulbGlow = general_heap_malloc(numParts * sizeof(*data));
ASSERT(effect->data.bulbGlow != NULL);
ASSERT_FX(effect->data.bulbGlow != NULL, EFFECT_BULB_GLOW)

data->type = arg0 & 255;
if (arg0 < 256) {
Expand Down
2 changes: 1 addition & 1 deletion src/effects/butterflies.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ EffectInstance* butterflies_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3) {
effect = create_effect_instance(&bp);
effect->numParts = numParts;
part = effect->data.butterflies = general_heap_malloc(numParts * sizeof(*part));
ASSERT(effect->data.butterflies != NULL);
ASSERT_FX(effect->data.butterflies != NULL, EFFECT_BUTTERFLIES)

part->unk_04 = 1000;
part->unk_00 = arg0;
Expand Down
2 changes: 1 addition & 1 deletion src/effects/chapter_change.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ EffectInstance* chapter_change_main(s32 arg0, f32 posX, f32 posY, f32 arg3, f32
effect = create_effect_instance(&bp);
effect->numParts = numParts;
data = effect->data.chapterChange = general_heap_malloc(numParts * sizeof(*data));
ASSERT(effect->data.chapterChange != NULL);
ASSERT_FX(effect->data.chapterChange != NULL, EFFECT_CHAPTER_CHANGE)

data->unk_00 = arg0;
data->lifetime = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/effects/chomp_drop.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ EffectInstance* chomp_drop_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4
effect = create_effect_instance(&bp);
effect->numParts = numParts;
data = effect->data.chompDrop = general_heap_malloc(numParts * sizeof(*data));
ASSERT(effect->data.chompDrop != NULL);
ASSERT_FX(effect->data.chompDrop != NULL, EFFECT_CHOMP_DROP)

data->unk_00 = arg0;
data->unk_04 = arg1;
Expand Down
2 changes: 1 addition & 1 deletion src/effects/cloud_puff.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void cloud_puff_main(f32 x, f32 y, f32 z, f32 angle) {
effect->numParts = numParts;
part = general_heap_malloc(numParts * sizeof(*part));
effect->data.cloudPuff = part;
ASSERT(effect->data.cloudPuff != NULL);
ASSERT_FX(effect->data.cloudPuff != NULL, EFFECT_CLOUD_PUFF)

mem_clear(part, numParts * sizeof(*part));

Expand Down
2 changes: 1 addition & 1 deletion src/effects/cloud_trail.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void cloud_trail_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3) {
part = general_heap_malloc(numParts * sizeof(*part));
effect->data.cloudTrail = part;

ASSERT(effect->data.cloudTrail != NULL);
ASSERT_FX(effect->data.cloudTrail != NULL, EFFECT_CLOUD_TRAIL)

mem_clear(part, numParts * sizeof(*part));

Expand Down
2 changes: 1 addition & 1 deletion src/effects/cold_breath.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ EffectInstance* cold_breath_main(s32 type, f32 posX, f32 posY, f32 posZ, f32 sca
effect = create_effect_instance(&bp);
effect->numParts = numParts;
data = effect->data.coldBreath = general_heap_malloc(numParts * sizeof(*data));
ASSERT(effect->data.coldBreath != NULL);
ASSERT_FX(effect->data.coldBreath != NULL, EFFECT_COLD_BREATH)

data->type = type;
data->lifetime = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/effects/confetti.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ EffectInstance* confetti_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4,
effect = create_effect_instance(bpPtr);
effect->numParts = numParts;
data = effect->data.confetti = (ConfettiFXData*)general_heap_malloc(numParts * sizeof(*data));
ASSERT(effect->data.confetti != NULL);
ASSERT_FX(effect->data.confetti != NULL, EFFECT_CONFETTI)

data->unk_04 = arg1;
data->unk_08 = arg2;
Expand Down
2 changes: 1 addition & 1 deletion src/effects/damage_indicator.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void damage_indicator_main(s32 arg0, f32 posX, f32 posY, f32 posZ, f32 starsRadi
effect->numParts = damageAmt;

effect->data.damageIndicator = part = general_heap_malloc(damageAmt * sizeof(*part));
ASSERT(effect->data.damageIndicator != NULL);
ASSERT_FX(effect->data.damageIndicator != NULL, EFFECT_DAMAGE_INDICATOR)

part->unk_00 = arg0;
part->basePos.x = posX;
Expand Down
2 changes: 1 addition & 1 deletion src/effects/damage_stars.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ void damage_stars_main(s32 type, f32 x, f32 y, f32 z, f32 rotAxisX, f32 rotAxisY
effect = create_effect_instance(bpPtr);
effect->numParts = number;
part = effect->data.damageStars = general_heap_malloc(number * sizeof(*part));
ASSERT(effect->data.damageStars != NULL);
ASSERT_FX(effect->data.damageStars != NULL, EFFECT_DAMAGE_STARS)

for (i = 0; i < number; i++, part++) {
part->type = type;
Expand Down
2 changes: 1 addition & 1 deletion src/effects/debuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ EffectInstance* debuff_main(s32 type, f32 x, f32 y, f32 z) {

effect->data.debuff = data = general_heap_malloc(numParts * sizeof(*data));

ASSERT(data != NULL);
ASSERT_FX(data != NULL, EFFECT_DEBUFF)

mem_clear(data, numParts * sizeof(*data));

Expand Down
2 changes: 1 addition & 1 deletion src/effects/disable_x.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ EffectInstance* disable_x_main(s32 type, f32 x, f32 y, f32 z, s32 arg4) {
effect->numParts = numParts;
data = general_heap_malloc(numParts * sizeof(*data));
effect->data.disableX = data;
ASSERT(effect->data.disableX != NULL);
ASSERT_FX(effect->data.disableX != NULL, EFFECT_DISABLE_X)

data->type = type;
data->scale = 1.0f;
Expand Down
2 changes: 1 addition & 1 deletion src/effects/drop_leaves.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void drop_leaves_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4) {
effect = create_effect_instance(&bp);
effect->numParts = numParts;
part = effect->data.dropLeaves = general_heap_malloc(numParts * sizeof(*part));
ASSERT(effect->data.dropLeaves != NULL);
ASSERT_FX(effect->data.dropLeaves != NULL, EFFECT_DROP_LEAVES)

part->unk_00 = arg0;
part->unk_04 = arg1;
Expand Down
2 changes: 1 addition & 1 deletion src/effects/dust.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ EffectInstance* dust_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4) {
effect = create_effect_instance(bpPtr);
effect->numParts = numParts;
part = effect->data.dust = general_heap_malloc(numParts * sizeof(*part));
ASSERT(effect->data.dust != NULL);
ASSERT_FX(effect->data.dust != NULL, EFFECT_DUST)

part->unk_00 = arg0;
part->unk_04 = arg1;
Expand Down
2 changes: 1 addition & 1 deletion src/effects/effect_3D.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void effect_3D_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5,
effect = create_effect_instance(bpPtr);
effect->numParts = arg7;
part = effect->data.unk_3D = general_heap_malloc(arg7 * sizeof(*part));
ASSERT(effect->data.unk_3D != NULL);
ASSERT_FX(effect->data.unk_3D != NULL, EFFECT_3D)

part->unk_04 = 0;
part->unk_00 = arg0;
Expand Down
2 changes: 1 addition & 1 deletion src/effects/effect_46.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ EffectInstance* effect_46_main(s32 type, PlayerStatus* player, f32 scale, s32 du
effect = create_effect_instance(&bp);
effect->numParts = numParts;
part = effect->data.spin = general_heap_malloc(numParts * sizeof(*part));
ASSERT(effect->data.spin != NULL);
ASSERT_FX(effect->data.spin != NULL, EFFECT_46)

part->type = type;
part->player = player;
Expand Down
2 changes: 1 addition & 1 deletion src/effects/effect_63.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ EffectInstance* effect_63_main(
effect = create_effect_instance(bpPtr);
effect->numParts = numParts;
part = effect->data.unk_63 = general_heap_malloc(numParts * sizeof(*part));
ASSERT(effect->data.unk_63 != NULL);
ASSERT_FX(effect->data.unk_63 != NULL, EFFECT_63)

if (arg9 <= 0) {
part->unk_20 = 1000;
Expand Down
2 changes: 1 addition & 1 deletion src/effects/effect_65.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ EffectInstance* effect_65_main(
effect = create_effect_instance(&bp);
effect->numParts = numParts;
data = effect->data.unk_65 = general_heap_malloc(numParts * sizeof(*data));
ASSERT(effect->data.unk_65 != NULL);
ASSERT_FX(effect->data.unk_65 != NULL, EFFECT_65)

data->variation = variation;
data->lifeTime = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/effects/effect_75.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ EffectInstance* effect_75_main(s32 arg0, f32 posX, f32 posY, f32 posZ, f32 scale
effect = create_effect_instance(&bp);
effect->numParts = numParts;
data = effect->data.unk_75 = general_heap_malloc(numParts * sizeof(*data));
ASSERT(effect->data.unk_75 != NULL);
ASSERT_FX(effect->data.unk_75 != NULL, EFFECT_75)

data->type = arg0;
data->unk_14 = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/effects/effect_86.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ EffectInstance* effect_86_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4,
effect->data.unk_86 = data;
part = data;

ASSERT(data != NULL);
ASSERT_FX(data != NULL, EFFECT_86)

part->unk_00 = arg0;
part->unk_14 = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/effects/embers.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ EffectInstance* embers_main(
effect = create_effect_instance(&bp);
effect->numParts = arg7;
part = effect->data.embers = general_heap_malloc(arg7 * sizeof(*part));
ASSERT(effect->data.embers != NULL);
ASSERT_FX(effect->data.embers != NULL, EFFECT_EMBERS)

part->unk_00 = arg0;
part->lifetime = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/effects/emote.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void emote_main(s32 arg0, Npc* arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32
effect->numParts = numParts;
data = effect->data.emote = general_heap_malloc(numParts * sizeof(*data));

ASSERT(effect->data.emote != NULL);
ASSERT_FX(effect->data.emote != NULL, EFFECT_EMOTE)
data->unk_3C = arg1;
data->unk_00 = arg0;
data->unk_30 = arg0;
Expand Down
2 changes: 1 addition & 1 deletion src/effects/ending_decals.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void ending_decals_main(s32 type, f32 posX, f32 posY, f32 posZ, f32 arg4, Effect
effect = create_effect_instance(&bp);
effect->numParts = numParts;
data = effect->data.endingDecals = general_heap_malloc(numParts * sizeof(*data));
ASSERT(effect->data.endingDecals != NULL);
ASSERT_FX(effect->data.endingDecals != NULL, EFFECT_ENDING_DECALS)

data->type = type;
data->pos.x = posX;
Expand Down
2 changes: 1 addition & 1 deletion src/effects/energy_in_out.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ EffectInstance* energy_in_out_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 a
effect = create_effect_instance(&bp);
effect->numParts = numParts;
firstPart = part = effect->data.energyInOut = general_heap_malloc(numParts * sizeof(*part));
ASSERT(effect->data.energyInOut != NULL);
ASSERT_FX(effect->data.energyInOut != NULL, EFFECT_ENERGY_IN_OUT)

part->unk_00 = arg0;
part->unk_14 = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/effects/energy_orb_wave.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ EffectInstance* energy_orb_wave_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32
effect = create_effect_instance(&bp);
effect->numParts = numParts;
data = effect->data.energyOrbWave = general_heap_malloc(numParts * sizeof(*data));
ASSERT(effect->data.energyOrbWave != NULL);
ASSERT_FX(effect->data.energyOrbWave != NULL, EFFECT_ENERGY_ORB_WAVE)

data->unk_00 = arg0;
data->unk_14 = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/effects/energy_shockwave.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void energy_shockwave_main(
effect = create_effect_instance(&bp);
effect->numParts = numParts;
data = effect->data.energyShockwave = general_heap_malloc(numParts * sizeof(*data));
ASSERT(effect->data.energyShockwave != NULL);
ASSERT_FX(effect->data.energyShockwave != NULL, EFFECT_ENERGY_SHOCKWAVE)

data->unk_00 = arg0;
data->unk_04 = arg1;
Expand Down
2 changes: 1 addition & 1 deletion src/effects/explosion.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void explosion_main(s32 type, f32 x, f32 y, f32 z) {
effect = create_effect_instance(bpPtr);
effect->numParts = numParts;
effect->data.explosion = data = general_heap_malloc(effect->numParts * sizeof(*data));
ASSERT(effect->data.explosion != NULL);
ASSERT_FX(effect->data.explosion != NULL, EFFECT_EXPLOSION)

data->pos.x = x;
data->pos.y = y;
Expand Down
Loading

0 comments on commit 3c5abbd

Please sign in to comment.