Rename many music related symbols

This commit is contained in:
Ryan Dwyer
2020-08-29 00:41:53 +10:00
parent 34f6cf9316
commit ae01166fd6
48 changed files with 514 additions and 472 deletions
+53 -22
View File
@@ -2192,20 +2192,35 @@
/**
* Starts the X music theme. The music will play for the given number of seconds
* before reverting to the standard level theme.
* before reverting to the primary track.
*
* The xreason argument is expected to be an XREASON constant. The command can
* be called multiple times with different XREASONs and durations, essentially
* overlapping them and causing the X music to continue playing while any reason
* is still in its duration. In practice this feature is not used - xreason is
* always 1 (XREASON_DEFAULT).
*
* The u2 argument appears to be a timer value as well, but its purpose is
* unknown.
*/
#define play_x_music(channel, seconds) \
#define play_x_track(xreason, u2, seconds) \
mkshort(0x00f9), \
0x01, \
channel, \
xreason, \
u2, \
seconds,
/**
* Stops the music in the given channel.
* Stops the X music which has the given reason. If there is no other reason to
* play X music then the level's primary track will be played.
*
* See the description of play_x_track for an explanation of xreasons.
*
* The special xreason value of -1 can be used to stop the X music regardless of
* reason.
*/
#define stop_music_channel(channel) \
#define stop_x_track(xreason) \
mkshort(0x00fa), \
channel,
xreason,
/**
* Surround the given player in infinite explosions.
@@ -3043,16 +3058,23 @@
bool,
/**
* Plays the given music track.
* Plays the given track in isolation.
*
* Any existing X track and ambient track is stopped, and the given track will
* play.
*
* It's used to start the CI training music and the Skedar King battle music.
*/
#define play_music_track(id) \
#define play_track_isolated(id) \
mkshort(0x015b), \
id,
/**
* Restarts the default stage music from the beginning.
* Restarts the default tracks (primary and ambient, if any) from the beginning.
*
* It's used to restart the default CI music after a training session.
*/
#define restart_music \
#define play_default_tracks \
mkshort(0x015c),
/**
@@ -3270,30 +3292,39 @@
channel,
/**
* Sets the music track for this stage.
* Plays the given track for the purpose of a cutscene.
*
* When playing via this command, the X music will be impossible to trigger
* until stop_cutscene_track is called.
*/
#define set_music_track(id) \
#define play_cutscene_track(tracknum) \
mkshort(0x017d), \
id,
tracknum,
/**
* Restarts the default stage music.
* Stops the cutscene track and restarts the default tracks for the current
* stage.
*/
#define restart_default_music \
#define stop_cutscene_track \
mkshort(0x017e),
/**
* Sets the sound effects track. This is typically background noise like wind,
* waves and the Area 51 announcements.
* Overrides the ambient track temporarily to the given one and plays it.
*
* It is used to change the ambient theme for the Defection intro and Extraction
* outro to traffic noises.
*/
#define set_sfx_track(id) \
#define play_temporary_track(tracknum) \
mkshort(0x017f), \
id,
tracknum,
/**
* Resets the sound effects track.
* Stops the ambient track.
*
* Typically used when ending a cutscene, because cutscenes can have their own
* ambient tracks.
*/
#define reset_ambience \
#define stop_ambient_track \
mkshort(0x0180),
/**
+30 -17
View File
@@ -2386,11 +2386,11 @@
#define RACE_EYESPY 3
#define RACE_ROBOT 4
#define ROOMFLAG_DISABLED 0x0001
#define ROOMFLAG_VISIBLEBYPLAYER 0x0004
#define ROOMFLAG_VISIBLEBYAIBOT 0x0008
#define ROOMFLAG_4000 0x4000
#define ROOMFLAG_8000 0x8000
#define ROOMFLAG_DISABLED 0x0001
#define ROOMFLAG_VISIBLEBYPLAYER 0x0004
#define ROOMFLAG_VISIBLEBYAIBOT 0x0008
#define ROOMFLAG_PLAYAMBIENTTRACK 0x4000
#define ROOMFLAG_8000 0x8000
#define SAVEFILEFLAG_P1_FORWARDPITCH 0x00
#define SAVEFILEFLAG_P1_AUTOAIM 0x01
@@ -2788,11 +2788,30 @@
#define TITLEAIMODE_RAREPRESENTS2 4
#define TITLEAIMODE_PDLOGO 5
#define TRACKTYPE_PRIMARY 1
#define TRACKTYPE_X 2
#define TRACKTYPE_MENU 3
#define TRACKTYPE_DEATH 4
#define TRACKTYPE_AMBIENT 5
#define TRACKTYPE_6 6
#define VERSION_NTSC_BETA 0
#define VERSION_NTSC_1_0 1
#define VERSION_NTSC_FINAL 2
#define VERSION_PAL_BETA 3
#define VERSION_PAL_FINAL 4
#define VERSION_JAP_FINAL 5
#define VISIONMODE_NORMAL 0
#define VISIONMODE_XRAY 1
#define VISIONMODE_SLAYERROCKET 2
#define VISIONMODE_3 3
#define VOICEBOX_0 0
#define VOICEBOX_1 1
#define VOICEBOX_2 2
#define VOICEBOX_3 3
#define WAYMODE_EXPENSIVE 0
#define WAYMODE_CHEAP 6
@@ -2911,6 +2930,12 @@
#define WEATHERTYPE_RAIN 0
#define WEATHERTYPE_SNOW 1
// Reasons for playing X music
#define XREASON_0 0
#define XREASON_DEFAULT 1
#define XREASON_2 2
#define XREASON_3 3
// Heads and bodies
#define HEAD_RANDOM -1
#define BODY_DJBOND 0x00
@@ -3064,15 +3089,3 @@
#define BODY_ELVISWAISTCOAT 0x94
#define BODY_DARK_LEATHER 0x95
#define BODY_DARK_NEGOTIATOR 0x96
#define VERSION_NTSC_BETA 0
#define VERSION_NTSC_1_0 1
#define VERSION_NTSC_FINAL 2
#define VERSION_PAL_BETA 3
#define VERSION_PAL_FINAL 4
#define VERSION_JAP_FINAL 5
#define VOICEBOX_0 0
#define VOICEBOX_1 1
#define VOICEBOX_2 2
#define VOICEBOX_3 3
+9 -9
View File
@@ -249,8 +249,8 @@
/*0x00f6*/ bool ai00f6(void);
/*0x00f7*/ bool aiIfAllObjectivesComplete(void);
/*0x00f8*/ bool aiIfPlayerIsInvincible(void);
/*0x00f9*/ bool aiAudioPlayXMusic(void);
/*0x00fa*/ bool aiAudioStopChannel(void);
/*0x00f9*/ bool aiPlayXTrack(void);
/*0x00fa*/ bool aiStopXTrack(void);
/*0x00fb*/ bool aiChrExplosions(void);
/*0x00fc*/ bool aiIfKillCountGreaterThan(void);
/*0x00fd*/ bool ai00fd(void);
@@ -332,8 +332,8 @@
/*0x014b*/ bool aiIfNotListening(void);
/*0x0152*/ bool aiIfNumChrsInSquadronGreaterThan(void);
/*0x0157*/ bool aiSetTintedGlassEnabled(void);
/*0x015b*/ bool aiAudioPlayMusic(void);
/*0x015c*/ bool aiAudioRestartMusic(void);
/*0x015b*/ bool aiPlayTrackIsolated(void);
/*0x015c*/ bool aiPlayDefaultTracks(void);
/*0x0165*/ bool aiIfChrInjured(void);
/*0x0166*/ bool aiIfAction(void);
/*0x0167*/ bool aiHovercopterFireRocket(void);
@@ -358,10 +358,10 @@
/*0x017a*/ bool aiIfCanSeeAttackTarget(void);
/*0x017b*/ bool aiIfChrKnockedOut(void);
/*0x017c*/ bool aiAssignSound(void);
/*0x017d*/ bool aiAudioSetMusicTrack(void);
/*0x017e*/ bool aiAudioRestartDefaultMusic(void);
/*0x017f*/ bool aiAudioSetSfxTrack(void);
/*0x0180*/ bool aiAudioRestartSfx(void);
/*0x017d*/ bool aiPlayCutsceneTrack(void);
/*0x017e*/ bool aiStopCutsceneTrack(void);
/*0x017f*/ bool aiPlayTemporaryTrack(void);
/*0x0180*/ bool aiStopAmbientTrack(void);
/*0x0181*/ bool aiIfPlayerLookingAtObject(void);
/*0x0182*/ bool aiPunchOrKick(void);
/*0x0183*/ bool aiIfTargetIsPlayer(void);
@@ -437,7 +437,7 @@
/*0x01d7*/ bool aiIfDistanceToTarget2LessThan(void);
/*0x01d8*/ bool aiIfDistanceToTarget2GreaterThan(void);
/*0x01d9*/ bool aiPlaySoundFromProp(void);
/*0x01da*/ bool aiPlayMusicContinuously(void);
/*0x01da*/ bool aiPlayTemporaryPrimaryTrack(void);
/*0x01db*/ bool aiChrKill(void);
/*0x01dc*/ bool aiRemoveWeaponFromInventory(void);
/*0x01dd*/ bool ai01dd(void);
+3 -3
View File
@@ -2,10 +2,10 @@
#define IN_GAME_DATA_02A0E0_H
#include <ultra64.h>
extern s32 g_AudioCurrentBgMusicNum;
extern s32 g_MenuTrack;
extern u32 var800840c4;
extern s32 var800840c8;
extern s32 var800840cc;
extern s32 g_TemporaryPrimaryTrack;
extern s32 g_TemporaryAmbientTrack;
extern s32 var800840d0;
extern u32 var800840d4;
extern u32 var800840d8;
+26 -26
View File
@@ -3,42 +3,42 @@
#include <ultra64.h>
#include "types.h"
u16 audioGetVolume(void);
void func0f16cfe8(u16 volume);
bool func0f16d0a8(s32 arg0, s32 arg1);
s32 func0f16d124(s32 arg0);
void func0f16d1bc(u32 arg0, u32 tracknum, f32 arg2, u16 volume);
void func0f16d240(s32 arg0);
void func0f16d2ac(s32 arg0, f32 arg1, s32 arg2);
u16 musicGetVolume(void);
void musicSetVolume(u16 volume);
bool func0f16d0a8(s32 tracktype, s32 arg1);
s32 func0f16d124(s32 tracktype);
void musicStart(u32 tracktype, u32 tracknum, f32 arg2, u16 volume);
void musicEnd(s32 tracktype);
void func0f16d2ac(s32 tracktype, f32 arg1, s32 arg2);
void func0f16d324(void);
void func0f16d3d0(void);
void func0f16d430(void);
void func0f16d44c(void);
void func0f16d4b8(f32 arg0);
void func0f16d548(f32 arg0);
bool audioIsAnyPlayerInRoomWithFlag4000(void);
void func0f16d89c(f32 arg0);
void audioSetBgMusic(s32 tracknum);
void func0f16d9a8(s32 stagenum);
void func0f16d9f0(s32 stagenum);
void musicStartPrimary(f32 arg0);
void musicStartAmbient(f32 arg0);
bool musicIsAnyPlayerInAmbientRoom(void);
void musicStartX(f32 arg0);
void musicStartMenu2(s32 tracknum);
void musicSetStageAndStartMusic(s32 stagenum);
void musicSetStage(s32 stagenum);
void func0f16d9fc(void);
void func0f16da2c(void);
void func0f16daa4(void);
void audioSetBgMusicForMenu(void);
void musicStartForMenu(void);
void func0f16db3c(void);
void audioPlaySoloDeathTrack(void);
void audioPlayMpDeathTrack(f32 arg0);
void musicStartSoloDeath(void);
void musicStartMpDeath(f32 arg0);
void func0f16dd14(void);
void func0f16ddb0(void);
void audioPlayTrack(s32 tracknum);
void audioRestartTrack(void);
void func0f16deb8(s32 tracknum);
void audioSetTrack(s32 tracknum);
void audioRestartDefaultTrack(void);
void audioSetAuxTrack(s32 tracknum);
void audioRestartAuxTrack(void);
void audioPlayXTrack(s32 index, u32 arg1, u32 duration);
void audioStopTrack(s32 index);
void musicPlayTrackIsolated(s32 tracknum);
void musicPlayDefaultTracks(void);
void musicStartTemporaryPrimary(s32 tracknum);
void musicStartCutscene(s32 tracknum);
void musicEndCutscene(void);
void musicStartTemporary(s32 tracknum);
void musicEndAmbient(void);
void musicSetXReason(s32 index, u32 arg1, u32 duration);
void musicUnsetXReason(s32 reason);
void func0f16e138(void);
#endif
+4 -4
View File
@@ -178,7 +178,7 @@ struct g_vars {
/*0004b0*/ u32 mpquickteam;
/*0004b4*/ s32 stagenum;
/*0004b8*/ struct prop *aibuddies[4];
/*0004c8*/ u32 unk0004c8;
/*0004c8*/ u32 dontplaynrg; // allow X music to be played (NRG = energy track)
/*0004cc*/ s32 in_cutscene;
/*0004d0*/ u8 unk0004d0;
/*0004d1*/ u8 unk0004d1;
@@ -762,12 +762,12 @@ extern u32 var800aa5a0;
extern struct audiohandle *g_BoostAndSlayerAudioHandles[3];
extern s32 g_BoostAndSlayerActiveTypes[3];
extern u32 var800aa5cc;
extern s32 var800aa5d0; // stage number
extern s32 g_MusicStageNum; // stage number
extern struct var800aa5d8 var800aa5d8[40];
extern struct var800aaa38 var800aaa38[3];
extern u32 var800aaa68[4];
extern u32 g_AudioXReasonsActive[4];
extern u32 var800aaa78[4];
extern u32 var800aaa88[4];
extern u32 g_AudioXReasonDurations[4];
extern u32 var800aaa98;
extern char *g_LangBanks[69];
extern void *var800aabb4;
+2 -2
View File
@@ -6196,7 +6196,7 @@ struct optiongroup {
};
struct var800aa5d8 {
s32 unk00;
s32 tracktype;
s32 tracknum;
s32 unk08;
f32 unk0c;
@@ -6251,7 +6251,7 @@ struct var800a4ce8 {
};
struct var800aaa38 {
u32 unk00;
u32 tracktype;
u32 unk04;
u32 unk08;
u32 unk0c;