papermario
Decompilation of Paper Mario
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Loading...
Searching...
No Matches
sfx.c File Reference

Macros

#define MAX_SOUND_INSTANCES   10
 
#define SOUND_LOOP_IDX(soundID)   (soundID & 0xFFFF)
 
#define SEQ_SOUND_ENTRY(soundID, sym)   [soundID & 0xFFFF] { .sounds = sym, .soundCount = ARRAY_COUNT(sym) }
 

Functions

void sfx_compute_spatialized_sound_params_full (f32 x, f32 y, f32 z, s16 *volume, s16 *pan, s32 flags)
 
void sfx_reset_door_sounds (void)
 
void sfx_clear_sounds (void)
 
void sfx_clear_env_sounds (s16 playSounds)
 
void sfx_update_env_sound_params (void)
 
void sfx_set_reverb_mode (s32 mode)
 
s32 sfx_get_reverb_mode (void)
 
void sfx_stop_env_sounds (void)
 
SoundInstancesfx_get_env_sound_instance (s32 soundID)
 
void sfx_play_sound_looping (s32 soundID, u8 volume, u8 pan, s16 pitchShift)
 
void sfx_register_looping_sound_at_position (s32 soundID, s32 flags, f32 x, f32 y, f32 z)
 
s32 sfx_adjust_env_sound_pos (s32 soundID, s32 sourceFlags, f32 x, f32 y, f32 z)
 
void snd_stop_tracking_env_sound_pos (s32 soundID, s32 keepPlaying)
 
void sfx_play_sound_with_params (s32 soundID, u8 volume, u8 pan, s16 pitchShift)
 
void sfx_adjust_env_sound_params (s32 soundID, u8 volume, u8 pan, s16 pitchShift)
 
void sfx_stop_sound (s32 soundID)
 
void sfx_play_sound (s32 soundID)
 
void sfx_play_sound_at_player (s32 soundID, s32 flags)
 
void sfx_play_sound_at_npc (s32 soundID, s32 flags, s32 npcID)
 
void sfx_play_sound_at_position (s32 soundID, s32 flags, f32 posX, f32 posY, f32 posZ)
 
void sfx_get_spatialized_sound_params (f32 x, f32 y, f32 z, s16 *volume, s16 *pan, s32 flags)
 
void sfx_compute_spatialized_sound_params_ignore_depth (f32 x, f32 y, f32 z, s16 *volume, s16 *pan)
 
void sfx_compute_spatialized_sound_params_with_depth (f32 x, f32 y, f32 z, s16 *volume, s16 *pan)
 

Variables

u16 gCurrentDoorSounds
 
u16 gCurrentRoomDoorSounds
 
s32 LoopingSounds []
 
s32 FireBar0Sounds [] = { SOUND_FIRE_BAR_0_A, SOUND_FIRE_BAR_0_B }
 
s32 FireBar1Sounds [] = { SOUND_FIRE_BAR_1_A, SOUND_FIRE_BAR_1_B }
 
s32 FireBar2Sounds [] = { SOUND_FIRE_BAR_2_A, SOUND_FIRE_BAR_2_B }
 
s32 FireBar3Sounds [] = { SOUND_FIRE_BAR_3_A, SOUND_FIRE_BAR_3_B }
 
s32 FireBar4Sounds [] = { SOUND_FIRE_BAR_4_A, SOUND_FIRE_BAR_4_B }
 
s32 FireBar5Sounds [] = { SOUND_FIRE_BAR_5_A, SOUND_FIRE_BAR_5_B }
 
s32 FireBar6Sounds [] = { SOUND_FIRE_BAR_6_A, SOUND_FIRE_BAR_6_B }
 
s32 FireBar7Sounds [] = { SOUND_FIRE_BAR_7_A, SOUND_FIRE_BAR_7_B }
 
s32 FireBar8Sounds [] = { SOUND_FIRE_BAR_8_A, SOUND_FIRE_BAR_8_B }
 
s32 FireBar9Sounds [] = { SOUND_FIRE_BAR_9_A, SOUND_FIRE_BAR_9_B }
 
