Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
effects_internal.h File Reference

Go to the source code of this file.

Macros

#define ASSERT(condition)
 

Functions

s32 effect_rand_int (s32)
 
s32 effect_simple_rand (s32, s32)
 

Macro Definition Documentation

◆ ASSERT

#define ASSERT ( condition)
Value:
if (!(condition)) { \
IS_DEBUG_PANIC("ASSERT"); \
}

Definition at line 7 of file effects_internal.h.

7#define ASSERT(condition) \
8 if (!(condition)) { \
9 IS_DEBUG_PANIC("ASSERT"); \
10 }

Referenced by add_anim_node(), ALT_clear_hud_element_cache(), ALT_load_entity_model(), animator_copy_vertices_to_buffer(), appendGfx_animator_node(), attack_result_text_main(), aura_main(), balloon_main(), big_smoke_puff_main(), big_snowflakes_main(), blast_main(), bombette_breaking_main(), breaking_junk_main(), btl_delete_actor(), btl_state_update_normal_start(), bulb_glow_main(), butterflies_main(), calc_enemy_damage_target(), calc_enemy_test_target(), calc_item_check_hit(), calc_partner_damage_enemy(), calc_partner_test_enemy(), calc_player_damage_enemy(), calc_player_test_enemy(), chapter_change_main(), chomp_drop_main(), clear_virtual_entity_list(), cloud_puff_main(), cloud_trail_main(), cold_breath_main(), confetti_main(), create_actor(), create_effect_instance(), create_encounters(), create_mesh_animator(), create_model_animator(), create_npc_impl(), create_shadow_from_data(), create_status_icon_set(), create_trigger(), create_worker_backUI(), create_worker_frontUI(), create_worker_world(), damage_indicator_main(), damage_stars_main(), debuff_main(), disable_x_main(), drop_leaves_main(), dust_main(), effect_3D_main(), effect_46_main(), effect_63_main(), effect_65_main(), effect_75_main(), effect_86_main(), embers_main(), emote_main(), enable_npc_blur(), ending_decals_main(), energy_in_out_main(), energy_orb_wave_main(), energy_shockwave_main(), evt_find_label(), evt_handle_break_case(), evt_handle_break_loop(), evt_handle_case_AND(), evt_handle_case_default(), evt_handle_case_equal(), evt_handle_case_equal_AND(), evt_handle_case_equal_OR(), evt_handle_case_greater(), evt_handle_case_greater_equal(), evt_handle_case_less(), evt_handle_case_less_equal(), evt_handle_case_not_equal(), evt_handle_case_range(), evt_handle_end_case_group(), evt_handle_end_loop(), evt_handle_end_switch(), evt_handle_loop(), evt_handle_switch(), evt_handle_switch_const(), explosion_main(), falling_leaves_main(), fio_save_game(), fire_breath_main(), fire_flower_main(), firework_main(), firework_rocket_main(), flame_main(), flashing_box_shockwave_main(), floating_cloud_puff_main(), floating_flower_main(), floating_rock_main(), flower_splash_main(), flower_trail_main(), footprint_main(), free_npc(), free_npc_by_index(), fright_jar_main(), func_802C39F8(), gather_energy_pink_main(), gather_magic_main(), get_npc_unsafe(), gfx_draw_frame(), gfx_task_background(), got_item_outline_main(), green_impact_main(), hieroglyphs_main(), hud_element_clear_cache(), hud_element_create(), hud_element_create_transform_A(), hud_element_create_transform_B(), hud_element_create_transform_C(), hud_element_load_script(), hud_element_update(), huff_puff_breath_main(), ice_pillar_main(), ice_shard_main(), init_all_status_icons(), initialize_next_camera(), item_entity_load(), landing_dust_main(), lens_flare_main(), light_rays_main(), lightning_bolt_main(), lightning_main(), lil_oink_main(), load_effect(), load_entity_model(), load_partner_actor(), load_player_actor(), make_item_entity(), make_item_entity_at_player(), merlin_house_stars_main(), misc_particles_main(), motion_blur_flame_main(), moving_cloud_main(), music_note_main(), npc_follow_init(), partner_buff_main(), peach_star_beam_main(), pink_sparkles_main(), purple_ring_main(), queue_render_task(), quizmo_assistant_main(), quizmo_audience_main(), quizmo_stage_main(), radial_shimmer_main(), radiating_energy_orb_main(), recover_main(), red_impact_main(), remove_effect(), reset_model_animators(), ring_blast_main(), rising_bubble_main(), set_npc_sprite(), shape_spell_main(), shattering_stones_main(), shimmer_burst_main(), shimmer_wave_main(), shiny_flare_main(), shockwave_main(), show_immune_bonk(), sleep_bubble_main(), small_gold_sparkle_main(), smoke_burst_main(), smoke_impact_main(), smoke_ring_main(), snaking_static_main(), snowfall_main(), snowflake_main(), snowman_doll_main(), something_rotating_main(), sparkles_main(), spiky_white_aura_main(), spirit_card_main(), squirt_main(), star_main(), star_outline_main(), star_spirits_energy_main(), stars_burst_main(), stars_orbiting_main(), stars_shimmer_main(), stars_spread_main(), start_child_script(), start_script(), start_script_in_group(), stat_change_main(), static_status_main(), steam_burst_main(), step_model_animator(), stop_watch_main(), sun_main(), sweat_main(), tattle_window_main(), throw_spiny_main(), thunderbolt_ring_main(), tubba_heart_attack_main(), underwater_main(), update_item_entity_collectable(), update_npcs(), walking_dust_main(), water_block_main(), water_fountain_main(), water_splash_main(), waterfall_main(), whirlwind_main(), and windy_leaves_main().

Function Documentation

◆ effect_rand_int()

s32 effect_rand_int ( s32 max)

Definition at line 38 of file effect_utils.c.

38 {
39 u32 seed = (effect_prng_seed << 2) + 2;
40
41 seed *= (seed + 1);
42 seed = seed >> 2;
43
44 effect_prng_seed = seed;
45
46 return effect_prng_seed % (max + 1);
47}
u32 effect_prng_seed
Definition effect_utils.c:5

Referenced by big_smoke_puff_main(), big_snowflakes_main(), cloud_puff_main(), cloud_trail_main(), confetti_main(), drop_leaves_main(), effect_3D_main(), effect_46_main(), fire_flower_main(), func_E008A000(), gather_energy_pink_main(), and windy_leaves_main().

◆ effect_simple_rand()

s32 effect_simple_rand ( s32 max,
s32 idx )

Definition at line 50 of file effect_utils.c.

50 {
51 s32 lookupVal = SimpleRandLUT[idx % ARRAY_COUNT(SimpleRandLUT)];
52
53 if (lookupVal < 0) {
54 lookupVal = -lookupVal;
55 }
56
57 return lookupVal % (max + 1);
58}
s32 SimpleRandLUT[128]
#define ARRAY_COUNT(arr)
Definition macros.h:40

Referenced by big_snowflakes_update(), drop_leaves_update(), energy_shockwave_update(), fire_breath_main(), func_E006A000(), sparkles_update(), water_block_appendGfx(), and windy_leaves_update().