Effect data refactor (#1094)

* grood

* fixes
This commit is contained in:
Ethan Roseman 2023-07-25 02:51:48 +09:00 committed by GitHub
parent ccc8e8e46b
commit 01d88aa9ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
65 changed files with 590 additions and 1110 deletions

View File

@ -4,144 +4,6 @@
#include "types.h"
#include "common_structs.h"
enum EffectID {
EFFECT_00 = 0x00,
EFFECT_BIG_SMOKE_PUFF = 0x01,
EFFECT_02 = 0x02, // unused
EFFECT_03 = 0x03, // unused
EFFECT_04 = 0x04, // unused
EFFECT_05 = 0x05, // unused
EFFECT_LANDING_DUST = 0x06,
EFFECT_WALKING_DUST = 0x07,
EFFECT_FLOWER_SPLASH = 0x08,
EFFECT_FLOWER_TRAIL = 0x09,
EFFECT_CLOUD_PUFF = 0x0A,
EFFECT_CLOUD_TRAIL = 0x0B,
EFFECT_FOOTPRINT = 0x0C,
EFFECT_FLOATING_FLOWER = 0x0D,
EFFECT_SNOWFLAKE = 0x0E,
EFFECT_STAR = 0x0F,
EFFECT_EMOTE = 0x10,
EFFECT_SPARKLES = 0x11,
EFFECT_SHAPE_SPELL = 0x12,
EFFECT_GATHER_ENERGY_PINK = 0x13,
EFFECT_DROP_LEAVES = 0x14,
EFFECT_DUST = 0x15,
EFFECT_SHATTERING_STONES = 0x16,
EFFECT_SMOKE_RING = 0x17,
EFFECT_DAMAGE_STARS = 0x18,
EFFECT_EXPLOSION = 0x19,
EFFECT_LENS_FLARE = 0x1A,
EFFECT_GOT_ITEM_OUTLINE = 0x1B,
EFFECT_SPIKY_WHITE_AURA = 0x1C,
EFFECT_SMOKE_IMPACT = 0x1D,
EFFECT_DAMAGE_INDICATOR = 0x1E,
EFFECT_PURPLE_RING = 0x1F,
EFFECT_FLAME = 0x20,
EFFECT_STARS_BURST = 0x21,
EFFECT_STARS_SHIMMER = 0x22,
EFFECT_RISING_BUBBLE = 0x23,
EFFECT_RING_BLAST = 0x24,
EFFECT_SHOCKWAVE = 0x25,
EFFECT_MUSIC_NOTE = 0x26,
EFFECT_SMOKE_BURST = 0x27,
EFFECT_SWEAT = 0x28,
EFFECT_SLEEP_BUBBLE = 0x29,
EFFECT_2A = 0x2A, // unused
EFFECT_WINDY_LEAVES = 0x2B,
EFFECT_FALLING_LEAVES = 0x2C,
EFFECT_STARS_SPREAD = 0x2D,
EFFECT_STEAM_BURST = 0x2E,
EFFECT_STARS_ORBITING = 0x2F,
EFFECT_BIG_SNOWFLAKES = 0x30,
EFFECT_DEBUFF = 0x31,
EFFECT_GREEN_IMPACT = 0x32,
EFFECT_RADIAL_SHIMMER = 0x33,
EFFECT_ENDING_DECALS = 0x34,
EFFECT_LIGHT_RAYS = 0x35,
EFFECT_LIGHTNING = 0x36,
EFFECT_FIRE_BREATH = 0x37,
EFFECT_SHIMMER_BURST = 0x38,
EFFECT_ENERGY_SHOCKWAVE = 0x39,
EFFECT_SHIMMER_WAVE = 0x3A,
EFFECT_AURA = 0x3B,
EFFECT_BULB_GLOW = 0x3C,
EFFECT_3D = 0x3D,
EFFECT_BLAST = 0x3E,
EFFECT_FIRE_FLOWER = 0x3F,
EFFECT_RECOVER = 0x40,
EFFECT_DISABLE_X = 0x41,
EFFECT_BOMBETTE_BREAKING = 0x42,
EFFECT_FIREWORK = 0x43,
EFFECT_CONFETTI = 0x44,
EFFECT_SNOWFALL = 0x45,
EFFECT_46 = 0x46,
EFFECT_GATHER_MAGIC = 0x47,
EFFECT_ATTACK_RESULT_TEXT = 0x48,
EFFECT_SMALL_GOLD_SPARKLE = 0x49,
EFFECT_FLASHING_BOX_SHOCKWAVE = 0x4A,
EFFECT_BALLOON = 0x4B,
EFFECT_FLOATING_ROCK = 0x4C,
EFFECT_CHOMP_DROP = 0x4D,
EFFECT_QUIZMO_STAGE = 0x4E,
EFFECT_RADIATING_ENERGY_ORB = 0x4F,
EFFECT_QUIZMO_ANSWER = 0x50, // unused
EFFECT_MOTION_BLUR_FLAME = 0x51, // three orbs emanating from super block during upgrading animation
EFFECT_ENERGY_ORB_WAVE = 0x52,
EFFECT_MERLIN_HOUSE_STARS = 0x53,
EFFECT_QUIZMO_AUDIENCE = 0x54, // unused
EFFECT_BUTTERFLIES = 0x55,
EFFECT_STAT_CHANGE = 0x56,
EFFECT_SNAKING_STATIC = 0x57,
EFFECT_THUNDERBOLT_RING = 0x58,
EFFECT_SQUIRT = 0x59,
EFFECT_WATER_BLOCK = 0x5A,
EFFECT_WATERFALL = 0x5B,
EFFECT_WATER_FOUNTAIN = 0x5C,
EFFECT_UNDERWATER = 0x5D,
EFFECT_LIGHTNING_BOLT = 0x5E,
EFFECT_WATER_SPLASH = 0x5F,
EFFECT_SNOWMAN_DOLL = 0x60,
EFFECT_FRIGHT_JAR = 0x61,
EFFECT_STOP_WATCH = 0x62,
EFFECT_63 = 0x63,
EFFECT_THROW_SPINY = 0x64,
EFFECT_65 = 0x65,
EFFECT_TUBBA_HEART_ATTACK = 0x66,
EFFECT_WHIRLWIND = 0x67,
EFFECT_RED_IMPACT = 0x68,
EFFECT_FLOATING_CLOUD_PUFF = 0x69,
EFFECT_6A = 0x6A, // unused
EFFECT_ENERGY_IN_OUT = 0x6B,
EFFECT_TATTLE_WINDOW = 0x6C,
EFFECT_SHINY_FLARE = 0x6D,
EFFECT_HUFF_PUFF_BREATH = 0x6E,
EFFECT_COLD_BREATH = 0x6F,
EFFECT_EMBERS = 0x70,
EFFECT_HIEROGLYPHS = 0x71,
EFFECT_MISC_PARTICLES = 0x72,
EFFECT_STATIC_STATUS = 0x73,
EFFECT_MOVING_CLOUD = 0x74,
EFFECT_75 = 0x75,
EFFECT_76 = 0x76, // unused
EFFECT_FIREWORK_ROCKET = 0x77,
EFFECT_PEACH_STAR_BEAM = 0x78,
EFFECT_CHAPTER_CHANGE = 0x79,
EFFECT_ICE_SHARD = 0x7A,
EFFECT_SPIRIT_CARD = 0x7B,
EFFECT_LIL_OINK = 0x7C,
EFFECT_SOMETHING_ROTATING = 0x7D,
EFFECT_BREAKING_JUNK = 0x7E,
EFFECT_PARTNER_BUFF = 0x7F,
EFFECT_QUIZMO_ASSISTANT = 0x80,
EFFECT_ICE_PILLAR = 0x81,
EFFECT_SUN = 0x82,
EFFECT_STAR_SPIRITS_ENERGY = 0x83,
EFFECT_PINK_SPARKLES = 0x84,
EFFECT_STAR_OUTLINE = 0x85,
EFFECT_86 = 0x86,
};
typedef struct BigSmokePuffFXData {
/* 0x00 */ s16 unk_00;
/* 0x02 */ s16 unk_02;
@ -2817,266 +2679,8 @@ EffectInstance* create_effect_instance(EffectBlueprint* effectBp);
void remove_effect(EffectInstance*);
s32 load_effect(s32 effectIndex);
void fx_big_dust_puff(s32, f32, f32, f32, s32);
void fx_big_smoke_puff(f32, f32, f32);
void fx_landing_dust(s32, f32, f32, f32, f32);
void fx_walking_dust(s32, f32, f32, f32, f32, f32);
void fx_flower_splash(f32, f32, f32, f32);
void fx_flower_trail(s32, f32, f32, f32, f32, f32);
EffectInstance* fx_cloud_puff(f32, f32, f32, f32);
EffectInstance* fx_cloud_trail(s32, f32, f32, f32);
EffectInstance* fx_footprint(f32, f32, f32, f32, f32);
EffectInstance* fx_floating_flower(s32, f32, f32, f32, s32);
EffectInstance* fx_snowflake(f32, f32, f32, s32);
void fx_star(s32, f32, f32, f32, f32, f32, f32, f32);
void fx_emote(s32, Npc*, f32, f32, f32, f32, f32, s32, s32*);
void fx_sparkles(s32, f32, f32, f32, f32);
EffectInstance* fx_shape_spell(s32, f32, f32, f32, f32, f32, f32, s32);
EffectInstance* fx_gather_energy_pink(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_drop_leaves(s32, f32, f32, f32, s32);
EffectInstance* fx_dust(s32, f32, f32, f32, s32);
void fx_shattering_stones(s32, f32, f32, f32, f32);
void fx_smoke_ring(s32, f32, f32, f32);
void fx_damage_stars(s32, f32, f32, f32, f32, f32, f32, s32);
void fx_explosion(s32, f32, f32, f32);
EffectInstance* fx_lens_flare(s32, f32, f32, f32, s32);
EffectInstance* fx_got_item_outline(s32, f32, f32, f32, f32, EffectInstance**);
EffectInstance* fx_spiky_white_aura(s32, f32, f32, f32, s32);
void fx_smoke_impact(s32, f32, f32, f32, f32, s32, f32, s32);
EffectInstance* fx_damage_indicator(s32, f32, f32, f32, f32, f32, s32, EffectInstance**);
EffectInstance* fx_purple_ring(s32, f32, f32, f32, f32, f32, f32, f32);
EffectInstance* fx_flame(s32, f32, f32, f32, f32, EffectInstance**);
EffectInstance* fx_stars_burst(s32, f32, f32, f32, f32, f32, s32);
void fx_stars_shimmer(s32, f32, f32, f32, f32, f32, s32, s32);
EffectInstance* fx_rising_bubble(u32, f32, f32, f32, f32);
EffectInstance* fx_ring_blast(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_shockwave(s32, f32, f32, f32);
void fx_music_note(s32, f32, f32, f32);
EffectInstance* fx_smoke_burst(s32, f32, f32, f32, f32, s32);
void fx_sweat(s32, f32 x, f32 y, f32 z, f32 radius, f32 pitch, s32 duration);
void fx_sleep_bubble(s32, f32, f32, f32, f32, f32, EffectInstance**);
EffectInstance* fx_2A(s32, f32, f32, f32);
EffectInstance* fx_windy_leaves(s32, f32, f32, f32);
EffectInstance* fx_falling_leaves(s32, f32, f32, f32);
void fx_stars_spread(s32, f32, f32, f32, s32, s32);
void fx_steam_burst(s32, f32, f32, f32, f32, s32);
void fx_stars_orbiting(s32, f32, f32, f32, f32, s32, EffectInstance**);
void fx_big_snowflakes(s32, f32, f32, f32);
EffectInstance* fx_debuff(s32, f32, f32, f32);
void fx_green_impact(s32, f32, f32, f32, f32);
EffectInstance* fx_radial_shimmer(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_ending_decals(s32, f32, f32, f32, f32, EffectInstance**);
EffectInstance* fx_light_rays(s32, f32, f32, f32, f32, s32*);
EffectInstance* fx_lightning(s32, f32, f32, f32, f32, f32);
EffectInstance* fx_fire_breath(s32, f32, f32, f32, f32, f32, f32, s32, s32, s32);
EffectInstance* fx_shimmer_burst(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_energy_shockwave(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_shimmer_wave(s32, f32, f32, f32, f32, f32, s32, s32);
void fx_aura(s32, f32, f32, f32, f32, EffectInstance**);
EffectInstance* fx_bulb_glow(s32, f32, f32, f32, f32, EffectInstance**);
void fx_3D(s32, f32, f32, f32, f32, f32, f32, s32, s32*);
EffectInstance* fx_blast(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_fire_flower(s32, f32, f32, f32, s32);
EffectInstance* fx_recover(s32, f32, f32, f32, s32);
EffectInstance* fx_disable_x(s32, f32, f32, f32, s32);
EffectInstance* fx_bombette_breaking(s32, s32, s32, f32, s32, s32);
EffectInstance* fx_firework(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_confetti(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_snowfall(s32, s32);
EffectInstance* fx_46(s32, PlayerStatus*, f32, s32);
EffectInstance* fx_gather_magic(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_attack_result_text(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_small_gold_sparkle(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_flashing_box_shockwave(s32, f32, f32, f32, f32, f32);
EffectInstance* fx_balloon(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_floating_rock(s32, f32, f32, f32, f32, f32, f32, f32, s32);
EffectInstance* fx_chomp_drop(s32, f32, f32, f32, f32, s32, f32, s32, f32, s32);
EffectInstance* fx_quizmo_stage(s32, f32, f32, f32);
EffectInstance* fx_radiating_energy_orb(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_quizmo_answer(s32, f32, f32, f32);
EffectInstance* fx_motion_blur_flame(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_energy_orb_wave(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_merlin_house_stars(s32, f32, f32, f32);
EffectInstance* fx_quizmo_audience(s32, f32, f32, f32);
EffectInstance* fx_butterflies(s32, f32, f32, f32);
EffectInstance* fx_stat_change(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_snaking_static(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_thunderbolt_ring(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_squirt(s32, f32, f32, f32, f32, f32, f32, f32, s32);
EffectInstance* fx_water_block(s32, f32 x, f32 y, f32 z, f32 scale /* maybe */, s32);
EffectInstance* fx_waterfall(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_water_fountain(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_underwater(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_lightning_bolt(s32, f32, f32, f32, f32, f32, f32, f32, s32);
EffectInstance* fx_water_splash(s32, f32 x, f32 y, f32 z, f32 scale /* maybe */, s32);
EffectInstance* fx_snowman_doll(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_fright_jar(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_stop_watch(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_63(s32, f32, f32, f32, f32, f32, f32, f32, s32, s32);
EffectInstance* fx_throw_spiny(s32, f32, f32, f32, f32, f32, f32, f32, s32);
EffectInstance* fx_65(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_tubba_heart_attack(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_whirlwind(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_red_impact(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_floating_cloud_puff(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_6A(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_energy_in_out(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_tattle_window(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_shiny_flare(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_huff_puff_breath(s32, f32, f32, f32, f32, f32, f32, s32);
EffectInstance* fx_cold_breath(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_embers(s32, f32, f32, f32, f32, f32, f32, s32, s32, f32, f32);
EffectInstance* fx_hieroglyphs(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_misc_particles(s32, f32, f32, f32, f32, f32, f32, s32, s32);
EffectInstance* fx_static_status(s32, f32, f32, f32, f32, s32, s32); //returns ptr to struct unk_802BE310* in watt.c
EffectInstance* fx_moving_cloud(s32, f32, f32, f32, f32, f32, f32, f32, f32);
EffectInstance* fx_75(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_76(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_firework_rocket(s32, f32, f32, f32, f32, f32, f32, f32, s32);
EffectInstance* fx_peach_star_beam(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_chapter_change(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_ice_shard(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_spirit_card(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_lil_oink(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_something_rotating(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_breaking_junk(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_partner_buff(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_quizmo_assistant(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_ice_pillar(s32, f32 x, f32 y, f32 z, f32, s32);
EffectInstance* fx_sun(s32, f32, f32, f32, f32, s32 time);
EffectInstance* fx_star_spirits_energy(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_pink_sparkles(s32, f32, f32, f32, f32, f32);
EffectInstance* fx_star_outline(s32, f32, f32, f32, f32, s32);
EffectInstance* fx_86(s32, f32, f32, f32, f32, s32);
void fx_sun_undeclared(s32, s32, s32, s32, s32, s32);
void big_smoke_puff_main(f32 x, f32 y, f32 z);
void landing_dust_main(s32 type, f32 x, f32 y, f32 z, f32);
void walking_dust_main(s32, f32, f32, f32, f32, f32);
void flower_splash_main(f32, f32, f32, f32);
void flower_trail_main(s32, f32, f32, f32, f32, f32);
void cloud_puff_main(f32, f32, f32, f32);
void cloud_trail_main(s32, f32, f32, f32);
void footprint_main(f32, f32, f32, f32, f32, f32, f32, f32);
void floating_flower_main(s32, f32, f32, f32, s32);
void snowflake_main(f32, f32, f32, s32, s32);
EffectInstance* star_main(s32, f32, f32, f32, f32, f32, f32, f32);
void emote_main(s32, Npc*, f32, f32, f32, f32, f32, s32, EffectInstance**);
void sparkles_main(s32, f32, f32, f32, f32);
EffectInstance* shape_spell_main(s32, f32, f32, f32, f32, f32, f32, s32);
void gather_energy_pink_main(s32, f32, f32, f32, f32, s32);
void drop_leaves_main(s32, f32, f32, f32, s32);
EffectInstance* dust_main(s32, f32, f32, f32, s32);
void shattering_stones_main(s32, f32, f32, f32, f32);
void smoke_ring_main(s32, f32, f32, f32);
void damage_stars_main(s32, f32, f32, f32, f32, f32, f32, s32);
void explosion_main(s32, f32, f32, f32);
void lens_flare_main(s32, f32, f32, f32, s32);
void got_item_outline_main(s32, f32, f32, f32, f32, EffectInstance**);
void spiky_white_aura_main(s32, f32, f32, f32, s32);
void smoke_impact_main(s32, f32, f32, f32, f32, s32, f32, s32);
void damage_indicator_main(s32, f32, f32, f32, f32, f32, s32, EffectInstance**);
EffectInstance* purple_ring_main(s32, f32, f32, f32, f32, f32, f32, f32);
void flame_main(s32, f32, f32, f32, f32, EffectInstance**);
void stars_burst_main(s32, f32, f32, f32, f32, f32, s32);
void stars_shimmer_main(s32, f32 x, f32 y, f32 z, f32, f32, s32, s32);
void rising_bubble_main(s32, f32, f32, f32, f32);
void ring_blast_main(s32, f32, f32, f32, f32, s32);
void shockwave_main(s32, f32, f32, f32);
void music_note_main(s32, f32, f32, f32);
void smoke_burst_main(s32, f32, f32, f32, f32, s32);
void sweat_main(s32, f32, f32, f32, f32, f32, s32);
void sleep_bubble_main(s32, f32, f32, f32, f32, f32, EffectInstance**);
void windy_leaves_main(s32, f32, f32, f32);
void falling_leaves_main(s32, f32, f32, f32);
void stars_spread_main(s32, f32, f32, f32, s32, s32);
void steam_burst_main(s32, f32, f32, f32, f32, s32);
void stars_orbiting_main(s32, f32, f32, f32, f32, s32, EffectInstance**);
void big_snowflakes_main(s32, f32, f32, f32);
EffectInstance* debuff_main(s32, f32, f32, f32);
EffectInstance* green_impact_main(s32, f32, f32, f32, f32);
EffectInstance* radial_shimmer_main(s32, f32, f32, f32, f32, s32);
void ending_decals_main(s32, f32, f32, f32, f32, EffectInstance**);
void light_rays_main(s32, f32, f32, f32, f32, EffectInstance**);
EffectInstance* lightning_main(s32, f32, f32, f32, f32, f32);
EffectInstance* fire_breath_main(s32, f32, f32, f32, f32, f32, f32, s32, s32, s32);
EffectInstance* shimmer_burst_main(s32, f32, f32, f32, f32, s32);
void energy_shockwave_main(s32, f32, f32, f32, f32, s32);
EffectInstance* shimmer_wave_main(s32, f32, f32, f32, f32, f32, s32, s32);
void aura_main(s32, f32, f32, f32, f32, EffectInstance**);
void bulb_glow_main(s32, f32, f32, f32, f32, EffectInstance**);
void effect_3D_main(s32, f32, f32, f32, f32, f32, f32, s32, EffectInstance**);
void blast_main(s32, f32, f32, f32, f32, s32);
EffectInstance* fire_flower_main(s32, f32, f32, f32, s32);
EffectInstance* recover_main(s32, f32, f32, f32, s32);
EffectInstance* disable_x_main(s32, f32, f32, f32, s32);
EffectInstance* bombette_breaking_main(s32, s32, s32, f32, s32, s32);
EffectInstance* firework_main(s32, f32, f32, f32, f32, s32);
EffectInstance* confetti_main(s32, f32, f32, f32, f32, s32);
EffectInstance* snowfall_main(s32, s32);
EffectInstance* effect_46_main(s32, PlayerStatus*, f32, s32);
EffectInstance* gather_magic_main(s32, f32, f32, f32, f32, s32);
EffectInstance* attack_result_text_main(s32, f32, f32, f32, f32, s32);
EffectInstance* small_gold_sparkle_main(s32, f32, f32, f32, f32);
EffectInstance* flashing_box_shockwave_main(s32, f32, f32, f32, f32, f32);
EffectInstance* balloon_main(s32, f32, f32, f32, f32, s32);
EffectInstance* floating_rock_main(s32, f32, f32, f32, f32, f32, f32, f32, s32);
EffectInstance* chomp_drop_main(s32, f32, f32, f32, f32, s32, f32, s32, f32, s32);
EffectInstance* quizmo_stage_main(s32, f32, f32, f32);
EffectInstance* radiating_energy_orb_main(s32, f32, f32, f32, f32, s32);
EffectInstance* quizmo_answer_main(s32, f32, f32, f32);
EffectInstance* motion_blur_flame_main(s32, f32, f32, f32, f32, s32);
EffectInstance* energy_orb_wave_main(s32, f32, f32, f32, f32, s32);
EffectInstance* merlin_house_stars_main(s32, f32, f32, f32);
EffectInstance* quizmo_audience_main(s32, f32, f32, f32);
EffectInstance* butterflies_main(s32, f32, f32, f32);
EffectInstance* stat_change_main(s32, f32, f32, f32, f32, s32);
EffectInstance* snaking_static_main(s32, f32, f32, f32, f32, s32);
EffectInstance* thunderbolt_ring_main(s32, f32, f32, f32, f32, s32);
EffectInstance* squirt_main(s32, f32, f32, f32, f32, f32, f32, f32, s32);
EffectInstance* water_block_main(s32, f32, f32, f32, f32, s32);
EffectInstance* waterfall_main(s32, f32, f32, f32, f32, s32);
EffectInstance* water_fountain_main(s32, f32, f32, f32, f32, s32);
EffectInstance* underwater_main(s32, f32, f32, f32, f32, s32);
EffectInstance* lightning_bolt_main(s32, f32, f32, f32, f32, f32, f32, f32, s32);
EffectInstance* water_splash_main(s32, f32, f32, f32, f32, s32);
EffectInstance* snowman_doll_main(s32, f32, f32, f32, f32, s32);
EffectInstance* fright_jar_main(s32, f32, f32, f32, f32, s32);
EffectInstance* stop_watch_main(s32, f32, f32, f32, f32, s32);
EffectInstance* effect_63_main(s32, f32, f32, f32, f32, f32, f32, f32, s32, s32);
EffectInstance* throw_spiny_main(s32, f32, f32, f32, f32, f32, f32, f32, s32);
EffectInstance* effect_65_main(s32, f32, f32, f32, f32, s32);
EffectInstance* tubba_heart_attack_main(s32, f32, f32, f32, f32, s32);
EffectInstance* whirlwind_main(s32, f32, f32, f32, f32, s32);
EffectInstance* red_impact_main(s32, f32, f32, f32, f32);
EffectInstance* floating_cloud_puff_main(s32, f32, f32, f32, f32, s32);
EffectInstance* energy_in_out_main(s32, f32, f32, f32, f32, s32);
EffectInstance* tattle_window_main(s32, f32, f32, f32, f32, s32);
EffectInstance* shiny_flare_main(s32, f32, f32, f32, f32);
EffectInstance* huff_puff_breath_main(s32, f32, f32, f32, f32, f32, f32, s32);
EffectInstance* cold_breath_main(s32, f32, f32, f32, f32, s32);
EffectInstance* embers_main(s32, f32, f32, f32, f32, f32, f32, s32, s32, f32, f32);
EffectInstance* hieroglyphs_main(s32, f32, f32, f32, f32, s32);
EffectInstance* misc_particles_main(s32, f32, f32, f32, f32, f32, f32, s32, s32);
EffectInstance* static_status_main(s32, f32, f32, f32, f32, s32, s32);
EffectInstance* moving_cloud_main(s32, f32, f32, f32, f32, f32, f32, f32, f32);
EffectInstance* effect_75_main(s32, f32, f32, f32, f32, s32);
EffectInstance* firework_rocket_main(s32, f32, f32, f32, f32, f32, f32, f32, s32);
EffectInstance* peach_star_beam_main(s32, f32, f32, f32, f32, s32);
EffectInstance* chapter_change_main(s32, f32, f32, f32, f32, s32);
EffectInstance* ice_shard_main(s32, f32, f32, f32, f32, s32);
EffectInstance* spirit_card_main(s32, f32, f32, f32, f32, s32);
EffectInstance* lil_oink_main(void);
EffectInstance* something_rotating_main(s32, f32, f32, f32, f32, s32);
EffectInstance* breaking_junk_main(s32, f32, f32, f32, f32, s32);
EffectInstance* partner_buff_main(s32, f32, f32, f32, f32, s32);
EffectInstance* quizmo_assistant_main(s32, f32, f32, f32, f32, s32);
EffectInstance* ice_pillar_main(s32 arg0, f32 x, f32 y, f32 z, f32 arg4, s32 arg5);
EffectInstance* sun_main(s32, f32, f32, f32, f32, s32);
EffectInstance* star_spirits_energy_main(s32, f32, f32, f32, f32, s32);
EffectInstance* pink_sparkles_main(s32, f32, f32, f32, f32, f32);
EffectInstance* star_outline_main(s32, f32, f32, f32, f32, s32);
EffectInstance* effect_86_main(s32, f32, f32, f32, f32, s32);
#include "effects/effect_defs.h"
#endif

View File

@ -3781,7 +3781,7 @@ void func_8025D640(ActorPart* part, s32 decorationIndex) {
switch (decor->state[decorationIndex]) {
case 0:
decor->effect[decorationIndex] = fx_65(1, part->currentPos.x, part->currentPos.y, part->currentPos.z, 1.0f, 0);
decor->effect[decorationIndex] = fx_effect_65(1, part->currentPos.x, part->currentPos.y, part->currentPos.z, 1.0f, 0);
decor->state[decorationIndex] = 1;
break;
case 1:
@ -3803,7 +3803,7 @@ void func_8025D71C(ActorPart* part, s32 decorationIndex) {
switch (decor->state[decorationIndex]) {
case 0:
decor->effect[decorationIndex] = fx_65(2, part->currentPos.x, part->currentPos.y, part->currentPos.z, 1.0f, 0);
decor->effect[decorationIndex] = fx_effect_65(2, part->currentPos.x, part->currentPos.y, part->currentPos.z, 1.0f, 0);
decor->unk_8C6[decorationIndex].unk00 = 1;
decor->state[decorationIndex] = 1;
break;

View File

@ -573,7 +573,7 @@ void basic_ai_wander(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolum
Npc* npc = get_npc_unsafe(enemy->npcID);
s32 stillWithinTerritory = FALSE;
f32 x, y, z;
s32 sp34;
EffectInstance* sp34;
f32 yaw;
if (aiSettings->playerSearchInterval >= 0) {
@ -673,7 +673,7 @@ void basic_ai_loiter(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolum
Npc* npc = get_npc_unsafe(enemy->npcID);
f32 x, y, z;
f32 yaw;
s32 emoteTemp;
EffectInstance* emoteTemp;
if (aiSettings->playerSearchInterval >= 0) {
if (basic_ai_check_player_dist(territory, enemy, aiSettings->chaseRadius, aiSettings->chaseOffsetDist, 0)) {
@ -784,7 +784,7 @@ void basic_ai_chase_init(Evt* script, MobileAISettings* npcAISettings, EnemyDete
void basic_ai_chase(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolume* territory) {
Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID);
s32 sp28;
EffectInstance* sp28;
f32 x, y, z;
if (!basic_ai_check_player_dist(territory, enemy, aiSettings->chaseRadius, aiSettings->chaseOffsetDist, 1)) {

View File

@ -62,7 +62,6 @@ void au_load_INIT(AuGlobals* arg0, s32 romAddr, ALHeap* heap);
AuResult au_fetch_SBN_file(u32 fileIdx, AuFileFormat format, SBNFileEntry* arg2);
void au_load_PER(AuGlobals* globals, s32 romAddr);
void au_load_PRG(AuGlobals* arg0, s32 romAddr);
// INCLUDE_ASM(s32, "audio/2e230_len_2190", snd_load_BGM);
InstrumentGroup* au_get_BK_instruments(s32 bankGroup, u32 bankIndex);
SoundBank* au_load_BK_to_bank(s32 bkFileOffset, SoundBank* bank, s32 bankIndex, s32 bankGroup);
void au_swizzle_BK_instruments(s32 bkFileOffset, SoundBank* bank, InstrumentGroup instruments, u32 instrumentCount, u8 arg4);

View File

@ -160,7 +160,7 @@ API_CALLABLE(N(SpawnSpinEffect)) {
N(DummyPlayerStatus).position.y = posY - 10.0f;
N(DummyPlayerStatus).position.z = posZ;
fx_46(6, &N(DummyPlayerStatus), 1.0f, duration);
fx_effect_46(6, &N(DummyPlayerStatus), 1.0f, duration);
return ApiStatus_DONE2;
}

View File

@ -615,7 +615,7 @@ s32 func_8021878C_512D5C(Evt* script, s32 isInitialCall) {
D_802310D0.position.x = x;
D_802310D0.position.y = y;
D_802310D0.position.z = z;
fx_46(6, &D_802310D0, temp_f20, temp_v0);
fx_effect_46(6, &D_802310D0, temp_f20, temp_v0);
return ApiStatus_DONE2;
}

View File

@ -484,7 +484,7 @@ API_CALLABLE(N(FlyAround)) {
script->functionTemp[1] = 0;
script->functionTemp[2] = 0;
script->functionTemp[3] = 0;
airRaidEffect = fx_65(0, state->currentPos.x, state->currentPos.y, state->currentPos.z, 1.0f, 0);
airRaidEffect = fx_effect_65(0, state->currentPos.x, state->currentPos.y, state->currentPos.z, 1.0f, 0);
script->functionTemp[0] = 1;
break;
case 1:

View File

@ -16,157 +16,14 @@ extern Addr D_801A6000;
gfx_name##_ROM_END \
}
EffectTableEntry gEffectTable[] = {
/* 0x00 */ {},
/* 0x01 */ FX_ENTRY(big_smoke_puff, effect_gfx_big_smoke_puff),
/* 0x02 */ {},
/* 0x03 */ {},
/* 0x04 */ {},
/* 0x05 */ {},
/* 0x06 */ FX_ENTRY(landing_dust, effect_gfx_landing_dust),
/* 0x07 */ FX_ENTRY(walking_dust, effect_gfx_landing_dust),
/* 0x08 */ FX_ENTRY(flower_splash, effect_gfx_flower_splash_trail),
/* 0x09 */ FX_ENTRY(flower_trail, effect_gfx_flower_splash_trail),
/* 0x0A */ FX_ENTRY(cloud_puff, effect_gfx_cloud_puff_trail),
/* 0x0B */ FX_ENTRY(cloud_trail, effect_gfx_cloud_puff_trail),
/* 0x0C */ FX_ENTRY(footprint, effect_gfx_footprint),
/* 0x0D */ FX_ENTRY(floating_flower, effect_gfx_floating_flower),
/* 0x0E */ FX_ENTRY(snowflake, effect_gfx_snowflake),
/* 0x0F */ FX_ENTRY(star, effect_gfx_star),
/* 0x10 */ FX_ENTRY(emote, effect_gfx_emote),
/* 0x11 */ FX_ENTRY(sparkles, effect_gfx_sparkles),
/* 0x12 */ FX_ENTRY(shape_spell, effect_gfx_shape_spell),
/* 0x13 */ FX_ENTRY(gather_energy_pink, effect_gfx_gather_energy_pink),
/* 0x14 */ FX_ENTRY(drop_leaves, effect_gfx_drop_leaves),
/* 0x15 */ FX_ENTRY(dust, effect_gfx_dust),
/* 0x16 */ FX_ENTRY(shattering_stones, effect_gfx_shattering_stones),
/* 0x17 */ FX_ENTRY(smoke_ring, effect_gfx_landing_dust),
/* 0x18 */ FX_ENTRY(damage_stars, effect_gfx_damage_stars),
/* 0x19 */ FX_ENTRY(explosion, effect_gfx_explosion),
/* 0x1A */ FX_ENTRY(lens_flare, effect_gfx_lens_flare),
/* 0x1B */ FX_ENTRY(got_item_outline, effect_gfx_got_item_outline),
/* 0x1C */ FX_ENTRY(spiky_white_aura, effect_gfx_spiky_white_aura),
/* 0x1D */ FX_ENTRY(smoke_impact, effect_gfx_landing_dust),
/* 0x1E */ FX_ENTRY(damage_indicator, effect_gfx_damage_indicator),
/* 0x1F */ FX_ENTRY(purple_ring, effect_gfx_purple_ring),
/* 0x20 */ FX_ENTRY(flame, effect_gfx_flame),
/* 0x21 */ FX_ENTRY(stars_burst, effect_gfx_damage_stars),
/* 0x22 */ FX_ENTRY(stars_shimmer, effect_gfx_sparkles),
/* 0x23 */ FX_ENTRY(rising_bubble, effect_gfx_rising_bubble),
/* 0x24 */ FX_ENTRY(ring_blast, effect_gfx_ring_blast),
/* 0x25 */ FX_ENTRY(shockwave, effect_gfx_shockwave),
/* 0x26 */ FX_ENTRY(music_note, effect_gfx_music_note),
/* 0x27 */ FX_ENTRY(smoke_burst, effect_gfx_landing_dust),
/* 0x28 */ FX_ENTRY(sweat, effect_gfx_sweat),
/* 0x29 */ FX_ENTRY(sleep_bubble, effect_gfx_sleep_bubble),
/* 0x2A */ {},
/* 0x2B */ FX_ENTRY(windy_leaves, effect_gfx_drop_leaves),
/* 0x2C */ FX_ENTRY(falling_leaves, effect_gfx_falling_leaves),
/* 0x2D */ FX_ENTRY(stars_spread, effect_gfx_stars_spread),
/* 0x2E */ FX_ENTRY(steam_burst, effect_gfx_steam_burst),
/* 0x2F */ FX_ENTRY(stars_orbiting, effect_gfx_stars_orbiting),
/* 0x30 */ FX_ENTRY(big_snowflakes, effect_gfx_big_snowflakes),
/* 0x31 */ FX_ENTRY(debuff, effect_gfx_debuff),
/* 0x32 */ FX_ENTRY(green_impact, effect_gfx_green_impact),
/* 0x33 */ FX_ENTRY(radial_shimmer, effect_gfx_radial_shimmer),
/* 0x34 */ FX_ENTRY(ending_decals, effect_gfx_ending_decals),
/* 0x35 */ FX_ENTRY(light_rays, effect_gfx_light_rays),
/* 0x36 */ FX_ENTRY(lightning, effect_gfx_lightning),
/* 0x37 */ FX_ENTRY(fire_breath, effect_gfx_fire_breath),
/* 0x38 */ FX_ENTRY(shimmer_burst, effect_gfx_sparkles),
/* 0x39 */ FX_ENTRY(energy_shockwave, effect_gfx_energy_shockwave),
/* 0x3A */ FX_ENTRY(shimmer_wave, effect_gfx_sparkles),
/* 0x3B */ FX_ENTRY(aura, effect_gfx_aura),
/* 0x3C */ FX_ENTRY(bulb_glow, effect_gfx_bulb_glow),
/* 0x3D */ FX_ENTRY(effect_3D, effect_gfx_effect_3D),
/* 0x3E */ FX_ENTRY(blast, effect_gfx_blast),
/* 0x3F */ FX_ENTRY(fire_flower, effect_gfx_fire_flower),
/* 0x40 */ FX_ENTRY(recover, effect_gfx_recover),
/* 0x41 */ FX_ENTRY(disable_x, effect_gfx_disable_x),
/* 0x42 */ FX_ENTRY(bombette_breaking, effect_gfx_blast),
/* 0x43 */ FX_ENTRY(firework, effect_gfx_firework),
/* 0x44 */ FX_ENTRY(confetti, effect_gfx_confetti),
/* 0x45 */ FX_ENTRY(snowfall, effect_gfx_snowfall),
/* 0x46 */ FX_ENTRY(effect_46, effect_gfx_effect_46),
/* 0x47 */ FX_ENTRY(gather_magic, effect_gfx_gather_magic),
/* 0x48 */ FX_ENTRY(attack_result_text, effect_gfx_attack_result_text),
/* 0x49 */ FX_ENTRY(small_gold_sparkle, effect_gfx_small_gold_sparkle),
/* 0x4A */ FX_ENTRY(flashing_box_shockwave, effect_gfx_flashing_box_shockwave),
/* 0x4B */ FX_ENTRY(balloon, effect_gfx_balloon),
/* 0x4C */ FX_ENTRY(floating_rock, effect_gfx_floating_rock),
/* 0x4D */ FX_ENTRY(chomp_drop, effect_gfx_chomp_drop),
/* 0x4E */ FX_ENTRY(quizmo_stage, effect_gfx_quizmo_stage),
/* 0x4F */ FX_ENTRY(radiating_energy_orb, effect_gfx_radiating_energy_orb),
/* 0x50 */ FX_ENTRY(quizmo_answer, effect_gfx_quizmo_answer),
/* 0x51 */ FX_ENTRY(motion_blur_flame, effect_gfx_motion_blur_flame),
/* 0x52 */ FX_ENTRY(energy_orb_wave, effect_gfx_energy_orb_wave),
/* 0x53 */ FX_ENTRY(merlin_house_stars, effect_gfx_merlin_house_stars),
/* 0x54 */ FX_ENTRY(quizmo_audience, effect_gfx_quizmo_audience),
/* 0x55 */ FX_ENTRY(butterflies, effect_gfx_butterflies),
/* 0x56 */ FX_ENTRY(stat_change, effect_gfx_stat_change),
/* 0x57 */ FX_ENTRY(snaking_static, effect_gfx_snaking_static),
/* 0x58 */ FX_ENTRY(thunderbolt_ring, effect_gfx_thunderbolt_ring),
/* 0x59 */ FX_ENTRY(squirt, effect_gfx_squirt),
/* 0x5A */ FX_ENTRY(water_block, effect_gfx_water_block),
/* 0x5B */ FX_ENTRY(waterfall, effect_gfx_waterfall),
/* 0x5C */ FX_ENTRY(water_fountain, effect_gfx_water_fountain),
/* 0x5D */ FX_ENTRY(underwater, effect_gfx_underwater),
/* 0x5E */ FX_ENTRY(lightning_bolt, effect_gfx_lightning_bolt),
/* 0x5F */ FX_ENTRY(water_splash, effect_gfx_water_splash),
/* 0x60 */ FX_ENTRY(snowman_doll, effect_gfx_snowman_doll),
/* 0x61 */ FX_ENTRY(fright_jar, effect_gfx_fright_jar),
/* 0x62 */ FX_ENTRY(stop_watch, effect_gfx_stop_watch),
/* 0x63 */ FX_ENTRY(effect_63, effect_gfx_effect_63),
/* 0x64 */ FX_ENTRY(throw_spiny, effect_gfx_throw_spiny),
/* 0x65 */ FX_ENTRY(effect_65, effect_gfx_effect_65),
/* 0x66 */ FX_ENTRY(tubba_heart_attack, effect_gfx_tubba_heart_attack),
/* 0x67 */ FX_ENTRY(whirlwind, effect_gfx_whirlwind),
/* 0x68 */ FX_ENTRY(red_impact, effect_gfx_shockwave),
/* 0x69 */ FX_ENTRY(floating_cloud_puff, effect_gfx_floating_cloud_puff),
/* 0x6A */ {},
/* 0x6B */ FX_ENTRY(energy_in_out, effect_gfx_energy_in_out),
/* 0x6C */ FX_ENTRY(tattle_window, effect_gfx_tattle_window),
/* 0x6D */ FX_ENTRY(shiny_flare, effect_gfx_shiny_flare),
/* 0x6E */ FX_ENTRY(huff_puff_breath, effect_gfx_huff_puff_breath),
/* 0x6F */ FX_ENTRY(cold_breath, effect_gfx_cold_breath),
/* 0x70 */ FX_ENTRY(embers, effect_gfx_embers),
/* 0x71 */ FX_ENTRY(hieroglyphs, effect_gfx_hieroglyphs),
/* 0x72 */ FX_ENTRY(misc_particles, effect_gfx_misc_particles),
/* 0x73 */ FX_ENTRY(static_status, effect_gfx_static_status),
/* 0x74 */ FX_ENTRY(moving_cloud, effect_gfx_moving_cloud),
/* 0x75 */ FX_ENTRY(effect_75, effect_gfx_effect_75),
/* 0x76 */ {},
/* 0x77 */ FX_ENTRY(firework_rocket, effect_gfx_firework_rocket),
/* 0x78 */ FX_ENTRY(peach_star_beam, effect_gfx_peach_star_beam),
/* 0x79 */ FX_ENTRY(chapter_change, effect_gfx_chapter_change),
/* 0x7A */ FX_ENTRY(ice_shard, effect_gfx_ice_shard),
/* 0x7B */ FX_ENTRY(spirit_card, effect_gfx_spirit_card),
/* 0x7C */ FX_ENTRY(lil_oink, effect_gfx_lil_oink),
/* 0x7D */ FX_ENTRY(something_rotating, effect_gfx_spirit_card),
/* 0x7E */ FX_ENTRY(breaking_junk, effect_gfx_breaking_junk),
/* 0x7F */ FX_ENTRY(partner_buff, effect_gfx_partner_buff),
/* 0x80 */ FX_ENTRY(quizmo_assistant, effect_gfx_quizmo_assistant),
/* 0x81 */ FX_ENTRY(ice_pillar, effect_gfx_ice_pillar),
/* 0x82 */ FX_ENTRY(sun, effect_gfx_sun),
/* 0x83 */ FX_ENTRY(star_spirits_energy, effect_gfx_star_spirits_energy),
/* 0x84 */ FX_ENTRY(pink_sparkles, effect_gfx_sparkles),
/* 0x85 */ FX_ENTRY(star_outline, effect_gfx_star_outline),
/* 0x86 */ FX_ENTRY(effect_86, effect_gfx_effect_86),
};
#include "effects/effect_table.c"
s32 D_8007FEB8[] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000008, 0x00000005, 0x00000003, 0x00000004,
0x0000000D, 0x0000003C, 0x00000000, 0x00000200, 0x00000000, 0x00000000,
0x00000003, 0x00000000,
};
s32 D_8007FEB8[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 5, 3, 4, 13, 60, 0, 512, 0, 0, 3, 0 };
/// Used for unbound function points in effect structs.
void stub_effect_delegate(EffectInstance* effect) {
}
void set_effect_pos_offset(EffectInstance* effect, f32 x, f32 y, f32 z) {
s32* data = effect->data.any;

325
src/effects.yaml Normal file
View File

@ -0,0 +1,325 @@
- {}
- name: big_smoke_puff
args: f32, f32, f32
void: True
- {}
- {}
- {}
- {}
- name: landing_dust
args: s32, f32, f32, f32, f32
void: True
- name: walking_dust
args: s32, f32, f32, f32, f32, f32
gfx: landing_dust
void: True
- name: flower_splash
args: f32, f32, f32, f32
gfx: flower_splash_trail
void: True
- name: flower_trail
args: s32, f32, f32, f32, f32, f32
gfx: flower_splash_trail
void: True
- name: cloud_puff
args: f32, f32, f32, f32
gfx: cloud_puff_trail
void: True
- name: cloud_trail
args: s32, f32, f32, f32
gfx: cloud_puff_trail
void: True
- name: footprint
args: f32, f32, f32, f32, f32
void: True
- name: floating_flower
args: s32, f32, f32, f32, s32
void: True
- name: snowflake
args: f32, f32, f32, s32
void: True
- name: star
args: s32, f32, f32, f32, f32, f32, f32, f32
- name: emote
args: s32, Npc*, f32, f32, f32, f32, f32, s32, EffectInstance**
void: True
- name: sparkles
args: s32, f32, f32, f32, f32
void: True
- name: shape_spell
args: s32, f32, f32, f32, f32, f32, f32, s32
- name: gather_energy_pink
args: s32, f32, f32, f32, f32, s32
void: True
- name: drop_leaves
args: s32, f32, f32, f32, s32
void: True
- name: dust
args: s32, f32, f32, f32, s32
- name: shattering_stones
args: s32, f32, f32, f32, f32
void: True
- name: smoke_ring
args: s32, f32, f32, f32
gfx: landing_dust
void: True
- name: damage_stars
args: s32, f32, f32, f32, f32, f32, f32, s32
void: True
- name: explosion
args: s32, f32, f32, f32
void: True
- name: lens_flare
args: s32, f32, f32, f32, s32
void: True
- name: got_item_outline
args: s32, f32, f32, f32, f32, EffectInstance**
void: True
- name: spiky_white_aura
args: s32, f32, f32, f32, s32
void: True
- name: smoke_impact
args: s32, f32, f32, f32, f32, s32, f32, s32
gfx: landing_dust
void: True
- name: damage_indicator
args: s32, f32, f32, f32, f32, f32, s32, EffectInstance**
void: True
- name: purple_ring
args: s32, f32, f32, f32, f32, f32, f32, f32
- name: flame
args: s32, f32, f32, f32, f32, EffectInstance**
void: True
- name: stars_burst
args: s32, f32, f32, f32, f32, f32, s32
gfx: damage_stars
void: True
- name: stars_shimmer
args: s32, f32, f32, f32, f32, f32, s32, s32
gfx: sparkles
void: True
- name: rising_bubble
args: s32, f32, f32, f32, f32
void: True
- name: ring_blast
args: s32, f32, f32, f32, f32, s32
void: True
- name: shockwave
args: s32, f32, f32, f32
void: True
- name: music_note
args: s32, f32, f32, f32
void: True
- name: smoke_burst
args: s32, f32, f32, f32, f32, s32
gfx: landing_dust
void: True
- name: sweat
args: s32, f32, f32, f32, f32, f32, s32
void: True
- name: sleep_bubble
args: s32, f32, f32, f32, f32, f32, EffectInstance**
void: True
- {}
- name: windy_leaves
args: s32, f32, f32, f32
gfx: drop_leaves
void: True
- name: falling_leaves
args: s32, f32, f32, f32
void: True
- name: stars_spread
args: s32, f32, f32, f32, s32, s32
void: True
- name: steam_burst
args: s32, f32, f32, f32, f32, s32
void: True
- name: stars_orbiting
args: s32, f32, f32, f32, f32, s32, EffectInstance**
void: True
- name: big_snowflakes
args: s32, f32, f32, f32
void: True
- name: debuff
args: s32, f32, f32, f32
- name: green_impact
args: s32, f32, f32, f32, f32
- name: radial_shimmer
args: s32, f32, f32, f32, f32, s32
- name: ending_decals
args: s32, f32, f32, f32, f32, EffectInstance**
void: True
- name: light_rays
args: s32, f32, f32, f32, f32, EffectInstance**
void: True
- name: lightning
args: s32, f32, f32, f32, f32, f32
- name: fire_breath
args: s32, f32, f32, f32, f32, f32, f32, s32, s32, s32
- name: shimmer_burst
args: s32, f32, f32, f32, f32, s32
gfx: sparkles
- name: energy_shockwave
args: s32, f32, f32, f32, f32, s32
void: True
- name: shimmer_wave
args: s32, f32, f32, f32, f32, f32, s32, s32
gfx: sparkles
- name: aura
args: s32, f32, f32, f32, f32, EffectInstance**
void: True
- name: bulb_glow
args: s32, f32, f32, f32, f32, EffectInstance**
void: True
- name: effect_3D
args: s32, f32, f32, f32, f32, f32, f32, s32, EffectInstance**
void: True
- name: blast
args: s32, f32, f32, f32, f32, s32
void: True
- name: fire_flower
args: s32, f32, f32, f32, s32
- name: recover
args: s32, f32, f32, f32, s32
- name: disable_x
args: s32, f32, f32, f32, s32
- name: bombette_breaking
args: s32, s32, s32, f32, s32, s32
gfx: blast
- name: firework
args: s32, f32, f32, f32, f32, s32
- name: confetti
args: s32, f32, f32, f32, f32, s32
- name: snowfall
args: s32, s32
- name: effect_46
args: s32, PlayerStatus*, f32, s32
- name: gather_magic
args: s32, f32, f32, f32, f32, s32
- name: attack_result_text
args: s32, f32, f32, f32, f32, s32
- name: small_gold_sparkle
args: s32, f32, f32, f32, f32, s32
- name: flashing_box_shockwave
args: s32, f32, f32, f32, f32, f32
- name: balloon
args: s32, f32, f32, f32, f32, s32
- name: floating_rock
args: s32, f32, f32, f32, f32, f32, f32, f32, s32
- name: chomp_drop
args: s32, f32, f32, f32, f32, s32, f32, s32, f32, s32
- name: quizmo_stage
args: s32, f32, f32, f32
- name: radiating_energy_orb
args: s32, f32, f32, f32, f32, s32
- name: quizmo_answer
args: s32, f32, f32, f32
- name: motion_blur_flame
args: s32, f32, f32, f32, f32, s32
- name: energy_orb_wave
args: s32, f32, f32, f32, f32, s32
- name: merlin_house_stars
args: s32, f32, f32, f32
- name: quizmo_audience
args: s32, f32, f32, f32
- name: butterflies
args: s32, f32, f32, f32
- name: stat_change
args: s32, f32, f32, f32, f32, s32
- name: snaking_static
args: s32, f32, f32, f32, f32, s32
- name: thunderbolt_ring
args: s32, f32, f32, f32, f32, s32
- name: squirt
args: s32, f32, f32, f32, f32, f32, f32, f32, s32
- name: water_block
args: s32, f32, f32, f32, f32, s32
- name: waterfall
args: s32, f32, f32, f32, f32, s32
- name: water_fountain
args: s32, f32, f32, f32, f32, s32
- name: underwater
args: s32, f32, f32, f32, f32, s32
- name: lightning_bolt
args: s32, f32, f32, f32, f32, f32, f32, f32, s32
- name: water_splash
args: s32, f32, f32, f32, f32, s32
- name: snowman_doll
args: s32, f32, f32, f32, f32, s32
- name: fright_jar
args: s32, f32, f32, f32, f32, s32
- name: stop_watch
args: s32, f32, f32, f32, f32, s32
- name: effect_63
args: s32, f32, f32, f32, f32, f32, f32, f32, s32, s32
- name: throw_spiny
args: s32, f32, f32, f32, f32, f32, f32, f32, s32
- name: effect_65
args: s32, f32, f32, f32, f32, s32
- name: tubba_heart_attack
args: s32, f32, f32, f32, f32, s32
- name: whirlwind
args: s32, f32, f32, f32, f32, s32
- name: red_impact
args: s32, f32, f32, f32, f32, s32
gfx: shockwave
- name: floating_cloud_puff
args: s32, f32, f32, f32, f32, s32
- {}
- name: energy_in_out
args: s32, f32, f32, f32, f32, s32
- name: tattle_window
args: s32, f32, f32, f32, f32, s32
- name: shiny_flare
args: s32, f32, f32, f32, f32, s32
- name: huff_puff_breath
args: s32, f32, f32, f32, f32, f32, f32, s32
- name: cold_breath
args: s32, f32, f32, f32, f32, s32
- name: embers
args: s32, f32, f32, f32, f32, f32, f32, s32, s32, f32, f32
- name: hieroglyphs
args: s32, f32, f32, f32, f32, s32
- name: misc_particles
args: s32, f32, f32, f32, f32, f32, f32, s32, s32
- name: static_status
args: s32, f32, f32, f32, f32, s32, s32
- name: moving_cloud
args: s32, f32, f32, f32, f32, f32, f32, f32, f32
- name: effect_75
args: s32, f32, f32, f32, f32, s32
- {}
- name: firework_rocket
args: s32, f32, f32, f32, f32, f32, f32, f32, s32
- name: peach_star_beam
args: s32, f32, f32, f32, f32, s32
- name: chapter_change
args: s32, f32, f32, f32, f32, s32
- name: ice_shard
args: s32, f32, f32, f32, f32, s32
- name: spirit_card
args: s32, f32, f32, f32, f32, s32
- name: lil_oink
args: s32, f32, f32, f32, f32, s32
- name: something_rotating
args: s32, f32, f32, f32, f32, s32
gfx: spirit_card
- name: breaking_junk
args: s32, f32, f32, f32, f32, s32
- name: partner_buff
args: s32, f32, f32, f32, f32, s32
- name: quizmo_assistant
args: s32, f32, f32, f32, f32, s32
- name: ice_pillar
args: s32, f32, f32, f32, f32, s32
- name: sun
args: s32, f32, f32, f32, f32, s32
- name: star_spirits_energy
args: s32, f32, f32, f32, f32, s32
- name: pink_sparkles
args: s32, f32, f32, f32, f32, f32
gfx: sparkles
- name: star_outline
args: s32, f32, f32, f32, f32, s32
- name: effect_86
args: s32, f32, f32, f32, f32, s32

View File

@ -130,6 +130,3 @@ void blast_appendGfx(void *effect) {
gSPDisplayList(gMainGfxPos++, dlist);
gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
}
// #else
// INCLUDE_ASM(s32, "effects/blast", blast_appendGfx);
// #endif

View File

@ -54,6 +54,8 @@ EffectInstance* chomp_drop_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4
void chomp_drop_init(EffectInstance* effect) {
}
EFFECT_DEF_DUST(dust_main);
void chomp_drop_update(EffectInstance* effect) {
ChompDropFXData* data = effect->data.chompDrop;
s32 unk40;

View File

@ -59,6 +59,8 @@ void energy_shockwave_main(
void energy_shockwave_init(EffectInstance* effect) {
}
EFFECT_DEF_SHIMMER_WAVE(shimmer_wave_main);
void energy_shockwave_update(EffectInstance* effect) {
EnergyShockwaveFXData* data = effect->data.energyShockwave;
s32 unk_28;

View File

@ -93,6 +93,10 @@ void explosion_main(s32 type, f32 x, f32 y, f32 z) {
void explosion_init(EffectInstance* effect) {
}
EFFECT_DEF_SMOKE_RING(smoke_ring_main);
EFFECT_DEF_CONFETTI(confetti_main);
void explosion_update(EffectInstance* effect) {
ExplosionFXData* part = effect->data.explosion;
s32 unk_00;

View File

@ -77,6 +77,8 @@ EffectInstance* fire_flower_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg
void fire_flower_init(EffectInstance* effect) {
}
EFFECT_DEF_STARS_SPREAD(stars_spread_main);
void fire_flower_update(EffectInstance* effect) {
FireFlowerFXData* part = effect->data.fireFlower;
s32 unk_04;

View File

@ -62,6 +62,8 @@ EffectInstance* floating_rock_main(s32 type, f32 posX, f32 posY, f32 posZ, f32 f
void floating_rock_init(EffectInstance* effect) {
}
EFFECT_DEF_DUST(dust_main);
void floating_rock_update(EffectInstance* effect) {
FloatingRockFXData* data = effect->data.floatingRock;
s32 time;

View File

@ -19,7 +19,7 @@ void func_E0018000(FootprintFXData* part) {
guMtxF2L(sp18, &part->mtx);
}
void footprint_main(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7) {
void footprint_main(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4) {
EffectBlueprint bp;
EffectInstance* effect;
FootprintFXData* part;

View File

@ -15,6 +15,10 @@ extern Gfx D_09001208_40B3C8[];
Gfx* D_E011E7F0[] = { D_090011A8_40B368, D_090011C8_40B388, D_090011E8_40B3A8, D_09001208_40B3C8 };
Gfx* D_E011E800[] = { D_09001000_40B1C0 };
EFFECT_DEF_MISC_PARTICLES(misc_particles_main);
EFFECT_DEF_ICE_SHARD(ice_shard_main);
EFFECT_DEF_COLD_BREATH(cold_breath_main);
EffectInstance* ice_pillar_main(s32 arg0, f32 x, f32 y, f32 z, f32 scale, s32 arg5) {
EffectBlueprint effectBp;
EffectInstance* effect;

View File

@ -25,6 +25,11 @@ void lightning_update(EffectInstance* effect);
void lightning_render(EffectInstance* effect);
void lightning_appendGfx(void* effect);
EFFECT_DEF_GATHER_MAGIC(gather_magic_main);
EFFECT_DEF_BULB_GLOW(bulb_glow_main);
EFFECT_DEF_SNAKING_STATIC(snaking_static_main);
EFFECT_DEF_FLASHING_BOX_SHOCKWAVE(flashing_box_shockwave_main);
EffectInstance* lightning_main(
s32 arg0,
f32 arg1,

View File

@ -49,7 +49,7 @@ Gfx* D_E0114718[] = {
s8 lil_oink_AnimateGfxSelect[] = { 1, 2, 1, 0 };
EffectInstance* lil_oink_main(void) {
EffectInstance* lil_oink_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5) {
EffectBlueprint bp;
EffectInstance* effect;
LilOinkFXData* data;

View File

@ -11,7 +11,7 @@ void red_impact_update(EffectInstance* effect);
void red_impact_render(EffectInstance* effect);
void red_impact_appendGfx(void* effect);
EffectInstance* red_impact_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4) {
EffectInstance* red_impact_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5) {
EffectBlueprint bp;
EffectBlueprint* bpPtr = &bp;
EffectInstance* effect;

View File

@ -20,7 +20,7 @@ void shiny_flare_update(EffectInstance* effect);
void shiny_flare_render(EffectInstance* effect);
void shiny_flare_appendGfx(void* effect);
EffectInstance* shiny_flare_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4) {
EffectInstance* shiny_flare_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5) {
EffectBlueprint effectBp;
EffectInstance* effect;
ShinyFlareFXData* data;

View File

@ -56,12 +56,12 @@ EffectInstance* small_gold_sparkle_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3,
part++;
for (i = 1; i < numParts; i++, part++) {
part->unk_08 = sPartParams[1 + (i - 1) * 5];
part->unk_0C = sPartParams[2 + (i - 1) * 5];
part->unk_10 = sPartParams[3 + (i - 1) * 5];
part->unk_04 = -1;
part->unk_20 = sPartParams[0 + (i - 1) * 5];
part->unk_1C = (arg4 * sPartParams[4 + (i - 1) * 5]) * 0.01;
part->unk_08 = sPartParams[1 + (i - 1) * 5];
part->unk_0C = sPartParams[2 + (i - 1) * 5];
part->unk_10 = sPartParams[3 + (i - 1) * 5];
part->unk_04 = -1;
part->unk_20 = sPartParams[0 + (i - 1) * 5];
part->unk_1C = (arg4 * sPartParams[4 + (i - 1) * 5]) * 0.01;
}
return effect;
}

View File

@ -11,7 +11,7 @@ void snowflake_update(EffectInstance* effect);
void snowflake_render(EffectInstance* effect);
void snowflake_appendGfx(void* effect);
void snowflake_main(f32 x, f32 y, f32 z, s32 arg3, s32 arg4) {
void snowflake_main(f32 x, f32 y, f32 z, s32 arg3) {
EffectBlueprint bp;
EffectInstance* effect;
SnowflakeFXData* part;

View File

@ -120,6 +120,9 @@ EffectInstance* snowman_doll_main(
void snowman_doll_init(EffectInstance* effect) {
}
EFFECT_DEF_COLD_BREATH(cold_breath_main);
EFFECT_DEF_MISC_PARTICLES(misc_particles_main);
void snowman_doll_update(EffectInstance* effect) {
SnowmanDollFXData* data = effect->data.snowmanDoll;
s32 unk_14;

View File

@ -26,6 +26,9 @@ void spirit_card_update(EffectInstance* effect);
void spirit_card_render(EffectInstance* effect);
void spirit_card_appendGfx(void* effect);
EFFECT_DEF_RING_BLAST(ring_blast_main);
EFFECT_DEF_MISC_PARTICLES(misc_particles_main);
EffectInstance* spirit_card_main(
s32 arg0,
f32 arg1,

View File

@ -116,6 +116,8 @@ EffectInstance* star_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32
void star_init(EffectInstance* effect) {
}
EFFECT_DEF_LANDING_DUST(landing_dust_main);
void star_update(EffectInstance* effect) {
PlayerStatus* playerStatus = &gPlayerStatus;
StarFXData* data = effect->data.star;

View File

@ -105,6 +105,8 @@ EffectInstance* tubba_heart_attack_main(
void tubba_heart_attack_init(EffectInstance* effect) {
}
EFFECT_DEF_FLOATING_CLOUD_PUFF(floating_cloud_puff_main);
void tubba_heart_attack_update(EffectInstance* effect) {
TubbaHeartAttackFXData* data = effect->data.tubbaHeartAttack;
EffectInstance* puffEffect;

View File

@ -115,6 +115,8 @@ EffectInstance* water_block_main(s32 arg0, f32 x, f32 y, f32 z, f32 arg4, s32 ar
void water_block_init(EffectInstance* effect) {
}
EFFECT_DEF_WATER_SPLASH(water_splash_main);
void water_block_update(EffectInstance* effect) {
WaterBlockFXData *data;
f32 temp_f20;

View File

@ -851,7 +851,7 @@ ApiStatus OnPlayerFled(Evt* script, s32 isInitialCall) {
enemy->aiFlags |= ENEMY_AI_FLAG_SUSPEND;
if (!skipReaction) {
s32 unk;
EffectInstance* unk;
if (!(enemy->aiFlags & ENEMY_AI_FLAG_10)) {
npc->currentAnim = *enemy->animList;

View File

@ -79,7 +79,7 @@ ApiStatus ShowEmote(Evt* script, s32 isInitialCall) {
f32 radius = evt_get_float_variable(script, *args++);
Npc* npc;
s32 emoteHandle;
EffectInstance* emoteHandle;
f32 x, y, z, r;
switch (emoterType) {
@ -322,7 +322,10 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) {
f32 fVar1, fVar2, fVar3, fVar4, fVar5, fVar6;
f32 fVar7, fVar8, fVar9, fVar10, fVar11;
s32 sp30, sp34, sp38, sp3C;
EffectInstance* sp30;
EffectInstance* sp34;
EffectInstance* sp38;
EffectInstance* sp3C;
s32 a2, a6, a7, a8, a9;
@ -407,8 +410,8 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) {
fx_star(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, fVar8);
break;
case EFFECT_EMOTE:
fx_emote(iVar1, (Npc*)a2, fVar3, fVar4, fVar5, fVar6, fVar7, iVar8, &sp30);
evt_set_variable(script, a8, sp30);
fx_emote(iVar1, (Npc*) a2, fVar3, fVar4, fVar5, fVar6, fVar7, iVar8, &sp30);
evt_set_variable(script, a8, (s32) sp30);
break;
case EFFECT_SPARKLES:
fx_sparkles(iVar1, fVar2, fVar3, fVar4, fVar5);
@ -441,8 +444,8 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) {
fx_lens_flare(iVar1, fVar2, fVar3, fVar4, iVar5);
break;
case EFFECT_GOT_ITEM_OUTLINE:
fx_got_item_outline(iVar1, fVar2, fVar3, fVar4, fVar5, (EffectInstance**) &sp34);
evt_set_variable(script, a6, sp34);
fx_got_item_outline(iVar1, fVar2, fVar3, fVar4, fVar5, &sp34);
evt_set_variable(script, a6, (s32) sp34);
break;
case EFFECT_SPIKY_WHITE_AURA:
fx_spiky_white_aura(iVar1, fVar2, fVar3, fVar4, iVar5);
@ -451,8 +454,8 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) {
fx_smoke_impact(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6, fVar7, iVar8);
break;
case EFFECT_DAMAGE_INDICATOR:
fx_damage_indicator(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, iVar7, (EffectInstance**) &sp30);
evt_set_variable(script, a8, sp30);
fx_damage_indicator(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, iVar7, &sp30);
evt_set_variable(script, a8, (s32) sp30);
break;
case EFFECT_PURPLE_RING:
fx_purple_ring(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, fVar8);
@ -482,15 +485,15 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) {
fx_sweat(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, iVar7);
break;
case EFFECT_SLEEP_BUBBLE:
fx_sleep_bubble(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, (EffectInstance**)&sp38);
evt_set_variable(script, a7, sp38);
fx_sleep_bubble(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, &sp38);
evt_set_variable(script, a7, (s32) sp38);
break;
case EFFECT_WINDY_LEAVES:
fx_windy_leaves(iVar1, fVar2, fVar3, fVar4);
break;
case EFFECT_FLAME:
fx_flame(iVar1, fVar2, fVar3, fVar4, fVar5, (EffectInstance**)&sp34);
evt_set_variable(script, a6, sp34);
fx_flame(iVar1, fVar2, fVar3, fVar4, fVar5, &sp34);
evt_set_variable(script, a6, (s32) sp34);
break;
case EFFECT_FALLING_LEAVES:
fx_falling_leaves(iVar1, fVar2, fVar3, fVar4);
@ -502,8 +505,8 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) {
fx_steam_burst(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_STARS_ORBITING:
fx_stars_orbiting(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6, (EffectInstance**)&sp38);
evt_set_variable(script, a7, sp38);
fx_stars_orbiting(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6, &sp38);
evt_set_variable(script, a7, (s32) sp38);
break;
case EFFECT_BIG_SNOWFLAKES:
fx_big_snowflakes(iVar1, fVar2, fVar3, fVar4);
@ -518,12 +521,12 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) {
fx_radial_shimmer(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_ENDING_DECALS:
fx_ending_decals(iVar1, fVar2, fVar3, fVar4, fVar5, (EffectInstance**)&sp34);
evt_set_variable(script, a6, sp34);
fx_ending_decals(iVar1, fVar2, fVar3, fVar4, fVar5, &sp34);
evt_set_variable(script, a6, (s32) sp34);
break;
case EFFECT_LIGHT_RAYS:
fx_light_rays(iVar1, fVar2, fVar3, fVar4, fVar5, &sp34);
evt_set_variable(script, a6, sp34);
evt_set_variable(script, a6, (s32) sp34);
break;
case EFFECT_LIGHTNING:
effectRet = fx_lightning(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6);
@ -541,16 +544,16 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) {
fx_shimmer_wave(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, iVar7, iVar8);
break;
case EFFECT_AURA:
fx_aura(iVar1, fVar2, fVar3, fVar4, fVar5, (EffectInstance**)&sp34);
evt_set_variable(script, a6, sp34);
fx_aura(iVar1, fVar2, fVar3, fVar4, fVar5, &sp34);
evt_set_variable(script, a6, (s32) sp34);
break;
case EFFECT_BULB_GLOW:
fx_bulb_glow(iVar1, fVar2, fVar3, fVar4, fVar5, (EffectInstance**)&sp34);
evt_set_variable(script, a6, sp34);
fx_bulb_glow(iVar1, fVar2, fVar3, fVar4, fVar5, &sp34);
evt_set_variable(script, a6, (s32) sp34);
break;
case EFFECT_3D:
fx_3D(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, iVar8, &sp3C);
evt_set_variable(script, a9, sp3C);
fx_effect_3D(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, iVar8, &sp3C);
evt_set_variable(script, a9, (s32) sp3C);
break;
case EFFECT_BLAST:
fx_blast(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
@ -562,7 +565,7 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) {
effectRet = fx_recover(iVar1, fVar2, fVar3, fVar4, iVar5);
break;
case EFFECT_DISABLE_X:
effectRet = (EffectInstance*)fx_disable_x(iVar1, fVar2, fVar3, fVar4, iVar5);
effectRet = fx_disable_x(iVar1, fVar2, fVar3, fVar4, iVar5);
break;
case EFFECT_BOMBETTE_BREAKING:
effectRet = fx_bombette_breaking(iVar1, iVar2, iVar3, fVar4, iVar5, iVar6);
@ -577,7 +580,7 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) {
effectRet = fx_snowfall(iVar1, iVar2);
break;
case EFFECT_46:
effectRet = fx_46(iVar1, (PlayerStatus*)a2, fVar3, iVar4);
effectRet = fx_effect_46(iVar1, (PlayerStatus*) a2, fVar3, iVar4);
break;
case EFFECT_GATHER_MAGIC:
effectRet = fx_gather_magic(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
@ -655,13 +658,13 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) {
effectRet = fx_stop_watch(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_63:
effectRet = fx_63(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, fVar8, iVar9, iVar10);
effectRet = fx_effect_63(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, fVar8, iVar9, iVar10);
break;
case EFFECT_THROW_SPINY:
effectRet = fx_throw_spiny(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, fVar8, iVar9);
break;
case EFFECT_65:
effectRet = fx_65(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
effectRet = fx_effect_65(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_TUBBA_HEART_ATTACK:
effectRet = fx_tubba_heart_attack(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
@ -706,7 +709,7 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) {
effectRet = fx_moving_cloud(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, fVar8, fVar9);
break;
case EFFECT_75:
effectRet = fx_75(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
effectRet = fx_effect_75(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_FIREWORK_ROCKET:
effectRet = fx_firework_rocket(iVar1, fVar2, fVar3, fVar4, fVar5, fVar6, fVar7, fVar8, iVar9);
@ -757,14 +760,14 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) {
effectRet = fx_star_outline(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
case EFFECT_86:
effectRet = fx_86(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
effectRet = fx_effect_86(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
break;
default:
PANIC();
}
if (effectRet != NULL) {
evt_set_variable(script, LVarF, (s32)effectRet);
evt_set_variable(script, LVarF, (s32) effectRet);
}
return ApiStatus_DONE2;

View File

@ -111,7 +111,3 @@ static void viMgrMain(void *arg) {
}
}
}
// INCLUDE_ASM(void, "os/vimgr", osCreateViManager, OSPri pri);
// INCLUDE_ASM(s32, "os/vimgr", viMgrMain);

View File

@ -309,9 +309,6 @@ void pause_tabs_draw_map(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 h
}
}
// #if VERSION_PAL
// INCLUDE_ASM(void, "pause/pause_tabs", pause_tabs_init);
// #else
void pause_tabs_init(MenuPanel* tab) {
s32 i;
@ -335,7 +332,6 @@ void pause_tabs_init(MenuPanel* tab) {
tab->initialized = TRUE;
gPauseTabsPreviousTab = 5;
}
//#endif
void pause_tabs_handle_input(MenuPanel* tab) {
Window* pauseWindows;

View File

@ -118,7 +118,7 @@ void action_update_spin(void) {
playerStatus->spinRate = -playerSpinState->spinRate;
}
if (spinFlags != 0) {
playerStatus->specialDecorationEffect = fx_46(effectType, playerStatus, 1.0f, 1000);
playerStatus->specialDecorationEffect = fx_effect_46(effectType, playerStatus, 1.0f, 1000);
}
phys_clear_spin_history();

View File

@ -425,7 +425,7 @@ API_CALLABLE(N(RunMinigame)) {
Enemy* enemy;
Npc* npc;
s32 writeback;
EffectInstance* writeback;
Model* model;
Matrix4f mtx;
@ -911,7 +911,7 @@ API_CALLABLE(N(CleanupGame)) {
SmashGameData* data = enemy->varTablePtr[SMASH_DATA_VAR_IDX];
Npc* npc;
u32 screenX, screenY,screenZ;
s32 writeback;
EffectInstance* writeback;
s32 i;
if (enemy->varTable[3] == 4) {

View File

@ -11,10 +11,10 @@ ApiStatus N(CreateWhaleGeyser)(Evt* script, s32 isInitialStatus) {
f32 var6 = evt_get_float_variable(script, *args++);
f32 var7 = evt_get_float_variable(script, *args++);
s32 var8 = evt_get_variable(script, *args++);
s32 outVal;
EffectInstance* outVal;
fx_3D(var1, var2, var3, var4, var5, var6, var7, var8, &outVal);
script->varTable[0] = outVal;
fx_effect_3D(var1, var2, var3, var4, var5, var6, var7, var8, &outVal);
script->varTablePtr[0] = outVal;
return ApiStatus_DONE2;
}

View File

@ -122,7 +122,7 @@ void N(AvoidPlayerAI_ChaseInit)(Evt* script, MobileAISettings* npcAISettings, En
void N(AvoidPlayerAI_Chase)(Evt* script, MobileAISettings* npcAISettings, EnemyDetectVolume* territory) {
Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID);
s32 emoteTemp;
EffectInstance* emoteTemp;
if (!basic_ai_check_player_dist(territory, enemy, npcAISettings->chaseRadius, npcAISettings->chaseOffsetDist, 1)) {
fx_emote(EMOTE_QUESTION, npc, 0.0f, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 15, &emoteTemp);

View File

@ -69,7 +69,7 @@ void N(CleftAI_HidingInit)(Evt* script, MobileAISettings* aiSettings, EnemyDetec
void N(CleftAI_Hiding)(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolume* volume) {
Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID);
s32 emoteTemp;
EffectInstance* emoteTemp;
if (script->functionTemp[1] <= 0) {
script->functionTemp[1] = aiSettings->playerSearchInterval;
@ -124,7 +124,7 @@ void N(CleftAI_FindPlayerInit)(Evt* script, MobileAISettings* aiSettings, EnemyD
void N(CleftAI_FindPlayer)(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolume* volume) {
Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID);
s32 var;
EffectInstance* var;
if (basic_ai_check_player_dist(volume, enemy, aiSettings->chaseRadius, aiSettings->chaseOffsetDist, 0)) {
npc->yaw = atan2(npc->pos.x, npc->pos.z, gPlayerStatusPtr->position.x, gPlayerStatusPtr->position.z);

View File

@ -35,7 +35,7 @@ void N(ClubbaNappingAI_Sleep)(Evt* script, MobileAISettings* aiSettings, EnemyDe
Npc* npc = get_npc_unsafe(enemy->npcID);
PlayerData* playerData = get_player_data();
s32 shouldWakeUp = FALSE;
s32 emoteTemp;
EffectInstance* emoteTemp;
f32 posX, posZ;
if (basic_ai_check_player_dist(territory, enemy, 80.0f, 0.0f, 0)) {

View File

@ -132,7 +132,7 @@ void N(FlyingAI_Wander)(Evt* script, MobileAISettings* aiSettings, EnemyDetectVo
if (gPlayerStatusPtr->position.y < (npc->pos.y + npc->collisionHeight) + 10.0 &&
basic_ai_check_player_dist(territory, enemy, aiSettings->alertRadius, aiSettings->alertOffsetDist, 0) != 0)
{
s32 emoteTemp;
EffectInstance* emoteTemp;
fx_emote(EMOTE_EXCLAMATION, npc, 0, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 0xC, &emoteTemp);
npc->moveToPos.y = npc->pos.y;
ai_enemy_play_sound(npc, SOUND_2F4, SOUND_PARAM_MORE_QUIET);
@ -198,7 +198,7 @@ void N(FlyingAI_Loiter)(Evt* script, MobileAISettings* aiSettings, EnemyDetectVo
f32 posX, posY, posZ, posW;
f32 hoverHeight = (f32)enemy->varTable[3] / 100.0;
f32 temp_f26 = hoverHeight + (f32)((f32)enemy->varTable[7] / 100.0);
s32 var;
EffectInstance* var;
if (npc->duration > 0) {
npc->duration--;

View File

@ -15,7 +15,7 @@ void N(FlyingMagikoopaAI_11)(Evt* script, MobileAISettings* aiSettings, EnemyDet
Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID);
f32 basePosY = (f32)enemy->varTable[1] / 100.0;
s32 emoteTemp;
EffectInstance* emoteTemp;
npc->pos.y = basePosY + sin_deg(enemy->varTable[0]) * 6.0;
enemy->varTable[0] = clamp_angle(enemy->varTable[0] + 10);
@ -189,7 +189,7 @@ void N(FlyingMagikoopaAI_21)(Evt* script, MobileAISettings* aiSettings, EnemyDet
Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID);
f32 posX, posY, posZ;
s32 emoteTemp;
EffectInstance* emoteTemp;
npc->duration--;
if (npc->duration == 0) {
@ -227,7 +227,7 @@ void N(FlyingMagikoopaAI_23)(Evt* script, MobileAISettings* aiSettings, EnemyDet
Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID);
s32 temp_s1;
s32 emoteTemp;
EffectInstance* emoteTemp;
npc->duration--;
if (npc->duration <= 0) {

View File

@ -38,7 +38,7 @@ void N(FlyingNoAttackAI_13)(Evt* script, MobileAISettings* aiSettings, EnemyDete
Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID);
f32 x, y, z, w;
s32 var;
EffectInstance* var;
s32 flag;
f32 temp_f6;

View File

@ -43,7 +43,7 @@ void N(GuardAI_IdleInit)(Evt* script, GuardAISettings* aiSettings, EnemyDetectVo
void N(GuardAI_Idle)(Evt* script, GuardAISettings* aiSettings, EnemyDetectVolume* territory) {
Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID);
s32 emoteTemp;
EffectInstance* emoteTemp;
if (aiSettings->playerSearchInterval >= 0 && basic_ai_check_player_dist(territory, enemy, aiSettings->chaseRadius, aiSettings->chaseOffsetDist, 0)) {
fx_emote(EMOTE_EXCLAMATION, npc, 0.0f, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 15, &emoteTemp);
@ -112,7 +112,7 @@ void N(GuardAI_ChaseInit)(Evt* script, GuardAISettings* aiSettings, EnemyDetectV
void N(GuardAI_Chase)(Evt* script, GuardAISettings* aiSettings, EnemyDetectVolume* arg2) {
Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID);
s32 emoteTemp;
EffectInstance* emoteTemp;
if (!basic_ai_check_player_dist(arg2, enemy, aiSettings->chaseRadius, aiSettings->chaseOffsetDist, 1)) {
fx_emote(EMOTE_QUESTION, npc, 0.0f, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 15, &emoteTemp);
@ -155,7 +155,7 @@ void N(GuardAI_ReturnHomeInit)(Evt* script, GuardAISettings* aiSettings, EnemyDe
void N(GuardAI_ReturnHome)(Evt* script, GuardAISettings* aiSettings, EnemyDetectVolume* territory) {
Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID);
s32 emoteTemp;
EffectInstance* emoteTemp;
if (aiSettings->playerSearchInterval >= 0) {
if (script->functionTemp[1] <= 0) {

View File

@ -49,7 +49,7 @@ void N(HoppingAI_Hop)(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolu
do {
script->functionTemp[1] = aiSettings->playerSearchInterval;
if (basic_ai_check_player_dist(territory, enemy, aiSettings->alertRadius, aiSettings->alertOffsetDist, 0) != 0) {
s32 emoteTemp;
EffectInstance* emoteTemp;
fx_emote(EMOTE_EXCLAMATION, npc, 0.0f, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 15, &emoteTemp);
ai_enemy_play_sound(npc, SOUND_2F4, SOUND_PARAM_MORE_QUIET);
npc->yaw = atan2(npc->pos.x, npc->pos.z, gPlayerStatusPtr->position.x, gPlayerStatusPtr->position.z);
@ -127,7 +127,7 @@ void N(HoppingAI_Loiter)(Evt* script, MobileAISettings* aiSettings, EnemyDetectV
Npc* npc = get_npc_unsafe(enemy->npcID);
if (aiSettings->playerSearchInterval >= 0 && basic_ai_check_player_dist(territory, enemy, aiSettings->chaseRadius, aiSettings->chaseOffsetDist, 0) != 0) {
s32 emoteTemp;
EffectInstance* emoteTemp;
fx_emote(EMOTE_EXCLAMATION, npc, 0.0f, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 15, &emoteTemp);
ai_enemy_play_sound(npc, SOUND_2F4, SOUND_PARAM_MORE_QUIET);
npc->yaw = atan2(npc->pos.x, npc->pos.z, gPlayerStatusPtr->position.x, gPlayerStatusPtr->position.z);
@ -164,7 +164,7 @@ void N(HoppingAI_Chase)(Evt* script, MobileAISettings* aiSettings, EnemyDetectVo
Npc* npc = get_npc_unsafe(enemy->npcID);
f32 posX, posY, posZ;
f32 groundY, hitDepth;
s32 emoteTemp;
EffectInstance* emoteTemp;
if (npc->moveSpeed > 0.0) {
posX = npc->pos.x;

View File

@ -47,7 +47,7 @@ API_CALLABLE(N(KoopaPatrolAI_Main)) {
}
if (enemy->aiFlags & ENEMY_AI_FLAG_SUSPEND) {
s32 emoteTemp;
EffectInstance* emoteTemp;
script->functionTemp[0] = 99;
script->functionTemp[1] = 0;

View File

@ -31,7 +31,7 @@ void N(LakituAI_Wander)(Evt* script, MobileAISettings* aiSettings, EnemyDetectVo
Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID);
f32 x, y, z, w;
s32 emoteTemp;
EffectInstance* emoteTemp;
f32 temp_f20;
f32 temp_f22;
f32 temp_f24;
@ -117,7 +117,7 @@ void N(LakituAI_Loiter)(Evt* script, MobileAISettings* aiSettings, EnemyDetectVo
Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID);
f32 posX, posY, posZ, hitDepth;
s32 emoteTemp;
EffectInstance* emoteTemp;
f32 var1 = enemy->varTable[3];
f32 var2;
f32 temp_f20;

View File

@ -156,7 +156,7 @@ void N(MagikoopaAI_21)(Evt* script, MobileAISettings* aiSettings, EnemyDetectVol
Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID);
f32 posX, posY, posZ;
s32 emoteTemp;
EffectInstance* emoteTemp;
npc->duration--;
if (npc->duration == 0) {
@ -196,7 +196,7 @@ void N(MagikoopaAI_23)(Evt* script, MobileAISettings* aiSettings, EnemyDetectVol
Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID);
s32 projectileEnemy;
s32 emoteTemp;
EffectInstance* emoteTemp;
npc->duration--;
if (npc->duration <= 0) {

View File

@ -34,7 +34,7 @@ void N(MeleeHitbox_31)(Evt* script) {
void N(MeleeHitbox_32)(Evt* script) {
Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID);
s32 emoteTemp;
EffectInstance* emoteTemp;
npc->duration--;
if (npc->duration <= 0) {

View File

@ -154,7 +154,7 @@ static void N(MontyMoleAI_Surface)(Evt* script, MobileAISettings* aiSettings, En
static void N(MontyMoleAI_DrawRock)(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolume* territory) {
Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID);
s32 emoteOut;
EffectInstance* emoteOut;
npc->duration--;
if ((npc->duration) <= 0) {

View File

@ -23,7 +23,7 @@ void N(PiranhaPlantAI_00)(Evt* script, MobileAISettings* aiSettings, EnemyDetect
void N(PiranhaPlantAI_01)(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolume* territory) {
Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID);
s32 temp;
EffectInstance* temp;
if (basic_ai_check_player_dist(territory, enemy, aiSettings->alertRadius, aiSettings->alertOffsetDist, 0)) {
ai_enemy_play_sound(npc, SOUND_BURROW_DIG, 0);
@ -237,7 +237,7 @@ void N(PiranhaPlantAI_11)(Evt* script, MobileAISettings* aiSettings, EnemyDetect
void N(PiranhaPlantAI_12)(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolume* territory) {
Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID);
s32 temp;
EffectInstance* temp;
npc->duration++;
if (npc->duration == enemy->varTable[13]) {
@ -269,7 +269,7 @@ void N(PiranhaPlantAI_13)(Evt* script, MobileAISettings* aiSettings, EnemyDetect
void N(PiranhaPlantAI_LosePlayer)(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolume* territory) {
Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID);
s32 retVal;
EffectInstance* retVal;
npc->duration--;
if (npc->duration == 0) {

View File

@ -55,7 +55,7 @@ void N(UnkNpcAIFunc48)(Evt* script, f32 arg1, f32 arg2, EnemyDetectVolume* terri
Npc* npc = get_npc_unsafe(enemy->npcID);
if (basic_ai_check_player_dist(territory, enemy, arg1, arg2, 1) == 0) {
s32 sp28;
EffectInstance* sp28;
fx_emote(EMOTE_QUESTION, npc, 0.0f, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 15, &sp28);
npc->currentAnim = enemy->animList[ENEMY_ANIM_INDEX_IDLE];
@ -81,7 +81,7 @@ void N(ProjectileHitbox_30)(Evt* script) {
if (npc->duration <= 0) {
npcID = N(ProjectileHitbox_GetUsableProjectileID)(script);
if (npcID < 0) {
s32 emoteTemp;
EffectInstance* emoteTemp;
fx_emote(EMOTE_QUESTION, npc, 0.0f, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 15, &emoteTemp);
npc->currentAnim = enemy->animList[ENEMY_ANIM_INDEX_IDLE];

View File

@ -175,7 +175,7 @@ void N(SentinelAI_LosePlayer)(Evt* script, MobileAISettings* aiSettings, EnemyDe
Npc* npc = get_npc_unsafe(enemy->npcID);
f32 posX, posY, posZ, posW;
f32 idleHeight = (f32)enemy->varTable[3] / 100.0;
s32 emoteTemp;
EffectInstance* emoteTemp;
npc->pos.y += 2.5;
posX = npc->pos.x;
@ -242,7 +242,7 @@ void N(SentinelAI_ReturnHome)(Evt* script, MobileAISettings* aiSettings, EnemyDe
f32 temp_f24 = idleHeight + (f32)((f32)enemy->varTable[7] / 100.0);
f32 undulateAmplitude = (f32)enemy->varTable[1] / 100.0;
f32 undulateAmount = sin_deg(enemy->varTable[2]);
s32 emoteTemp;
EffectInstance* emoteTemp;
if (npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &hitDepth)) {
npc->pos.y = posY + idleHeight + (undulateAmount * undulateAmplitude);

View File

@ -67,7 +67,7 @@ API_CALLABLE(N(SpinyAI_Main)) {
npc->jumpScale = 1.0f;
script->AI_TEMP_STATE = 102;
} else {
s32 emoteTemp;
EffectInstance* emoteTemp;
fx_emote(EMOTE_QUESTION, npc, 0.0f, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 0x28, &emoteTemp);
npc->currentAnim = enemy->animList[ENEMY_ANIM_INDEX_IDLE];
script->functionTemp[1] = 0;

View File

@ -48,7 +48,7 @@ void N(PatrolAI_Move)(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolu
Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID);
f32 x, z;
s32 emoteTemp;
EffectInstance* emoteTemp;
if (aiSettings->playerSearchInterval >= 0) {
if (script->functionTemp[1] <= 0) {
@ -107,7 +107,7 @@ void N(PatrolAI_LoiterInit)(Evt* script, MobileAISettings* aiSettings, EnemyDete
void N(PatrolAI_Loiter)(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolume* territory) {
Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID);
s32 emoteTemp;
EffectInstance* emoteTemp;
if ((aiSettings->playerSearchInterval >= 0) && basic_ai_check_player_dist(territory, enemy, aiSettings->chaseRadius, aiSettings->chaseOffsetDist, 0)) {
fx_emote(EMOTE_EXCLAMATION, npc, 0.0f, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 0xF, &emoteTemp);
@ -211,7 +211,7 @@ void N(PatrolAI_ChaseInit)(Evt* script, MobileAISettings* aiSettings, EnemyDetec
ApiStatus N(PatrolAI_Chase)(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolume* territory) {
Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID);
s32 emoteTemp;
EffectInstance* emoteTemp;
if (!basic_ai_check_player_dist(territory, enemy, aiSettings->chaseRadius, aiSettings->chaseOffsetDist, 1)) {
fx_emote(EMOTE_QUESTION, npc, 0.0f, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 15, &emoteTemp);

View File

@ -61,7 +61,7 @@ API_CALLABLE(N(TackleAI_Main)) {
}
if (enemy->aiFlags & ENEMY_AI_FLAG_SUSPEND) {
s32 emoteTemp;
EffectInstance* emoteTemp;
script->AI_TEMP_STATE = 99;
script->functionTemp[1] = 0;

View File

@ -309,6 +309,10 @@ def write_ninja_rules(
ninja.rule("shape", command=f"$python {BUILD_TOOLS}/mapfs/shape.py $in $out")
ninja.rule(
"effect_data", command=f"$python {BUILD_TOOLS}/effects.py $in_yaml $out_dir"
)
with Path("tools/permuter_settings.toml").open("w") as f:
f.write(
f"compiler_command = \"{cc} {CPPFLAGS.replace('$version', 'pal')} {cflags} -DPERMUTER -fforce-addr\"\n"
@ -544,6 +548,23 @@ class Configure:
implicit_outputs=implicit_outputs,
)
# Effect data includes
effect_yaml = ROOT / "src/effects.yaml"
effect_data_outdir = ROOT / "assets" / version / "effects"
effect_macros_path = effect_data_outdir / "effect_macros.h"
effect_defs_path = effect_data_outdir / "effect_defs.h"
effect_table_path = effect_data_outdir / "effect_table.c"
build(
[effect_macros_path, effect_defs_path, effect_table_path],
[effect_yaml],
"effect_data",
variables={
"in_yaml": str(effect_yaml),
"out_dir": str(effect_data_outdir),
},
)
# Build objects
for entry in self.linker_entries:
seg = entry.segment

52
tools/build/effects.py Normal file
View File

@ -0,0 +1,52 @@
import argparse
from pathlib import Path
import sys
sys.path.append(str(Path(__file__).parent.parent))
sys.path.append(str(Path(__file__).parent.parent / "splat"))
from splat_ext.pm_effect_loads import effects_from_yaml
if __name__ == "__main__":
parser = argparse.ArgumentParser(
description="Builds effect table, function declarations, macros, and enum"
)
parser.add_argument("in_yaml")
parser.add_argument("out_dir", type=Path)
args = parser.parse_args()
effect_enum_text = "enum EffectID {\n"
effect_table_text = "EffectTableEntry gEffectTable[] = {\n"
fx_decls_text = '#include "effects/effect_macros.h"\n\n'
main_decls_text = '#include "effects/effect_macros.h"\n\n'
macro_defs = ""
effects = effects_from_yaml(args.in_yaml)
for i, effect in enumerate(effects):
enum_name = effect.name.upper()
if not enum_name.startswith("EFFECT_"):
enum_name = "EFFECT_" + enum_name
effect_enum_text += f" {enum_name} = 0x{i:02X},\n"
if not effect.empty:
effect_table_text += (
f" FX_ENTRY({effect.name}, effect_gfx_{effect.gfx}),\n"
)
fx_decls_text += effect.get_macro_call("fx_" + effect.name) + ";\n"
main_decls_text += effect.get_macro_call(effect.name + "_main") + ";\n"
macro_defs += effect.get_macro_def() + "\n"
else:
effect_table_text += " {},\n"
args.out_dir.mkdir(parents=True, exist_ok=True)
with open(args.out_dir / "effect_macros.h", "w") as f:
f.write(macro_defs)
with open(args.out_dir / "effect_table.c", "w") as f:
f.write(main_decls_text + "\n" + effect_table_text + "};\n")
with open(args.out_dir / "effect_defs.h", "w") as f:
f.write(effect_enum_text + "};\n\n" + fx_decls_text)

View File

@ -1,11 +1,50 @@
from dataclasses import dataclass
from pathlib import Path
from typing import List
from segtypes.n64.segment import N64Segment
from util import options
import yaml as yaml_loader
@dataclass
class Effect:
name: str
args: str
gfx: str
empty: bool
returns_void: bool
def get_macro_def(self) -> str:
ret_type = "void" if self.returns_void else "EffectInstance*"
return f"#define EFFECT_DEF_{self.name.upper()}(func_name) {ret_type} func_name({self.args})"
def get_macro_call(self, func_name: str) -> str:
return f"EFFECT_DEF_{self.name.upper()}({func_name})"
def effects_from_yaml(yaml_path: Path) -> List[Effect]:
with open(yaml_path) as f:
effects_yaml = yaml_loader.load(f.read(), Loader=yaml_loader.SafeLoader)
effects: List[Effect] = []
for effect_yaml in effects_yaml:
name = str(effect_yaml.get("name", f"{len(effects):02X}"))
effects.append(
Effect(
name=name,
args=effect_yaml.get("args", ""),
gfx=effect_yaml.get("gfx", name),
empty="name" not in effect_yaml,
returns_void=effect_yaml.get("void", False),
)
)
return effects
class N64SegPm_effect_loads(N64Segment):
effects: List[str] = []
effects: List[Effect] = []
@staticmethod
def get_effect_asm(index, name):
@ -18,7 +57,7 @@ class N64SegPm_effect_loads(N64Segment):
.section .text, "ax"
glabel {name}
glabel fx_{name}
/* 00 27BDFFD0 */ addiu $sp, $sp, -0x30
/* 04 AFA40010 */ sw $a0, 0x10($sp)
/* 08 AFA50014 */ sw $a1, 0x14($sp)
@ -45,9 +84,6 @@ glabel {name}
/* 5C 00000000 */ nop
"""
def effect_path(self, effect):
return options.opts.build_path / "asm" / "effects" / f"{effect}.s"
def __init__(
self,
rom_start,
@ -68,16 +104,19 @@ glabel {name}
yaml=yaml,
)
with open(options.opts.asm_path / ".." / "effects.yaml") as f:
self.effects = yaml_loader.load(f.read(), Loader=yaml_loader.SafeLoader)
self.effects = effects_from_yaml(options.opts.src_path / "effects.yaml")
def effect_s_path(self, effect_name: str):
return options.opts.build_path / "asm" / "effects" / f"{effect_name}.s"
def split(self, rom_bytes):
for i, effect in enumerate(self.effects):
effect_asm = N64SegPm_effect_loads.get_effect_asm(i, effect)
# .s file for effect
effect_asm = N64SegPm_effect_loads.get_effect_asm(i, effect.name)
self.effect_path("").parent.mkdir(parents=True, exist_ok=True)
self.effect_s_path("").parent.mkdir(parents=True, exist_ok=True)
with open(self.effect_path(effect), "w") as f:
with open(self.effect_s_path(effect.name), "w") as f:
f.write(effect_asm)
def get_linker_entries(self):
@ -88,7 +127,10 @@ glabel {name}
for effect in self.effects:
ret.append(
LinkerEntry(
self, [self.effect_path(effect)], self.effect_path(effect), ".text"
self,
[self.effect_s_path(effect.name)],
self.effect_s_path(effect.name),
".text",
)
)

View File

@ -49,7 +49,7 @@ glabel {name}
yaml=yaml,
)
with open(options.opts.asm_path / ".." / "effect_shims.yaml") as f:
with open(options.opts.src_path / "effect_shims.yaml") as f:
self.shims = yaml_loader.load(f.read(), Loader=yaml_loader.SafeLoader)
def split(self, rom_bytes):

View File

@ -1,135 +0,0 @@
- fx_big_dust_puff
- fx_big_smoke_puff
- fx_02
- fx_03
- fx_04
- fx_05
- fx_landing_dust
- fx_walking_dust
- fx_flower_splash
- fx_flower_trail
- fx_cloud_puff
- fx_cloud_trail
- fx_footprint
- fx_floating_flower
- fx_snowflake
- fx_star
- fx_emote
- fx_sparkles
- fx_shape_spell
- fx_gather_energy_pink
- fx_drop_leaves
- fx_dust
- fx_shattering_stones
- fx_smoke_ring
- fx_damage_stars
- fx_explosion
- fx_lens_flare
- fx_got_item_outline
- fx_spiky_white_aura
- fx_smoke_impact
- fx_damage_indicator
- fx_purple_ring
- fx_flame
- fx_stars_burst
- fx_stars_shimmer
- fx_rising_bubble
- fx_ring_blast
- fx_shockwave
- fx_music_note
- fx_smoke_burst
- fx_sweat
- fx_sleep_bubble
- fx_2A
- fx_windy_leaves
- fx_falling_leaves
- fx_stars_spread
- fx_steam_burst
- fx_stars_orbiting
- fx_big_snowflakes
- fx_debuff
- fx_green_impact
- fx_radial_shimmer
- fx_ending_decals
- fx_light_rays
- fx_lightning
- fx_fire_breath
- fx_shimmer_burst
- fx_energy_shockwave
- fx_shimmer_wave
- fx_aura
- fx_bulb_glow
- fx_3D
- fx_blast
- fx_fire_flower
- fx_recover
- fx_disable_x
- fx_bombette_breaking
- fx_firework
- fx_confetti
- fx_snowfall
- fx_46
- fx_gather_magic
- fx_attack_result_text
- fx_small_gold_sparkle
- fx_flashing_box_shockwave
- fx_balloon
- fx_floating_rock
- fx_chomp_drop
- fx_quizmo_stage
- fx_radiating_energy_orb
- fx_quizmo_answer
- fx_motion_blur_flame
- fx_energy_orb_wave
- fx_merlin_house_stars
- fx_quizmo_audience
- fx_butterflies
- fx_stat_change
- fx_snaking_static
- fx_thunderbolt_ring
- fx_squirt
- fx_water_block
- fx_waterfall
- fx_water_fountain
- fx_underwater
- fx_lightning_bolt
- fx_water_splash
- fx_snowman_doll
- fx_fright_jar
- fx_stop_watch
- fx_63
- fx_throw_spiny
- fx_65
- fx_tubba_heart_attack
- fx_whirlwind
- fx_red_impact
- fx_floating_cloud_puff
- fx_6A
- fx_energy_in_out
- fx_tattle_window
- fx_shiny_flare
- fx_huff_puff_breath
- fx_cold_breath
- fx_embers
- fx_hieroglyphs
- fx_misc_particles
- fx_static_status
- fx_moving_cloud
- fx_75
- fx_76
- fx_firework_rocket
- fx_peach_star_beam
- fx_chapter_change
- fx_ice_shard
- fx_spirit_card
- fx_lil_oink
- fx_something_rotating
- fx_breaking_junk
- fx_partner_buff
- fx_quizmo_assistant
- fx_ice_pillar
- fx_sun
- fx_star_spirits_energy
- fx_pink_sparkles
- fx_star_outline
- fx_86

View File

@ -1,135 +0,0 @@
- fx_big_dust_puff
- fx_big_smoke_puff
- fx_02
- fx_03
- fx_04
- fx_05
- fx_landing_dust
- fx_walking_dust
- fx_flower_splash
- fx_flower_trail
- fx_cloud_puff
- fx_cloud_trail
- fx_footprint
- fx_floating_flower
- fx_snowflake
- fx_star
- fx_emote
- fx_sparkles
- fx_shape_spell
- fx_gather_energy_pink
- fx_drop_leaves
- fx_dust
- fx_shattering_stones
- fx_smoke_ring
- fx_damage_stars
- fx_explosion
- fx_lens_flare
- fx_got_item_outline
- fx_spiky_white_aura
- fx_smoke_impact
- fx_damage_indicator
- fx_purple_ring
- fx_flame
- fx_stars_burst
- fx_stars_shimmer
- fx_rising_bubble
- fx_ring_blast
- fx_shockwave
- fx_music_note
- fx_smoke_burst
- fx_sweat
- fx_sleep_bubble
- fx_2A
- fx_windy_leaves
- fx_falling_leaves
- fx_stars_spread
- fx_steam_burst
- fx_stars_orbiting
- fx_big_snowflakes
- fx_debuff
- fx_green_impact
- fx_radial_shimmer
- fx_ending_decals
- fx_light_rays
- fx_lightning
- fx_fire_breath
- fx_shimmer_burst
- fx_energy_shockwave
- fx_shimmer_wave
- fx_aura
- fx_bulb_glow
- fx_3D
- fx_blast
- fx_fire_flower
- fx_recover
- fx_disable_x
- fx_bombette_breaking
- fx_firework
- fx_confetti
- fx_snowfall
- fx_46
- fx_gather_magic
- fx_attack_result_text
- fx_small_gold_sparkle
- fx_flashing_box_shockwave
- fx_balloon
- fx_floating_rock
- fx_chomp_drop
- fx_quizmo_stage
- fx_radiating_energy_orb
- fx_quizmo_answer
- fx_motion_blur_flame
- fx_energy_orb_wave
- fx_merlin_house_stars
- fx_quizmo_audience
- fx_butterflies
- fx_stat_change
- fx_snaking_static
- fx_thunderbolt_ring
- fx_squirt
- fx_water_block
- fx_waterfall
- fx_water_fountain
- fx_underwater
- fx_lightning_bolt
- fx_water_splash
- fx_snowman_doll
- fx_fright_jar
- fx_stop_watch
- fx_63
- fx_throw_spiny
- fx_65
- fx_tubba_heart_attack
- fx_whirlwind
- fx_red_impact
- fx_floating_cloud_puff
- fx_6A
- fx_energy_in_out
- fx_tattle_window
- fx_shiny_flare
- fx_huff_puff_breath
- fx_cold_breath
- fx_embers
- fx_hieroglyphs
- fx_misc_particles
- fx_static_status
- fx_moving_cloud
- fx_75
- fx_76
- fx_firework_rocket
- fx_peach_star_beam
- fx_chapter_change
- fx_ice_shard
- fx_spirit_card
- fx_lil_oink
- fx_something_rotating
- fx_breaking_junk
- fx_partner_buff
- fx_quizmo_assistant
- fx_ice_pillar
- fx_sun
- fx_star_spirits_energy
- fx_pink_sparkles
- fx_star_outline
- fx_86

View File

@ -1269,11 +1269,11 @@ fx_ending_decals = 0x802DE040;
fx_lightning = 0x802DE100;
fx_fire_breath = 0x802DE160;
fx_bulb_glow = 0x802DE340;
fx_3D = 0x802DE3A0;
fx_effect_3D = 0x802DE3A0;
fx_fire_flower = 0x802DE460;
fx_recover = 0x802DE4C0;
fx_snowfall = 0x802DE6A0;
fx_46 = 0x802DE700;
fx_effect_46 = 0x802DE700;
fx_floating_rock = 0x802DE940;
fx_quizmo_stage = 0x802DEA00;
fx_quizmo_answer = 0x802DEAC0;
@ -1290,7 +1290,7 @@ fx_underwater = 0x802DEFA0;
fx_lightning_bolt = 0x802DF000;
fx_water_splash = 0x802DF060;
fx_throw_spiny = 0x802DF240;
fx_65 = 0x802DF2A0;
fx_effect_65 = 0x802DF2A0;
fx_floating_cloud_puff = 0x802DF420;
fx_energy_in_out = 0x802DF4E0;
fx_tattle_window = 0x802DF540;

View File

@ -1,40 +0,0 @@
- shim_guRotateF
- shim_guTranslateF
- shim_guTranslate
- shim_guScaleF
- shim_guMtxCatF
- shim_guMtxF2L
- shim_guMtxL2F
- shim_queue_render_task
- shim_create_effect_instance
- shim_remove_effect
- shim_general_heap_malloc
- shim_mem_clear
- shim_NULL
- shim_rand_int
- shim_clamp_angle
- shim_sin_deg
- shim_cos_deg
- shim_atan2
- shim_npc_raycast_down_sides
- shim_load_effect
- shim_sqrtf
- shim_mdl_draw_hidden_panel_surface
- shim_is_point_visible
- shim_guPerspectiveF
- shim_guMtxIdentF
- shim_transform_point
- shim_guLookAtHiliteF
- shim_set_screen_overlay_params_back
- shim_set_screen_overlay_center
- shim_set_screen_overlay_center_worldpos
- shim_mdl_get_next_texture_address
- shim_guPositionF
- shim_guOrthoF
- shim_guFrustumF
- shim_draw_prev_frame_buffer_at_screen_pos
- shim_draw_box
- shim_draw_msg
- shim_get_msg_width
- shim_get_background_color_blend
- shim_sfx_play_sound_at_position

View File

@ -1,135 +0,0 @@
- fx_big_dust_puff
- fx_big_smoke_puff
- fx_02
- fx_03
- fx_04
- fx_05
- fx_landing_dust
- fx_walking_dust
- fx_flower_splash
- fx_flower_trail
- fx_cloud_puff
- fx_cloud_trail
- fx_footprint
- fx_floating_flower
- fx_snowflake
- fx_star
- fx_emote
- fx_sparkles
- fx_shape_spell
- fx_gather_energy_pink
- fx_drop_leaves
- fx_dust
- fx_shattering_stones
- fx_smoke_ring
- fx_damage_stars
- fx_explosion
- fx_lens_flare
- fx_got_item_outline
- fx_spiky_white_aura
- fx_smoke_impact
- fx_damage_indicator
- fx_purple_ring
- fx_flame
- fx_stars_burst
- fx_stars_shimmer
- fx_rising_bubble
- fx_ring_blast
- fx_shockwave
- fx_music_note
- fx_smoke_burst
- fx_sweat
- fx_sleep_bubble
- fx_2A
- fx_windy_leaves
- fx_falling_leaves
- fx_stars_spread
- fx_steam_burst
- fx_stars_orbiting
- fx_big_snowflakes
- fx_debuff
- fx_green_impact
- fx_radial_shimmer
- fx_ending_decals
- fx_light_rays
- fx_lightning
- fx_fire_breath
- fx_shimmer_burst
- fx_energy_shockwave
- fx_shimmer_wave
- fx_aura
- fx_bulb_glow
- fx_3D
- fx_blast
- fx_fire_flower
- fx_recover
- fx_disable_x
- fx_bombette_breaking
- fx_firework
- fx_confetti
- fx_snowfall
- fx_46
- fx_gather_magic
- fx_attack_result_text
- fx_small_gold_sparkle
- fx_flashing_box_shockwave
- fx_balloon
- fx_floating_rock
- fx_chomp_drop
- fx_quizmo_stage
- fx_radiating_energy_orb
- fx_quizmo_answer
- fx_motion_blur_flame
- fx_energy_orb_wave
- fx_merlin_house_stars
- fx_quizmo_audience
- fx_butterflies
- fx_stat_change
- fx_snaking_static
- fx_thunderbolt_ring
- fx_squirt
- fx_water_block
- fx_waterfall
- fx_water_fountain
- fx_underwater
- fx_lightning_bolt
- fx_water_splash
- fx_snowman_doll
- fx_fright_jar
- fx_stop_watch
- fx_63
- fx_throw_spiny
- fx_65
- fx_tubba_heart_attack
- fx_whirlwind
- fx_red_impact
- fx_floating_cloud_puff
- fx_6A
- fx_energy_in_out
- fx_tattle_window
- fx_shiny_flare
- fx_huff_puff_breath
- fx_cold_breath
- fx_embers
- fx_hieroglyphs
- fx_misc_particles
- fx_static_status
- fx_moving_cloud
- fx_75
- fx_76
- fx_firework_rocket
- fx_peach_star_beam
- fx_chapter_change
- fx_ice_shard
- fx_spirit_card
- fx_lil_oink
- fx_something_rotating
- fx_breaking_junk
- fx_partner_buff
- fx_quizmo_assistant
- fx_ice_pillar
- fx_sun
- fx_star_spirits_energy
- fx_pink_sparkles
- fx_star_outline
- fx_86

View File

@ -1146,7 +1146,7 @@ osFlashSectorErase = 0x8006F424; // type:func rom:0x4A824
osFlashWriteBuffer = 0x8006F550; // type:func rom:0x4A950
osFlashWriteArray = 0x8006F61C; // type:func rom:0x4AA1C
osFlashReadArray = 0x8006F75C; // type:func rom:0x4AB5C
fx_big_dust_puff = 0x8006F890; // type:func rom:0x4AC90
fx_00 = 0x8006F890; // type:func rom:0x4AC90
fx_big_smoke_puff = 0x8006F8F0; // type:func rom:0x4ACF0
fx_02 = 0x8006F950; // type:func rom:0x4AD50
fx_03 = 0x8006F9B0; // type:func rom:0x4ADB0
@ -1207,7 +1207,7 @@ fx_energy_shockwave = 0x80070DF0; // type:func rom:0x4C1F0
fx_shimmer_wave = 0x80070E50; // type:func rom:0x4C250
fx_aura = 0x80070EB0; // type:func rom:0x4C2B0
fx_bulb_glow = 0x80070F10; // type:func rom:0x4C310
fx_3D = 0x80070F70; // type:func rom:0x4C370
fx_effect_3D = 0x80070F70; // type:func rom:0x4C370
fx_blast = 0x80070FD0; // type:func rom:0x4C3D0
fx_fire_flower = 0x80071030; // type:func rom:0x4C430
fx_recover = 0x80071090; // type:func rom:0x4C490
@ -1216,7 +1216,7 @@ fx_bombette_breaking = 0x80071150; // type:func rom:0x4C550
fx_firework = 0x800711B0; // type:func rom:0x4C5B0
fx_confetti = 0x80071210; // type:func rom:0x4C610
fx_snowfall = 0x80071270; // type:func rom:0x4C670
fx_46 = 0x800712D0; // type:func rom:0x4C6D0
fx_effect_46 = 0x800712D0; // type:func rom:0x4C6D0
fx_gather_magic = 0x80071330; // type:func rom:0x4C730
fx_attack_result_text = 0x80071390; // type:func rom:0x4C790
fx_small_gold_sparkle = 0x800713F0; // type:func rom:0x4C7F0
@ -1245,9 +1245,9 @@ fx_water_splash = 0x80071C30; // type:func rom:0x4D030
fx_snowman_doll = 0x80071C90; // type:func rom:0x4D090
fx_fright_jar = 0x80071CF0; // type:func rom:0x4D0F0
fx_stop_watch = 0x80071D50; // type:func rom:0x4D150
fx_63 = 0x80071DB0; // type:func rom:0x4D1B0
fx_effect_63 = 0x80071DB0; // type:func rom:0x4D1B0
fx_throw_spiny = 0x80071E10; // type:func rom:0x4D210
fx_65 = 0x80071E70; // type:func rom:0x4D270
fx_effect_65 = 0x80071E70; // type:func rom:0x4D270
fx_tubba_heart_attack = 0x80071ED0; // type:func rom:0x4D2D0
fx_whirlwind = 0x80071F30; // type:func rom:0x4D330
fx_red_impact = 0x80071F90; // type:func rom:0x4D390