s32 FireBarDeadSounds [] = { SOUND_FIRE_BAR_DEAD, SOUND_FIRE_BAR_DEAD }
 
s32 AlertSounds [] = { SOUND_AI_ALERT_A, SOUND_AI_ALERT_B }
 
s32 SnoreInhaleSounds [] = { SOUND_SNORE_INHALE_A, SOUND_SNORE_INHALE_B }
 
s32 SnoreExhaleSounds [] = { SOUND_SNORE_EXHALE_A, SOUND_SNORE_EXHALE_B }
 
s32 SnapAwakeSounds [] = { SOUND_SNAP_AWAKE_A, SOUND_SNAP_AWAKE_B }
 
s32 BooVanishSounds [] = { SOUND_BOO_VANISH_A, SOUND_BOO_VANISH_B }
 
s32 BooAppearSounds [] = { SOUND_BOO_APPEAR_A, SOUND_BOO_APPEAR_B }
 
s32 WindowOpenSounds [] = { SOUND_WINDOW_OPEN_A, SOUND_WINDOW_OPEN_B }
 
s32 WindowCloseSounds [] = { SOUND_WINDOW_CLOSE_A, SOUND_WINDOW_CLOSE_B }
 
s32 RavenLeapSounds [] = { SOUND_RAVEN_LEAP_A, SOUND_RAVEN_LEAP_B }
 
s32 RavenFallSounds [] = { SOUND_RAVEN_FALL_A, SOUND_RAVEN_FALL_B, SOUND_RAVEN_FALL_C }
 
s32 ShootingStarFallSounds [] = { SOUND_SHOOTING_STAR_FALL_A, SOUND_SHOOTING_STAR_FALL_B }
 
s32 ShootingStarBounceSounds [] = { SOUND_STAR_BOUNCE_A, SOUND_STAR_BOUNCE_B }
 
s32 FuzzyHopSounds [] = { SOUND_FUZZY_HOP_A, SOUND_FUZZY_HOP_B, SOUND_FUZZY_HOP_C }
 
s32 BulletBillExplodeSounds [] = { SOUND_BULLET_BILL_EXPLODE_A, SOUND_BULLET_BILL_EXPLODE_B }
 
s32 LuigiStepSounds [] = { SOUND_LUIGI_STEP_A, SOUND_LUIGI_STEP_B }
 
s32 TrainChugSounds [] = { SOUND_TRAIN_CHUG_A, SOUND_TRAIN_CHUG_B }
 
s32 FinaleBridgeCollapseSounds [] = { SOUND_KPA_BRIDGE_COLLAPSE_A, SOUND_KPA_BRIDGE_COLLAPSE_B }
 
s32 FinaleExplosionSounds [] = { SOUND_KPA_EXPLOSION_A, SOUND_KPA_EXPLOSION_B }
 
s32 CardShuffleSounds [] = { SOUND_SHUFFLE_CARD_A, SOUND_SHUFFLE_CARD_B }
 
s32 StarSpiritAppearSounds [] = { SOUND_STAR_SPIRIT_APPEAR_A, SOUND_STAR_SPIRIT_APPEAR_B }
 
s32 StarSpiritCastSounds [] = { SOUND_STAR_SPIRIT_CAST_A, SOUND_STAR_SPIRIT_CAST_B }
 
s32 UnusedExplodeSounds [] = { SOUND_BULLET_BILL_EXPLODE_A, SOUND_BULLET_BILL_EXPLODE_B }
 
s32 ShyGuyStepSounds [] = { SOUND_SHY_GUY_STEP_A, SOUND_SHY_GUY_STEP_B }
 
AlternatingSoundSet AlternatingSounds []
 
s32 OpenCloseSounds [][2]
 
BSS SoundInstance wEnvSounds [10]
 
BSS SoundInstance bEnvSounds [10]
 
BSS SoundInstancegCurrentEnvSounds
 
BSS s32 SfxReverbMode
 

Macro Definition Documentation

◆ MAX_SOUND_INSTANCES

◆ SEQ_SOUND_ENTRY

#define SEQ_SOUND_ENTRY ( soundID,
sym )   [soundID & 0xFFFF] { .sounds = sym, .soundCount = ARRAY_COUNT(sym) }

