#ifndef SFX_H #define SFX_H #include "sys.h" extern f32 gDefaultSfxSource[]; extern f32 gDefaultMod; extern s8 gDefaultReverb; void Audio_PlaySfx(u32 sfxId, f32* sfxSource, u8 token, f32* freqMod, f32* volMod, s8* reverbAdd); void Audio_KillSfxByBank(u8 bankId); void Audio_StopSfxByBankAndSource(u8 bankId, f32* sfxSource); void Audio_KillSfxByBankAndSource(u8 bankId, f32* sfxSource); void Audio_KillSfxBySource(f32* sfxSource); void Audio_KillSfxBySourceAndId(f32* sfxSource, u32 sfxId); void Audio_KillSfxByTokenAndId(u8 token, u32 sfxId); void Audio_KillSfxById(u32 sfxId); void Audio_StartPlayerNoise(u8 playerId); void Audio_StopPlayerNoise(u8 playerId); void Audio_InitBombSfx(u8 playerId, u8 type); void Audio_PlayBombFlightSfx(u8 playerId, f32* sfxSource); void Audio_PlayBombExplodeSfx(u8 playerId, f32* sfxSource); void Audio_StopEngineNoise(f32* sfxSource); void Audio_SetSfxSpeedModulation(f32 vel); void Audio_SetTransposeAndPlaySfx(f32* sfxSource, u32 sfxId, u8 semitones); void Audio_SetModulationAndPlaySfx(f32* sfxSource, u32 sfxId, f32 freqMod); void Audio_PlaySfxModulated(f32* sfxSource, u32 sfxId); void Audio_SetSfxMapModulation(u8 fMod); void Audio_SetHeatAlarmParams(u8 shields, u8 heightParam); void Audio_PlayEventSfx(f32* sfxSource, u16 eventSfxId); void Audio_StopEventSfx(f32* sfxSource, u16 eventSfxId); void Audio_SetEnvSfxReverb(s8 reverb); void Audio_PlayPauseSfx(u8 active); void Audio_PlayMapMenuSfx(u8 active); void Audio_KillAllSfx(void); #define AUDIO_PLAY_SFX(sfxId, srcPos, token) (Audio_PlaySfx((sfxId),(srcPos),(token),&gDefaultMod,&gDefaultMod,&gDefaultReverb)) #define SFX_FLAG_18 (1 << 18) // makes distance ignore z position? probably more #define SFX_FLAG_19 (1 << 19) #define SFX_FLAG_20 (1 << 20) // make priority ignore distance #define SFX_FLAG_21 (1 << 21) // make reverb ignore distance #define SFX_FLAG_22 (1 << 22) // make volume ignore distance #define SFX_FLAG_23 (1 << 23) // make noisy #define SFX_FLAG_27 (1 << 27) // allow duplicate requests #define SFX_BANK_SHIFT 28 #define SFX_STATE_SHIFT 24 #define SFX_RANGE_SHIFT 16 #define SFX_IMPORT_SHIFT 8 #define SFX_BANK_MASK (0xF << SFX_BANK_SHIFT) #define SFX_STATE_FLAG (1 << SFX_STATE_SHIFT) #define SFX_RANGE_MASK (3 << SFX_RANGE_SHIFT) #define SFX_IMPORT_MASK (0xFF << SFX_IMPORT_SHIFT) #define SFX_BANK(sfxId) ((((sfxId) & SFX_BANK_MASK) >> SFX_BANK_SHIFT) & 0xFF) #define SFX_BANK_ALT(sfxId) (((sfxId) >> SFX_BANK_SHIFT) & 0xFF) #define SFX_STATE(sfxId) (((sfxId) & SFX_STATE_FLAG) >> SFX_STATE_SHIFT) #define SFX_RANGE(sfxId) ((((sfxId) & SFX_RANGE_MASK) >> SFX_RANGE_SHIFT) & 0xFF) #define SFX_IMPORT(sfxId) ((((sfxId) & SFX_IMPORT_MASK) >> SFX_IMPORT_SHIFT) & 0xFF) #define SFX_INDEX(sfxId) ((sfxId) & 0xFF) #define SFX_PACK(bank, index, range, importance, flags) \ ((((bank)< call alert #define NA_SE_MAP_WINDOW_OPEN 0x49000019 // Also reticles on #define NA_SE_MAP_WINDOW_CLOSE 0x4900101A // Also reticles off #define NA_SE_MAR_LOCKON 0x4900001B #define NA_SE_MISSILE_ALARM 0x4900001C #define NA_SE_CANCEL 0x4900101D #define NA_SE_COMPUTER_NOISE 0x4100001E // Used in mission briefing #define NA_SE_MAP_MOVE_STOP 0x4900001F #define NA_SE_ARWING_DECIDE 0x49000020 // Used in main menu #define NA_SE_ARWING_CANCEL 0x49000021 // Used in main menu #define NA_SE_ARWING_CURSOR 0x49000022 // Used in main menu #define NA_SE_OVERHEAT_ALARM 0x4100C023 #define NA_SE_ONE_UP 0x4900C024 #define NA_SE_RING_PASS 0x49008025 // Also used for Corneria mech boss secret 1UP #define NA_SE_SHIELD_BUZZER 0x49001026 #define NA_SE_LOCK_ON 0x49008027 #define NA_SE_BOSS_GAUGE_OPEN 0x4900C028 #define NA_SE_BANK4_UNK_1 0x40000029 // Unreferenced. Sounds like an item collect jingle #define NA_SE_COUNTDOWN 0x4900C02A #define NA_SE_VIEW_SITCHW_ON 0x4000002B // Unreferenced. Related to gFovYMode? #define NA_SE_VIEW_MOVE_IN 0x4900002C #define NA_SE_VIEW_MOVE_OUT 0x4900002D #define NA_SE_SEARCHLIGHT_MISS 0x4900402E #define NA_SE_RING_MISS 0x4900402F #define NA_SE_GET_EMBLEM 0x49008030 #define NA_SE_MISSION_ACCOMPLISHED 0x49008031 #define NA_SE_VO_PEPPER_CONSENT 0x49000032 // This is ONE steep bill, but it's worth it. #define NA_SE_VO_PEPPER_SURPRISE 0x49000033 // WHAT?! #define NA_SE_MISSION_COMPLETE 0x49008034 #define NA_SE_BANL4_UNK_2 0x40000035 // Unreferenced. Hard to make out what it is #define NA_SE_TIME_OVER 0x4900D036 #endif