◆ SOUND_LOOP_IDX

#define SOUND_LOOP_IDX ( soundID)    (soundID & 0xFFFF)

Function Documentation

◆ sfx_adjust_env_sound_params()

void sfx_adjust_env_sound_params ( s32 soundID,
u8 volume,
u8 pan,
s16 pitchShift )

Referenced by update().

◆ sfx_adjust_env_sound_pos()

s32 sfx_adjust_env_sound_pos ( s32 soundID,
s32 sourceFlags,
f32 x,
f32 y,
f32 z )

Referenced by SentinelAI_Descend().

◆ sfx_clear_env_sounds()

◆ sfx_clear_sounds()

void sfx_clear_sounds ( void )

◆ sfx_compute_spatialized_sound_params_full()

void sfx_compute_spatialized_sound_params_full ( f32 x,
f32 y,
f32 z,
s16 * volume,
s16 * pan,
s32 flags )

◆ sfx_compute_spatialized_sound_params_ignore_depth()

void sfx_compute_spatialized_sound_params_ignore_depth ( f32 x,
f32 y,
f32 z,
s16 * volume,
s16 * pan )

◆ sfx_compute_spatialized_sound_params_with_depth()

void sfx_compute_spatialized_sound_params_with_depth ( f32 x,
f32 y,
f32 z,
s16 * volume,
s16 * pan )

◆ sfx_get_env_sound_instance()

SoundInstance * sfx_get_env_sound_instance ( s32 soundID)

◆ sfx_get_reverb_mode()

s32 sfx_get_reverb_mode ( void )

Referenced by state_step_pause().

◆ sfx_get_spatialized_sound_params()

void sfx_get_spatialized_sound_params ( f32 x,
f32 y,
f32 z,
s16 * volume,
s16 * pan,
s32 flags )

◆ sfx_play_sound()

void sfx_play_sound ( s32 soundID)

Referenced by _use_partner_ability(), btl_main_menu_update(), btl_state_update_begin_player_turn(), btl_state_update_celebration(), btl_state_update_defeat(), btl_state_update_partner_menu(), btl_state_update_partner_move(), btl_state_update_player_menu(), btl_state_update_player_move(), btl_state_update_run_away(), btl_state_update_select_target(), btl_submenu_moves_update(), btl_update_ko_status(), btl_update_strats_menu(), calc_player_damage_enemy(), can_open_world_menu(), card_worker_update(), check_input_open_menus(), check_input_status_bar(), coin_counter_draw_content(), entity_BlueWarpPipe_enter_pipe_init(), entity_Chest_begin_opening(), entity_CymbalPlant_idle(), entity_HeartBlockContent__anim_heal(), entity_HiddenPanel_flip_over(), entity_Padlock_idle(), entity_SaveBlock_show_result_message(), entity_StarBoxLauncher_launch(), entity_WoodenCrate_idle(), filemenu_choose_name_handle_input(), filemenu_main_handle_input(), filemenu_selectlanguage_handle_input(), filemenu_yesno_handle_input(), func_800F16CC(), func_802BB34C_E2DC7C(), func_802BC3E4_E2ED14(), hud_element_update(), inflict_partner_ko(), partner_use_ability(), pause_badges_handle_input(), pause_handle_input(), pause_init(), pause_items_handle_input(), pause_map_handle_input(), pause_partners_handle_input(), pause_spirits_handle_input(), pause_stats_handle_input(), pause_tabs_handle_input(), pause_tutorial_input(), popup_menu_update(), remove_player_buffs(), should_cancel_open_world_menu(), state_step_title_screen(), step_entity_commandlist(), update(), update_encounters_neutral(), update_item_entity_pickup(), and update_status_bar().

◆ sfx_play_sound_at_npc()

void sfx_play_sound_at_npc ( s32 soundID,
s32 flags,
s32 npcID )

Referenced by update_riding_physics().

◆ sfx_play_sound_at_player()

◆ sfx_play_sound_at_position()

void sfx_play_sound_at_position ( s32 soundID,
s32 flags,
f32 posX,
f32 posY,
f32 posZ )

◆ sfx_play_sound_looping()

void sfx_play_sound_looping ( s32 soundID,
u8 volume,
u8 pan,
s16 pitchShift )

◆ sfx_play_sound_with_params()

◆ sfx_register_looping_sound_at_position()

void sfx_register_looping_sound_at_position ( s32 soundID,
s32 flags,
f32 x,
f32 y,
f32 z )

◆ sfx_reset_door_sounds()

void sfx_reset_door_sounds ( void )

◆ sfx_set_reverb_mode()

void sfx_set_reverb_mode ( s32 mode)

◆ sfx_stop_env_sounds()

◆ sfx_stop_sound()

◆ sfx_update_env_sound_params()

void sfx_update_env_sound_params ( void )

Referenced by step_game_loop().

◆ snd_stop_tracking_env_sound_pos()

void snd_stop_tracking_env_sound_pos ( s32 soundID,
s32 keepPlaying )

Variable Documentation

◆ AlertSounds

s32 AlertSounds[] = { SOUND_AI_ALERT_A, SOUND_AI_ALERT_B }

◆ AlternatingSounds

AlternatingSoundSet AlternatingSounds[]

◆ bEnvSounds

◆ BooAppearSounds

s32 BooAppearSounds[] = { SOUND_BOO_APPEAR_A, SOUND_BOO_APPEAR_B }

◆ BooVanishSounds

s32 BooVanishSounds[] = { SOUND_BOO_VANISH_A, SOUND_BOO_VANISH_B }

◆ BulletBillExplodeSounds

s32 BulletBillExplodeSounds[] = { SOUND_BULLET_BILL_EXPLODE_A, SOUND_BULLET_BILL_EXPLODE_B }

◆ CardShuffleSounds

s32 CardShuffleSounds[] = { SOUND_SHUFFLE_CARD_A, SOUND_SHUFFLE_CARD_B }

◆ FinaleBridgeCollapseSounds

s32 FinaleBridgeCollapseSounds[] = { SOUND_KPA_BRIDGE_COLLAPSE_A, SOUND_KPA_BRIDGE_COLLAPSE_B }

◆ FinaleExplosionSounds

s32 FinaleExplosionSounds[] = { SOUND_KPA_EXPLOSION_A, SOUND_KPA_EXPLOSION_B }

◆ FireBar0Sounds

s32 FireBar0Sounds[] = { SOUND_FIRE_BAR_0_A, SOUND_FIRE_BAR_0_B }

◆ FireBar1Sounds

s32 FireBar1Sounds[] = { SOUND_FIRE_BAR_1_A, SOUND_FIRE_BAR_1_B }

◆ FireBar2Sounds

s32 FireBar2Sounds[] = { SOUND_FIRE_BAR_2_A, SOUND_FIRE_BAR_2_B }

◆ FireBar3Sounds

s32 FireBar3Sounds[] = { SOUND_FIRE_BAR_3_A, SOUND_FIRE_BAR_3_B }

◆ FireBar4Sounds

s32 FireBar4Sounds[] = { SOUND_FIRE_BAR_4_A, SOUND_FIRE_BAR_4_B }

◆ FireBar5Sounds

s32 FireBar5Sounds[] = { SOUND_FIRE_BAR_5_A, SOUND_FIRE_BAR_5_B }

◆ FireBar6Sounds

s32 FireBar6Sounds[] = { SOUND_FIRE_BAR_6_A, SOUND_FIRE_BAR_6_B }

◆ FireBar7Sounds

s32 FireBar7Sounds[] = { SOUND_FIRE_BAR_7_A, SOUND_FIRE_BAR_7_B }

◆ FireBar8Sounds

s32 FireBar8Sounds[] = { SOUND_FIRE_BAR_8_A, SOUND_FIRE_BAR_8_B }

◆ FireBar9Sounds

s32 FireBar9Sounds[] = { SOUND_FIRE_BAR_9_A, SOUND_FIRE_BAR_9_B }

◆ FireBarDeadSounds

s32 FireBarDeadSounds[] = { SOUND_FIRE_BAR_DEAD, SOUND_FIRE_BAR_DEAD }

◆ FuzzyHopSounds

◆ gCurrentDoorSounds

u16 gCurrentDoorSounds

◆ gCurrentEnvSounds

◆ gCurrentRoomDoorSounds

u16 gCurrentRoomDoorSounds

◆ LoopingSounds

◆ LuigiStepSounds

s32 LuigiStepSounds[] = { SOUND_LUIGI_STEP_A, SOUND_LUIGI_STEP_B }

◆ OpenCloseSounds

s32 OpenCloseSounds[][2]
Initial value:
= {
}
@ SOUND_BASIC_DOOR_CLOSE
Definition enums.h:850
@ SOUND_CREAKY_DOOR_CLOSE
Definition enums.h:856
@ SOUND_BASIC_DOOR_OPEN
Definition enums.h:849
@ SOUND_METAL_GATE_CLOSE
Definition enums.h:858
@ SOUND_METAL_DOOR_OPEN
Definition enums.h:851
@ SOUND_WINDOW_CLOSE_A
Definition enums.h:860
@ SOUND_CREAKY_WINDOW_OPEN
Definition enums.h:1454
@ SOUND_CREAKY_DOOR_OPEN
Definition enums.h:855
@ SOUND_LARGE_DOOR_OPEN
Definition enums.h:853
@ SOUND_METAL_DOOR_CLOSE
Definition enums.h:852
@ SOUND_WINDOW_OPEN_A
Definition enums.h:859
@ SOUND_LARGE_DOOR_CLOSE
Definition enums.h:854
@ SOUND_METAL_GATE_OPEN
Definition enums.h:857
@ SOUND_CREAKY_WINDOW_CLOSE
Definition enums.h:1455

Referenced by sfx_play_sound_with_params().

◆ RavenFallSounds

◆ RavenLeapSounds

s32 RavenLeapSounds[] = { SOUND_RAVEN_LEAP_A, SOUND_RAVEN_LEAP_B }

◆ SfxReverbMode

BSS s32 SfxReverbMode

◆ ShootingStarBounceSounds

s32 ShootingStarBounceSounds[] = { SOUND_STAR_BOUNCE_A, SOUND_STAR_BOUNCE_B }

◆ ShootingStarFallSounds

s32 ShootingStarFallSounds[] = { SOUND_SHOOTING_STAR_FALL_A, SOUND_SHOOTING_STAR_FALL_B }

◆ ShyGuyStepSounds

s32 ShyGuyStepSounds[] = { SOUND_SHY_GUY_STEP_A, SOUND_SHY_GUY_STEP_B }

◆ SnapAwakeSounds

s32 SnapAwakeSounds[] = { SOUND_SNAP_AWAKE_A, SOUND_SNAP_AWAKE_B }

◆ SnoreExhaleSounds

s32 SnoreExhaleSounds[] = { SOUND_SNORE_EXHALE_A, SOUND_SNORE_EXHALE_B }

◆ SnoreInhaleSounds

s32 SnoreInhaleSounds[] = { SOUND_SNORE_INHALE_A, SOUND_SNORE_INHALE_B }

◆ StarSpiritAppearSounds

s32 StarSpiritAppearSounds[] = { SOUND_STAR_SPIRIT_APPEAR_A, SOUND_STAR_SPIRIT_APPEAR_B }

◆ StarSpiritCastSounds

s32 StarSpiritCastSounds[] = { SOUND_STAR_SPIRIT_CAST_A, SOUND_STAR_SPIRIT_CAST_B }

◆ TrainChugSounds

s32 TrainChugSounds[] = { SOUND_TRAIN_CHUG_A, SOUND_TRAIN_CHUG_B }

◆ UnusedExplodeSounds

s32 UnusedExplodeSounds[] = { SOUND_BULLET_BILL_EXPLODE_A, SOUND_BULLET_BILL_EXPLODE_B }

◆ wEnvSounds

◆ WindowCloseSounds

s32 WindowCloseSounds[] = { SOUND_WINDOW_CLOSE_A, SOUND_WINDOW_CLOSE_B }

◆ WindowOpenSounds

s32 WindowOpenSounds[] = { SOUND_WINDOW_OPEN_A, SOUND_WINDOW_OPEN_B }