415D90 and Audio (#229)

* 415D90 decomp

* code_415D90 rodata migration

* data migration, decomp

* .

* .

* .

* 4 funcs

* non-matching

* audio part 1

* audio work

* end of snd

* update_symbol_addrs

* .

* 🐔

* .

* sfx func names

* bgm

* more audio

* .

* a few audio funcs
This commit is contained in:
Ethan Roseman 2021-03-26 23:46:45 +09:00 committed by GitHub
parent 3a767cffe3
commit 4ace4bb0d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
402 changed files with 2326 additions and 2558 deletions

View File

@ -227,9 +227,9 @@ f32 dist2D(f32 ax, f32 ay, f32 bx, f32 by);
f32 dist3D(f32 ax, f32 ay, f32 az, f32 bx, f32 by, f32 bz);
void add_vec2D_polar(f32* x, f32* y, f32 r, f32 theta);
s32 func_801499EC(s32 soundID, s32 arg1, f32 arg2, f32 arg3, f32 arg4);
s32 play_sound_at_position(s32 soundID, s32 value2, f32 posX, f32 posY, f32 posZ);
s32 set_music_track(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, s16 volume);
s32 sfx_adjust_env_sound_pos(s32 soundID, s32 arg1, f32 arg2, f32 arg3, f32 arg4);
s32 sfx_play_sound_at_position(s32 soundID, s32 value2, f32 posX, f32 posY, f32 posZ);
s32 bgm_set_song(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, s16 volume);
s32 func_8014AA54(s32 playerIndex, s32 arg1, s16 arg2);
s32 basic_window_update(void);

View File

@ -43,7 +43,7 @@ typedef struct Map {
/* 0x14 */ char* bgName;
/* 0x18 */ MapInit init; ///< Return TRUE to skip normal asset (shape/hit/bg/tex) loading.
/* 0x1C */ s16 unk_1C; // Unused?
/* 0x1E */ s8 songVariation; ///< 0 or 1. @see get_song_variation_override_for_cur_map
/* 0x1E */ s8 songVariation; ///< 0 or 1. @see bgm_get_map_default_variation
/* 0x1F */ s8 flags;
} Map; // size = 0x20
@ -266,7 +266,7 @@ s32 func_800490B4(s32 arg0, Enemy* arg1, f32 arg2, s32 arg3, s32 arg4);
Area gAreas[29];
/// Lists the songs that are forced to use the variation determined by `map.songVariation & 1`.
/// @see get_song_variation_override_for_cur_map
/// @see bgm_get_map_default_variation
extern SongID gSongsUsingVariationFlag[6];
extern s16 D_8014F738;

View File

@ -236,7 +236,7 @@ extern s32 D_801083D8;
extern s32 D_80108068;
extern s32 D_80104BEC;
extern Temp8010EBB0 D_8010EBB0; // something with partners
extern Temp8010F250 D_8010F250; // play_sound state struct?
extern Temp8010F250 D_8010F250; // sfx_play_sound state struct?
// Effects
extern EffectTableEntry gEffectTable[135];

View File

@ -3,7 +3,7 @@
#include "common.h"
struct UnkAlA9C;
struct BGMPlayer;
struct UnkAl19E0;
typedef void (*UnkFuncAl)();
@ -34,14 +34,14 @@ typedef struct UnkAl1 {
/* 0x1A */ s16 unk_1A;
} UnkAl1; // size unknown (currently 0x1C)
typedef struct UnkAl4 { // maybe same as UnkAlC?
typedef struct InstrumentCFG { // maybe same as UnkAlC?
/* 0x00 */ s16 unk_00;
/* 0x02 */ u8 unk_02;
/* 0x03 */ s8 unk_03;
/* 0x04 */ s8 unk_04;
/* 0x05 */ s8 unk_05;
/* 0x06 */ s8 unk_06;
} UnkAl4;
} InstrumentCFG;
typedef struct UnkLen18 {
/* 0x00 */ u16 unk_00;
@ -94,22 +94,23 @@ typedef struct UnkAl0 {
/* 0x28 */ s32* unk_28;
} UnkAl0;
typedef struct UnkAlA {
/* 0x0 */ s16 unk_00;
/* 0x2 */ s16 unk_02;
/* 0x4 */ s16 unk_04;
/* 0x6 */ s16 unk_06;
/* 0x8 */ s8 unk_08;
} UnkAlA; // size = 0xA
typedef struct SoundSFXEntry {
/* 0x0 */ s16 soundID;
/* 0x2 */ s16 upperSoundID;
/* 0x4 */ s16 volume;
/* 0x6 */ s16 pitchShift;
/* 0x8 */ s8 pan;
/* 0x9 */ char unk_9[0x1];
} SoundSFXEntry; // size = 0xA
typedef struct UnkAlAC {
/* 0x00 */ s32 unk_00;
typedef struct SoundPlayer {
/* 0x00 */ s32 counter;
/* 0x04 */ char unk_04[0x58];
/* 0x5C */ u16 unk_5C;
/* 0x5E */ char unk_5E[0x1A];
/* 0x78 */ u8 unk_78;
/* 0x79 */ u8 unk_79;
/* 0x7A */ u8 unk_7A;
/* 0x78 */ u8 locatorB;
/* 0x79 */ u8 locatorC;
/* 0x7A */ u8 locatorD;
/* 0x7B */ u8 unk_7B;
/* 0x7C */ u8 unk_7C;
/* 0x7D */ u8 unk_7D;
@ -129,17 +130,24 @@ typedef struct UnkAlAC {
/* 0x9E */ u8 unk_9E;
/* 0x9F */ u8 unk_9F;
/* 0xA0 */ char unk_A0[0xC];
} UnkAlAC; // size = 0xAC
} SoundPlayer; // size = 0xAC
typedef struct UnkAl6CC {
/* 0x000 */ struct UnkAl19E0* unk_00;
typedef struct SoundSefHeader {
/* 0x00 */ char unk_00[0x10];
/* 0x10 */ s16 groupOffsets[8];
/* 0x20 */ char unk_20[0x2];
} SoundSefHeader; // size = 0x22
typedef struct SoundManager {
/* 0x000 */ struct UnkAl19E0* soundData;
/* 0x004 */ char unk_04[0x4];
/* 0x008 */ s32* unk_08;
/* 0x00C */ char unk_0C[0x24];
/* 0x030 */ s32 unk_30;
/* 0x034 */ s32 unk_34;
/* 0x038 */ s32 unk_38;
/* 0x03C */ s32 unk_3C;
/* 0x008 */ s32* sefData;
/* 0x00C */ s32* normalSounds[8];
/* 0x02C */ s32* soundsWithBit2000;
/* 0x030 */ s32 playCounter; //?
/* 0x034 */ s32 unkCounterStep;
/* 0x038 */ s32 unkCounterMax;
/* 0x03C */ s32 unkCounter;
/* 0x040 */ UnkAl1 unk_40;
/* 0x05C */ s32 unk_5C;
/* 0x060 */ s32 unk_60;
@ -153,20 +161,20 @@ typedef struct UnkAl6CC {
/* 0x0B8 */ u16 unk_B8;
/* 0x0BA */ s16 unk_BA;
/* 0x0BC */ u8 unk_BC;
/* 0x0BD */ u8 unk_BD;
/* 0x0BD */ u8 sfxPlayerSelector;
/* 0x0BE */ u8 unk_BE;
/* 0x0BF */ char unk_BF[0x1];
/* 0x0C0 */ s8 unk_C0;
/* 0x0C1 */ char unk_C1[0x1];
/* 0x0C2 */ UnkAlA unk_C2[16];
/* 0x0C2 */ SoundSFXEntry unk_C2[16];
/* 0x162 */ s8 unk_162;
/* 0x163 */ s8 unk_163;
/* 0x164 */ s8 unk_164;
/* 0x163 */ u8 sfxQueuePosOffset;
/* 0x164 */ u8 sfxQueueNextPos;
/* 0x165 */ s8 unk_165;
/* 0x166 */ char unk_166[0x2];
/* 0x168 */ s32 unk_168;
/* 0x16C */ UnkAlAC unk_16C[8];
} UnkAl6CC;
/* 0x16C */ SoundPlayer unk_16C[8];
} SoundManager;
typedef struct UnkAlC {
/* 0x0 */ s16 unk_00;
@ -180,18 +188,18 @@ typedef struct UnkAlC {
/* 0xA */ s8 unk_0A;
} UnkAlC;
typedef struct UnkAl30 {
/* 0x00 */ s32* unk_00;
/* 0x04 */ s32 unk_04;
/* 0x08 */ s32 unk_08;
/* 0x0C */ s32 unk_0C;
/* 0x10 */ s32 unk_10;
/* 0x14 */ s32 unk_14;
/* 0x18 */ s32* unk_18;
typedef struct Instrument {
/* 0x00 */ s32 wavOffset;
/* 0x04 */ s32 wavLength;
/* 0x08 */ s32 loopPredictorOffset;
/* 0x0C */ s32 loopStart;
/* 0x10 */ s32 loopEnd;
/* 0x14 */ s32 loopCount;
/* 0x18 */ s32 predictorOffset;
/* 0x1C */ s16 unk_1C;
/* 0x1E */ s16 unk_1E;
/* 0x20 */ f32 unk_20;
/* 0x24 */ s8 unk_24;
/* 0x20 */ f32 sampleRate;
/* 0x24 */ s8 skipLoopPredictor;
/* 0x25 */ s8 unk_25;
/* 0x26 */ s8 unk_26;
/* 0x27 */ s8 unk_27;
@ -199,8 +207,10 @@ typedef struct UnkAl30 {
/* 0x29 */ s8 unk_29;
/* 0x2A */ s8 unk_2A;
/* 0x2B */ s8 unk_2B;
/* 0x2C */ s32* unk_2C;
} UnkAl30;
/* 0x2C */ s32 unkOffset;
} Instrument;
typedef Instrument* Instruments[16];
typedef struct UnkAl48 { // Track?
/* 0x00 */ s32 unk_00; // pointer to something
@ -236,10 +246,17 @@ typedef struct UnkAl48 { // Track?
/* 0x46 */ char unk_46[2];
} UnkAl48; // size = 0x48
typedef struct UnkTemp2 {
/* 0x00 */ s32 unk_00;
/* 0x08 */ s32 unk_04;
} UnkTemp2;
typedef struct SBNFileEntry {
/* 0x0 */ s32 offset;
/* 0x4 */ s8 fmt;
/* 0x5 */ char unk_05;
/* 0x6 */ s16 length;
} SBNFileEntry; // size = 0x8
typedef struct InitSongEntry {
/* 0x0 */ s16 bgmFileIndex; // required BGM file
/* 0x2 */ s16 bkFileIndex[3]; // optional BK files for this track
} InitSongEntry; // size = 0x8
typedef struct UnkAl19E0Sub {
/* 0x0 */ u16 unk_0;
@ -254,111 +271,108 @@ typedef struct UnkAl19E0Sub2 {
} UnkAl19E0Sub2;
typedef struct UnkAl19E0Sub3 {
/* 0x00 */ struct UnkAlA9C* unk_0;
/* 0x00 */ struct BGMPlayer* unk_0;
/* 0x04 */ s8 unk_4;
/* 0x05 */ s8 unk_5;
} UnkAl19E0Sub3;
typedef struct SoundBank {
/* 0x000 */ char unk_00[0xE];
/* 0x00E */ u8 swizzled;
/* 0x010 */ char unk_0F[0x831];
} SoundBank; // size = 0x840
typedef struct UnkAl19E0 {
/* 0x0000 */ f32 unk_00;
/* 0x0004 */ UnkAl30* unk_04;
/* 0x0000 */ f32 actualFrequency;
/* 0x0004 */ Instrument* defaultInstrument;
/* 0x0008 */ UnkAlC unk_08;
/* 0x0014 */ UnkAl4 unk_14;
/* 0x001C */ s32 unk_1C;
/* 0x0020 */ UnkTemp2* unk_20;
/* 0x0024 */ s32 unk_24;
/* 0x0014 */ InstrumentCFG defaultPRGEntry;
/* 0x001C */ s32 baseRomOffset;
/* 0x0020 */ SBNFileEntry* sbnFileList;
/* 0x0024 */ s32 fileListLength;
/* 0x0028 */ char unk_28[0x4];
/* 0x002C */ s32* unk_2C;
/* 0x0030 */ char unk_30[0x4];
/* 0x0034 */ s32 unk_34;
/* 0x0038 */ s32 unk_38;
/* 0x003C */ UnkAl19E0Sub* unk_3C;
/* 0x002C */ InitSongEntry* songList;
/* 0x0030 */ s32 songListLength;
/* 0x0034 */ s32 bkFileListOffset;
/* 0x0038 */ s32 bkListLength;
/* 0x003C */ UnkAl19E0Sub* mseqFileList;
/* 0x0040 */ UnkAl19E0Sub2 unk_40[4];
/* 0x0050 */ u8 unk_50;
/* 0x0051 */ u8 unk_51;
/* 0x0052 */ u8 unk_52;
/* 0x0053 */ u8 unk_53;
/* 0x0054 */ s32* unk_54;
/* 0x0058 */ s32* unk_58;
/* 0x0054 */ s32* dataPER;
/* 0x0058 */ s32* dataPRG;
/* 0x005C */ s32* unk_5C;
/* 0x0060 */ s32* unk_60;
/* 0x0064 */ s32* unk_64;
/* 0x0068 */ s32* unk_68;
/* 0x006C */ UnkAl19E0Sub3 unk_6C[1];
/* 0x0074 */ char unk_74[0xC];
/* 0x0074 */ char unk_74[0x8];
/* 0x007C */ s32 unkSongName;
/* 0x0080 */ s32 unk_80;
/* 0x0084 */ char unk_84[0x10];
/* 0x0084 */ s32 unkFadeTime;
/* 0x0088 */ s32 unkFadeStart;
/* 0x008C */ s32 unkFadeEnd;
/* 0x0090 */ s32* unk_90;
/* 0x0094 */ s32* unk_94;
/* 0x0098 */ s32* unk_98;
/* 0x009C */ s32 unk_9C;
/* 0x00A0 */ s32* unk_A0;
/* 0x00A0 */ s32* dataSEF;
/* 0x00A4 */ UnkFuncAl unk_A4[2];
/* 0x00AC */ s32* unk_AC;
/* 0x00B0 */ char unk_B0[0x3C];
/* 0x00EC */ s32* unk_EC;
/* 0x00F0 */ char unk_F0[0x3FC];
/* 0x04EC */ s32* unk_4EC;
/* 0x04F0 */ char unk_4F0[0xFC];
/* 0x05EC */ s32* unk_5EC;
/* 0x05F0 */ char unk_5F0[0x3FC];
/* 0x09EC */ s32* unk_9EC;
/* 0x09F0 */ char unk_9F0[0x3FC];
/* 0x0DEC */ s32* unk_DEC;
/* 0x0DF0 */ char unk_DF0[0x3FC];
/* 0x11EC */ s32* unk_11EC;
/* 0x11F0 */ char unk_11F0[0xFC];
/* 0x12EC */ s32* unk_12EC;
/* 0x12F0 */ s32* unk_12F0;
/* 0x12F4 */ s32* unk_12F4;
/* 0x12F8 */ s32* unk_12F8;
/* 0x12FC */ s32* unk_12FC;
/* 0x1300 */ s32* unk_1300;
/* 0x1304 */ s32* unk_1304;
/* 0x1308 */ s32* unk_1308;
/* 0x00AC */ Instruments instrumentGroupX[1];
/* 0x00EC */ Instruments instrumentGroup3[16];
/* 0x04EC */ Instruments instrumentGroup1[4];
/* 0x05EC */ Instruments instrumentGroup2[16];
/* 0x09EC */ Instruments instrumentGroup4[16];
/* 0x0DEC */ Instruments instrumentGroup5[16];
/* 0x11EC */ Instruments instrumentGroup6[4];
/* 0x12EC */ Instruments* instrumentGroups[8];
/* 0x130C */ u8 unk_130C;
/* 0x130D */ char unk_130D[3];
/* 0x1310 */ s32* unk_1310[3];
/* 0x1310 */ s32* banks[3];
/* 0x131C */ char unk_131C[4];
/* 0x1320 */ UnkAl48 unk_1320[24];
} UnkAl19E0; // size = 0x19E0
typedef struct UnkAl60 {
/* 0x00 */ u32 unk_00;
typedef struct BGMPlayerTrack {
/* 0x00 */ u32 bgmReadPos;
/* 0x04 */ u32 unk_04;
/* 0x08 */ char unk_08[0x4];
/* 0x0C */ s32 unk_0C;
/* 0x10 */ s32 unk_10;
/* 0x14 */ char unk_14[0x4];
/* 0x18 */ s32 unk_18;
/* 0x1C */ s32 unk_1C;
/* 0x20 */ s32 unk_20;
/* 0x24 */ s32 unk_24[2];
/* 0x18 */ s32 subTrackVolume;
/* 0x1C */ s32 subTrackVolumeFadeDelta;
/* 0x20 */ s32 subTrackVolumeFadeVolume;
/* 0x24 */ s32 subTrackVolumeFadeTime;
/* 0x28 */ s32 unk_28;
/* 0x2C */ char unk_2C[0xC];
/* 0x38 */ u16 unk_38;
/* 0x3A */ s16 unk_3A;
/* 0x38 */ u16 segTrackTune;
/* 0x3A */ s16 trackTremoloAmount;
/* 0x3C */ char unk_3C[0x2];
/* 0x3E */ s16 unk_3E;
/* 0x40 */ s8 unk_40;
/* 0x41 */ s8 unk_41;
/* 0x42 */ s8 unk_42;
/* 0x43 */ s8 unk_43;
/* 0x40 */ s8 tuneChanged;
/* 0x41 */ s8 volumeChanged;
/* 0x42 */ s8 panChanged;
/* 0x43 */ s8 reverbChanged;
/* 0x44 */ u16 unk_44;
/* 0x46 */ u16 unk_46;
/* 0x48 */ u8 unk_48;
/* 0x49 */ u8 unk_49;
/* 0x4A */ u8 unk_4A;
/* 0x4B */ u8 unk_4B;
/* 0x46 */ u16 subTrackCoarseTune;
/* 0x48 */ u8 subTrackFineTune;
/* 0x49 */ u8 segTrackVolume;
/* 0x4A */ u8 subTrackPan;
/* 0x4B */ u8 subTrackReverb;
/* 0x4C */ u8 unk_4C;
/* 0x4D */ char unk_4D[0x8];
/* 0x55 */ s8 unk_55;
/* 0x56 */ s8 unk_56;
/* 0x55 */ s8 trackTremoloSpeed;
/* 0x56 */ s8 trackTremoloTime;
/* 0x57 */ s8 unk_57;
/* 0x58 */ u8 unk_58;
/* 0x59 */ char unk_59[0x2];
/* 0x5B */ s8 unk_5B;
/* 0x5B */ s8 subtrackReverbType;
/* 0x5C */ u8 unk_5C;
/* 0x5D */ char unk_5D[0x3];
} UnkAl60; // size = 0x60;
} BGMPlayerTrack; // size = 0x60;
typedef struct UnkAl24 {
/* 0x00 */ char unk_00[0x8];
@ -371,18 +385,30 @@ typedef struct UnkAl24 {
/* 0x17 */ u8 unk_17;
} UnkAl24; // size = 0x18;
typedef struct UnkAlA9C {
/* 0x000 */ UnkAl19E0* unk_00;
/* 0x004 */ UnkAl6CC* unk_04;
/* 0x008 */ s32 unk_08;
typedef struct Fade {
/* 0x0 */ UnkField currentVolume;
/* 0x4 */ s32 fadeStep;
/* 0x8 */ s16 endVolume;
/* 0xA */ s16 fadeTime;
/* 0xC */ UnkFuncAl fpFadeCallback;
} Fade; // size = 0x10
typedef struct BGMPlayer {
/* 0x000 */ UnkAl19E0* data;
/* 0x004 */ SoundManager* soundManager;
/* 0x008 */ s32 unkFrequency; //?
/* 0x00C */ s32 unk_0C;
/* 0x010 */ s32 unk_10;
/* 0x014 */ s32 unk_14;
/* 0x018 */ s32 unk_18;
/* 0x01C */ s32 unk_1C;
/* 0x020 */ s32 unk_20;
/* 0x024 */ char unk_24[0x8];
/* 0x02C */ UnkAl1 unk_2C;
/* 0x01C */ s32 songName;
/* 0x020 */ s32 fadeSongName;
/* 0x024 */ s32 bgmFileIndex;
/* 0x028 */ s32 songID;
/* 0x02C */ Fade fadeInfo;
/* 0x03C */ u16 unk_3C;
/* 0x03E */ char unk_3E[0x8];
/* 0x046 */ s16 unk_46;
/* 0x048 */ s32 unk_48;
/* 0x04C */ u8 unk_4C[0x1]; // not sure how long this is
/* 0x04D */ char unk_4D[0xB];
@ -441,9 +467,9 @@ typedef struct UnkAlA9C {
/* 0x259 */ s8 unk_259;
/* 0x25A */ s8 unk_25A;
/* 0x25B */ s8 unk_25B;
/* 0x25C */ UnkAl60 unk_25C[16];
/* 0x25C */ BGMPlayerTrack unk_25C[16];
/* 0x85C */ UnkAl24 unk_85C[24];
} UnkAlA9C; // size = 0xA9C
} BGMPlayer; // size = 0xA9C
typedef union Q32 {
u8 u8[4];
@ -501,12 +527,12 @@ extern s8 D_80078E5C;
extern s32* D_8007F1F8; // points to 80078290
extern UnkAl19E0* D_8009A5C0;
extern UnkAlA9C* D_8009A5CC;
extern UnkAlA9C* D_8009A5FC;
extern BGMPlayer* D_8009A5CC;
extern BGMPlayer* D_8009A5FC;
extern UnkFuncAl D_8009A5E8;
extern UnkAl834* D_8009A628;
extern UnkAl6CC* D_8009A640;
extern UnkAlA9C* D_8009A664;
extern SoundManager* D_8009A640;
extern BGMPlayer* D_8009A664;
extern u16 D_800A0F50;
@ -517,55 +543,55 @@ extern s8 D_800A3FEC;
extern s16 D_800A3FEE;
extern s32 D_800A3FF0;
void al_LoadBKHeaders(UnkAl19E0* arg0, ALHeap* arg1);
void snd_load_BK_headers(UnkAl19E0* arg0, ALHeap* arg1);
void func_8004B440(UnkAl6CC*, u8, u8, UnkAl19E0*, u8);
void func_8004B62C(UnkAl6CC*);
void func_8004B698(UnkAl6CC*);
void func_8004B6D8(UnkAl6CC*, s32, s16, s16, u8);
void func_8004B748(UnkAl6CC*);
s32 func_8004B9E4(UnkAl6CC*, s32);
void func_8004BA54(UnkAl6CC*, s32);
s16 func_8004C444(UnkAl6CC*);
void func_8004B440(SoundManager*, u8, u8, UnkAl19E0*, u8);
void snd_load_sfx_groups_from_SEF(SoundManager*);
void snd_clear_sfx_queue(SoundManager*);
void snd_enqueue_sfx_event(SoundManager*, s32, s16, s16, u8);
void func_8004B748(SoundManager*);
s32 func_8004B9E4(SoundManager*, s32);
void func_8004BA54(SoundManager*, s32);
s16 func_8004C444(SoundManager*);
void func_8004D510(UnkAlA9C*);
UnkAlA9C* func_8004D794(s32);
void func_8004D510(BGMPlayer*);
BGMPlayer* snd_get_player_with_song_name(s32);
s32 func_8004DA0C(UNK_TYPE);
void func_8004DAA8(UnkAlA9C*);
void func_8004DAA8(BGMPlayer*);
void func_8004DFD4(UnkAl19E0*);
void func_8004E158(UnkAlA9C*, s32, s32, UnkAl19E0*);
void func_8004E3A4(UnkAlA9C*);
void func_8004E444(UnkAlA9C*);
s16 func_8004E4B8(UnkAlA9C*);
void func_8004FBBC(UnkAlA9C*, UnkAl60*);
s32 func_8004FC08(UnkAlA9C*, u32);
void func_8004FCB4(UnkAlA9C*, UnkAl60*);
void func_8004FCE4(UnkAlA9C*, UnkAl60*);
void func_8004FD04(UnkAlA9C*, UnkAl60*);
void func_8004FD38(UnkAlA9C*, UnkAl60*);
void func_8004FD94(UnkAlA9C*, UnkAl60*);
void func_8004FE10(UnkAlA9C*, UnkAl60*);
void func_8004FE6C(UnkAlA9C*, UnkAl60*);
void func_8004FEB0(UnkAlA9C*, UnkAl60*);
void func_8004FED0(UnkAlA9C*, UnkAl60*);
void func_8004FF3C(UnkAlA9C*, UnkAl60*);
void func_8004FF58(UnkAlA9C*, UnkAl60*);
void func_8004FF70(UnkAlA9C*, UnkAl60*);
void func_8004FF88(UnkAlA9C*, UnkAl60*);
void func_8004FFA8(UnkAlA9C*, UnkAl60*);
void func_8004FFB4(UnkAlA9C*, UnkAl60*);
void func_8004FFC8(UnkAlA9C*, UnkAl60*);
void func_8004FFE4(UnkAlA9C*, UnkAl60*);
void func_8004FFF0(UnkAlA9C*, UnkAl60*);
void func_8004FFFC(UnkAlA9C*, UnkAl60*);
void func_80050004(UnkAlA9C*, UnkAl60*);
void func_80050020(UnkAlA9C*, UnkAl60*);
void func_80050128(UnkAlA9C*, UnkAl60*);
void func_8005015C(UnkAlA9C*, UnkAl60*);
void func_80050184(UnkAlA9C*, UnkAl60*);
void func_800501A8(UnkAlA9C*, UnkAl60*);
void func_800502F0(UnkAlA9C*, UnkAl60*);
void func_80050560(UnkAlA9C*, UnkAl60*);
void func_8004E158(BGMPlayer*, s32, s32, UnkAl19E0*);
void snd_update_bgm_fade(BGMPlayer*);
void func_8004E444(BGMPlayer*);
s16 func_8004E4B8(BGMPlayer*);
void snd_BGMCmd_E0_MasterTempo(BGMPlayer*, BGMPlayerTrack*);
s32 snd_bpm_to_tempo(BGMPlayer*, u32);
void snd_BGMCmd_E1_MasterVolume(BGMPlayer*, BGMPlayerTrack*);
void snd_BGMCmd_E2_MasterTranspose(BGMPlayer*, BGMPlayerTrack*);
void snd_BGMCmd_E3(BGMPlayer*, BGMPlayerTrack*);
void snd_BGMCmd_E6_MasterEffect(BGMPlayer*, BGMPlayerTrack*);
void snd_BGMCmd_E4_MasterTempoFade(BGMPlayer*, BGMPlayerTrack*);
void snd_BGMCmd_E5_MasterVolumeFade(BGMPlayer*, BGMPlayerTrack*);
void snd_BGMCmd_E8_TrackOverridePatch(BGMPlayer*, BGMPlayerTrack*);
void snd_BGMCmd_E9_SubTrackVolume(BGMPlayer*, BGMPlayerTrack*);
void snd_BGMCmd_F6_TrackVolumeFade(BGMPlayer*, BGMPlayerTrack*);
void snd_BGMCmd_EA_SubTrackPan(BGMPlayer*, BGMPlayerTrack*);
void snd_BGMCmd_EB_SubTrackReverb(BGMPlayer*, BGMPlayerTrack*);
void snd_BGMCmd_EC_SegTrackVolume(BGMPlayer*, BGMPlayerTrack*);
void snd_BGMCmd_ED_SubTrackCoarseTune(BGMPlayer*, BGMPlayerTrack*);
void snd_BGMCmd_EE_SubTrackFineTune(BGMPlayer*, BGMPlayerTrack*);
void snd_BGMCmd_EF_SegTrackTune(BGMPlayer*, BGMPlayerTrack*);
void snd_BGMCmd_F0_TrackTremolo(BGMPlayer*, BGMPlayerTrack*);
void snd_BGMCmd_F1_TrackTremoloSpeed(BGMPlayer*, BGMPlayerTrack*);
void snd_BGMCmd_F2_TrackTremoloTime(BGMPlayer*, BGMPlayerTrack*);
void snd_BGMCmd_F3_TrackTremoloStop(BGMPlayer*, BGMPlayerTrack*);
void snd_BGMCmd_F4(BGMPlayer*, BGMPlayerTrack*);
void snd_BGMCmd_F5_TrackVoice(BGMPlayer*, BGMPlayerTrack*);
void snd_BGMCmd_F7_SubTrackReverbType(BGMPlayer*, BGMPlayerTrack*);
void snd_BGMCmd_FD(BGMPlayer*, BGMPlayerTrack*);
void snd_BGMCmd_FE(BGMPlayer*, BGMPlayerTrack*);
void snd_BGMCmd_FC_Jump(BGMPlayer*, BGMPlayerTrack*);
void snd_BGMCmd_FF(BGMPlayer*, BGMPlayerTrack*);
void snd_BGMCmd_NOP(BGMPlayer*, BGMPlayerTrack*);
s32 func_80056068(s32, u8);
s32 func_800506C8(s32, s32);
s32 func_80050C30(u32);
@ -583,11 +609,11 @@ void func_80052660(UnkAl19E0*);
void func_80052B44(UnkAl48*);
void func_80052BF8(UnkAl48*, s32*);
void func_800532F4(UnkAl30*);
void snd_reset_instrument(Instrument*);
void func_80053370(UnkAlC*);
void func_800533A8(UnkAl4*);
void func_800533A8(InstrumentCFG*);
void func_80053654(UnkAl19E0*);
void func_80053974(UnkAl1*, s32, s32, s16);
//void snd_initialize_fade(Fade*, s32, s32, s16);
void func_80053A18(UnkAl1*);
void func_80053A28(UnkAl1*);
void func_80053A98(u8, u16, s32);
@ -597,7 +623,7 @@ s32 func_80053BE8(UnkAl19E0*, s32, s32, s32*);
void func_80054CE0(s32, s32);
void func_8005610C(void);
void func_80055110(UnkAlA9C*);
void func_80055110(BGMPlayer*);
s32 func_80055FF0(s32, s32);
s32 func_8005600C(s32, s32);
s32 func_80056028(s32, u8);
@ -622,7 +648,7 @@ void func_80056DCC(u8, u8);
void func_80056EC0(u8, s8);
void func_80056EE8(u8);
void func_80056FA4(u8, u8, s32, f32, s16, u8, u8, s32);
void func_80057224(u8, UnkAl30*);
void func_80057224(u8, Instrument*);
void func_80057344(u8, f32);
void func_8005736C(u8, s16, s32, u8, u8);
void func_80057548(u8, u8, u8);
@ -633,11 +659,11 @@ void func_80057E5C(u8);
void func_80057EB0(void);
void func_80057ED0(s16);
void al_LoadINIT(UnkAl19E0*, s32, ALHeap*);
s32 al_CopyFileTableEntry(u16, s32, s32*);
void al_LoadPER(UnkAl19E0*, s32*);
void al_LoadPRG(UnkAl19E0*, s32*);
void al_DmaCopy(s32, s32*, s32);
void snd_load_INIT(UnkAl19E0*, s32, ALHeap*);
s32 snd_fetch_SBN_file(u16, s32, s32*);
void snd_load_PER(UnkAl19E0*, s32*);
void snd_load_PRG(UnkAl19E0*, s32*);
void snd_read_rom(s32, s32*, s32);
#undef alHeapAlloc
void* alHeapAlloc(ALHeap *heap, s32 arg1, s32 size);

View File

@ -71,7 +71,7 @@ ApiStatus N(func_802A1270_727B80)(ScriptInstance* script, s32 isInitialCall) {
case 0:
script->functionTemp[1].s = 0;
script->functionTemp[2].s = 0;
play_sound(0x2033);
sfx_play_sound(0x2033);
camera->unk_1C = 0;
D_802A1CD0 = bind_dynamic_entity_7(NULL, func_802A123C_727B4C);
script->functionTemp[0].s = 1;

View File

@ -68,7 +68,7 @@ ApiStatus N(func_802A1280_72A9D0)(ScriptInstance* script, s32 isInitialCall) {
Actor* enemy = get_actor(script->owner1.enemyID);
Actor* target;
play_sound_at_position(0x231, 0, enemy->walk.goalPos.x, enemy->walk.goalPos.y, enemy->walk.goalPos.z);
sfx_play_sound_at_position(0x231, 0, enemy->walk.goalPos.x, enemy->walk.goalPos.y, enemy->walk.goalPos.z);
target = get_actor(enemy->targetActorID);
dispatch_event_actor(target, 0x39);

View File

@ -61,7 +61,7 @@ ApiStatus N(func_802A123C_722D7C)(ScriptInstance* script, s32 isInitialCall) {
s32 scaleX, scaleY;
if (actor != NULL) {
play_sound(0x366);
sfx_play_sound(0x366);
posX = actor->currentPos.x;
posY = actor->currentPos.y + (actor->size.y / 10);

View File

@ -79,7 +79,7 @@ ApiStatus N(func_802A1354_71B4F4)(ScriptInstance* script, s32 isInitialCall) {
s32 scaleX, scaleY;
if (actor != NULL) {
play_sound(0x366);
sfx_play_sound(0x366);
posX = actor->currentPos.x;
posY = actor->currentPos.y + (actor->size.y / 10);

View File

@ -20,7 +20,7 @@ ApiStatus func_80238000_6FAD10(ScriptInstance* script, s32 isInitialCall) {
} else {
func_800701F0(0, x, y + 20, z);
}
play_sound(8214);
sfx_play_sound(8214);
break;
case 147:
if (script->varTable[10] > 0) {
@ -28,7 +28,7 @@ ApiStatus func_80238000_6FAD10(ScriptInstance* script, s32 isInitialCall) {
} else {
func_800701F0(0, x, y + 20, z);
}
play_sound(8215);
sfx_play_sound(8215);
break;
case 148:
if (script->varTable[10] > 0) {
@ -36,11 +36,11 @@ ApiStatus func_80238000_6FAD10(ScriptInstance* script, s32 isInitialCall) {
} else {
func_800701F0(1, x, y + 20, z);
}
play_sound(8215);
sfx_play_sound(8215);
break;
default:
func_800701F0(0, x, y + 20, z);
play_sound(8214);
sfx_play_sound(8214);
break;
}

View File

@ -75,7 +75,7 @@ ApiStatus func_80238A20_6F1B00(ScriptInstance* script, s32 isInitialCall) {
play_movement_dust_effects(2, partnerActor->currentPos.x, partnerActor->currentPos.y, partnerActor->currentPos.z,
partnerActor->yaw);
play_sound(0x148);
sfx_play_sound(0x148);
return ApiStatus_DONE1;
}

View File

@ -80,7 +80,7 @@ void func_802E1298(void) {
void func_802E12F8(void) {
load_message_to_printer(0x1D0005, D_802EB39C);
play_sound(0x10);
sfx_play_sound(0x10);
}
void func_802E1328(Entity* entity) {

View File

@ -78,7 +78,7 @@ void func_80035660(void) {
} else {
set_map_transition_effect(8);
OVERRIDE_FLAG_UNSET(0x0010000);
set_music_track(0, -1, 0, 1000, 8);
bgm_set_song(0, -1, 0, 1000, 8);
}
OVERRIDE_FLAG_UNSET(0x40);
}

View File

@ -263,7 +263,7 @@ void func_802E2EB0(Entity* entity) {
a2 = &D_0A001218;
break;
case 13:
play_sound_at_position(0x158, 0, entity->position.x, entity->position.y, entity->position.z);
sfx_play_sound_at_position(0x158, 0, entity->position.x, entity->position.y, entity->position.z);
a1 = &D_0A003F70;
a2 = &D_0A002318;
break;

View File

@ -266,7 +266,7 @@ s32 func_802E3BA4(Entity* entity) {
return 1;
}
set_entity_updatecmd(entity, &D_802E9E80);
play_sound_at_position(0x14f, 0, entity->position.x, entity->position.y, entity->position.z);
sfx_play_sound_at_position(0x14f, 0, entity->position.x, entity->position.y, entity->position.z);
break;
case 0x16:
case 0x19:
@ -281,7 +281,7 @@ s32 func_802E3BA4(Entity* entity) {
return 1;
}
set_entity_updatecmd(entity, &D_802E9E80);
play_sound_at_position(0x150, 0, entity->position.x, entity->position.y, entity->position.z);
sfx_play_sound_at_position(0x150, 0, entity->position.x, entity->position.y, entity->position.z);
break;
case 0x17:
case 0x1a:
@ -289,7 +289,7 @@ s32 func_802E3BA4(Entity* entity) {
return 1;
}
set_entity_updatecmd(entity, &D_802E9E80);
play_sound_at_position(0x151, 0, entity->position.x, entity->position.y, entity->position.z);
sfx_play_sound_at_position(0x151, 0, entity->position.x, entity->position.y, entity->position.z);
break;
case 0x1b:
case 0x1c:

View File

@ -64,7 +64,7 @@ s32 func_802E8858(Entity* entity) {
func_80110BCC(entity, &D_802EAE7C);
func_80110678(entity);
exec_entity_updatecmd(entity);
play_sound(0x20AE);
sfx_play_sound(0x20AE);
}
}

View File

@ -119,7 +119,7 @@ void player_enter_blue_pipe(Entity* bluePipe) {
playerStatus->renderMode = 0xD;
func_802DDFF8(0x10002, 5, 2, 1, 1, 0, 0);
play_sound(0x163);
sfx_play_sound(0x163);
disable_player_shadow();
}

View File

@ -46,8 +46,6 @@ void func_800360FC(void) {
}
void func_80036130(void) {
//GameStatus* gameStatus = gGameStatusPtr;
gMapTransitionAlpha = 0x00;
D_800A0942 = 0x14;
D_800A0944 = 0x00;

View File

@ -23,11 +23,11 @@ HitResult calc_item_check_hit(void) {
return HitResult_MISS;
}
if (actor->stoneStatus == 0xC) {
play_sound_at_position(0x10C, 0, walk->goalPos.x, walk->goalPos.y, walk->goalPos.z);
sfx_play_sound_at_position(0x10C, 0, walk->goalPos.x, walk->goalPos.y, walk->goalPos.z);
return HitResult_IMMUNE;
}
if ((battleStatus->currentAttackElement & 0x80) && (actorPart->eventFlags & 0x10)) {
play_sound_at_position(0xE9, 0, walk->goalPos.x, walk->goalPos.y, walk->goalPos.z);
sfx_play_sound_at_position(0xE9, 0, walk->goalPos.x, walk->goalPos.y, walk->goalPos.z);
return HitResult_LANDED_ON_SPIKE;
}
} else {

View File

@ -220,7 +220,7 @@ ApiStatus PlaySoundAtActor(ScriptInstance* script, s32 isInitialCall) {
}
actor = get_actor(actorID);
play_sound_at_position(soundID, 0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z);
sfx_play_sound_at_position(soundID, 0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z);
return ApiStatus_DONE2;
}
@ -237,7 +237,7 @@ ApiStatus PlaySoundAtPart(ScriptInstance* script, s32 isInitialCall) {
}
part = get_actor_part(get_actor(actorID), partIndex);
play_sound_at_position(soundID, 0, part->currentPos.x, part->currentPos.y, part->currentPos.z);
sfx_play_sound_at_position(soundID, 0, part->currentPos.x, part->currentPos.y, part->currentPos.z);
return ApiStatus_DONE2;
}
@ -255,7 +255,7 @@ ApiStatus PlayLoopingSoundAtActor(ScriptInstance* script, s32 isInitialCall) {
actor = get_actor(actorID);
actor->x[idx] = soundID;
play_sound_at_position(soundID, 0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z);
sfx_play_sound_at_position(soundID, 0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z);
return ApiStatus_DONE2;
}
@ -276,7 +276,7 @@ ApiStatus StopLoopingSoundAtActor(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
stop_sound(actor->x[idx]);
sfx_stop_sound(actor->x[idx]);
actor->x[idx] = 0;
return ApiStatus_DONE2;
}

View File

@ -1174,7 +1174,7 @@ s32 inflict_partner_ko(Actor* target, s32 statusTypeKey, s32 duration) {
if (statusTypeKey == Debuff_DAZE) {
if (statusTypeKey != target->koStatus) {
inflict_status(target, Debuff_DAZE, duration);
play_sound(0x2107);
sfx_play_sound(0x2107);
} else {
target->koDuration += duration;
if (target->koDuration > 9) {
@ -1448,7 +1448,7 @@ void remove_player_buffs(PlayerBuff buffs) {
func_80071C30(1, player->currentPos.x + 15.0f, player->currentPos.y + 22.0f, player->currentPos.z + 5.0f, 1.0f, 0x18);
battleStatus->unk_A0 = NULL;
play_sound(0x299);
sfx_play_sound(0x299);
}
if ((buffs & 0x100) && (battleStatus->turboChargeTurnsLeft != 0)) {
battleStatus->turboChargeTurnsLeft = 0;

View File

@ -79,7 +79,7 @@ ApiStatus FadeInMerlee(ScriptInstance* script, s32 isInitialCall) {
Npc* npc = get_npc_unsafe(-0xA);
if (isInitialCall) {
play_sound(0x24B);
sfx_play_sound(0x24B);
npc->unk_AC = 0;
}
@ -165,7 +165,7 @@ ApiStatus OnDefeatEnemy(ScriptInstance* script, s32 isInitialCall) {
}
if (script->functionTemp[1].s == 15) {
play_sound(SoundId_DEATH);
sfx_play_sound(SoundId_DEATH);
func_80070190(1, npc->pos.x, npc->pos.y + (npc->collisionHeight / 2), npc->pos.z, 0, -1.0f, 0, 10);
}

View File

@ -80,9 +80,9 @@ void step_game_loop(void) {
step_current_game_mode();
update_entities();
func_80138198();
func_8014A548();
bgm_update_music_settings();
update_ambient_sounds();
func_80149734();
sfx_update_looping_sound_params();
update_windows();
update_curtains();
@ -109,7 +109,7 @@ void step_game_loop(void) {
temp8009A690 = &D_8009A690;
(*temp8009A690)--;
if (*temp8009A690 == 0) {
func_80149838();
sfx_stop_env_sounds();
set_game_mode(0);
OVERRIDE_FLAG_UNSET(0x20);
}
@ -223,9 +223,9 @@ void load_engine_data(void) {
clear_effect_data();
clear_saved_variables();
clear_item_entity_data();
func_8014A498();
bgm_reset_sequence_players();
reset_ambient_sounds();
func_80149618();
sfx_clear_sounds();
clear_windows();
initialize_curtains();
poll_rumble();

View File

@ -148,7 +148,7 @@ void func_800494C0(Npc* npc, s32 arg1, s32 arg2) {
value2 |= 0x20000;
}
play_sound_at_position(arg1, value2, npc->pos.x, npc->pos.y, npc->pos.z);
sfx_play_sound_at_position(arg1, value2, npc->pos.x, npc->pos.y, npc->pos.z);
}
void func_80049550(ScriptInstance* script, s32 arg1) {

View File

@ -1,31 +1,31 @@
#include "common.h"
#include "audio.h"
void func_8004B440(UnkAl6CC* arg0, u8 arg1, u8 arg2, UnkAl19E0* arg3, u8 arg4) {
void func_8004B440(SoundManager* manager, u8 arg1, u8 arg2, UnkAl19E0* arg3, u8 arg4) {
u32 i;
s32 c = 0x6A25E;
arg0->unk_00 = arg3;
arg0->unk_34 = 0x4C4B4;
arg0->unk_38 = arg0->unk_3C = c;
arg0->unk_BC = arg1;
arg0->unk_BE = arg2;
manager->soundData = arg3;
manager->unkCounterStep = 312500;
manager->unkCounterMax = manager->unkCounter = c;
manager->unk_BC = arg1;
manager->unk_BE = arg2;
if (arg4 > 0x10) {
arg0->unk_BD = 0x10;
manager->sfxPlayerSelector = 0x10;
} else {
arg0->unk_BD = arg4;
manager->sfxPlayerSelector = arg4;
}
arg0->unk_5C = 0x8000;
arg0->unk_B8 = 0x8000;
arg0->unk_30 = 0;
arg0->unk_60 = 0;
manager->unk_5C = 0x8000;
manager->unk_B8 = 0x8000;
manager->playCounter = 0;
manager->unk_60 = 0;
for (i = 0; i < ARRAY_COUNT(arg0->unk_16C); i++) {
UnkAlAC* sub = &arg0->unk_16C[i];
for (i = 0; i < ARRAY_COUNT(manager->unk_16C); i++) {
SoundPlayer* sub = &manager->unk_16C[i];
sub->unk_00 = 0;
sub->counter = 0;
sub->unk_5C = 0;
sub->unk_8E = 0;
sub->unk_90 = 0;
@ -37,9 +37,9 @@ void func_8004B440(UnkAl6CC* arg0, u8 arg1, u8 arg2, UnkAl19E0* arg3, u8 arg4) {
sub->unk_9E = 0;
sub->unk_9F = 0;
sub->unk_99 = 0;
sub->unk_78 = 0;
sub->unk_79 = 0;
sub->unk_7A = 0;
sub->locatorB = 0;
sub->locatorC = 0;
sub->locatorD = 0;
sub->unk_7B = 0x40;
sub->unk_7C = 0;
sub->unk_7D = 0xB0;
@ -48,114 +48,113 @@ void func_8004B440(UnkAl6CC* arg0, u8 arg1, u8 arg2, UnkAl19E0* arg3, u8 arg4) {
}
for (i = 0; i < 4; i++) {
arg0->unk_90[i] = 0;
manager->unk_90[i] = 0;
}
for (i = 0; i < 4; i++) {
arg0->unk_A0[i].x = 0;
manager->unk_A0[i].x = 0;
}
arg0->unk_168 = 0;
func_8004BA54(arg0, 0);
func_8004B698(arg0);
func_80053974(&arg0->unk_40, 0, 0x7FFF, 0x7FFF);
func_80053A98(arg0->unk_BE, arg0->unk_40.unk_00.u16, arg0->unk_5C);
arg0->unk_8C = 0xFF;
manager->unk_168 = 0;
func_8004BA54(manager, 0);
snd_clear_sfx_queue(manager);
snd_initialize_fade(&manager->unk_40, 0, 0x7FFF, 0x7FFF);
func_80053A98(manager->unk_BE, manager->unk_40.unk_00.u16, manager->unk_5C);
manager->unk_8C = 0xFF;
arg0->unk_64[0] = &D_80078290;
arg0->unk_64[1] = &D_800782F8;
arg0->unk_64[2] = &D_80078320;
arg0->unk_64[3] = &D_80078348;
arg0->unk_64[4] = &D_80078348;
arg0->unk_64[5] = &D_80078348;
arg0->unk_64[6] = &D_80078348;
arg0->unk_64[7] = &D_80078348;
manager->unk_64[0] = &D_80078290;
manager->unk_64[1] = &D_800782F8;
manager->unk_64[2] = &D_80078320;
manager->unk_64[3] = &D_80078348;
manager->unk_64[4] = &D_80078348;
manager->unk_64[5] = &D_80078348;
manager->unk_64[6] = &D_80078348;
manager->unk_64[7] = &D_80078348;
arg0->unk_84[0] = 0x10;
arg0->unk_84[1] = 0x20;
arg0->unk_84[2] = 0x20;
arg0->unk_84[3] = 0x20;
arg0->unk_84[4] = 0x20;
arg0->unk_84[5] = 0x30;
arg0->unk_84[6] = 0x40;
arg0->unk_84[7] = 0x50;
manager->unk_84[0] = 0x10;
manager->unk_84[1] = 0x20;
manager->unk_84[2] = 0x20;
manager->unk_84[3] = 0x20;
manager->unk_84[4] = 0x20;
manager->unk_84[5] = 0x30;
manager->unk_84[6] = 0x40;
manager->unk_84[7] = 0x50;
func_8004B9E4(arg0, 0);
func_8004B9E4(manager, 0);
}
INCLUDE_ASM(void, "code_26840_len_20d0", func_8004B62C, UnkAl6CC* arg0);
INCLUDE_ASM(void, "code_26840_len_20d0", snd_load_sfx_groups_from_SEF, SoundManager* manager);
void func_8004B698(UnkAl6CC* arg0) {
void snd_clear_sfx_queue(SoundManager* manager) {
s32 i;
for (i = 0; i < ARRAY_COUNT(arg0->unk_C2); i++) {
arg0->unk_C2[i].unk_00 = 0;
arg0->unk_C2[i].unk_02 = 0;
arg0->unk_C2[i].unk_04 = 0;
arg0->unk_C2[i].unk_06 = 0;
arg0->unk_C2[i].unk_08 = 0;
for (i = 0; i < ARRAY_COUNT(manager->unk_C2); i++) {
manager->unk_C2[i].soundID = 0;
manager->unk_C2[i].upperSoundID = 0;
manager->unk_C2[i].volume = 0;
manager->unk_C2[i].pitchShift = 0;
manager->unk_C2[i].pan = 0;
}
arg0->unk_165 = 0;
arg0->unk_164 = 0;
arg0->unk_163 = 0;
arg0->unk_162 = 0;
manager->unk_165 = 0;
manager->sfxQueueNextPos = 0;
manager->sfxQueuePosOffset = 0;
manager->unk_162 = 0;
}
void func_8004B6D8(UnkAl6CC* arg0, s32 arg1, s16 arg2, s16 arg3, u8 arg4) {
u8 temp_v1 = arg0->unk_164;
s32 temp_v0 = temp_v1 - (u8) arg0->unk_163;
u32 temp_t0;
void snd_enqueue_sfx_event(SoundManager* manager, s32 soundID, s16 volume, s16 pitchShift, u8 pan) {
u32 queuePos = manager->sfxQueueNextPos;
s32 queueAmt = manager->sfxQueueNextPos - manager->sfxQueuePosOffset;
if (temp_v0 < 0) {
temp_v0 += 0x10;
if (queueAmt < 0) {
queueAmt += 16;
}
if (temp_v0 < 0x10) {
temp_t0 = temp_v1;
if (queueAmt < 16) {
u32 queueNextPos = queuePos;
arg0->unk_C2[temp_v1].unk_00 = arg1 & 0xBFFF;
arg0->unk_C2[temp_v1].unk_02 = (((u32) arg1 >> 0x10) & 0x3FF);
arg0->unk_C2[temp_v1].unk_04 = arg2;
arg0->unk_C2[temp_v1].unk_06 = arg3;
arg0->unk_C2[temp_v1].unk_08 = arg4;
manager->unk_C2[queueNextPos].soundID = soundID & 0xBFFF;
manager->unk_C2[queueNextPos].upperSoundID = (((u32) soundID >> 0x10) & 0x3FF);
manager->unk_C2[queueNextPos].volume = volume;
manager->unk_C2[queueNextPos].pitchShift = pitchShift;
manager->unk_C2[queueNextPos].pan = pan;
temp_t0++;
if (temp_t0 >= 0x10) {
temp_t0 = 0;
queueNextPos++;
if (queueNextPos >= 16) {
queueNextPos = 0;
}
arg0->unk_164 = temp_t0;
manager->sfxQueueNextPos = queueNextPos;
}
}
INCLUDE_ASM(void, "code_26840_len_20d0", func_8004B748, UnkAl6CC* arg0);
INCLUDE_ASM(void, "code_26840_len_20d0", func_8004B748, SoundManager* manager);
s32 func_8004B9E4(UnkAl6CC* arg0, s32 arg1) {
s32 func_8004B9E4(SoundManager* manager, s32 arg1) {
s32 a1 = (u8) arg1;
if (a1 != 0xF0) {
if (a1 < 8) {
if (arg0->unk_8C != a1) {
arg0->unk_8C = a1;
arg0->unk_00->unk_40[1].unk_00 = 6;
arg0->unk_00->unk_40[1].unk_01 = 1;
D_8007F1F8 = arg0->unk_64[a1];
if (manager->unk_8C != a1) {
manager->unk_8C = a1;
manager->soundData->unk_40[1].unk_00 = 6;
manager->soundData->unk_40[1].unk_01 = 1;
D_8007F1F8 = manager->unk_64[a1];
}
arg0->unk_8D = arg0->unk_84[a1];
manager->unk_8D = manager->unk_84[a1];
} else {
arg0->unk_8C = 0xFF;
arg0->unk_8D = 0;
manager->unk_8C = 0xFF;
manager->unk_8D = 0;
}
}
return arg0->unk_8C;
return manager->unk_8C;
}
void func_8004BA54(UnkAl6CC* arg0, s32 arg1) {
void func_8004BA54(SoundManager* manager, s32 arg1) {
if (arg1 == 0) {
arg0->unk_C0 = 0;
manager->unk_C0 = 0;
} else if (arg1 == 1) {
arg0->unk_C0 = 1;
manager->unk_C0 = 1;
}
}
@ -169,11 +168,11 @@ INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004C2A4);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004C300);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004C358);
INCLUDE_ASM(void, "code_26840_len_20d0", snd_set_modifiers, SoundManager* manager, SoundSFXEntry* sfxEntry);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004C3D4);
INCLUDE_ASM(void, "code_26840_len_20d0", snd_set_player_modifiers, SoundManager* manager, SoundSFXEntry* sfxEntry);
INCLUDE_ASM(s16, "code_26840_len_20d0", func_8004C444, UnkAl6CC* arg0);
INCLUDE_ASM(s16, "code_26840_len_20d0", func_8004C444, SoundManager* manager);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004C578);

View File

@ -1,23 +1,23 @@
#include "audio.h"
INCLUDE_ASM(void, "code_28910_len_5090", func_8004D510, UnkAlA9C* arg0);
INCLUDE_ASM(void, "code_28910_len_5090", func_8004D510, BGMPlayer* arg0);
// Return values are being pushed into v0 in the wrong place
// May depend on data decomp
#ifdef NON_MATCHING
UnkAlA9C* func_8004D794(s32 arg0) {
UnkAlA9C* snd_get_player_with_song_name(s32 songString) {
UnkAl19E0* temp_v1 = D_8009A664->unk_00;
if (arg0 == temp_v1->unk_5C[2]) {
if (songString == temp_v1->unk_5C[2]) {
return D_8009A664;
}
if (arg0 == temp_v1->unk_60[2]) {
if (songString == temp_v1->unk_60[2]) {
return D_8009A5FC;
}
return NULL;
}
#else
INCLUDE_ASM(UnkAlA9C*, "code_28910_len_5090", func_8004D794, s32 arg0);
INCLUDE_ASM(BGMPlayer*, "code_28910_len_5090", snd_get_player_with_song_name, s32 songString);
#endif
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004D7E0);
@ -26,16 +26,16 @@ s32 func_8004DA0C(UNK_TYPE arg0) {
s32 ret = 0;
if (arg0 != 0) {
UnkAlA9C* unknown;
BGMPlayer* unknown;
do {
unknown = func_8004D794(arg0);
unknown = snd_get_player_with_song_name(arg0);
} while (0);
do {
if (unknown == NULL) {
ret = 2;
} else if (arg0 == unknown->unk_1C) {
} else if (arg0 == unknown->songName) {
func_8004DAA8(unknown);
ret = 0;
}
@ -49,12 +49,12 @@ s32 func_8004DA0C(UNK_TYPE arg0) {
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004DA74);
void func_8004DAA8(UnkAlA9C* arg0) {
void func_8004DAA8(BGMPlayer* arg0) {
if (arg0->unk_221 != 0) {
arg0->unk_221 = 4;
arg0->unk_10 = 1;
arg0->unk_08 = 1;
func_80053A18(&arg0->unk_2C);
arg0->unkFrequency = 1;
func_80053A18(&arg0->fadeInfo);
}
}
@ -74,10 +74,10 @@ INCLUDE_ASM(void, "code_28910_len_5090", func_8004DFD4, UnkAl19E0* arg0);
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004E0F4);
void func_8004E158(UnkAlA9C* arg0, s32 arg1, s32 arg2, UnkAl19E0* arg3) {
void func_8004E158(BGMPlayer* arg0, s32 arg1, s32 arg2, UnkAl19E0* arg3) {
s16 i;
arg0->unk_00 = arg3;
arg0->data = arg3;
func_8004E880(arg0, 0x2625A, 0x30);
arg0->unk_48 = 0x8000;
arg0->unk_B0 = 0x3CF0;
@ -85,8 +85,8 @@ void func_8004E158(UnkAlA9C* arg0, s32 arg1, s32 arg2, UnkAl19E0* arg3) {
arg0->unk_22B = 1;
arg0->unk_14 = 0;
arg0->unk_18 = 0;
arg0->unk_1C = 0;
arg0->unk_20 = 0;
arg0->songName = 0;
arg0->fadeSongName = 0;
arg0->unk_58 = 0;
arg0->unk_5A = 0;
arg0->unk_68 = 0;
@ -119,17 +119,17 @@ void func_8004E158(UnkAlA9C* arg0, s32 arg1, s32 arg2, UnkAl19E0* arg3) {
arg0->unk_231 = 4;
for (i = 0; i < ARRAY_COUNT(arg0->unk_25C); i++) {
UnkAl60* temp = &arg0->unk_25C[i];
BGMPlayerTrack* temp = &arg0->unk_25C[i];
temp->unk_18 = 0;
temp->unk_24[1] = 0;
temp->unk_46 = 0;
temp->unk_48 = 0;
temp->unk_4A = 0;
temp->unk_4B = 0;
temp->subTrackVolume = 0;
temp->unk_28 = 0;
temp->subTrackCoarseTune = 0;
temp->subTrackFineTune = 0;
temp->subTrackPan = 0;
temp->subTrackReverb = 0;
temp->unk_44 = 0;
temp->unk_58 = 0;
temp->unk_49 = 0x7F;
temp->segTrackVolume = 0x7F;
temp->unk_4C = 0;
if (i < ARRAY_COUNT(arg0->unk_238)) {
@ -148,36 +148,36 @@ void func_8004E158(UnkAlA9C* arg0, s32 arg1, s32 arg2, UnkAl19E0* arg3) {
temp->unk_17 = 0;
}
func_80053AEC(&arg0->unk_2C, 0x7FFF);
func_80053AEC(&arg0->fadeInfo, 0x7FFF);
func_80055110(arg0);
}
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004E344);
void func_8004E3A4(UnkAlA9C* arg0) {
arg0->unk_2C.unk_0A--;
void snd_update_bgm_fade(BGMPlayer* player) {
player->fadeInfo.fadeTime--;
if (arg0->unk_2C.unk_0A != 0) {
arg0->unk_2C.unk_00.s32 += arg0->unk_2C.unk_04;
if (player->fadeInfo.fadeTime != 0) {
player->fadeInfo.currentVolume.s32 += player->fadeInfo.fadeStep;
} else {
arg0->unk_2C.unk_00.s32 = arg0->unk_2C.unk_08 << 16;
player->fadeInfo.currentVolume.s32 = player->fadeInfo.endVolume << 16;
if (arg0->unk_2C.unk_0C != NULL) {
arg0->unk_2C.unk_0C();
if (player->fadeInfo.fpFadeCallback != NULL) {
player->fadeInfo.fpFadeCallback();
}
if (arg0->unk_20 != 0) {
func_8004DC80(arg0->unk_20);
} else if (arg0->unk_2C.unk_00.s32 == 0) {
func_8004DAA8(arg0);
if (player->fadeSongName != 0) {
func_8004DC80(player->fadeSongName);
} else if (player->fadeInfo.currentVolume.s32 == 0) {
func_8004DAA8(player);
}
}
func_8004E444(arg0);
func_8004E444(player);
}
void func_8004E444(UnkAlA9C* arg0) {
u16 mult = (arg0->unk_2C.unk_00.u16 * arg0->unk_2C.unk_10.u16) >> 15;
void func_8004E444(BGMPlayer *arg0) {
u16 mult = (arg0->fadeInfo.currentVolume.u16 * arg0->unk_3C) >> 15;
s32 i;
for (i = 0; i < 4; i++) {
@ -190,9 +190,9 @@ void func_8004E444(UnkAlA9C* arg0) {
}
}
INCLUDE_ASM(s16, "code_28910_len_5090", func_8004E4B8, UnkAlA9C* arg0);
INCLUDE_ASM(s16, "code_28910_len_5090", func_8004E4B8, BGMPlayer* player);
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004E5D8);
INCLUDE_ASM(s32, "code_28910_len_5090", snd_initialize_bgm_player, BGMPlayer* player);
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004E844);
@ -208,24 +208,24 @@ INCLUDE_ASM(s32, "code_28910_len_5090", func_8004EC04);
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004EC68);
void func_8004FBBC(UnkAlA9C* arg0, UnkAl60* arg1) {
u32 unk_D4 = arg0->unk_D4.u16;
void snd_BGMCmd_E0_MasterTempo(BGMPlayer* player, BGMPlayerTrack* track) {
u32 unk_D4 = player->unk_D4.u16;
s32 temp_v0;
arg0->unk_208 = unk_D4;
temp_v0 = func_8004FC08(arg0, unk_D4);
arg0->unk_B0 = temp_v0;
arg0->unk_08 = temp_v0 * 10;
arg0->unk_BC = 0;
arg0->unk_B8 = 0;
arg0->unk_B4 = 0;
player->unk_208 = unk_D4;
temp_v0 = snd_bpm_to_tempo(player, unk_D4);
player->unk_B0 = temp_v0;
player->unkFrequency = temp_v0 * 10;
player->unk_BC = 0;
player->unk_B8 = 0;
player->unk_B4 = 0;
}
s32 func_8004FC08(UnkAlA9C* arg0, u32 arg1) {
u32 unk_20A = arg0->unk_20A;
u32 ret = arg1;
s32 snd_bpm_to_tempo(BGMPlayer* player, u32 tempo) {
u32 unk_20A = player->unk_20A;
u32 ret = tempo;
ret *= arg0->unk_D0;
ret *= player->unk_D0;
if (unk_20A < ret) {
ret = unk_20A;
@ -236,64 +236,64 @@ s32 func_8004FC08(UnkAlA9C* arg0, u32 arg1) {
return ret * 100;
}
void func_8004FCB4(UnkAlA9C* arg0, UnkAl60* arg1) {
s32 unk_D4 = arg0->unk_D4.u8[0] & 0x7F;
void snd_BGMCmd_E1_MasterVolume(BGMPlayer* player, BGMPlayerTrack* track) {
s32 unk_D4 = player->unk_D4.u8[0] & 0x7F;
if (unk_D4 != 0) {
unk_D4 = unk_D4 << 0x18;
}
arg0->unk_C0 = unk_D4;
arg0->unk_CC = 0;
arg0->unk_C8 = 0;
arg0->unk_C4 = 0;
arg0->unk_21A = 1;
arg1->unk_41 = 1;
player->unk_C0 = unk_D4;
player->unk_CC = 0;
player->unk_C8 = 0;
player->unk_C4 = 0;
player->unk_21A = 1;
track->volumeChanged = 1;
}
void func_8004FCE4(UnkAlA9C* arg0, UnkAl60* arg1) {
arg0->unk_20C = (s8)arg0->unk_D4.u8[0] * 100;
void snd_BGMCmd_E2_MasterTranspose(BGMPlayer* player, BGMPlayerTrack* track) {
player->unk_20C = (s8)player->unk_D4.u8[0] * 100;
}
void func_8004FD04(UnkAlA9C* arg0, UnkAl60* arg1) {
arg0->unk_00->unk_40[arg0->unk_235].unk_00 = arg0->unk_D4.u8[0];
arg0->unk_00->unk_40[arg0->unk_235].unk_01 = 1;
void snd_BGMCmd_E3(BGMPlayer* player, BGMPlayerTrack* track) {
player->data->unk_40[player->unk_235].unk_00 = player->unk_D4.u8[0];
player->data->unk_40[player->unk_235].unk_01 = 1;
}
void func_8004FD38(UnkAlA9C* arg0, UnkAl60* arg1) {
u8 unk_D4 = arg0->unk_D4.u8[0];
u32 temp_v1 = arg0->unk_4C[unk_D4];
void snd_BGMCmd_E6_MasterEffect(BGMPlayer* player, BGMPlayerTrack* track) {
u8 unk_D4 = player->unk_D4.u8[0];
u32 temp_v1 = player->unk_4C[unk_D4];
if ((unk_D4 < 4) && (temp_v1 < 0x80)) {
if (arg0->unk_00->unk_40[temp_v1].unk_00 != arg0->unk_D4.u8[1]) {
arg0->unk_00->unk_40[temp_v1].unk_00 = arg0->unk_D4.u8[1];
arg0->unk_00->unk_40[temp_v1].unk_01 = 1;
if (player->data->unk_40[temp_v1].unk_00 != player->unk_D4.u8[1]) {
player->data->unk_40[temp_v1].unk_00 = player->unk_D4.u8[1];
player->data->unk_40[temp_v1].unk_01 = 1;
}
arg0->unk_224[unk_D4] = arg0->unk_D4.u8[1];
player->unk_224[unk_D4] = player->unk_D4.u8[1];
}
}
void func_8004FD94(UnkAlA9C* arg0, UnkAl60* arg1) {
s32 unk_D4 = arg0->unk_D4.u16;
s32 temp_a0 = func_8004FC08(arg0, arg0->unk_D6.u16);
void snd_BGMCmd_E4_MasterTempoFade(BGMPlayer* player, BGMPlayerTrack* track) {
s32 unk_D4 = player->unk_D4.u16;
s32 temp_a0 = snd_bpm_to_tempo(player, player->unk_D6.u16);
s32 temp_v0;
if (unk_D4 <= 0) {
unk_D4 = 1;
}
temp_v0 = (temp_a0 - arg0->unk_B0) / unk_D4;
temp_v0 = (temp_a0 - player->unk_B0) / unk_D4;
arg0->unk_BC = unk_D4;
arg0->unk_B8 = temp_a0;
arg0->unk_B4 = temp_v0;
player->unk_BC = unk_D4;
player->unk_B8 = temp_a0;
player->unk_B4 = temp_v0;
}
void func_8004FE10(UnkAlA9C* arg0, UnkAl60* arg1) {
void snd_BGMCmd_E5_MasterVolumeFade(BGMPlayer* player, BGMPlayerTrack* track) {
s32 temp_a1;
s32 temp_a2;
temp_a1 = arg0->unk_D4.u16;
temp_a2 = arg0->unk_D6.u8[0] & 0x7F;
temp_a1 = player->unk_D4.u16;
temp_a2 = player->unk_D6.u8[0] & 0x7F;
if (temp_a2 != 0) {
temp_a2 = temp_a2 << 0x18;
@ -303,46 +303,46 @@ void func_8004FE10(UnkAlA9C* arg0, UnkAl60* arg1) {
temp_a1 = 1;
}
arg0->unk_CC = temp_a1;
arg0->unk_C8 = temp_a2;
arg0->unk_C4 = (temp_a2 - arg0->unk_C0) / temp_a1;
player->unk_CC = temp_a1;
player->unk_C8 = temp_a2;
player->unk_C4 = (temp_a2 - player->unk_C0) / temp_a1;
}
// Not sure about types
#ifdef NON_MATCHING
void func_8004FE6C(UnkAlA9C* arg0, UnkAl60* arg1) {
u8 temp_v1 = arg0->unk_D4.u16;
void snd_BGMCmd_E8_TrackOverridePatch(BGMPlayer* player, UnkAl60* track) {
u8 temp_v1 = player->unk_D4.u16;
arg1->unk_44 = temp_v1;
arg1->unk_0C = func_80053BE8(arg0->unk_00, arg0->unk_D4.u8[0], temp_v1, &arg1->unk_10);
track->unk_44 = temp_v1;
track->unk_0C = func_80053BE8(player->unk_00, player->unk_D4.u8[0], temp_v1, &track->unk_10);
}
#else
INCLUDE_ASM(void, "code_28910_len_5090", func_8004FE6C, UnkAlA9C* arg0, UnkAl60* arg1);
INCLUDE_ASM(void, "code_28910_len_5090", snd_BGMCmd_E8_TrackOverridePatch, BGMPlayer* player, BGMPlayerTrack* track);
#endif
void func_8004FEB0(UnkAlA9C* arg0, UnkAl60* arg1) {
void snd_BGMCmd_E9_SubTrackVolume(BGMPlayer* arg0, BGMPlayerTrack* track) {
u32 unk_D4 = arg0->unk_D4.u8[0] & 0x7F;
if (unk_D4 != 0) {
unk_D4 = unk_D4 << 0x18;
}
arg1->unk_18 = unk_D4;
arg1->unk_41 = 1;
track->subTrackVolume = unk_D4;
track->volumeChanged = 1;
}
// Type shenanigans
#ifdef NON_MATCHING
void func_8004FED0(UnkAlA9C* arg0, UnkAl60* arg1) {
s32 temp_a2 = arg0->unk_D4.u16;
s32 temp_a0 = arg0->unk_D6.u8[0] & 0x7F;
void snd_BGMCmd_F6_TrackVolumeFade(BGMPlayer* player, BGMPlayerTrack* track) {
s32 temp_a2 = player->unk_D4.u16;
s32 temp_a0 = player->unk_D6.u8[0] & 0x7F;
s32 phi_a2;
if (temp_a0 != 0) {
temp_a0 = temp_a0 << 0x18;
}
if (temp_a0 != arg1->unk_18) {
if (temp_a0 != track->unk_18) {
if (temp_a2 <= 0) {
@ -350,102 +350,102 @@ void func_8004FED0(UnkAlA9C* arg0, UnkAl60* arg1) {
} else {
phi_a2 = temp_a2;
}
arg1->unk_24[0] = phi_a2;
arg1->unk_20 = temp_a0;
arg1->unk_1C = (temp_a0 - arg1->unk_18) / phi_a2;
track->unk_24[0] = phi_a2;
track->unk_20 = temp_a0;
track->unk_1C = (temp_a0 - track->unk_18) / phi_a2;
}
}
#else
INCLUDE_ASM(void, "code_28910_len_5090", func_8004FED0, UnkAlA9C* arg0, UnkAl60* arg1);
INCLUDE_ASM(void, "code_28910_len_5090", snd_BGMCmd_F6_TrackVolumeFade, BGMPlayer* player, BGMPlayerTrack* track);
#endif
void func_8004FF3C(UnkAlA9C* arg0, UnkAl60* arg1) {
arg1->unk_4A = arg0->unk_D4.u8[0] & 0x7F;
arg1->unk_57 = 0;
arg1->unk_42 = 1;
void snd_BGMCmd_EA_SubTrackPan(BGMPlayer* player, BGMPlayerTrack* track) {
track->subTrackPan = player->unk_D4.u8[0] & 0x7F;
track->unk_57 = 0;
track->panChanged = 1;
}
void func_8004FF58(UnkAlA9C* arg0, UnkAl60* arg1) {
arg1->unk_4B = arg0->unk_D4.u8[0] & 0x7F;
arg1->unk_43 = 1;
void snd_BGMCmd_EB_SubTrackReverb(BGMPlayer* player, BGMPlayerTrack* track) {
track->subTrackReverb = player->unk_D4.u8[0] & 0x7F;
track->reverbChanged = 1;
}
void func_8004FF70(UnkAlA9C* arg0, UnkAl60* arg1) {
arg1->unk_49 = arg0->unk_D4.u8[0] & 0x7F;
arg1->unk_41 = 1;
void snd_BGMCmd_EC_SegTrackVolume(BGMPlayer* player, BGMPlayerTrack* track) {
track->segTrackVolume = player->unk_D4.u8[0] & 0x7F;
track->volumeChanged = 1;
}
void func_8004FF88(UnkAlA9C* arg0, UnkAl60* arg1) {
arg1->unk_46 = (s8)arg0->unk_D4.u8[0] * 100;
void snd_BGMCmd_ED_SubTrackCoarseTune(BGMPlayer* player, BGMPlayerTrack* track) {
track->subTrackCoarseTune = (s8)player->unk_D4.u8[0] * 100;
}
void func_8004FFA8(UnkAlA9C* arg0, UnkAl60* arg1) {
arg1->unk_48 = arg0->unk_D4.u8[0];
void snd_BGMCmd_EE_SubTrackFineTune(BGMPlayer* player, BGMPlayerTrack* track) {
track->subTrackFineTune = player->unk_D4.u8[0];
}
void func_8004FFB4(UnkAlA9C* arg0, UnkAl60* arg1) {
arg1->unk_38 = arg0->unk_D4.u16;
arg1->unk_40 = 1;
void snd_BGMCmd_EF_SegTrackTune(BGMPlayer* player, BGMPlayerTrack* track) {
track->segTrackTune = player->unk_D4.u16;
track->tuneChanged = 1;
}
void func_8004FFC8(UnkAlA9C* arg0, UnkAl60* arg1) {
arg1->unk_3A = arg0->unk_D4.u8[0];
arg1->unk_55 = arg0->unk_D4.u8[1];
arg1->unk_56 = arg0->unk_D6.u8[0];
void snd_BGMCmd_F0_TrackTremolo(BGMPlayer* player, BGMPlayerTrack* track) {
track->trackTremoloAmount = player->unk_D4.u8[0];
track->trackTremoloSpeed = player->unk_D4.u8[1];
track->trackTremoloTime = player->unk_D6.u8[0];
}
void func_8004FFE4(UnkAlA9C* arg0, UnkAl60* arg1) {
arg1->unk_55 = arg0->unk_D4.u8[0];
void snd_BGMCmd_F1_TrackTremoloSpeed(BGMPlayer* player, BGMPlayerTrack* track) {
track->trackTremoloSpeed = player->unk_D4.u8[0];
}
void func_8004FFF0(UnkAlA9C* arg0, UnkAl60* arg1) {
arg1->unk_56 = arg0->unk_D4.u8[0];
void snd_BGMCmd_F2_TrackTremoloTime(BGMPlayer* player, BGMPlayerTrack* track) {
track->trackTremoloTime = player->unk_D4.u8[0];
}
void func_8004FFFC(UnkAlA9C* arg0, UnkAl60* arg1) {
arg1->unk_56 = 0;
void snd_BGMCmd_F3_TrackTremoloStop(BGMPlayer* player, BGMPlayerTrack* track) {
track->trackTremoloTime = 0;
}
void func_80050004(UnkAlA9C* arg0, UnkAl60* arg1) {
arg1->unk_4A = arg0->unk_D4.u8[0] & 0x7F;
arg1->unk_57 = arg0->unk_D4.u8[1] & 0x7F;
void snd_BGMCmd_F4(BGMPlayer* player, BGMPlayerTrack* track) {
track->subTrackPan = player->unk_D4.u8[0] & 0x7F;
track->unk_57 = player->unk_D4.u8[1] & 0x7F;
}
INCLUDE_ASM(void, "code_28910_len_5090", func_80050020, UnkAlA9C* arg0, UnkAl60* arg1);
INCLUDE_ASM(void, "code_28910_len_5090", snd_BGMCmd_F5_TrackVoice, BGMPlayer* player, BGMPlayerTrack* track);
void func_80050128(UnkAlA9C* arg0, UnkAl60* arg1) {
u8 temp_v0 = arg0->unk_D4.u8[0];
u8 temp_v1 = arg0->unk_4C[temp_v0];
void snd_BGMCmd_F7_SubTrackReverbType(BGMPlayer* player, BGMPlayerTrack* track) {
u8 temp_v0 = player->unk_D4.u8[0];
u8 temp_v1 = player->unk_4C[temp_v0];
if ((temp_v0 < 4) && ((s8)temp_v1 >= 0)) {
arg1->unk_5B = temp_v1;
track->subtrackReverbType = temp_v1;
} else {
arg1->unk_5B = arg0->unk_235;
track->subtrackReverbType = player->unk_235;
}
}
// unk_D4 type shenanigans
#ifdef NON_MATCHING
void func_8005015C(UnkAlA9C* arg0, UnkAl60* arg1) {
func_800560BC(arg0->unk_234, arg1->unk_5C, arg0->unk_D4.u16 >> 8);
void snd_BGMCmd_FD(UnkAlA9C* player, UnkAl60* track) {
func_800560BC(player->unk_234, track->unk_5C, player->unk_D4.u16 >> 8);
}
#else
INCLUDE_ASM(void, "code_28910_len_5090", func_8005015C, UnkAlA9C* arg0, UnkAl60* arg1);
INCLUDE_ASM(void, "code_28910_len_5090", snd_BGMCmd_FD, BGMPlayer* player, BGMPlayerTrack* track);
#endif
void func_80050184(UnkAlA9C* arg0, UnkAl60* arg1) {
s32 temp = arg0->unk_D4.u16 + arg0->unk_64;
void snd_BGMCmd_FE(BGMPlayer* player, BGMPlayerTrack* track) {
s32 temp = player->unk_D4.u16 + player->unk_64;
arg1->unk_3E = arg0->unk_D6.u8[0];
arg1->unk_04 = arg1->unk_00;
arg1->unk_00 = temp;
track->unk_3E = player->unk_D6.u8[0];
track->unk_04 = track->bgmReadPos;
track->bgmReadPos = temp;
}
INCLUDE_ASM(void, "code_28910_len_5090", func_800501A8, UnkAlA9C* arg0, UnkAl60* arg1);
INCLUDE_ASM(void, "code_28910_len_5090", snd_BGMCmd_FC_Jump, BGMPlayer* player, BGMPlayerTrack* track);
INCLUDE_ASM(void, "code_28910_len_5090", func_800502F0, UnkAlA9C* arg0, UnkAl60* arg1);
INCLUDE_ASM(void, "code_28910_len_5090", snd_BGMCmd_FF, BGMPlayer* player, BGMPlayerTrack* track);
void func_80050560(UnkAlA9C* arg0, UnkAl60* arg1) {
void snd_BGMCmd_NOP(BGMPlayer* player, BGMPlayerTrack* track) {
}
INCLUDE_ASM(s32, "code_28910_len_5090", func_80050568);
@ -462,13 +462,13 @@ INCLUDE_ASM(s32, "code_28910_len_5090", func_80050770);
INCLUDE_ASM(s32, "code_28910_len_5090", func_80050818);
void func_8005083C(UnkAlA9C* arg0, s32 arg1, s16 arg2, s8 arg3) {
UnkAl60* temp_a1 = &arg0->unk_25C[arg1];
void func_8005083C(BGMPlayer* arg0, s32 arg1, s16 arg2, s8 arg3) {
BGMPlayerTrack* temp_a1 = &arg0->unk_25C[arg1];
if (temp_a1->unk_00 != 0) {
if (temp_a1->bgmReadPos != 0) {
arg0->unk_D4.u16 = arg2;
arg0->unk_D6.u8[0] = arg3;
func_8004FED0(arg0, temp_a1);
snd_BGMCmd_F6_TrackVolumeFade(arg0, temp_a1);
}
}

View File

@ -7,7 +7,7 @@ void func_80052E30(u8 index) {
temp->unk_45 = 0;
}
void func_80052E5C(s32 arg0) {
void snd_load_audio_data(s32 frequency) {
UnkAl19E0** temp_s4 = &D_8009A5C0;
UnkAl19E0* temp4;
s32* temp_v0_2;
@ -15,22 +15,22 @@ void func_80052E5C(s32 arg0) {
u32 i;
s32 subroutine_arg7[2];
u8 temp6[4];
UnkAlA9C** temp1 = &D_8009A664;
UnkAlA9C** temp1_1;
UnkAl6CC** temp2 = &D_8009A640;
UnkAl6CC** temp2_1;
UnkAlA9C** temp3;
BGMPlayer** temp1 = &D_8009A664;
BGMPlayer** temp1_1;
SoundManager** temp2 = &D_8009A640;
SoundManager** temp2_1;
BGMPlayer** temp3;
UnkAl48* temp5;
alHeap = D_80078E54->unk_18;
*temp_s4 = alHeapAlloc(alHeap, 1, 0x19E0);
(*temp1) = alHeapAlloc(alHeap, 1, 0xA9C);
D_8009A5FC = alHeapAlloc(alHeap, 1, 0xA9C);
D_8009A5CC = alHeapAlloc(alHeap, 1, 0xA9C);
(*temp1) = alHeapAlloc(alHeap, 1, sizeof(BGMPlayer));
D_8009A5FC = alHeapAlloc(alHeap, 1, sizeof(BGMPlayer));
D_8009A5CC = alHeapAlloc(alHeap, 1, sizeof(BGMPlayer));
(*temp2) = alHeapAlloc(alHeap, 1, 0x6CC);
D_8009A628 = alHeapAlloc(alHeap, 1, 0x834);
(*temp1)->unk_04 = (*temp2);
(*temp1)->soundManager = (*temp2);
D_8009A628->unk_00 = *(temp_s4);
@ -42,18 +42,18 @@ void func_80052E5C(s32 arg0) {
temp4->unk_68 = &temp_v0_2[0x1400];
for (i = 0; i < 1; i++) {
temp4->unk_6C[i].unk_0 = alHeapAlloc(alHeap, 1, 0xA9C);
temp4->unk_6C[i].unk_0 = alHeapAlloc(alHeap, 1, sizeof(BGMPlayer));
}
temp4->unk_A0 = alHeapAlloc(alHeap, 1, 0x5200);
temp4->unk_04 = alHeapAlloc(alHeap, 1, 0x30);
temp4->unk_54 = alHeapAlloc(alHeap, 1, 0x360);
temp4->unk_58 = alHeapAlloc(alHeap, 1, 0x200);
temp4->dataSEF = alHeapAlloc(alHeap, 1, 0x5200);
temp4->defaultInstrument = alHeapAlloc(alHeap, 1, 0x30);
temp4->dataPER = alHeapAlloc(alHeap, 1, 0x360);
temp4->dataPRG = alHeapAlloc(alHeap, 1, 0x200);
temp4->unk_94 = alHeapAlloc(alHeap, 1, 0x40);
temp4->unk_00 = arg0;
func_800532F4(temp4->unk_04);
temp4->actualFrequency = frequency;
snd_reset_instrument(temp4->defaultInstrument);
func_80053370(&temp4->unk_08);
func_800533A8(&temp4->unk_14);
func_800533A8(&temp4->defaultPRGEntry);
func_8005610C();
temp4->unk_A4[0] = NULL;
@ -71,7 +71,7 @@ void func_80052E5C(s32 arg0) {
for (i = 0; i < 24; i++) {
func_80056EC0(i, 0);
func_80057224(i, temp4->unk_04);
func_80057224(i, temp4->defaultInstrument);
temp5 = &temp4->unk_1320[i];
temp5->unk_00 = 0;
temp5->unk_04 = 0;
@ -85,10 +85,10 @@ void func_80052E5C(s32 arg0) {
temp5->unk_45 = 0;
}
al_LoadINIT(temp4, 0xF00000, alHeap);
snd_load_INIT(temp4, 0xF00000, alHeap);
for (i = 0; i < 3; i++) {
temp4->unk_1310[i] = alHeapAlloc(alHeap, 1, 0x840);
temp4->banks[i] = alHeapAlloc(alHeap, 1, 0x840);
}
temp2_1 = &D_8009A640;
@ -110,26 +110,26 @@ void func_80052E5C(s32 arg0) {
func_8004B440(*temp2_1, 4, 1, temp4, 0x10);
func_80050B90(D_8009A628, 6, 1, temp4);
func_80052614(temp4);
al_LoadBKHeaders(temp4, alHeap);
if (al_CopyFileTableEntry(temp4->unk_3C->unk_0, 0x20, subroutine_arg7) == 0) {
al_DmaCopy(subroutine_arg7[0], temp4->unk_A0, subroutine_arg7[1] & 0xFFFFFF);
snd_load_BK_headers(temp4, alHeap);
if (snd_fetch_SBN_file(temp4->mseqFileList->unk_0, 0x20, subroutine_arg7) == 0) {
snd_read_rom(subroutine_arg7[0], temp4->dataSEF, subroutine_arg7[1] & 0xFFFFFF);
}
func_8004B62C((*temp2_1));
if (al_CopyFileTableEntry(temp4->unk_3C->unk_2, 0x40, subroutine_arg7) == 0) {
al_LoadPER(temp4, subroutine_arg7[0]);
snd_load_sfx_groups_from_SEF(*temp2_1);
if (snd_fetch_SBN_file(temp4->mseqFileList->unk_2, 0x40, subroutine_arg7) == 0) {
snd_load_PER(temp4, subroutine_arg7[0]);
}
if (al_CopyFileTableEntry(temp4->unk_3C->unk_4, 0x40, subroutine_arg7) == 0) {
al_LoadPRG(temp4, subroutine_arg7[0]);
if (snd_fetch_SBN_file(temp4->mseqFileList->unk_4, 0x40, subroutine_arg7) == 0) {
snd_load_PRG(temp4, subroutine_arg7[0]);
}
temp4->unk_12EC = &temp4->unk_4EC;
temp4->unk_12F0 = &temp4->unk_5EC;
temp4->unk_12F4 = &temp4->unk_AC;
temp4->unk_12F8 = &temp4->unk_EC;
temp4->unk_12FC = &temp4->unk_9EC;
temp4->unk_1300 = &temp4->unk_DEC;
temp4->unk_1304 = &temp4->unk_11EC;
temp4->unk_1308 = &temp4->unk_4EC;
temp4->instrumentGroups[0] = temp4->instrumentGroup1;
temp4->instrumentGroups[1] = temp4->instrumentGroup2;
temp4->instrumentGroups[2] = temp4->instrumentGroupX;
temp4->instrumentGroups[3] = temp4->instrumentGroup3;
temp4->instrumentGroups[4] = temp4->instrumentGroup4;
temp4->instrumentGroups[5] = temp4->instrumentGroup5;
temp4->instrumentGroups[6] = temp4->instrumentGroup6;
temp4->instrumentGroups[7] = temp4->instrumentGroup1;
temp4->unk_53 = 0;
temp4->unk_52 = 0;
temp4->unk_51 = 0;
@ -139,26 +139,26 @@ void func_80052E5C(s32 arg0) {
func_80055050(alHeap);
}
void func_800532F4(UnkAl30* arg0) {
arg0->unk_00 = &D_800781D0;
arg0->unk_04 = 190;
arg0->unk_18 = &D_80078190;
arg0->unk_1C = 64;
arg0->unk_1E = 4800;
arg0->unk_08 = 0;
arg0->unk_0C = 0;
arg0->unk_10 = 0;
arg0->unk_14 = 0;
arg0->unk_24 = 0;
arg0->unk_25 = 0;
arg0->unk_2C = &D_80078544;
arg0->unk_26 = 0;
arg0->unk_27 = 0;
arg0->unk_28 = 0;
arg0->unk_29 = 0;
arg0->unk_2A = 0;
arg0->unk_2B = 0;
arg0->unk_20 = 0.5f;
void snd_reset_instrument(Instrument* instrument) {
instrument->wavOffset = &D_800781D0;
instrument->wavLength = 190;
instrument->predictorOffset = &D_80078190;
instrument->unk_1C = 64;
instrument->unk_1E = 4800;
instrument->loopPredictorOffset = 0;
instrument->loopStart = 0;
instrument->loopEnd = 0;
instrument->loopCount = 0;
instrument->skipLoopPredictor = 0;
instrument->unk_25 = 0;
instrument->unkOffset = &D_80078544;
instrument->unk_26 = 0;
instrument->unk_27 = 0;
instrument->unk_28 = 0;
instrument->unk_29 = 0;
instrument->unk_2A = 0;
instrument->unk_2B = 0;
instrument->sampleRate = 0.5f;
}
void func_80053370(UnkAlC* arg0) {
@ -173,7 +173,7 @@ void func_80053370(UnkAlC* arg0) {
arg0->unk_0A = 0;
}
void func_800533A8(UnkAl4* arg0) {
void func_800533A8(InstrumentCFG* arg0) {
arg0->unk_00 = 8208;
arg0->unk_02 = ~0x80;
arg0->unk_03 = 64;
@ -183,12 +183,12 @@ void func_800533A8(UnkAl4* arg0) {
}
void func_800533D0(void) {
void snd_update_sequence_players(void) {
UnkAl19E0* temp_s2 = D_8009A5C0;
UnkAl6CC* temp_s1 = D_8009A640;
SoundManager* manager = D_8009A640;
UnkAl834* temp_s0 = D_8009A628;
UnkAlA9C* temp_s0_2;
UnkAlA9C* temp_s0_3;
BGMPlayer* bgmPlayer1;
BGMPlayer* bgmPlayer2;
s32* t1;
func_80053654(temp_s2);
@ -199,55 +199,55 @@ void func_800533D0(void) {
func_800511BC(temp_s0);
}
if (temp_s1->unk_40.unk_0A != 0) {
func_80053A28(&temp_s1->unk_40);
func_80053A98(temp_s1->unk_BE, temp_s1->unk_40.unk_00.u16, temp_s1->unk_5C);
if (manager->unk_40.unk_0A != 0) {
func_80053A28(&manager->unk_40);
func_80053A98(manager->unk_BE, manager->unk_40.unk_00.u16, manager->unk_5C);
}
temp_s1->unk_3C -= temp_s1->unk_34;
if (temp_s1->unk_3C <= 0) {
temp_s1->unk_3C += temp_s1->unk_38;
temp_s1->unk_BA = func_8004C444(temp_s1);
manager->unkCounter -= manager->unkCounterStep;
if (manager->unkCounter <= 0) {
manager->unkCounter += manager->unkCounterMax;
manager->unk_BA = func_8004C444(manager);
}
t1 = &D_80078DB0;
if (*t1 == 0) {
temp_s0_2 = D_8009A5FC;
if (temp_s0_2->unk_2C.unk_0A != 0) {
func_8004E3A4(temp_s0_2);
bgmPlayer1 = D_8009A5FC;
if (bgmPlayer1->fadeInfo.fadeTime != 0) {
snd_update_bgm_fade(bgmPlayer1);
}
if (temp_s0_2->unk_1C != 0) {
temp_s0_2->unk_18++;
if (bgmPlayer1->songName != 0) {
bgmPlayer1->unk_18++;
}
temp_s0_2->unk_10 -= temp_s0_2->unk_08;
if (temp_s0_2->unk_10 <= 0) {
temp_s0_2->unk_10 += temp_s0_2->unk_0C;
temp_s0_2->unk_5C = func_8004E4B8(temp_s0_2);
bgmPlayer1->unk_10 -= bgmPlayer1->unkFrequency;
if (bgmPlayer1->unk_10 <= 0) {
bgmPlayer1->unk_10 += bgmPlayer1->unk_0C;
bgmPlayer1->unk_5C = func_8004E4B8(bgmPlayer1);
}
if (*t1 == 0) {
if (temp_s2->unk_80 != 0) {
func_8004DFD4(temp_s2);
}
temp_s0_3 = D_8009A664;
if (temp_s0_3->unk_2C.unk_1A != 0) {
func_80053BA8(&temp_s0_3->unk_2C);
if (temp_s0_3->unk_2C.unk_0A == 0) {
func_8004E444(temp_s0_3);
bgmPlayer2 = D_8009A664;
if (bgmPlayer2->unk_46 != 0) {
func_80053BA8(&bgmPlayer2->fadeInfo);
if (bgmPlayer2->fadeInfo.fadeTime == 0) {
func_8004E444(bgmPlayer2);
} else {
func_8004E3A4(temp_s0_3);
snd_update_bgm_fade(bgmPlayer2);
}
} else if (temp_s0_3->unk_2C.unk_0A != 0) {
func_8004E3A4(temp_s0_3);
} else if (bgmPlayer2->fadeInfo.fadeTime != 0) {
snd_update_bgm_fade(bgmPlayer2);
}
if (temp_s0_3->unk_1C != 0) {
temp_s0_3->unk_18++;
if (bgmPlayer2->songName != 0) {
bgmPlayer2->unk_18++;
}
temp_s0_3->unk_10 -= temp_s0_3->unk_08;
if (temp_s0_3->unk_10 <= 0) {
temp_s0_3->unk_10 += temp_s0_3->unk_0C;
temp_s0_3->unk_5C = func_8004E4B8(temp_s0_3);
bgmPlayer2->unk_10 -= bgmPlayer2->unkFrequency;
if (bgmPlayer2->unk_10 <= 0) {
bgmPlayer2->unk_10 += bgmPlayer2->unk_0C;
bgmPlayer2->unk_5C = func_8004E4B8(bgmPlayer2);
}
}
}
@ -256,8 +256,8 @@ void func_800533D0(void) {
void func_800535C0(void) {
UnkAl19E0* temp_s1 = D_8009A5C0;
UnkAlA9C* temp = D_8009A664;
UnkAl6CC* temp_s2 = D_8009A640;
BGMPlayer* player = D_8009A664;
SoundManager* manager = D_8009A640;
if (temp_s1->unk_9C != 0) {
func_8005610C();
@ -268,10 +268,10 @@ void func_800535C0(void) {
D_8009A5E8();
}
func_8004D510(temp);
temp = D_8009A5FC;
func_8004D510(temp);
func_8004B748(temp_s2);
func_8004D510(player);
player = D_8009A5FC;
func_8004D510(D_8009A5FC);
func_8004B748(manager);
}
void func_80053654(UnkAl19E0* arg0) {
@ -366,7 +366,20 @@ void func_800538C4(UnkAl48* arg0, s32 arg1) { // type may be wrong but it seems
INCLUDE_ASM(s32, "code_2e230_len_2190", func_800538F8);
INCLUDE_ASM(void, "code_2e230_len_2190", func_80053974, UnkAl1* arg0, s32 arg1, s32 arg2, s16 arg3);
void snd_initialize_fade(Fade* fade, s32 time, s32 startValue, s16 endValue) {
fade->currentVolume.s32 = startValue * 0x10000;
fade->endVolume = endValue;
if (time != 0) {
fade->fadeTime = (time * 1000) / 5750;
fade->fadeStep = (endValue * 0x10000 - fade->currentVolume.s32) / fade->fadeTime;
} else {
fade->fadeTime = 1;
fade->fadeStep = 0;
}
fade->fpFadeCallback = NULL;
}
void func_80053A18(UnkAl1* arg0) {
arg0->unk_0A = 0;
@ -438,15 +451,49 @@ void func_80053BA8(UnkAl1* arg0) {
INCLUDE_ASM(s32, "code_2e230_len_2190", func_80053BE8, UnkAl19E0* arg0, s32 arg1, s32 arg2, s32* arg3);
INCLUDE_ASM(s32, "code_2e230_len_2190", func_80053C58);
void snd_get_sequence_player_and_track(u32 playerIndex, s32** outCurrentTrackData, BGMPlayer** outPlayer) {
UnkAl19E0* temp_v1 = D_8009A5C0;
INCLUDE_ASM(s32, "code_2e230_len_2190", func_80053CB4);
switch (playerIndex) {
case 0:
*outCurrentTrackData = temp_v1->unk_5C;
*outPlayer = D_8009A664;
break;
case 1:
*outCurrentTrackData = temp_v1->unk_60;
*outPlayer = D_8009A5FC;
break;
case 2:
*outCurrentTrackData = temp_v1->unk_5C;
*outPlayer = D_8009A664;
break;
default:
*outCurrentTrackData = NULL;
*outPlayer = NULL;
}
}
INCLUDE_ASM(s32, "code_2e230_len_2190", func_80053CF8);
void snd_get_sequence_player(u32 playerIndex, BGMPlayer** outPlayer) {
switch (playerIndex) {
case 0:
*outPlayer = D_8009A664;
break;
case 1:
*outPlayer = D_8009A5FC;
break;
case 2:
*outPlayer = D_8009A664;
break;
default:
*outPlayer = NULL;
}
}
INCLUDE_ASM(s32, "code_2e230_len_2190", snd_load_song_files);
INCLUDE_ASM(s32, "code_2e230_len_2190", func_80053E58);
UnkAlA9C* func_80053F64(s32 arg0) {
BGMPlayer* func_80053F64(s32 arg0) {
if (arg0 == 0) {
return D_8009A5C0->unk_6C[0].unk_0;
}
@ -455,7 +502,7 @@ UnkAlA9C* func_80053F64(s32 arg0) {
INCLUDE_ASM(s32, "code_2e230_len_2190", func_80053F80);
UnkAlA9C* func_80054248(u8 arg0) {
BGMPlayer* func_80054248(u8 arg0) {
switch (arg0) {
case 1:
return D_8009A664;
@ -468,26 +515,93 @@ UnkAlA9C* func_80054248(u8 arg0) {
}
}
INCLUDE_ASM(void, "code_2e230_len_2190", al_LoadINIT, UnkAl19E0* arg0, s32 arg1, ALHeap* arg2);
INCLUDE_ASM(void, "code_2e230_len_2190", snd_load_INIT, UnkAl19E0* arg0, s32 arg1, ALHeap* arg2);
INCLUDE_ASM(s32, "code_2e230_len_2190", al_CopyFileTableEntry, u16 arg0, s32 arg1, s32* arg2);
INCLUDE_ASM(s32, "code_2e230_len_2190", snd_fetch_SBN_file, u16 arg0, s32 arg1, s32* arg2);
INCLUDE_ASM(void, "code_2e230_len_2190", al_LoadPER, UnkAl19E0* arg0, s32* arg1);
INCLUDE_ASM(void, "code_2e230_len_2190", snd_load_PER, UnkAl19E0* arg0, s32* arg1);
INCLUDE_ASM(void, "code_2e230_len_2190", al_LoadPRG, UnkAl19E0* arg0, s32* arg1);
INCLUDE_ASM(void, "code_2e230_len_2190", snd_load_PRG, UnkAl19E0* arg0, s32* arg1);
INCLUDE_ASM(s32, "code_2e230_len_2190", func_8005465C);
INCLUDE_ASM(s32, "code_2e230_len_2190", snd_load_BGM);
INCLUDE_ASM(s32, "code_2e230_len_2190", func_80054744);
Instruments* snd_get_BK_instruments(s32 bankGroup, u32 bankIndex) {
Instruments* ret = NULL;
UnkAl19E0* temp = D_8009A5C0;
INCLUDE_ASM(s32, "code_2e230_len_2190", al_LoadBank);
// TODO fake match - this multiplying the bankIndex by 16 and then dividing it right after is dumb
bankIndex *= 16;
switch (bankGroup) {
case 1:
ret = temp->instrumentGroup1[bankIndex / 16];
break;
case 2:
ret = temp->instrumentGroup2[bankIndex / 16];
break;
case 4:
ret = temp->instrumentGroup4[bankIndex / 16];
break;
case 5:
ret = temp->instrumentGroup5[bankIndex / 16];
break;
case 6:
ret = temp->instrumentGroup6[bankIndex / 16];
break;
case 3:
ret = temp->instrumentGroup3[bankIndex / 16];
break;
}
return ret;
}
INCLUDE_ASM(s32, "code_2e230_len_2190", snd_load_BK_to_bank);
void snd_swizzle_BK_instruments(s32 bkFileOffset, SoundBank* bank, Instruments instruments, s32 instrumentCount, u8 arg4);
// float weirdness
#ifdef NON_MATCHING
void snd_swizzle_BK_instruments(s32 bkFileOffset, SoundBank *bank, Instruments instruments, u32 instrumentCount, u8 arg4) {
SoundBank* sb = bank;
Instrument* defaultInstrument = D_8009A5C0->defaultInstrument;
f32 freq = D_8009A5C0->actualFrequency;
s32 i;
if (sb->swizzled == 0) {
for (i = 0; i < instrumentCount; i++) {
Instrument* instrument = instruments[i];
if (instrument != NULL) {
if (instrument->wavOffset != 0) {
instrument->wavOffset += bkFileOffset;
}
if (instrument->loopPredictorOffset != 0) {
instrument->loopPredictorOffset += (s32)bank;
}
if (instrument->predictorOffset != 0) {
instrument->predictorOffset += (s32)bank;
}
if (instrument->unkOffset != 0) {
instrument->unkOffset += (s32)bank;
}
instrument->unk_25 = arg4;
instrument->sampleRate = (instrument->sampleRate / freq);
} else {
instruments[i] = defaultInstrument;
}
}
sb->swizzled = 1;
}
}
#else
INCLUDE_ASM(void, "code_2e230_len_2190", snd_swizzle_BK_instruments, s32 bkFileOffset, SoundBank* bank, Instruments instruments, s32 instrumentCount, u8 arg4);
#endif
INCLUDE_ASM(s32, "code_2e230_len_2190", func_800549F8);
INCLUDE_ASM(s32, "code_2e230_len_2190", func_80054AA0);
s32 func_80054C4C(s32 arg0, s32 arg1) {
al_LoadBank(arg0, D_8009A5C0->unk_1310[arg1], arg1, 1);
s32 snd_load_BK(s32 arg0, s32 arg1) {
snd_load_BK_to_bank(arg0, D_8009A5C0->banks[arg1], arg1, 1);
return 0;
}
@ -504,13 +618,19 @@ s32 func_80054D74(s32 arg0, s32 arg1) {
INCLUDE_ASM(s32, "code_2e230_len_2190", func_80054DA8);
INCLUDE_ASM(void, "code_2e230_len_2190", al_DmaCopy, s32 arg0, s32* arg1, s32 arg2);
INCLUDE_ASM(void, "code_2e230_len_2190", snd_read_rom, s32 arg0, s32* arg1, s32 arg2);
INCLUDE_ASM(s32, "code_2e230_len_2190", func_80054E90);
INCLUDE_ASM(s32, "code_2e230_len_2190", snd_memset);
INCLUDE_ASM(s32, "code_2e230_len_2190", func_80054F48);
void snd_bcopy(s8* src, s8 *dest, s32 size) {
if (size > 0) {
while (size-- != 0) {
*dest++ = *src++;
}
}
}
void al_CopyWords(s32* src, s32* dst, s32 num) {
void snd_copy_words(s32* src, s32* dst, s32 num) {
num /= 4;
if (num > 0) {

View File

@ -1,4 +1,4 @@
#include "common.h"
#include "audio.h"
INCLUDE_ASM(void, "code_303c0_len_3e10", al_LoadBKHeaders, UnkAl19E0* arg0, ALHeap* arg1);
INCLUDE_ASM(void, "code_303c0_len_3e10", snd_load_BK_headers, UnkAl19E0* arg0, ALHeap* arg1);

View File

@ -22,7 +22,7 @@ void func_80055050(void) {
INCLUDE_ASM(void, "code_30450", func_80055068, u32 arg0);
void func_80055110(UnkAlA9C* arg0) {
void func_80055110(BGMPlayer* arg0) {
s32 i;
for (i = 0; i < 8; i++) {
@ -37,88 +37,88 @@ void func_80055110(UnkAlA9C* arg0) {
INCLUDE_ASM(s32, "code_30450", func_8005513C);
void func_800551E0(s32 arg0, u8 arg1, s8 arg2) {
UnkAl6CC* sym = D_8009A640;
s16 a1temp = arg1 * 256;
void snd_start_sound(s32 soundID, u8 volume, s8 pan) {
SoundManager* sym = D_8009A640;
s16 a1temp = volume * 256;
if (a1temp != 0) {
a1temp |= 0xFF;
}
if (arg2 < 0) {
arg2 = 0x7F;
if (pan < 0) {
pan = 0x7F;
}
func_8004B6D8(sym, arg0, a1temp, 0, arg2);
snd_enqueue_sfx_event(sym, soundID, a1temp, 0, pan);
}
void func_80055240(s32 arg0, u8 arg1, s8 arg2, s16 arg3) {
UnkAl6CC* sym = D_8009A640;
s16 a1temp = arg1 * 256;
void snd_start_sound_with_shift(s32 soundID, u8 volume, s8 pan, s16 pitchShift) {
SoundManager* sym = D_8009A640;
s16 a1temp = volume * 256;
if (a1temp != 0) {
a1temp |= 0xFF;
}
if (arg2 < 0) {
arg2 = 0x7F;
if (pan < 0) {
pan = 0x7F;
}
if (arg3 > 0x960) {
arg3 = 0x960;
} else if (arg3 < -0x960) {
arg3 = -0x960;
if (pitchShift > 0x960) {
pitchShift = 0x960;
} else if (pitchShift < -0x960) {
pitchShift = -0x960;
}
func_8004B6D8(sym, arg0, a1temp, arg3, arg2);
snd_enqueue_sfx_event(sym, soundID, a1temp, pitchShift, pan);
}
void func_800552D0(s32 arg0, u8 arg1, s8 arg2) {
UnkAl6CC* sym = D_8009A640;
s16 a1temp = arg1 * 256;
void snd_adjust_sound(s32 soundID, u8 volume, s8 pan) {
SoundManager* sym = D_8009A640;
s16 a1temp = volume * 256;
if (a1temp != 0) {
a1temp |= 0xFF;
}
if (arg2 < 0) {
arg2 = 0x7F;
if (pan < 0) {
pan = 0x7F;
}
func_8004B6D8(sym, arg0 | 0x1000, a1temp, 0, arg2);
snd_enqueue_sfx_event(sym, soundID | 0x1000, a1temp, 0, pan);
}
void func_80055330(s32 arg0, u8 arg1, s8 arg2, s16 arg3) {
UnkAl6CC* sym = D_8009A640;
s16 a1temp = arg1 * 256;
void snd_adjust_sound_with_shift(s32 soundID, u8 volume, s8 pan, s16 pitchShift) {
SoundManager* sym = D_8009A640;
s16 a1temp = volume * 256;
if (a1temp != 0) {
a1temp |= 0xFF;
}
if (arg2 < 0) {
arg2 = 0x7F;
if (pan < 0) {
pan = 0x7F;
}
if (arg3 > 0x960) {
arg3 = 0x960;
} else if (arg3 < -0x960) {
arg3 = -0x960;
if (pitchShift > 0x960) {
pitchShift = 0x960;
} else if (pitchShift < -0x960) {
pitchShift = -0x960;
}
func_8004B6D8(sym, arg0 | 0x1000, a1temp, arg3, arg2);
snd_enqueue_sfx_event(sym, soundID | 0x1000, a1temp, pitchShift, pan);
}
void func_800553C0(s32 arg0) {
func_8004B6D8(D_8009A640, arg0 | 0x8000, 0, 0, 0);
void snd_stop_sound(s32 soundID) {
snd_enqueue_sfx_event(D_8009A640, soundID | 0x8000, 0, 0, 0);
}
void func_800553F4(void) {
D_8009A640->unk_168 = 1;
}
void func_80055408(s32 arg0, s16 arg1, s16 arg2, s32 arg3) {
func_8004B6D8(D_8009A640, arg0, arg1, arg2, arg3);
void snd_start_sound_raw(s32 soundID, s16 volume, s16 pitchShift, s32 pan) {
snd_enqueue_sfx_event(D_8009A640, soundID, volume, pitchShift, pan);
}
s32 func_80055448(s32 arg0) {
@ -278,7 +278,7 @@ s32 func_80055848(s32 arg0) {
return phi_v1;
}
INCLUDE_ASM(s32, "code_30450", func_800558D4);
INCLUDE_ASM(s32, "code_30450", snd_load_song);
INCLUDE_ASM(s32, "code_30450", func_8005591C);

View File

@ -85,7 +85,7 @@ void func_80056F78(u8 arg0) {
INCLUDE_ASM(void, "code_31650", func_80056FA4, u8 arg0, u8 arg1, s32 arg2, f32 arg3, s16 arg4, u8 arg5, u8 arg6,
s32 arg7);
INCLUDE_ASM(void, "code_31650", func_80057224, u8 arg0, UnkAl30* arg1);
INCLUDE_ASM(void, "code_31650", func_80057224, u8 arg0, Instrument* arg1);
void func_80057344(u8 arg0, f32 arg1) {
UnkAl7C* al7C = &D_80078E54->unk_1C[arg0];
@ -222,7 +222,7 @@ void* alHeapAlloc(ALHeap* heap, s32 arg1, s32 size) {
return ret;
}
void func_80057FD8(u8* src, u8* dst, s32 size) {
void alCopy(void* src, void* dst, s32 size) {
s32 i;
u8* srcIt = src;
u8* dstIt = dst;

View File

@ -1,16 +1,178 @@
#include "common.h"
INCLUDE_ASM(s32, "code_415D90", func_802A1000);
extern s32 D_80104A28;
extern s32 D_80107D48;
extern s32 D_80107D98;
extern s32 D_80107CA8;
extern s32 D_80107CD0;
extern s32 D_80107CF8;
extern s32 D_80107D20;
extern s32 D_80107D70;
extern s32 D_80107DC0;
extern s32 D_80107DE8;
extern s32 D_80107E10;
extern s32 D_80107E38;
extern s32 D_80107E60;
extern s32 D_80107E88;
extern s32 D_80107EB0;
extern s32 D_80107ED8;
extern s32 D_80107F00;
extern s32 D_80107F28;
extern s32 D_80107F50;
extern s32 D_80107FC8;
extern s32 D_80107FF0;
extern s32 D_80108974;
INCLUDE_ASM(s32, "code_415D90", func_802A1030);
extern u8 D_802AD000;
extern u8 D_802AD001;
extern s16 D_802AD006;
extern s16 D_802AD008;
extern s32* D_802AD010;
extern s32* D_802AD028;
extern s32 D_802AD040;
extern s32 D_802AD044;
extern s32 D_802AD048;
extern s32 D_802AD04C;
extern s32 D_802AD05C;
extern s32 D_802AD050;
extern s32 D_802AD054;
extern s32 D_802AD058;
extern s8 D_802AD068;
extern s32 main_menu_numOptions;
extern s8 D_802AD10F;
extern u8 battle_menu_moveState;
extern s16 battle_menu_moveTextColor;
extern s16 battle_menu_moveTextOpacity;
extern s32 battle_menu_moveCursorIcon;
extern s32 battle_menu_moveUpArrowIcon;
extern s32 battle_menu_moveDownArrowIcon;
extern s32* battle_menu_moveOptionIconIDs;
extern s32 battle_menu_moveTitleIcon;
extern s32* battle_menu_moveOptionCostUnitIconIDs;
extern s32 D_802AD258;
extern s32 battle_menu_hasSpiritsMenu;
extern s32 battle_menu_moveOptionCount;
extern s8 D_802AD604;
extern s8 D_802AD605;
extern s8 D_802AD60B;
extern s32 D_802AD610;
extern s8 D_802AD614;
extern s32 D_802AD618;
extern s32 D_802AD61C;
extern s32 D_802AD620;
extern s32 D_802AD624;
extern s32 D_802AD628;
extern s32 D_802AD66C;
extern s32* D_802AD6C0[];
INCLUDE_ASM(s32, "code_415D90", func_802A1050);
s16 D_802AB340[] = { 0x001C, 0x0028 };
INCLUDE_ASM(s32, "code_415D90", func_802A1078);
s16 D_802AB344[] = { 0, -2 };
INCLUDE_ASM(s32, "code_415D90", func_802A1098);
s32 battle_menu_iconScripts[] = { 0x8010876C, 0x8010876C, 0x80108744, 0x8010876C, 0x80108794, 0x801087BC, 0x801087E4, 0x8010880C };
INCLUDE_ASM(s32, "code_415D90", func_802A10B8);
s32 D_802AB368[] = { 0x8010885C, 0x8010885C, 0x80108834, 0x8010885C, 0x80108884, 0x801088AC, 0x801088D4, 0x801088FC };
s32 D_802AB388[] = { 0x80108924, 0x8010894C };
s32 D_802AB390[] = { &D_80108974, 0x8010899C };
s32 D_802AB398[] = { &D_80108974, 0x8010899C, 0x80107990, 0x801079BC, 0x801079E8, 0x80107A14, 0x80107A40, 0x80107A6C, 0x80107A98, 0x80107AC4, 0x80107AF0, 0x80107B1C, 0x80107B48, 0x80107B74, 0x80107BA0, 0x80107BCC, 0x80107BF8, 0x80107C24, 0x80107C50, 0x80107C7C, &D_80108974, 0x8010899C, &D_80108974, 0x8010899C };
s32 D_802AB3F8[] = { &D_80107CA8, &D_80107CF8, &D_80107D48, &D_80107D98, &D_80107DE8, &D_80107CA8, &D_80107E88, &D_80107ED8, &D_80107F28, &D_80107E38, &D_80107FC8, &D_80107FC8, &D_80107FC8, &D_80107FC8, &D_80107FC8, &D_80107FC8 };
s32 D_802AB438[] = { &D_80107CD0, &D_80107D20, &D_80107D70, &D_80107DC0, &D_80107E10, &D_80107CD0, &D_80107EB0, &D_80107F00, &D_80107F50, &D_80107E60, &D_80107FF0, &D_80107FF0, &D_80107FF0, &D_80107FF0, &D_80107FF0, &D_80107FF0 };
s32 D_802AB478[] = { 0x80292200 };
s32 D_802AB47C[] = { 0x80292228 };
s32 D_802AB480[] = { 0x802922A0, 0x802922C8 };
s32 D_802AB488[] = { 0x80292160, 0x80292188 };
s32 battle_menu_leftJustfiedMessages[] = { 0x001D0039, 0x001D0038, 0x001D003F, 0x001D003B, 0x001D0044 };
s32 D_802AB4A4[] = { 0x001D003E, 0x001D0045, 0x001D0043, 0x001D003A };
s32 D_802AB4B4[] = { 0x001D003C, 0x001D0046, 0x001D0048 };
s32 battle_menu_centeredMessages[] = { 0x001D004B, 0x001D004A };
s32 D_802AB4C8[] = { 0x001D0050, 0x001D004D, 0x001D0052, 0x001D004F, 0x001D0053 };
s32 D_802AB4DC[] = { 0x001D0051 };
s32 D_802AB4E0[] = { 0x001D004C, 0x001D004E, 0x001D0056, 0x001D0055 };
s8 D_802AB4F0[] = { 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x39, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x37, };
// s8 D_802AB513
s32 D_802AB520[] = { 0x00000000, 0x00090012, 0x000A001A, 0x000B001C, 0x000C0017, 0x009D0001, 0x000E000B, 0x000F0012, 0x00100003, 0x000D0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 };
s32 D_802AB558[] = { 0x00000000, 0x00090002, 0x000A0005, 0x000B0006, 0x000C0002, 0x009D0002, 0x000E0002, 0x000F0002, 0x00100002, 0x000D0002, 0x00000000, 0x00000000, 0x00000000, 0x00000000 };
s32 D_802AB590[] = { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, &D_80107CF8, &D_80107D20, 0x80109338, 0x801093D8, 0x80109360, 0x80109400, 0x80109388, 0x80109428, 0x801093B0, 0x80109450, &D_80107D48, &D_80107D70, 0x80109338, 0x801093D8, 0x80109360, 0x80109400, 0x80109388, 0x80109428, 0x801093B0, 0x80109450, &D_80107D98, &D_80107DC0, 0x80109338, 0x801093D8, 0x80109360, 0x80109400, 0x80109388, 0x80109428, 0x801093B0, 0x80109450, &D_80107DE8, &D_80107E10, 0x80109338, 0x801093D8, 0x80109360, 0x80109400, 0x80109388, 0x80109428, 0x801093B0, 0x80109450, &D_80107CA8, &D_80107CD0, 0x80109338, 0x801093D8, 0x80109360, 0x80109400, 0x80109388, 0x80109428, 0x801093B0, 0x80109450, &D_80107E88, &D_80107EB0, 0x80109338, 0x801093D8, 0x80109360, 0x80109400, 0x80109388, 0x80109428, 0x801093B0, 0x80109450, &D_80107ED8, &D_80107F00, 0x80109338, 0x801093D8, 0x80109360, 0x80109400, 0x80109388, 0x80109428, 0x801093B0, 0x80109450, &D_80107F28, &D_80107F50, 0x80109338, 0x801093D8, 0x80109360, 0x80109400, 0x80109388, 0x80109428, 0x801093B0, 0x80109450, &D_80107E38, &D_80107E60, 0x80109338, 0x801093D8, 0x80109360, 0x80109400, 0x80109388, 0x80109428, 0x801093B0, 0x80109450 };
s32 D_802AB720[] = { &D_80108974, 0x8010899C };
s32 D_802AB728[] = { 0x001D0055 };
s32 D_802AB72C[] = { &D_80108974, 0x8010899C };
s32 D_802AB734[] = { 0x001D0057 };
s32 D_802AB738[] = { 0x00000000, 0x001D0007, 0x001D0008, 0x001D0009, 0x001D000A, 0x001D000B, 0x001D000C, 0x001D000D, 0x001D000E, 0x001D000F, 0x001D0010, 0x001D0011, 0x001D0012, 0x00000000 };
void func_802A1000(void) {
D_802AD006 = 255;
D_802AD008 = 255;
D_802AD000 = 0;
D_802AD068 = -1;
}
void func_802A1030(void) {
D_802AD001 = 3;
D_802AD000 = 10;
}
void func_802A1050(void) {
D_802AD000 = 2;
D_802AD006 = 255;
D_802AD008 = 255;
}
void func_802A1078(void) {
D_802AD008 = 255;
D_802AD000 = 20;
}
void func_802A1098(void) {
D_802AD008 = 100;
D_802AD000 = 30;
}
void func_802A10B8(void) {
s32 i;
for (i = 0; i < main_menu_numOptions; i++) {
s32* icons1 = &D_802AD010;
s32* icons2 = &D_802AD028;
free_icon(icons1[i]);
free_icon(icons2[i]);
}
free_icon(D_802AD040);
free_icon(D_802AD044);
free_icon(D_802AD048);
free_icon(D_802AD04C);
free_icon(D_802AD05C);
free_icon(D_802AD050);
free_icon(D_802AD054);
free_icon(D_802AD058);
}
INCLUDE_ASM(s32, "code_415D90", func_802A11B0);
@ -18,53 +180,300 @@ INCLUDE_ASM(s32, "code_415D90", draw_battle_wheel);
INCLUDE_ASM(s32, "code_415D90", func_802A2684);
INCLUDE_ASM(s32, "code_415D90", func_802A27D0);
void func_802A27D0(void) {
battle_menu_moveState = 10;
}
INCLUDE_ASM(s32, "code_415D90", func_802A27E4);
INCLUDE_ASM(s32, "code_415D90", func_802A2910);
void func_802A2910(void) {
s32* moveOptionIconIDs;
s32* moveOptionCostUnitIconIDs;
s32 i;
INCLUDE_ASM(s32, "code_415D90", func_802A2AB8);
moveOptionIconIDs = &battle_menu_moveOptionIconIDs;
INCLUDE_ASM(s32, "code_415D90", func_802A2C58);
for (i = 0; i < battle_menu_moveOptionCount; i++) {
icon_set_tint(moveOptionIconIDs[i], 255, 255, 255);
}
icon_set_tint(battle_menu_moveCursorIcon, 255, 255, 255);
icon_set_tint(battle_menu_moveUpArrowIcon, 255, 255, 255);
icon_set_tint(battle_menu_moveDownArrowIcon, 255, 255, 255);
icon_set_tint(battle_menu_moveTitleIcon, 255, 255, 255);
moveOptionCostUnitIconIDs = &battle_menu_moveOptionCostUnitIconIDs;
for (i = 0; i < battle_menu_moveOptionCount; i++) {
icon_set_tint(moveOptionCostUnitIconIDs[i], 255, 255, 255);
}
set_menu_icon_script(battle_menu_moveCursorIcon, &D_80104A28);
set_window_update(1, 5);
if (!battle_menu_hasSpiritsMenu) {
set_window_update(2, 5);
set_window_update(3, 5);
} else {
set_window_update(4, 5);
set_window_update(5, 5);
}
set_window_update(8, 1);
battle_menu_moveTextColor = 10;
D_802AD10F = 1;
battle_menu_moveTextOpacity = 255;
battle_menu_moveState = 1;
}
void func_802A2AB8(void) {
s32* moveOptionIconIDs;
s32* moveOptionCostUnitIconIDs;
s32 i;
set_window_update(1, 5);
if (!battle_menu_hasSpiritsMenu) {
set_window_update(2, 5);
set_window_update(3, 5);
} else {
set_window_update(4, 5);
set_window_update(5, 5);
}
set_window_update(8, 1);
moveOptionIconIDs = &battle_menu_moveOptionIconIDs;
for (i = 0; i < battle_menu_moveOptionCount; i++) {
icon_set_tint(moveOptionIconIDs[i], 255, 255, 255);
}
icon_set_tint(battle_menu_moveCursorIcon, 255, 255, 255);
icon_set_tint(battle_menu_moveUpArrowIcon, 255, 255, 255);
icon_set_tint(battle_menu_moveDownArrowIcon, 255, 255, 255);
icon_set_tint(battle_menu_moveTitleIcon, 255, 255, 255);
moveOptionCostUnitIconIDs = &battle_menu_moveOptionCostUnitIconIDs;
for (i = 0; i < battle_menu_moveOptionCount; i++) {
icon_set_tint(moveOptionCostUnitIconIDs[i], 255, 255, 255);
}
set_menu_icon_script(battle_menu_moveCursorIcon, &D_80104A28);
battle_menu_moveTextColor = 10;
D_802AD10F = 1;
battle_menu_moveState = 20;
}
void func_802A2C58(void) {
set_window_update(8, 1);
battle_menu_moveState = 30;
}
INCLUDE_ASM(s32, "code_415D90", func_802A2C84);
INCLUDE_ASM(s32, "code_415D90", func_802A3C98);
INCLUDE_ASM(s32, "code_415D90", func_802A43DC);
void func_802A43DC(s32 arg0, s32 arg1, s32 arg2) {
s32 phi_a0;
s32 phi_a1;
s32 phi_a2;
s32 phi_a3;
s32 phi_v0;
INCLUDE_ASM(s32, "code_415D90", func_802A4448);
if (!battle_menu_hasSpiritsMenu) {
phi_a0 = 0x1D0045;
phi_a1 = arg1 + 0x10;
phi_a2 = arg2 + 2;
phi_a3 = battle_menu_moveTextOpacity;
phi_v0 = 0x30;
} else {
phi_a0 = 0x1D003A;
phi_a1 = arg1 + 6;
phi_a2 = arg2 + 2;
phi_a3 = battle_menu_moveTextOpacity;
phi_v0 = 0x31;
}
draw_msg(phi_a0, phi_a1, phi_a2, phi_a3, phi_v0, 1);
}
void func_802A4448(s32 arg0, s32 arg1, s32 arg2) {
s32 icon = battle_menu_moveTitleIcon;
set_icon_render_pos(icon, arg1 + 0x10, arg2 + 0xF);
icon_set_opacity(icon, battle_menu_moveTextOpacity);
draw_icon_0(icon);
}
INCLUDE_ASM(s32, "code_415D90", func_802A4494);
INCLUDE_ASM(s32, "code_415D90", func_802A4534);
void func_802A4534(s32 arg0, s32 arg1, s32 arg2) {
s32 temp2 = arg2;
s32 temp1;
s32 phi_s0;
temp2 += 6;
temp1 = arg1 + 11;
if (D_802AD258 != 0) {
phi_s0 = 0x1D00C3;
} else if (battle_menu_hasSpiritsMenu == 0) {
phi_s0 = 0x1D009F;
} else {
phi_s0 = 0x1D00A0;
}
draw_msg(phi_s0, temp1, temp2 + D_802AB344[get_msg_lines(phi_s0) - 1], 255, 0xF, 0);
}
INCLUDE_ASM(s32, "code_415D90", func_802A45D8);
INCLUDE_ASM(s32, "code_415D90", func_802A4718);
INCLUDE_ASM(s32, "code_415D90", func_802A472C);
void func_802A4718(void) {
D_802AD604 = 10;
}
//INCLUDE_ASM(s32, "code_415D90", func_802A472C);
void func_802A472C(void) {
s32* temp = &D_802AD628;
s32 i;
set_window_update(6, 2);
set_window_update(7, 2);
set_window_update(8, 2);
for (i = 0; i < D_802AD66C; i++) {
free_icon(temp[i]);
}
free_icon(D_802AD618);
free_icon(D_802AD61C);
free_icon(D_802AD620);
}
INCLUDE_ASM(s32, "code_415D90", func_802A47E0);
INCLUDE_ASM(s32, "code_415D90", func_802A48FC);
INCLUDE_ASM(s32, "code_415D90", func_802A4A10);
void func_802A4A10(void) {
set_window_update(6, 5);
set_window_update(7, 5);
set_window_update(8, 1);
D_802AD604 = 30;
}
INCLUDE_ASM(s32, "code_415D90", func_802A4A54);
INCLUDE_ASM(s32, "code_415D90", func_802A5290);
INCLUDE_ASM(s32, "code_415D90", func_802A56F8);
void func_802A56F8(s32 arg0, s32 arg1, s32 arg2) {
draw_msg(0x1D0043, arg1 + 0xF, arg2 + 2, D_802AD624, 0x33, 1);
}
#ifdef NON_MATCHING
void func_802A5738(s32 arg0, s32 arg1, s32 arg2) {
s32 id;
switch (D_802AD604) {
case -1:
case 1:
case 10:
case 20:
case 30:
if (D_802AD60B != 0) {
draw_msg(D_802AD6C0[D_802AD605], arg1 + 8, arg2, D_802AD624, D_802AD614, 0);
}
break;
}
}
#else
INCLUDE_ASM(s32, "code_415D90", func_802A5738);
#endif
INCLUDE_ASM(s32, "code_415D90", func_802A57C8);
INCLUDE_ASM(s32, "code_415D90", can_switch_to_player);
s32 can_switch_to_player(void) {
BattleStatus* battleStatus = &gBattleStatus;
Actor* player = battleStatus->playerActor;
INCLUDE_ASM(s32, "code_415D90", func_802A58D0);
if (battleStatus->flags2 & 2) {
return FALSE;
} else {
s8 debuff = player->debuff;
s32 ret = player->koStatus == 0xD;
if (debuff == 9) {
ret = FALSE;
}
if (debuff == 10) {
ret = FALSE;
}
if (debuff == 6) {
ret = TRUE;
}
if (debuff == 3) {
ret = TRUE;
}
if (debuff == 4) {
ret = TRUE;
}
if (debuff == 5) {
ret = TRUE;
}
if (debuff == 7) {
ret = TRUE;
}
if (debuff == 8) {
ret = TRUE;
}
if (player->stoneStatus == 0xC) {
ret = TRUE;
}
if (battleStatus->outtaSightActive) {
ret = TRUE;
}
return !ret;
}
}
s32 func_802A58D0(void) {
BattleStatus* battleStatus = &gBattleStatus;
Actor* partner = battleStatus->partnerActor;
s8 partnerDebuff;
s32 ret;
if (battleStatus->flags2 & 4 || partner == PartnerID_NONE || partner->flags & 0x200000) {
return FALSE;
}
partnerDebuff = partner->debuff;
ret = partner->koStatus == 0xD;
if (partnerDebuff == 9) {
ret = FALSE;
}
if (partnerDebuff == 10) {
ret = FALSE;
}
if (partnerDebuff == 6) {
ret = TRUE;
}
if (partnerDebuff == 3) {
ret = TRUE;
}
if (partnerDebuff == 5) {
ret = TRUE;
}
if (partnerDebuff == 7) {
ret = TRUE;
}
if (partnerDebuff == 8) {
ret = TRUE;
}
if (partner->stoneStatus == 0xC) {
ret = TRUE;
}
return !ret;
}
INCLUDE_ASM(s32, "code_415D90", update_player_menu);
@ -74,17 +483,68 @@ INCLUDE_ASM(s32, "code_415D90", update_partner_menu);
INCLUDE_ASM(s32, "code_415D90", func_802A9AE8);
INCLUDE_ASM(s32, "code_415D90", func_802A9B30);
s32 func_802A9B30(void) {
return (gBattleStatus.flags2 & 4) <= 0;
}
INCLUDE_ASM(s32, "code_415D90", func_802A9B44);
INCLUDE_ASM(s32, "code_415D90", func_802AA05C);
// void func_802AA05C(void) {
// switch (gBattleStatus.battleState) {
// case 1:
// draw_battle_wheel();
// break;
// case 2:
// draw_battle_wheel();
// break;
// case 3:
// draw_battle_wheel();
// break;
// case 4:
// draw_battle_wheel();
// break;
// case 5:
// draw_battle_wheel();
// break;
// case 6:
// case 7:
// case 8:
// case 9:
// break;
// }
// }
INCLUDE_ASM(s32, "code_415D90", func_802AA0A4);
s32 func_802AA0A4(void) {
return (gBattleStatus.flags2 & 2) <= 0;
}
INCLUDE_ASM(s32, "code_415D90", func_802AA0B8);
INCLUDE_ASM(s32, "code_415D90", func_802AA0B8); // look into m2c bug
INCLUDE_ASM(s32, "code_415D90", func_802AA640);
void func_802AA640(void) {
switch (gBattleStatus.battleState) {
case 1:
draw_battle_wheel();
break;
case 2:
draw_battle_wheel();
break;
case 3:
draw_battle_wheel();
break;
case 4:
draw_battle_wheel();
break;
case 5:
draw_battle_wheel();
break;
case 6:
case 7:
case 8:
case 9:
break;
}
}
INCLUDE_ASM(s32, "code_415D90", update_targeting_enemies);

View File

@ -150,7 +150,7 @@ s32 collision_check_player_intersecting_world(s32 arg0, s32 arg1, f32 arg2) {
f32 y = (*playerStatus)->position.y + arg1;
f32 z = (*playerStatus)->position.z;
s32 hitID = do_lateral_collision(arg0, *playerStatus, &x, &y, &z, 0, angle);
if (hitID >= 0) {
ret = hitID;
}
@ -296,7 +296,7 @@ void func_800E5098(s32 arg0) {
soundID = soundID2;
}
play_sound_at_player(soundID, 0);
sfx_play_sound_at_player(soundID, 0);
*temp_800F7B80 ^= 1;
}
}
@ -412,7 +412,7 @@ void set_action_state(s32 actionState) {
playerStatus->animFlags &= ~0x10000;
if (unknownStruct[0xC]) {
stop_sound(unknownStruct[0xC]);
sfx_stop_sound(unknownStruct[0xC]);
}
if (playerStatus->unk_D8) {

View File

@ -35,7 +35,7 @@ s32 func_800E6904(void) {
}
} else if (temp_8010EBB0->unk_03 == 8) {
if (actionState != ActionState_RIDE) {
play_sound(0x21D);
sfx_play_sound(0x21D);
} else {
return 1;
}
@ -77,14 +77,14 @@ void check_input_status_menu(void) {
open_status_menu_long();
if (!is_picking_up_item()) {
play_sound(3);
sfx_play_sound(3);
}
}
} else if (!(playerStatus->currentButtons & Z_TRIG + R_TRIG) && (pressedButtons & 8) && func_800E9860()) {
close_status_menu();
if (!is_picking_up_item()) {
play_sound(4);
sfx_play_sound(4);
}
}
}

View File

@ -395,7 +395,7 @@ void coin_counter_draw_content(UNK_TYPE arg0, s32 posX, s32 posY) {
s32 iconIndex;
if ((gPlayerData.coins != uiStatus->displayCoins) && ((gGameStatusPtr->frameCounter % 3) == 0)) {
play_sound(0x211);
sfx_play_sound(0x211);
}
iconIndex = uiStatus->iconIndex10;

View File

@ -68,18 +68,18 @@ s32 D_8014F6B4[] = { 0x000001C1, 0x000001C2, 0x000001C3, 0x000001C4, 0x000001C5,
extern s32 D_80159AD4;
INCLUDE_ASM(s32, "code_DF950", func_80149250);
INCLUDE_ASM(void, "code_DF950", sfx_compute_spatialized_sound_params_2, f32 posX, f32 posY, f32 posZ, s16* volume, s16* pan, u32 sourceFlags);
void use_default_door_sounds(void) {
void sfx_reset_door_sounds(void) {
gCurrentDoorSoundsSet = 0;
D_80151308 = 0;
}
INCLUDE_ASM(s32, "code_DF950", func_80149618);
INCLUDE_ASM(void, "code_DF950", sfx_clear_sounds);
INCLUDE_ASM(s32, "code_DF950", func_80149670);
INCLUDE_ASM(s32, "code_DF950", func_80149734);
INCLUDE_ASM(void, "code_DF950", sfx_update_looping_sound_params);
void func_801497FC(s32 arg0) {
func_800561E4();
@ -90,47 +90,47 @@ s32 func_80149828(void) {
return D_80159AD4;
}
INCLUDE_ASM(s32, "code_DF950", func_80149838);
INCLUDE_ASM(s32, "code_DF950", sfx_stop_env_sounds);
INCLUDE_ASM(s32, "code_DF950", func_801498C4);
INCLUDE_ASM(s32, "code_DF950", sfx_get_env_sound_instance);
INCLUDE_ASM(s32, "code_DF950", func_80149908);
INCLUDE_ASM(s32, "code_DF950", sfx_play_sound_looping);
INCLUDE_ASM(s32, "code_DF950", func_80149974);
INCLUDE_ASM(s32, "code_DF950", sfx_register_looping_sound_at_position);
INCLUDE_ASM(s32, "code_DF950", func_801499EC, s32 soundID, s32 arg1, f32 arg2, f32 arg3, f32 arg4);
INCLUDE_ASM(s32, "code_DF950", sfx_adjust_env_sound_pos, s32 soundID, s32 arg1, f32 arg2, f32 arg3, f32 arg4);
INCLUDE_ASM(s32, "code_DF950", func_80149A6C);
INCLUDE_ASM(s32, "code_DF950", _play_sound);
INCLUDE_ASM(s32, "code_DF950", sfx_play_sound_with_params);
INCLUDE_ASM(s32, "code_DF950", func_80149BE4);
INCLUDE_ASM(s32, "code_DF950", sfx_adjust_env_sound_params);
INCLUDE_ASM(s32, "code_DF950", stop_sound);
INCLUDE_ASM(s32, "code_DF950", sfx_stop_sound);
void play_sound(s32 soundID) {
_play_sound(soundID, 0, 0, 0);
void sfx_play_sound(s32 soundID) {
sfx_play_sound_with_params(soundID, 0, 0, 0);
}
void play_sound_at_player(s32 soundID, s32 arg1) {
void sfx_play_sound_at_player(s32 soundID, s32 arg1) {
PlayerStatus* playerStatus = &gPlayerStatus;
play_sound_at_position(soundID, arg1, playerStatus->position.x, playerStatus->position.y, playerStatus->position.z);
sfx_play_sound_at_position(soundID, arg1, playerStatus->position.x, playerStatus->position.y, playerStatus->position.z);
}
void play_sound_at_npc(s32 soundID, s32 arg1, s32 npcID) {
void sfx_play_sound_at_npc(s32 soundID, s32 arg1, s32 npcID) {
Npc* npc = get_npc_safe(npcID);
if (npc != NULL) {
play_sound_at_position(soundID, arg1, npc->pos.x, npc->pos.y, npc->pos.z);
sfx_play_sound_at_position(soundID, arg1, npc->pos.x, npc->pos.y, npc->pos.z);
}
}
INCLUDE_ASM(s32, "code_DF950", play_sound_at_position, s32 soundID, s32 value2, f32 posX, f32 posY,
INCLUDE_ASM(s32, "code_DF950", sfx_play_sound_at_position, s32 soundID, s32 value2, f32 posX, f32 posY,
f32 posZ);
INCLUDE_ASM(s32, "code_DF950", func_80149E04);
INCLUDE_ASM(s32, "code_DF950", sfx_get_spatialized_sound_params);
INCLUDE_ASM(s32, "code_DF950", func_80149F58);
INCLUDE_ASM(s32, "code_DF950", sfx_compute_spatialized_sound_params_0);
INCLUDE_ASM(s32, "code_DF950", func_8014A1B4);
INCLUDE_ASM(s32, "code_DF950", sfx_compute_spatialized_sound_params_1);

View File

@ -406,7 +406,7 @@ ApiStatus PlaySoundAtModel(ScriptInstance* script, s32 isInitialCall) {
f32 n1, n2, n3;
get_model_center_and_size((u16)modelID, &x, &y, &z, &n1, &n2, &n3);
play_sound_at_position(soundID, var3, x, y, z);
sfx_play_sound_at_position(soundID, var3, x, y, z);
return ApiStatus_DONE2;
}
@ -419,7 +419,7 @@ ApiStatus PlaySoundAtCollider(ScriptInstance* script, s32 isInitialCall) {
f32 x, y, z;
get_collider_center(colliderID, &x, &y, &z);
play_sound_at_position(soundID, var3, x, y, z);
sfx_play_sound_at_position(soundID, var3, x, y, z);
return ApiStatus_DONE2;
}

View File

@ -446,7 +446,7 @@ ApiStatus PlaySoundAtPlayer(ScriptInstance* script, s32 isInitialCall) {
s32 var = get_variable(script, *args++);
s32 var2 = get_variable(script, *args++);
play_sound_at_player(var, var2);
sfx_play_sound_at_player(var, var2);
return ApiStatus_DONE2;
}

View File

@ -11,7 +11,7 @@ ApiStatus func_802D7520(ScriptInstance* script, s32 isInitialCall) {
f32 z = get_float_variable(script, *args++);
func_802D7460(x, y, z, get_variable(script, *args++));
play_sound_at_position(0x2055, 0, x, y, z);
sfx_play_sound_at_position(0x2055, 0, x, y, z);
return ApiStatus_DONE2;
}
@ -22,7 +22,7 @@ ApiStatus func_802D75D8(ScriptInstance* script, s32 isInitialCall) {
f32 z = get_float_variable(script, *args++);
func_802D74C0(x, y, z, get_variable(script, *args++));
play_sound_at_position(0x378, 0, x, y, z);
sfx_play_sound_at_position(0x378, 0, x, y, z);
return ApiStatus_DONE2;
}

View File

@ -23,14 +23,14 @@ SongID gSongsUsingVariationFlag[] = { Song_SPECIAL_BATTLE, Song_TUBBA_BLUBBA_BAT
s16 D_8014F738 = 0;
void transition_music_volume_to(s16 volume);
void bgm_set_target_volume(s16 volume);
/// If the given song ID is present in gSongsUsingVariationFlag, returns the current
/// map's `songVariation & 1` value. Otherwise, returns -1.
///
/// @see gSongsUsingVariationFlag
/// @returns -1: no override; 0: override to variation 0; 1 override to variation 1
s32 get_song_variation_override_for_cur_map(SongID songID) {
s32 bgm_get_map_default_variation(SongID songID) {
u32 i = 0;
Area* areas = gAreas;
GameStatus** gameStatus = &gGameStatusPtr;
@ -47,7 +47,7 @@ s32 get_song_variation_override_for_cur_map(SongID songID) {
return -1;
}
void func_8014A498(void) {
void bgm_reset_sequence_players(void) {
MusicPlayer* src; // TODO: remove this temp when .data section for this file (incl. D_8014F6F0) is set up
s32 i;
@ -62,14 +62,14 @@ void func_8014A498(void) {
func_800561A4(8);
}
void func_8014A52C(void) {
void bgm_reset_volume(void) {
gMusicTargetVolume = 8;
gMusicUnkVolume2 = 8;
}
INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014A548);
INCLUDE_ASM(s32, "code_e0b30_len_b80", bgm_update_music_settings);
s32 _set_music_track(s32 playerIndex, SongID songID, s32 variation, s32 fadeOutTime, s16 volume) {
s32 _bgm_set_song(s32 playerIndex, SongID songID, s32 variation, s32 fadeOutTime, s16 volume) {
if (gGameStatusPtr->demoState != 0) {
return 1;
} else {
@ -83,13 +83,13 @@ s32 _set_music_track(s32 playerIndex, SongID songID, s32 variation, s32 fadeOutT
return 1;
} else {
s32 override = get_song_variation_override_for_cur_map(songID);
s32 override = bgm_get_map_default_variation(songID);
if (override >= 0) {
variation = override;
}
if (musicPlayer->songID == songID && musicPlayer->variation == variation) {
transition_music_volume_to(volume);
bgm_set_target_volume(volume);
if (musicPlayer->flags & 4) {
func_80055B80(musicPlayer->unk_18);
@ -111,12 +111,12 @@ s32 _set_music_track(s32 playerIndex, SongID songID, s32 variation, s32 fadeOutT
}
}
s32 set_music_track(s32 playerIndex, SongID songID, s32 variation, s32 fadeOutTime, s16 volume) {
s32 bgm_set_song(s32 playerIndex, SongID songID, s32 variation, s32 fadeOutTime, s16 volume) {
MusicPlayer* musicPlayers = gMusicPlayers;
musicPlayers[playerIndex].flags &= ~8;
return _set_music_track(playerIndex, songID, variation, fadeOutTime, volume);
return _bgm_set_song(playerIndex, songID, variation, fadeOutTime, volume);
}
s32 func_8014A964(s32 playerIndex, SongID songID, s32 variation, s32 fadeInTime, s16 arg4, s16 arg5) {
@ -132,7 +132,7 @@ s32 func_8014A964(s32 playerIndex, SongID songID, s32 variation, s32 fadeInTime,
return 1;
} else {
s32 defaultVariation = get_song_variation_override_for_cur_map(songID);
s32 defaultVariation = bgm_get_map_default_variation(songID);
if (defaultVariation >= 0) {
variation = defaultVariation;
}
@ -211,28 +211,28 @@ s32 func_8014ABB4(s32 playerIndex, s16 arg1) {
return func_80055CC4(musicPlayer->unk_18, arg1);
}
s32 func_8014AC08(void) {
set_music_track(0, -1, 0, 250, 8);
set_music_track(1, -1, 0, 250, 8);
s32 bgm_init_music_players(void) {
bgm_set_song(0, -1, 0, 250, 8);
bgm_set_song(1, -1, 0, 250, 8);
return 1;
}
void func_8014AC5C(void) {
void bgm_quiet_max_volume(void) {
gMusicUnkVolume2 = 4;
}
void func_8014AC70(void) {
void bgm_reset_max_volume(void) {
gMusicUnkVolume2 = 8;
}
void transition_music_volume_to(s16 volume) {
void bgm_set_target_volume(s16 volume) {
gMusicTargetVolume = volume;
}
//Data loading shenanigans
#ifdef NON_MATCHING
void func_8014AC94(void) {
void bgm_update_volume(void) {
s16* currentVolume;
s16 compareVolume;
s16 toVolume;
@ -259,21 +259,21 @@ void func_8014AC94(void) {
}
}
#else
INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AC94);
INCLUDE_ASM(s32, "code_e0b30_len_b80", bgm_update_volume);
#endif
INCLUDE_ASM(s32, "code_e0b30_len_b80", func_8014AD40);
void func_8014ADA4(void) {
void bgm_pop_song(void) {
MusicPlayer* musicPlayer = &gMusicPlayers[0];
if (gGameStatusPtr->demoState == 0) {
musicPlayer->flags |= 8;
_set_music_track(0, musicPlayer->unk_24, musicPlayer->unk_28, 0, 8);
_bgm_set_song(0, musicPlayer->unk_24, musicPlayer->unk_28, 0, 8);
}
}
void func_8014ADF8(SongID songID, s32 variation) {
void bgm_push_song(SongID songID, s32 variation) {
MusicPlayer* musicPlayer = &gMusicPlayers[0];
if (gGameStatusPtr->demoState == 0) {
@ -281,11 +281,11 @@ void func_8014ADF8(SongID songID, s32 variation) {
musicPlayer->unk_28 = musicPlayer->variation;
musicPlayer->unk_2C = musicPlayer->unk_18;
musicPlayer->flags |= 4;
set_music_track(0, songID, variation, 500, 8);
bgm_set_song(0, songID, variation, 500, 8);
}
}
void func_8014AE6C(void) {
void bgm_pop_battle_song(void) {
MusicPlayer* musicPlayer = &gMusicPlayers[0];
if (gGameStatusPtr->demoState == 0) {
@ -293,13 +293,13 @@ void func_8014AE6C(void) {
OVERRIDE_FLAG_UNSET(0x20000);
} else {
musicPlayer->flags |= 8;
_set_music_track(0, musicPlayer->unk_24, musicPlayer->unk_28, 0, 8);
_bgm_set_song(0, musicPlayer->unk_24, musicPlayer->unk_28, 0, 8);
func_80055590(0, 250);
}
}
}
void func_8014AEF8(void) {
void bgm_push_battle_song(void) {
MusicPlayer* musicPlayer = &gMusicPlayers[0];
if (gGameStatusPtr->demoState == 0 && !OVERRIDE_FLAG_CHECK(0x20000)) {
@ -308,11 +308,11 @@ void func_8014AEF8(void) {
musicPlayer->unk_28 = musicPlayer->variation;
musicPlayer->unk_2C = musicPlayer->unk_18;
musicPlayer->flags |= 4;
set_music_track(0, musicPlayer->unk_1C, musicPlayer->unk_20, 500, 8);
bgm_set_song(0, musicPlayer->unk_1C, musicPlayer->unk_20, 500, 8);
}
}
void func_8014AF8C(s32 arg0, s32 arg1) {
void bgm_set_battle_song(s32 arg0, s32 arg1) {
MusicPlayer* musicPlayer = &gMusicPlayers[0];
musicPlayer->unk_1C = arg0;

View File

@ -55,11 +55,11 @@ void step_init_state(void) {
clear_item_entity_data();
clear_saved_variables();
initialize_collision();
func_8014AC08();
bgm_init_music_players();
clear_windows();
partner_initialize_data();
func_80149618();
func_8014A52C();
sfx_clear_sounds();
bgm_reset_volume();
initialize_curtains();
for (i = 0; i < 4; i++) {

View File

@ -79,7 +79,7 @@ void step_battle(void) {
*temp800A0900 = -1;
nuGfxSetCfb(&D_800778A0, 2);
nuContRmbForceStopEnd();
func_80149838();
sfx_stop_env_sounds();
func_8003B1A8();
gGameStatusPtr->isBattle = TRUE;
allocate_hit_tables();

View File

@ -566,7 +566,7 @@ ApiStatus PlaySoundAtNpc(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
play_sound_at_position(soundID, value2, npc->pos.x, npc->pos.y, npc->pos.z);
sfx_play_sound_at_position(soundID, value2, npc->pos.x, npc->pos.y, npc->pos.z);
return ApiStatus_DONE2;
}

View File

@ -9,7 +9,7 @@ ApiStatus FadeOutMusic(ScriptInstance* script, s32 isInitialCall) {
s32 itemID = get_variable(script, *args++);
s32* ptrNextPos = args++;
return (set_music_track(itemID, -1, 0, get_variable(script, *ptrNextPos++), 8) != 0) * ApiStatus_DONE2;
return (bgm_set_song(itemID, -1, 0, get_variable(script, *ptrNextPos++), 8) != 0) * ApiStatus_DONE2;
}
ApiStatus SetMusicTrack(ScriptInstance* script, s32 isInitialCall) {
@ -19,7 +19,7 @@ ApiStatus SetMusicTrack(ScriptInstance* script, s32 isInitialCall) {
s32 variation = get_variable(script, *args++);
s16 volume = get_variable(script, *args++);
return (set_music_track(musicPlayer, songID, variation, 0x1F4, volume) != 0) * ApiStatus_DONE2;
return (bgm_set_song(musicPlayer, songID, variation, 0x1F4, volume) != 0) * ApiStatus_DONE2;
}
ApiStatus FadeInMusic(ScriptInstance* script, s32 isInitialCall) {
@ -55,31 +55,31 @@ ApiStatus func_802D5FA4(ScriptInstance* script, s32 isInitialCall) {
}
ApiStatus func_802D5FD8(ScriptInstance* script, s32 isInitialCall) {
func_8014ADA4();
bgm_pop_song();
return ApiStatus_DONE2;
}
ApiStatus func_802D5FF8(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
func_8014ADF8(get_variable(script, *args++), get_variable(script, *args++));
bgm_push_song(get_variable(script, *args++), get_variable(script, *args++));
return ApiStatus_DONE2;
}
ApiStatus func_802D6050(ScriptInstance* script, s32 isInitialCall) {
func_8014AE6C();
bgm_pop_battle_song();
return ApiStatus_DONE2;
}
ApiStatus func_802D6070(ScriptInstance* script, s32 isInitialCall) {
func_8014AEF8();
bgm_push_battle_song();
return ApiStatus_DONE2;
}
ApiStatus func_802D6090(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
func_8014AF8C(get_variable(script, *args++), get_variable(script, *args++));
bgm_set_battle_song(get_variable(script, *args++), get_variable(script, *args++));
return ApiStatus_DONE2;
}
@ -101,7 +101,7 @@ ApiStatus PlaySound(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 soundID = get_variable(script, *args++);
play_sound(soundID);
sfx_play_sound(soundID);
return ApiStatus_DONE2;
}
@ -110,7 +110,7 @@ ApiStatus func_802D617C(ScriptInstance* script, s32 initialCall) {
s32 soundID = get_variable(script, *args++);
s32 value2 = get_variable(script, *args++);
_play_sound(soundID, value2 & 0xFF, 0, 0);
sfx_play_sound_with_params(soundID, value2 & 0xFF, 0, 0);
return ApiStatus_DONE2;
}
@ -122,14 +122,14 @@ ApiStatus PlaySoundAt(ScriptInstance* script, s32 isInitialCall) {
s32 y = get_variable(script, *args++);
s32 z = get_variable(script, *args++);
play_sound_at_position(soundID, value2, x, y, z);
sfx_play_sound_at_position(soundID, value2, x, y, z);
return ApiStatus_DONE2;
}
ApiStatus StopSound(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
stop_sound(get_variable(script, *args++));
sfx_stop_sound(get_variable(script, *args++));
return ApiStatus_DONE2;
}
@ -162,7 +162,7 @@ ApiStatus PlaySoundAtF(ScriptInstance* script, s32 isInitialCall) {
f32 y = get_float_variable(script, *args++);
f32 z = get_float_variable(script, *args++);
play_sound_at_position(soundID, value2, x, y, z);
sfx_play_sound_at_position(soundID, value2, x, y, z);
return ApiStatus_DONE2;
}

View File

@ -3,6 +3,6 @@
ApiStatus func_80240060_BFA100(ScriptInstance* script, s32 isInitialCall) {
Npc* npc = get_npc_unsafe(get_enemy(6)->npcID);
func_801499EC(0x32E, 0, npc->pos.x, npc->pos.y, npc->pos.z);
sfx_adjust_env_sound_pos(0x32E, 0, npc->pos.x, npc->pos.y, npc->pos.z);
return ApiStatus_DONE2;
}

View File

@ -54,7 +54,7 @@ ApiStatus func_80240BD8_8ACB68(ScriptInstance* script, s32 isInitialCall) {
if (isInitialCall) {
script->functionTemp[1].s = get_variable(script, *args);
npc = get_npc_unsafe(script->functionTemp[1].s);
play_sound_at_position(0xB000001E, 0, npc->pos.x, npc->pos.y, npc->pos.z);
sfx_play_sound_at_position(0xB000001E, 0, npc->pos.x, npc->pos.y, npc->pos.z);
func_8006FEF0(0, npc->pos.x, npc->pos.y + 20.0f, npc->pos.z, 10.0f);
script->functionTemp[0].s = 3;
}

View File

@ -405,7 +405,7 @@ s32 partner_use_ability(void) {
wPartner != NULL &&
(wPartner->canUseAbility == NULL || wPartner->canUseAbility(wPartnerNpc))) {
if ((gGameStatusPtr->unk_81 != 0) && (temp8010EBB0->unk_08 & 0x4000)) {
play_sound(0x21D);
sfx_play_sound(0x21D);
} else if (D_8010CFD8 != 0) {
D_8010CFE0 = 1;
D_8010CFE8 = 8;

View File

@ -190,6 +190,37 @@ def write_new_symbol_addrs():
read_ignores()
scan_map()
read_symbol_addrs()
# chicken scratch cod to print out new / renamed symbols
# with open("tools/new_syms.txt") as f:
# new_syms = f.readlines()
# new_sym_dict = {}
# for sym_line in new_syms:
# sym_line = sym_line.strip()
# if sym_line:
# name, rest = sym_line.split(" = ")
# vram = int(rest.split(";")[0], 0)
# new_sym_dict[vram] = name
# renames = []
# adds = []
# for addr in new_sym_dict:
# found = False
# for thing in symbol_addrs:
# if thing[1] == addr and not thing[0].startswith("func_") and not thing[0].startswith("D_"):
# if new_sym_dict[addr] != thing[0]:
# renames.append(f"{thing[0]} -> {new_sym_dict[addr]}")
# found = True
# break
# if not found:
# adds.append(f"{new_sym_dict[addr]} = {addr:X}")
# for r in renames:
# print(r)
# for a in adds:
# print(a)
read_elf()
reconcile_symbols()
write_new_symbol_addrs()

View File

@ -36,7 +36,7 @@ glabel D_80078464
.word 0x00000000, 0x00000000, 0x00000000
glabel D_80078470
.word func_8004FBBC, func_8004FCB4, func_8004FCE4, func_8004FD04, func_8004FD94, func_8004FE10, func_8004FD38, func_80050560, func_8004FE6C, func_8004FEB0, func_8004FF3C, func_8004FF58, func_8004FF70, func_8004FF88, func_8004FFA8, func_8004FFB4, func_8004FFC8, func_8004FFE4, func_8004FFF0, func_8004FFFC, func_80050004, func_80050020, func_8004FED0, func_80050128, func_80050560, func_80050560, func_80050560, func_80050560, func_800501A8, func_8005015C, func_80050184, func_800502F0, 0x02010101, 0x04030200, 0x02010101, 0x01010102, 0x03010100, 0x02010301, 0x00000000, 0x03030303
.word snd_BGMCmd_E0_MasterTempo, snd_BGMCmd_E1_MasterVolume, snd_BGMCmd_E2_MasterTranspose, snd_BGMCmd_E3, snd_BGMCmd_E4_MasterTempoFade, snd_BGMCmd_E5_MasterVolumeFade, snd_BGMCmd_E6_MasterEffect, snd_BGMCmd_NOP, snd_BGMCmd_E8_TrackOverridePatch, snd_BGMCmd_E9_SubTrackVolume, snd_BGMCmd_EA_SubTrackPan, snd_BGMCmd_EB_SubTrackReverb, snd_BGMCmd_EC_SegTrackVolume, snd_BGMCmd_ED_SubTrackCoarseTune, snd_BGMCmd_EE_SubTrackFineTune, snd_BGMCmd_EF_SegTrackTune, snd_BGMCmd_F0_TrackTremolo, snd_BGMCmd_F1_TrackTremoloSpeed, snd_BGMCmd_F2_TrackTremoloTime, snd_BGMCmd_F3_TrackTremoloStop, snd_BGMCmd_F4, snd_BGMCmd_F5_TrackVoice, snd_BGMCmd_F6_TrackVolumeFade, snd_BGMCmd_F7_SubTrackReverbType, snd_BGMCmd_NOP, snd_BGMCmd_NOP, snd_BGMCmd_NOP, snd_BGMCmd_NOP, snd_BGMCmd_FC_Jump, snd_BGMCmd_FD, snd_BGMCmd_FE, snd_BGMCmd_FF, 0x02010101, 0x04030200, 0x02010101, 0x01010102, 0x03010100, 0x02010301, 0x00000000, 0x03030303
glabel D_80078510
.byte 0x30, 0x18, 0x20, 0x28, 0x30, 0x38, 0x40, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00

View File

@ -56,7 +56,7 @@ glabel func_80218020_47F0D0
/* 47F198 802180E8 E7A00010 */ swc1 $f0, 0x10($sp)
/* 47F19C 802180EC 8E260144 */ lw $a2, 0x144($s1)
/* 47F1A0 802180F0 8E270148 */ lw $a3, 0x148($s1)
/* 47F1A4 802180F4 0C052757 */ jal play_sound_at_position
/* 47F1A4 802180F4 0C052757 */ jal sfx_play_sound_at_position
/* 47F1A8 802180F8 0000282D */ daddu $a1, $zero, $zero
.L802180FC:
/* 47F1AC 802180FC 8E420070 */ lw $v0, 0x70($s2)
@ -69,7 +69,7 @@ glabel func_80218020_47F0D0
/* 47F1C8 80218118 E7A00010 */ swc1 $f0, 0x10($sp)
/* 47F1CC 8021811C 8E260144 */ lw $a2, 0x144($s1)
/* 47F1D0 80218120 8E270148 */ lw $a3, 0x148($s1)
/* 47F1D4 80218124 0C052757 */ jal play_sound_at_position
/* 47F1D4 80218124 0C052757 */ jal sfx_play_sound_at_position
/* 47F1D8 80218128 0000282D */ daddu $a1, $zero, $zero
/* 47F1DC 8021812C 0808604E */ j .L80218138
/* 47F1E0 80218130 24020002 */ addiu $v0, $zero, 2

View File

@ -95,7 +95,7 @@ glabel func_802184CC_4E2C0C
/* 4E2D5C 8021861C E7A00010 */ swc1 $f0, 0x10($sp)
/* 4E2D60 80218620 8E260144 */ lw $a2, 0x144($s1)
/* 4E2D64 80218624 8E270148 */ lw $a3, 0x148($s1)
/* 4E2D68 80218628 0C052757 */ jal play_sound_at_position
/* 4E2D68 80218628 0C052757 */ jal sfx_play_sound_at_position
/* 4E2D6C 8021862C 0000282D */ daddu $a1, $zero, $zero
.L80218630:
/* 4E2D70 80218630 C6000000 */ lwc1 $f0, ($s0)

View File

@ -101,7 +101,7 @@ glabel func_8021825C_4EF6FC
/* 4EF868 802183C8 E7A00010 */ swc1 $f0, 0x10($sp)
/* 4EF86C 802183CC 8E260144 */ lw $a2, 0x144($s1)
/* 4EF870 802183D0 8E270148 */ lw $a3, 0x148($s1)
/* 4EF874 802183D4 0C052757 */ jal play_sound_at_position
/* 4EF874 802183D4 0C052757 */ jal sfx_play_sound_at_position
/* 4EF878 802183D8 0000282D */ daddu $a1, $zero, $zero
.L802183DC:
/* 4EF87C 802183DC C6000000 */ lwc1 $f0, ($s0)

View File

@ -56,7 +56,7 @@ glabel func_80218700_685130
/* 6851F8 802187C8 E7A00010 */ swc1 $f0, 0x10($sp)
/* 6851FC 802187CC 8E260144 */ lw $a2, 0x144($s1)
/* 685200 802187D0 8E270148 */ lw $a3, 0x148($s1)
/* 685204 802187D4 0C052757 */ jal play_sound_at_position
/* 685204 802187D4 0C052757 */ jal sfx_play_sound_at_position
/* 685208 802187D8 0000282D */ daddu $a1, $zero, $zero
.L802187DC:
/* 68520C 802187DC 8E420070 */ lw $v0, 0x70($s2)
@ -69,7 +69,7 @@ glabel func_80218700_685130
/* 685228 802187F8 E7A00010 */ swc1 $f0, 0x10($sp)
/* 68522C 802187FC 8E260144 */ lw $a2, 0x144($s1)
/* 685230 80218800 8E270148 */ lw $a3, 0x148($s1)
/* 685234 80218804 0C052757 */ jal play_sound_at_position
/* 685234 80218804 0C052757 */ jal sfx_play_sound_at_position
/* 685238 80218808 0000282D */ daddu $a1, $zero, $zero
/* 68523C 8021880C 08086206 */ j .L80218818
/* 685240 80218810 24020002 */ addiu $v0, $zero, 2

View File

@ -293,7 +293,7 @@ glabel func_802180D0_6BBC60
/* 6BC0B4 80218524 8E260058 */ lw $a2, 0x58($s1)
/* 6BC0B8 80218528 0C098F3F */ jal set_animation
/* 6BC0BC 8021852C 24050001 */ addiu $a1, $zero, 1
/* 6BC0C0 80218530 0C05272D */ jal play_sound
/* 6BC0C0 80218530 0C05272D */ jal sfx_play_sound
/* 6BC0C4 80218534 24042081 */ addiu $a0, $zero, 0x2081
/* 6BC0C8 80218538 24020001 */ addiu $v0, $zero, 1
/* 6BC0CC 8021853C AE820070 */ sw $v0, 0x70($s4)

View File

@ -81,7 +81,7 @@ glabel func_80218960_6BC4F0
/* 6BC60C 80218A7C 8E27014C */ lw $a3, 0x14c($s1)
/* 6BC610 80218A80 0C0990BC */ jal play_movement_dust_effects
/* 6BC614 80218A84 24040002 */ addiu $a0, $zero, 2
/* 6BC618 80218A88 0C05272D */ jal play_sound
/* 6BC618 80218A88 0C05272D */ jal sfx_play_sound
/* 6BC61C 80218A8C 24040148 */ addiu $a0, $zero, 0x148
/* 6BC620 80218A90 24020001 */ addiu $v0, $zero, 1
.L80218A94:

View File

@ -56,7 +56,7 @@ glabel func_80218000_58C2F0
/* 58C3B8 802180C8 E7A00010 */ swc1 $f0, 0x10($sp)
/* 58C3BC 802180CC 8E260144 */ lw $a2, 0x144($s1)
/* 58C3C0 802180D0 8E270148 */ lw $a3, 0x148($s1)
/* 58C3C4 802180D4 0C052757 */ jal play_sound_at_position
/* 58C3C4 802180D4 0C052757 */ jal sfx_play_sound_at_position
/* 58C3C8 802180D8 0000282D */ daddu $a1, $zero, $zero
.L802180DC:
/* 58C3CC 802180DC 8E420070 */ lw $v0, 0x70($s2)
@ -69,7 +69,7 @@ glabel func_80218000_58C2F0
/* 58C3E8 802180F8 E7A00010 */ swc1 $f0, 0x10($sp)
/* 58C3EC 802180FC 8E260144 */ lw $a2, 0x144($s1)
/* 58C3F0 80218100 8E270148 */ lw $a3, 0x148($s1)
/* 58C3F4 80218104 0C052757 */ jal play_sound_at_position
/* 58C3F4 80218104 0C052757 */ jal sfx_play_sound_at_position
/* 58C3F8 80218108 0000282D */ daddu $a1, $zero, $zero
/* 58C3FC 8021810C 08086046 */ j .L80218118
/* 58C400 80218110 24020002 */ addiu $v0, $zero, 2

View File

@ -10,14 +10,14 @@ glabel func_80218A98_59F178
/* 59F18C 80218AAC 24440001 */ addiu $a0, $v0, 1
/* 59F190 80218AB0 10A0000C */ beqz $a1, .L80218AE4
/* 59F194 80218AB4 AC640000 */ sw $a0, ($v1)
/* 59F198 80218AB8 0C05272D */ jal play_sound
/* 59F198 80218AB8 0C05272D */ jal sfx_play_sound
/* 59F19C 80218ABC 240400D4 */ addiu $a0, $zero, 0xd4
/* 59F1A0 80218AC0 24020008 */ addiu $v0, $zero, 8
/* 59F1A4 80218AC4 AFA20010 */ sw $v0, 0x10($sp)
/* 59F1A8 80218AC8 0000202D */ daddu $a0, $zero, $zero
/* 59F1AC 80218ACC 2405008B */ addiu $a1, $zero, 0x8b
/* 59F1B0 80218AD0 0080302D */ daddu $a2, $a0, $zero
/* 59F1B4 80218AD4 0C052A46 */ jal set_music_track
/* 59F1B4 80218AD4 0C052A46 */ jal bgm_set_song
/* 59F1B8 80218AD8 240701F4 */ addiu $a3, $zero, 0x1f4
/* 59F1BC 80218ADC 080862CB */ j .L80218B2C
/* 59F1C0 80218AE0 0000102D */ daddu $v0, $zero, $zero
@ -30,7 +30,7 @@ glabel func_80218A98_59F178
/* 59F1D8 80218AF8 080862CB */ j .L80218B2C
/* 59F1DC 80218AFC 0000102D */ daddu $v0, $zero, $zero
.L80218B00:
/* 59F1E0 80218B00 0C052B02 */ jal func_8014AC08
/* 59F1E0 80218B00 0C052B02 */ jal bgm_init_music_players
/* 59F1E4 80218B04 00000000 */ nop
/* 59F1E8 80218B08 080862CB */ j .L80218B2C
/* 59F1EC 80218B0C 0000102D */ daddu $v0, $zero, $zero
@ -39,7 +39,7 @@ glabel func_80218A98_59F178
/* 59F1F4 80218B14 0000202D */ daddu $a0, $zero, $zero
/* 59F1F8 80218B18 2405000D */ addiu $a1, $zero, 0xd
/* 59F1FC 80218B1C 24060001 */ addiu $a2, $zero, 1
/* 59F200 80218B20 0C052A46 */ jal set_music_track
/* 59F200 80218B20 0C052A46 */ jal bgm_set_song
/* 59F204 80218B24 240701F4 */ addiu $a3, $zero, 0x1f4
/* 59F208 80218B28 24020002 */ addiu $v0, $zero, 2
.L80218B2C:

View File

@ -293,7 +293,7 @@ glabel func_80218300_464790
/* 464BE4 80218754 8E260058 */ lw $a2, 0x58($s1)
/* 464BE8 80218758 0C098F3F */ jal set_animation
/* 464BEC 8021875C 24050001 */ addiu $a1, $zero, 1
/* 464BF0 80218760 0C05272D */ jal play_sound
/* 464BF0 80218760 0C05272D */ jal sfx_play_sound
/* 464BF4 80218764 24042081 */ addiu $a0, $zero, 0x2081
/* 464BF8 80218768 24020001 */ addiu $v0, $zero, 1
/* 464BFC 8021876C AE820070 */ sw $v0, 0x70($s4)

View File

@ -81,7 +81,7 @@ glabel func_80218B90_465020
/* 46513C 80218CAC 8E27014C */ lw $a3, 0x14c($s1)
/* 465140 80218CB0 0C0990BC */ jal play_movement_dust_effects
/* 465144 80218CB4 24040002 */ addiu $a0, $zero, 2
/* 465148 80218CB8 0C05272D */ jal play_sound
/* 465148 80218CB8 0C05272D */ jal sfx_play_sound
/* 46514C 80218CBC 24040148 */ addiu $a0, $zero, 0x148
/* 465150 80218CC0 24020001 */ addiu $v0, $zero, 1
.L80218CC4:

View File

@ -293,7 +293,7 @@ glabel func_80218000_669D80
/* 66A1D4 80218454 8E260058 */ lw $a2, 0x58($s1)
/* 66A1D8 80218458 0C098F3F */ jal set_animation
/* 66A1DC 8021845C 24050001 */ addiu $a1, $zero, 1
/* 66A1E0 80218460 0C05272D */ jal play_sound
/* 66A1E0 80218460 0C05272D */ jal sfx_play_sound
/* 66A1E4 80218464 24042081 */ addiu $a0, $zero, 0x2081
/* 66A1E8 80218468 24020001 */ addiu $v0, $zero, 1
/* 66A1EC 8021846C AE820070 */ sw $v0, 0x70($s4)

View File

@ -81,7 +81,7 @@ glabel func_80218890_66A610
/* 66A72C 802189AC 8E27014C */ lw $a3, 0x14c($s1)
/* 66A730 802189B0 0C0990BC */ jal play_movement_dust_effects
/* 66A734 802189B4 24040002 */ addiu $a0, $zero, 2
/* 66A738 802189B8 0C05272D */ jal play_sound
/* 66A738 802189B8 0C05272D */ jal sfx_play_sound
/* 66A73C 802189BC 24040148 */ addiu $a0, $zero, 0x148
/* 66A740 802189C0 24020001 */ addiu $v0, $zero, 1
.L802189C4:

View File

@ -293,7 +293,7 @@ glabel func_80218000_623BA0
/* 623FF4 80218454 8E260058 */ lw $a2, 0x58($s1)
/* 623FF8 80218458 0C098F3F */ jal set_animation
/* 623FFC 8021845C 24050001 */ addiu $a1, $zero, 1
/* 624000 80218460 0C05272D */ jal play_sound
/* 624000 80218460 0C05272D */ jal sfx_play_sound
/* 624004 80218464 24042081 */ addiu $a0, $zero, 0x2081
/* 624008 80218468 24020001 */ addiu $v0, $zero, 1
/* 62400C 8021846C AE820070 */ sw $v0, 0x70($s4)

View File

@ -81,7 +81,7 @@ glabel func_80218890_624430
/* 62454C 802189AC 8E27014C */ lw $a3, 0x14c($s1)
/* 624550 802189B0 0C0990BC */ jal play_movement_dust_effects
/* 624554 802189B4 24040002 */ addiu $a0, $zero, 2
/* 624558 802189B8 0C05272D */ jal play_sound
/* 624558 802189B8 0C05272D */ jal sfx_play_sound
/* 62455C 802189BC 24040148 */ addiu $a0, $zero, 0x148
/* 624560 802189C0 24020001 */ addiu $v0, $zero, 1
.L802189C4:

View File

@ -5,9 +5,9 @@ glabel func_80218350_4B1540
/* 4B1540 80218350 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 4B1544 80218354 24040008 */ addiu $a0, $zero, 8
/* 4B1548 80218358 AFBF0010 */ sw $ra, 0x10($sp)
/* 4B154C 8021835C 0C052BE3 */ jal func_8014AF8C
/* 4B154C 8021835C 0C052BE3 */ jal bgm_set_battle_song
/* 4B1550 80218360 0000282D */ daddu $a1, $zero, $zero
/* 4B1554 80218364 0C052BBE */ jal func_8014AEF8
/* 4B1554 80218364 0C052BBE */ jal bgm_push_battle_song
/* 4B1558 80218368 00000000 */ nop
/* 4B155C 8021836C 8FBF0010 */ lw $ra, 0x10($sp)
/* 4B1560 80218370 24020002 */ addiu $v0, $zero, 2

View File

@ -243,7 +243,7 @@ glabel func_8023803C_70BD4C
/* 70C0E4 802383D4 44060000 */ mfc1 $a2, $f0
/* 70C0E8 802383D8 0000282D */ daddu $a1, $zero, $zero
/* 70C0EC 802383DC 00C0382D */ daddu $a3, $a2, $zero
/* 70C0F0 802383E0 0C052757 */ jal play_sound_at_position
/* 70C0F0 802383E0 0C052757 */ jal sfx_play_sound_at_position
/* 70C0F4 802383E4 AFA60010 */ sw $a2, 0x10($sp)
/* 70C0F8 802383E8 8FA80068 */ lw $t0, 0x68($sp)
/* 70C0FC 802383EC 24020002 */ addiu $v0, $zero, 2
@ -553,7 +553,7 @@ glabel func_8023803C_70BD4C
/* 70C568 80238858 00000000 */ nop
/* 70C56C 8023885C 0C093EB1 */ jal set_popup_duration
/* 70C570 80238860 0000202D */ daddu $a0, $zero, $zero
/* 70C574 80238864 0C05271B */ jal stop_sound
/* 70C574 80238864 0C05271B */ jal sfx_stop_sound
/* 70C578 80238868 24040312 */ addiu $a0, $zero, 0x312
/* 70C57C 8023886C 0808E28D */ j .L80238A34
/* 70C580 80238870 24020002 */ addiu $v0, $zero, 2

View File

@ -331,7 +331,7 @@ glabel func_80239140_70CE50
/* 70D334 80239624 E7A00010 */ swc1 $f0, 0x10($sp)
/* 70D338 80239628 8E460144 */ lw $a2, 0x144($s2)
/* 70D33C 8023962C 8E470148 */ lw $a3, 0x148($s2)
/* 70D340 80239630 0C052757 */ jal play_sound_at_position
/* 70D340 80239630 0C052757 */ jal sfx_play_sound_at_position
/* 70D344 80239634 0000282D */ daddu $a1, $zero, $zero
.L80239638:
/* 70D348 80239638 24040100 */ addiu $a0, $zero, 0x100
@ -387,7 +387,7 @@ glabel func_80239140_70CE50
/* 70D408 802396F8 E7A00010 */ swc1 $f0, 0x10($sp)
/* 70D40C 802396FC 8E460144 */ lw $a2, 0x144($s2)
/* 70D410 80239700 8E470148 */ lw $a3, 0x148($s2)
/* 70D414 80239704 0C052757 */ jal play_sound_at_position
/* 70D414 80239704 0C052757 */ jal sfx_play_sound_at_position
/* 70D418 80239708 0000282D */ daddu $a1, $zero, $zero
/* 70D41C 8023970C AE700078 */ sw $s0, 0x78($s3)
.L80239710:

View File

@ -476,7 +476,7 @@ glabel func_80238000_6FFD80
/* 7004B0 80238730 C680001C */ lwc1 $f0, 0x1c($s4)
/* 7004B4 80238734 E6800048 */ swc1 $f0, 0x48($s4)
.L80238738:
/* 7004B8 80238738 0C05272D */ jal play_sound
/* 7004B8 80238738 0C05272D */ jal sfx_play_sound
/* 7004BC 8023873C 24040311 */ addiu $a0, $zero, 0x311
/* 7004C0 80238740 2402003C */ addiu $v0, $zero, 0x3c
/* 7004C4 80238744 3C018024 */ lui $at, %hi(D_8023BDBC)

View File

@ -127,7 +127,7 @@ glabel func_80238E24_700BA4
/* 700D80 80239000 E7A00010 */ swc1 $f0, 0x10($sp)
/* 700D84 80239004 8E06000C */ lw $a2, 0xc($s0)
/* 700D88 80239008 8E070010 */ lw $a3, 0x10($s0)
/* 700D8C 8023900C 0C052757 */ jal play_sound_at_position
/* 700D8C 8023900C 0C052757 */ jal sfx_play_sound_at_position
/* 700D90 80239010 0000282D */ daddu $a1, $zero, $zero
.L80239014:
/* 700D94 80239014 C602000C */ lwc1 $f2, 0xc($s0)

View File

@ -165,7 +165,7 @@ glabel func_802390B4_700E34
.L8023931C:
/* 70109C 8023931C 8E060000 */ lw $a2, ($s0)
/* 7010A0 80239320 8E070004 */ lw $a3, 4($s0)
/* 7010A4 80239324 0C052757 */ jal play_sound_at_position
/* 7010A4 80239324 0C052757 */ jal sfx_play_sound_at_position
/* 7010A8 80239328 0000282D */ daddu $a1, $zero, $zero
/* 7010AC 8023932C 8E43007C */ lw $v1, 0x7c($s2)
/* 7010B0 80239330 24020001 */ addiu $v0, $zero, 1
@ -249,7 +249,7 @@ glabel func_802390B4_700E34
.L80239450:
/* 7011D0 80239450 8E060000 */ lw $a2, ($s0)
/* 7011D4 80239454 8E070004 */ lw $a3, 4($s0)
/* 7011D8 80239458 0C052757 */ jal play_sound_at_position
/* 7011D8 80239458 0C052757 */ jal sfx_play_sound_at_position
/* 7011DC 8023945C 0000282D */ daddu $a1, $zero, $zero
/* 7011E0 80239460 8E43007C */ lw $v1, 0x7c($s2)
/* 7011E4 80239464 24020001 */ addiu $v0, $zero, 1
@ -329,7 +329,7 @@ glabel func_802390B4_700E34
.L80239574:
/* 7012F4 80239574 8E060000 */ lw $a2, ($s0)
/* 7012F8 80239578 8E070004 */ lw $a3, 4($s0)
/* 7012FC 8023957C 0C052757 */ jal play_sound_at_position
/* 7012FC 8023957C 0C052757 */ jal sfx_play_sound_at_position
/* 701300 80239580 0000282D */ daddu $a1, $zero, $zero
/* 701304 80239584 8E43007C */ lw $v1, 0x7c($s2)
/* 701308 80239588 24020001 */ addiu $v0, $zero, 1
@ -413,7 +413,7 @@ glabel func_802390B4_700E34
.L802396A4:
/* 701424 802396A4 8E060000 */ lw $a2, ($s0)
/* 701428 802396A8 8E070004 */ lw $a3, 4($s0)
/* 70142C 802396AC 0C052757 */ jal play_sound_at_position
/* 70142C 802396AC 0C052757 */ jal sfx_play_sound_at_position
/* 701430 802396B0 0000282D */ daddu $a1, $zero, $zero
/* 701434 802396B4 8E43007C */ lw $v1, 0x7c($s2)
/* 701438 802396B8 24020001 */ addiu $v0, $zero, 1

View File

@ -232,7 +232,7 @@ glabel func_80238540_7081E0
.L802388A0:
/* 708540 802388A0 8E060000 */ lw $a2, ($s0)
/* 708544 802388A4 8E070004 */ lw $a3, 4($s0)
/* 708548 802388A8 0C052757 */ jal play_sound_at_position
/* 708548 802388A8 0C052757 */ jal sfx_play_sound_at_position
/* 70854C 802388AC 0000282D */ daddu $a1, $zero, $zero
/* 708550 802388B0 8E430078 */ lw $v1, 0x78($s2)
/* 708554 802388B4 24020001 */ addiu $v0, $zero, 1
@ -319,7 +319,7 @@ glabel func_80238540_7081E0
.L802389DC:
/* 70867C 802389DC 8E060000 */ lw $a2, ($s0)
/* 708680 802389E0 8E070004 */ lw $a3, 4($s0)
/* 708684 802389E4 0C052757 */ jal play_sound_at_position
/* 708684 802389E4 0C052757 */ jal sfx_play_sound_at_position
/* 708688 802389E8 0000282D */ daddu $a1, $zero, $zero
/* 70868C 802389EC 8E430078 */ lw $v1, 0x78($s2)
/* 708690 802389F0 24020001 */ addiu $v0, $zero, 1
@ -413,7 +413,7 @@ glabel func_80238540_7081E0
.L80238B30:
/* 7087D0 80238B30 8E060000 */ lw $a2, ($s0)
/* 7087D4 80238B34 8E070004 */ lw $a3, 4($s0)
/* 7087D8 80238B38 0C052757 */ jal play_sound_at_position
/* 7087D8 80238B38 0C052757 */ jal sfx_play_sound_at_position
/* 7087DC 80238B3C 0000282D */ daddu $a1, $zero, $zero
/* 7087E0 80238B40 8E430078 */ lw $v1, 0x78($s2)
/* 7087E4 80238B44 24020001 */ addiu $v0, $zero, 1
@ -513,7 +513,7 @@ glabel func_80238540_7081E0
/* 708954 80238CB4 4406A000 */ mfc1 $a2, $f20
/* 708958 80238CB8 4407A000 */ mfc1 $a3, $f20
/* 70895C 80238CBC 0000282D */ daddu $a1, $zero, $zero
/* 708960 80238CC0 0C052757 */ jal play_sound_at_position
/* 708960 80238CC0 0C052757 */ jal sfx_play_sound_at_position
/* 708964 80238CC4 E7B40010 */ swc1 $f20, 0x10($sp)
/* 708968 80238CC8 0000202D */ daddu $a0, $zero, $zero
/* 70896C 80238CCC 3C05C248 */ lui $a1, 0xc248

View File

@ -121,7 +121,7 @@ glabel func_802A16F4_7907C4
/* 790984 802A18B4 AFA20014 */ sw $v0, 0x14($sp)
/* 790988 802A18B8 0C01C634 */ jal func_800718D0
/* 79098C 802A18BC E7A40010 */ swc1 $f4, 0x10($sp)
/* 790990 802A18C0 0C05272D */ jal play_sound
/* 790990 802A18C0 0C05272D */ jal sfx_play_sound
/* 790994 802A18C4 24042106 */ addiu $a0, $zero, 0x2106
/* 790998 802A18C8 24020002 */ addiu $v0, $zero, 2
/* 79099C 802A18CC 24030001 */ addiu $v1, $zero, 1

View File

@ -342,7 +342,7 @@ glabel L802A18B0_79A060
/* 79A194 802A19E4 3C048000 */ lui $a0, 0x8000
/* 79A198 802A19E8 34840069 */ ori $a0, $a0, 0x69
.L802A19EC:
/* 79A19C 802A19EC 0C05272D */ jal play_sound
/* 79A19C 802A19EC 0C05272D */ jal sfx_play_sound
/* 79A1A0 802A19F0 00000000 */ nop
/* 79A1A4 802A19F4 24020001 */ addiu $v0, $zero, 1
/* 79A1A8 802A19F8 080A8907 */ j L802A241C_79ABCC
@ -432,7 +432,7 @@ glabel L802A1AB8_79A268
/* 79A2E8 802A1B38 24040649 */ addiu $a0, $zero, 0x649
/* 79A2EC 802A1B3C 24040648 */ addiu $a0, $zero, 0x648
.L802A1B40:
/* 79A2F0 802A1B40 0C05272D */ jal play_sound
/* 79A2F0 802A1B40 0C05272D */ jal sfx_play_sound
/* 79A2F4 802A1B44 00000000 */ nop
/* 79A2F8 802A1B48 24020004 */ addiu $v0, $zero, 4
/* 79A2FC 802A1B4C 080A8907 */ j L802A241C_79ABCC
@ -681,7 +681,7 @@ glabel L802A1E34_79A5E4
/* 79A694 802A1EE4 E448008C */ swc1 $f8, 0x8c($v0)
/* 79A698 802A1EE8 8FC30078 */ lw $v1, 0x78($fp)
/* 79A69C 802A1EEC AC4300AC */ sw $v1, 0xac($v0)
/* 79A6A0 802A1EF0 0C05272D */ jal play_sound
/* 79A6A0 802A1EF0 0C05272D */ jal sfx_play_sound
/* 79A6A4 802A1EF4 2404024A */ addiu $a0, $zero, 0x24a
/* 79A6A8 802A1EF8 2402002D */ addiu $v0, $zero, 0x2d
/* 79A6AC 802A1EFC AFC20074 */ sw $v0, 0x74($fp)
@ -810,7 +810,7 @@ glabel L802A2080_79A830
/* 79A868 802A20B8 24050001 */ addiu $a1, $zero, 1
/* 79A86C 802A20BC 24040649 */ addiu $a0, $zero, 0x649
.L802A20C0:
/* 79A870 802A20C0 0C05272D */ jal play_sound
/* 79A870 802A20C0 0C05272D */ jal sfx_play_sound
/* 79A874 802A20C4 00000000 */ nop
.L802A20C8:
/* 79A878 802A20C8 0000B82D */ daddu $s7, $zero, $zero

View File

@ -342,7 +342,7 @@ glabel L802A18B0_797870
/* 7979A4 802A19E4 3C048000 */ lui $a0, 0x8000
/* 7979A8 802A19E8 34840069 */ ori $a0, $a0, 0x69
.L802A19EC:
/* 7979AC 802A19EC 0C05272D */ jal play_sound
/* 7979AC 802A19EC 0C05272D */ jal sfx_play_sound
/* 7979B0 802A19F0 00000000 */ nop
/* 7979B4 802A19F4 24020001 */ addiu $v0, $zero, 1
/* 7979B8 802A19F8 080A8907 */ j L802A241C_7983DC
@ -432,7 +432,7 @@ glabel L802A1AB8_797A78
/* 797AF8 802A1B38 24040649 */ addiu $a0, $zero, 0x649
/* 797AFC 802A1B3C 24040648 */ addiu $a0, $zero, 0x648
.L802A1B40:
/* 797B00 802A1B40 0C05272D */ jal play_sound
/* 797B00 802A1B40 0C05272D */ jal sfx_play_sound
/* 797B04 802A1B44 00000000 */ nop
/* 797B08 802A1B48 24020004 */ addiu $v0, $zero, 4
/* 797B0C 802A1B4C 080A8907 */ j L802A241C_7983DC
@ -681,7 +681,7 @@ glabel L802A1E34_797DF4
/* 797EA4 802A1EE4 E448008C */ swc1 $f8, 0x8c($v0)
/* 797EA8 802A1EE8 8FC30078 */ lw $v1, 0x78($fp)
/* 797EAC 802A1EEC AC4300AC */ sw $v1, 0xac($v0)
/* 797EB0 802A1EF0 0C05272D */ jal play_sound
/* 797EB0 802A1EF0 0C05272D */ jal sfx_play_sound
/* 797EB4 802A1EF4 2404024A */ addiu $a0, $zero, 0x24a
/* 797EB8 802A1EF8 2402002D */ addiu $v0, $zero, 0x2d
/* 797EBC 802A1EFC AFC20074 */ sw $v0, 0x74($fp)
@ -810,7 +810,7 @@ glabel L802A2080_798040
/* 798078 802A20B8 24050001 */ addiu $a1, $zero, 1
/* 79807C 802A20BC 24040649 */ addiu $a0, $zero, 0x649
.L802A20C0:
/* 798080 802A20C0 0C05272D */ jal play_sound
/* 798080 802A20C0 0C05272D */ jal sfx_play_sound
/* 798084 802A20C4 00000000 */ nop
.L802A20C8:
/* 798088 802A20C8 0000B82D */ daddu $s7, $zero, $zero

View File

@ -126,7 +126,7 @@ glabel state_step_language_select
/* 1078C 8003538C 00021600 */ sll $v0, $v0, 0x18
/* 10790 80035390 1440003B */ bnez $v0, .L80035480
/* 10794 80035394 2402FFFF */ addiu $v0, $zero, -1
/* 10798 80035398 0C05260E */ jal func_80149838
/* 10798 80035398 0C05260E */ jal sfx_stop_env_sounds
/* 1079C 8003539C A2020000 */ sb $v0, ($s0)
/* 107A0 800353A0 0C00EC6A */ jal func_8003B1A8
/* 107A4 800353A4 00000000 */ nop

View File

@ -161,7 +161,7 @@ glabel L802E3D84_105604
/* 105630 802E3DB0 E7A00010 */ swc1 $f0, 0x10($sp)
/* 105634 802E3DB4 8E260048 */ lw $a2, 0x48($s1)
/* 105638 802E3DB8 8E27004C */ lw $a3, 0x4c($s1)
/* 10563C 802E3DBC 0C052757 */ jal play_sound_at_position
/* 10563C 802E3DBC 0C052757 */ jal sfx_play_sound_at_position
/* 105640 802E3DC0 0000282D */ daddu $a1, $zero, $zero
/* 105644 802E3DC4 080B8F7A */ j .L802E3DE8
/* 105648 802E3DC8 24020001 */ addiu $v0, $zero, 1

View File

@ -145,7 +145,7 @@ glabel L802E4F1C_10679C
/* 10687C 802E4FFC E6000004 */ swc1 $f0, 4($s0)
/* 106880 802E5000 0C03A899 */ jal recover_fp
/* 106884 802E5004 2404FFFF */ addiu $a0, $zero, -1
/* 106888 802E5008 0C05272D */ jal play_sound
/* 106888 802E5008 0C05272D */ jal sfx_play_sound
/* 10688C 802E500C 24040131 */ addiu $a0, $zero, 0x131
/* 106890 802E5010 080B949D */ j .L802E5274
/* 106894 802E5014 00000000 */ nop

View File

@ -42,7 +42,7 @@ glabel func_802E5FB0
/* 1078C0 802E6040 E7A00010 */ swc1 $f0, 0x10($sp)
/* 1078C4 802E6044 8E060048 */ lw $a2, 0x48($s0)
/* 1078C8 802E6048 8E07004C */ lw $a3, 0x4c($s0)
/* 1078CC 802E604C 0C052757 */ jal play_sound_at_position
/* 1078CC 802E604C 0C052757 */ jal sfx_play_sound_at_position
/* 1078D0 802E6050 0000282D */ daddu $a1, $zero, $zero
.L802E6054:
/* 1078D4 802E6054 8FBF001C */ lw $ra, 0x1c($sp)

View File

@ -38,7 +38,7 @@ glabel func_802E6064
/* 107964 802E60E4 E7A00010 */ swc1 $f0, 0x10($sp)
/* 107968 802E60E8 8E060048 */ lw $a2, 0x48($s0)
/* 10796C 802E60EC 8E07004C */ lw $a3, 0x4c($s0)
/* 107970 802E60F0 0C052757 */ jal play_sound_at_position
/* 107970 802E60F0 0C052757 */ jal sfx_play_sound_at_position
/* 107974 802E60F4 0000282D */ daddu $a1, $zero, $zero
/* 107978 802E60F8 0C03805E */ jal disable_player_input
/* 10797C 802E60FC 00000000 */ nop

View File

@ -63,7 +63,7 @@ glabel func_802E6574
/* 107EB4 802E6634 00400008 */ jr $v0
/* 107EB8 802E6638 00000000 */ nop
glabel L802E663C_107EBC
/* 107EBC 802E663C 0C05272D */ jal play_sound
/* 107EBC 802E663C 0C05272D */ jal sfx_play_sound
/* 107EC0 802E6640 240420AB */ addiu $a0, $zero, 0x20ab
/* 107EC4 802E6644 24040001 */ addiu $a0, $zero, 1
/* 107EC8 802E6648 3C0142B4 */ lui $at, 0x42b4
@ -278,7 +278,7 @@ glabel L802E685C_1080DC
/* 1081E0 802E6960 E6340068 */ swc1 $f20, 0x68($s1)
/* 1081E4 802E6964 0C0B2D72 */ jal exec_ShakeCamX
/* 1081E8 802E6968 A2020001 */ sb $v0, 1($s0)
/* 1081EC 802E696C 0C05272D */ jal play_sound
/* 1081EC 802E696C 0C05272D */ jal sfx_play_sound
/* 1081F0 802E6970 240420AC */ addiu $a0, $zero, 0x20ac
/* 1081F4 802E6974 080B9AB5 */ j L802E6AD4_108354
/* 1081F8 802E6978 00000000 */ nop

View File

@ -11,7 +11,7 @@ glabel func_802E71F8
/* 108A90 802E7210 24030028 */ addiu $v1, $zero, 0x28
/* 108A94 802E7214 AC400008 */ sw $zero, 8($v0)
/* 108A98 802E7218 A0400005 */ sb $zero, 5($v0)
/* 108A9C 802E721C 0C05272D */ jal play_sound
/* 108A9C 802E721C 0C05272D */ jal sfx_play_sound
/* 108AA0 802E7220 A4430002 */ sh $v1, 2($v0)
/* 108AA4 802E7224 8FBF0010 */ lw $ra, 0x10($sp)
/* 108AA8 802E7228 03E00008 */ jr $ra

View File

@ -177,7 +177,7 @@ glabel begin_state_title_screen
/* 12478 80037078 0080302D */ daddu $a2, $a0, $zero
/* 1247C 8003707C 240701F4 */ addiu $a3, $zero, 0x1f4
/* 12480 80037080 24020008 */ addiu $v0, $zero, 8
/* 12484 80037084 0C052A46 */ jal set_music_track
/* 12484 80037084 0C052A46 */ jal bgm_set_song
/* 12488 80037088 AFA20010 */ sw $v0, 0x10($sp)
/* 1248C 8003708C 8FBF002C */ lw $ra, 0x2c($sp)
/* 12490 80037090 8FB20028 */ lw $s2, 0x28($sp)

View File

@ -111,7 +111,7 @@ glabel L80037204_12604
/* 12628 80037228 0000202D */ daddu $a0, $zero, $zero
/* 1262C 8003722C 2405FFFF */ addiu $a1, $zero, -1
/* 12630 80037230 0080302D */ daddu $a2, $a0, $zero
/* 12634 80037234 0C052A46 */ jal set_music_track
/* 12634 80037234 0C052A46 */ jal bgm_set_song
/* 12638 80037238 24070F3C */ addiu $a3, $zero, 0xf3c
.L8003723C:
/* 1263C 8003723C 3C02800A */ lui $v0, %hi(D_800A0988)
@ -145,14 +145,14 @@ glabel L80037204_12604
/* 126A4 800372A4 24020005 */ addiu $v0, $zero, 5
/* 126A8 800372A8 3C018007 */ lui $at, %hi(D_800779C0)
/* 126AC 800372AC A42279C0 */ sh $v0, %lo(D_800779C0)($at)
/* 126B0 800372B0 0C05272D */ jal play_sound
/* 126B0 800372B0 0C05272D */ jal sfx_play_sound
/* 126B4 800372B4 240400D5 */ addiu $a0, $zero, 0xd5
/* 126B8 800372B8 0000202D */ daddu $a0, $zero, $zero
/* 126BC 800372BC 24050069 */ addiu $a1, $zero, 0x69
/* 126C0 800372C0 0080302D */ daddu $a2, $a0, $zero
/* 126C4 800372C4 240701F4 */ addiu $a3, $zero, 0x1f4
/* 126C8 800372C8 24020008 */ addiu $v0, $zero, 8
/* 126CC 800372CC 0C052A46 */ jal set_music_track
/* 126CC 800372CC 0C052A46 */ jal bgm_set_song
/* 126D0 800372D0 AFA20010 */ sw $v0, 0x10($sp)
/* 126D4 800372D4 0800DD64 */ j .L80037590
/* 126D8 800372D8 00000000 */ nop

View File

@ -71,7 +71,7 @@ glabel pause_handle_input
.L80244520:
/* 137860 80244520 0C039E1B */ jal enforce_hpfp_limits
/* 137864 80244524 00000000 */ nop
/* 137868 80244528 0C05272D */ jal play_sound
/* 137868 80244528 0C05272D */ jal sfx_play_sound
/* 13786C 8024452C 240400C6 */ addiu $a0, $zero, 0xc6
/* 137870 80244530 0C00CD3C */ jal set_game_mode
/* 137874 80244534 2404000B */ addiu $a0, $zero, 0xb

View File

@ -140,7 +140,7 @@ glabel pause_init
/* 13759C 8024425C 24040018 */ addiu $a0, $zero, 0x18
/* 1375A0 80244260 0C051F9F */ jal set_window_update
/* 1375A4 80244264 24050001 */ addiu $a1, $zero, 1
/* 1375A8 80244268 0C05272D */ jal play_sound
/* 1375A8 80244268 0C05272D */ jal sfx_play_sound
/* 1375AC 8024426C 24040009 */ addiu $a0, $zero, 9
.L80244270:
/* 1375B0 80244270 2404002C */ addiu $a0, $zero, 0x2c

View File

@ -40,7 +40,7 @@ glabel pause_tutorial_input
/* 137668 80244328 00000000 */ nop
/* 13766C 8024432C 16000003 */ bnez $s0, .L8024433C
/* 137670 80244330 00000000 */ nop
/* 137674 80244334 0C05272D */ jal play_sound
/* 137674 80244334 0C05272D */ jal sfx_play_sound
/* 137678 80244338 2404021D */ addiu $a0, $zero, 0x21d
.L8024433C:
/* 13767C 8024433C 3C028025 */ lui $v0, %hi(D_8024F018)

View File

@ -119,7 +119,7 @@ glabel pause_tabs_handle_input
/* 138844 80245504 A483024C */ sh $v1, 0x24c($a0)
/* 138848 80245508 82020001 */ lb $v0, 1($s0)
/* 13884C 8024550C 240400C8 */ addiu $a0, $zero, 0xc8
/* 138850 80245510 0C05272D */ jal play_sound
/* 138850 80245510 0C05272D */ jal sfx_play_sound
/* 138854 80245514 AE220000 */ sw $v0, ($s1)
.L80245518:
/* 138858 80245518 3C028027 */ lui $v0, %hi(gPauseMenuPressedButtons)
@ -141,7 +141,7 @@ glabel pause_tabs_handle_input
/* 138898 80245558 24020001 */ addiu $v0, $zero, 1
/* 13889C 8024555C 14620008 */ bne $v1, $v0, .L80245580
/* 1388A0 80245560 00000000 */ nop
/* 1388A4 80245564 0C05272D */ jal play_sound
/* 1388A4 80245564 0C05272D */ jal sfx_play_sound
/* 1388A8 80245568 240400C9 */ addiu $a0, $zero, 0xc9
/* 1388AC 8024556C 82020001 */ lb $v0, 1($s0)
/* 1388B0 80245570 00511021 */ addu $v0, $v0, $s1

View File

@ -54,13 +54,13 @@ glabel pause_badges_handle_input
/* 13C4A0 80249160 24027FFE */ addiu $v0, $zero, 0x7ffe
/* 13C4A4 80249164 14620005 */ bne $v1, $v0, .L8024917C
/* 13C4A8 80249168 24020001 */ addiu $v0, $zero, 1
/* 13C4AC 8024916C 0C05272D */ jal play_sound
/* 13C4AC 8024916C 0C05272D */ jal sfx_play_sound
/* 13C4B0 80249170 2404021D */ addiu $a0, $zero, 0x21d
/* 13C4B4 80249174 08092581 */ j .L80249604
/* 13C4B8 80249178 00000000 */ nop
.L8024917C:
/* 13C4BC 8024917C AC820000 */ sw $v0, ($a0)
/* 13C4C0 80249180 0C05272D */ jal play_sound
/* 13C4C0 80249180 0C05272D */ jal sfx_play_sound
/* 13C4C4 80249184 240400C9 */ addiu $a0, $zero, 0xc9
/* 13C4C8 80249188 08092581 */ j .L80249604
/* 13C4CC 8024918C 00000000 */ nop
@ -88,19 +88,19 @@ glabel pause_badges_handle_input
/* 13C51C 802491DC 08092581 */ j .L80249604
/* 13C520 802491E0 00000000 */ nop
.L802491E4:
/* 13C524 802491E4 0C05272D */ jal play_sound
/* 13C524 802491E4 0C05272D */ jal sfx_play_sound
/* 13C528 802491E8 24040006 */ addiu $a0, $zero, 6
/* 13C52C 802491EC 0C091CAC */ jal pause_badges_try_remove
/* 13C530 802491F0 0220202D */ daddu $a0, $s1, $zero
/* 13C534 802491F4 08092581 */ j .L80249604
/* 13C538 802491F8 00000000 */ nop
.L802491FC:
/* 13C53C 802491FC 0C05272D */ jal play_sound
/* 13C53C 802491FC 0C05272D */ jal sfx_play_sound
/* 13C540 80249200 2404021D */ addiu $a0, $zero, 0x21d
/* 13C544 80249204 08092581 */ j .L80249604
/* 13C548 80249208 AE500000 */ sw $s0, ($s2)
.L8024920C:
/* 13C54C 8024920C 0C05272D */ jal play_sound
/* 13C54C 8024920C 0C05272D */ jal sfx_play_sound
/* 13C550 80249210 24040005 */ addiu $a0, $zero, 5
/* 13C554 80249214 08092581 */ j .L80249604
/* 13C558 80249218 00000000 */ nop
@ -137,7 +137,7 @@ glabel pause_badges_handle_input
/* 13C5C4 80249284 8E020000 */ lw $v0, ($s0)
/* 13C5C8 80249288 106200A0 */ beq $v1, $v0, .L8024950C
/* 13C5CC 8024928C 00000000 */ nop
/* 13C5D0 80249290 0C05272D */ jal play_sound
/* 13C5D0 80249290 0C05272D */ jal sfx_play_sound
/* 13C5D4 80249294 240400C8 */ addiu $a0, $zero, 0xc8
/* 13C5D8 80249298 8E040000 */ lw $a0, ($s0)
/* 13C5DC 8024929C 0C092363 */ jal pause_badges_load_badges
@ -298,7 +298,7 @@ glabel pause_badges_handle_input
/* 13C81C 802494DC 010A1021 */ addu $v0, $t0, $t2
/* 13C820 802494E0 10490003 */ beq $v0, $t1, .L802494F0
/* 13C824 802494E4 AE020000 */ sw $v0, ($s0)
/* 13C828 802494E8 0C05272D */ jal play_sound
/* 13C828 802494E8 0C05272D */ jal sfx_play_sound
/* 13C82C 802494EC 240400C7 */ addiu $a0, $zero, 0xc7
.L802494F0:
/* 13C830 802494F0 8E020000 */ lw $v0, ($s0)
@ -359,14 +359,14 @@ glabel pause_badges_handle_input
/* 13C8F4 802495B4 8E020000 */ lw $v0, ($s0)
/* 13C8F8 802495B8 14400007 */ bnez $v0, .L802495D8
/* 13C8FC 802495BC 00000000 */ nop
/* 13C900 802495C0 0C05272D */ jal play_sound
/* 13C900 802495C0 0C05272D */ jal sfx_play_sound
/* 13C904 802495C4 240400CA */ addiu $a0, $zero, 0xca
/* 13C908 802495C8 3C018027 */ lui $at, %hi(gPauseMenuCurrentTab)
/* 13C90C 802495CC A02000D4 */ sb $zero, %lo(gPauseMenuCurrentTab)($at)
/* 13C910 802495D0 08092581 */ j .L80249604
/* 13C914 802495D4 00000000 */ nop
.L802495D8:
/* 13C918 802495D8 0C05272D */ jal play_sound
/* 13C918 802495D8 0C05272D */ jal sfx_play_sound
/* 13C91C 802495DC 240400CA */ addiu $a0, $zero, 0xca
/* 13C920 802495E0 0C039E1B */ jal enforce_hpfp_limits
/* 13C924 802495E4 AE000000 */ sw $zero, ($s0)

View File

@ -177,7 +177,7 @@ glabel pause_stats_handle_input
/* 13A144 80246E04 304200FF */ andi $v0, $v0, 0xff
/* 13A148 80246E08 10470003 */ beq $v0, $a3, .L80246E18
/* 13A14C 80246E0C 00000000 */ nop
/* 13A150 80246E10 0C05272D */ jal play_sound
/* 13A150 80246E10 0C05272D */ jal sfx_play_sound
/* 13A154 80246E14 240400C7 */ addiu $a0, $zero, 0xc7
.L80246E18:
/* 13A158 80246E18 3C028011 */ lui $v0, %hi(gPlayerData)
@ -277,7 +277,7 @@ glabel pause_stats_handle_input
/* 13A2A4 80246F64 30634000 */ andi $v1, $v1, 0x4000
/* 13A2A8 80246F68 10600005 */ beqz $v1, .L80246F80
/* 13A2AC 80246F6C 00000000 */ nop
/* 13A2B0 80246F70 0C05272D */ jal play_sound
/* 13A2B0 80246F70 0C05272D */ jal sfx_play_sound
/* 13A2B4 80246F74 240400CA */ addiu $a0, $zero, 0xca
/* 13A2B8 80246F78 3C018027 */ lui $at, %hi(gPauseMenuCurrentTab)
/* 13A2BC 80246F7C A02000D4 */ sb $zero, %lo(gPauseMenuCurrentTab)($at)

View File

@ -44,13 +44,13 @@ glabel pause_items_handle_input
/* 13DBAC 8024A86C 24027FFE */ addiu $v0, $zero, 0x7ffe
/* 13DBB0 8024A870 14620005 */ bne $v1, $v0, .L8024A888
/* 13DBB4 8024A874 24020001 */ addiu $v0, $zero, 1
/* 13DBB8 8024A878 0C05272D */ jal play_sound
/* 13DBB8 8024A878 0C05272D */ jal sfx_play_sound
/* 13DBBC 8024A87C 2404021D */ addiu $a0, $zero, 0x21d
/* 13DBC0 8024A880 08092B11 */ j .L8024AC44
/* 13DBC4 8024A884 00000000 */ nop
.L8024A888:
/* 13DBC8 8024A888 AC820000 */ sw $v0, ($a0)
/* 13DBCC 8024A88C 0C05272D */ jal play_sound
/* 13DBCC 8024A88C 0C05272D */ jal sfx_play_sound
/* 13DBD0 8024A890 240400C9 */ addiu $a0, $zero, 0xc9
/* 13DBD4 8024A894 08092B11 */ j .L8024AC44
/* 13DBD8 8024A898 00000000 */ nop
@ -77,7 +77,7 @@ glabel pause_items_handle_input
/* 13DC24 8024A8E4 8E020000 */ lw $v0, ($s0)
/* 13DC28 8024A8E8 106200A0 */ beq $v1, $v0, .L8024AB6C
/* 13DC2C 8024A8EC 00000000 */ nop
/* 13DC30 8024A8F0 0C05272D */ jal play_sound
/* 13DC30 8024A8F0 0C05272D */ jal sfx_play_sound
/* 13DC34 8024A8F4 240400C8 */ addiu $a0, $zero, 0xc8
/* 13DC38 8024A8F8 8E040000 */ lw $a0, ($s0)
/* 13DC3C 8024A8FC 0C092937 */ jal pause_items_load_items
@ -238,7 +238,7 @@ glabel pause_items_handle_input
/* 13DE7C 8024AB3C 010A1021 */ addu $v0, $t0, $t2
/* 13DE80 8024AB40 10490003 */ beq $v0, $t1, .L8024AB50
/* 13DE84 8024AB44 AE020000 */ sw $v0, ($s0)
/* 13DE88 8024AB48 0C05272D */ jal play_sound
/* 13DE88 8024AB48 0C05272D */ jal sfx_play_sound
/* 13DE8C 8024AB4C 240400C7 */ addiu $a0, $zero, 0xc7
.L8024AB50:
/* 13DE90 8024AB50 8E020000 */ lw $v0, ($s0)
@ -299,14 +299,14 @@ glabel pause_items_handle_input
/* 13DF54 8024AC14 8E020000 */ lw $v0, ($s0)
/* 13DF58 8024AC18 14400007 */ bnez $v0, .L8024AC38
/* 13DF5C 8024AC1C 00000000 */ nop
/* 13DF60 8024AC20 0C05272D */ jal play_sound
/* 13DF60 8024AC20 0C05272D */ jal sfx_play_sound
/* 13DF64 8024AC24 240400CA */ addiu $a0, $zero, 0xca
/* 13DF68 8024AC28 3C018027 */ lui $at, %hi(gPauseMenuCurrentTab)
/* 13DF6C 8024AC2C A02000D4 */ sb $zero, %lo(gPauseMenuCurrentTab)($at)
/* 13DF70 8024AC30 08092B11 */ j .L8024AC44
/* 13DF74 8024AC34 00000000 */ nop
.L8024AC38:
/* 13DF78 8024AC38 0C05272D */ jal play_sound
/* 13DF78 8024AC38 0C05272D */ jal sfx_play_sound
/* 13DF7C 8024AC3C 240400CA */ addiu $a0, $zero, 0xca
/* 13DF80 8024AC40 AE000000 */ sw $zero, ($s0)
.L8024AC44:

View File

@ -45,7 +45,7 @@ glabel pause_partners_handle_input
.L8024C3C8:
/* 13F708 8024C3C8 1200002B */ beqz $s0, .L8024C478
/* 13F70C 8024C3CC 00000000 */ nop
/* 13F710 8024C3D0 0C05272D */ jal play_sound
/* 13F710 8024C3D0 0C05272D */ jal sfx_play_sound
/* 13F714 8024C3D4 240400C7 */ addiu $a0, $zero, 0xc7
/* 13F718 8024C3D8 3C048027 */ lui $a0, %hi(D_802706A0)
/* 13F71C 8024C3DC 248406A0 */ addiu $a0, $a0, %lo(D_802706A0)
@ -202,7 +202,7 @@ glabel pause_partners_handle_input
/* 13F944 8024C604 8C4206A4 */ lw $v0, %lo(D_802706A4)($v0)
/* 13F948 8024C608 10510003 */ beq $v0, $s1, .L8024C618
/* 13F94C 8024C60C 00000000 */ nop
/* 13F950 8024C610 0C05272D */ jal play_sound
/* 13F950 8024C610 0C05272D */ jal sfx_play_sound
/* 13F954 8024C614 240400C7 */ addiu $a0, $zero, 0xc7
.L8024C618:
/* 13F958 8024C618 3C028027 */ lui $v0, %hi(gPauseMenuPressedButtons)
@ -216,7 +216,7 @@ glabel pause_partners_handle_input
/* 13F978 8024C638 14400009 */ bnez $v0, .L8024C660
/* 13F97C 8024C63C 24020001 */ addiu $v0, $zero, 1
/* 13F980 8024C640 AC620000 */ sw $v0, ($v1)
/* 13F984 8024C644 0C05272D */ jal play_sound
/* 13F984 8024C644 0C05272D */ jal sfx_play_sound
/* 13F988 8024C648 240400C9 */ addiu $a0, $zero, 0xc9
/* 13F98C 8024C64C 24040024 */ addiu $a0, $zero, 0x24
/* 13F990 8024C650 0C051F9F */ jal set_window_update
@ -236,12 +236,12 @@ glabel pause_partners_handle_input
/* 13F9C4 8024C684 AC600000 */ sw $zero, ($v1)
/* 13F9C8 8024C688 3C018027 */ lui $at, %hi(gPauseMenuCurrentTab)
/* 13F9CC 8024C68C A02000D4 */ sb $zero, %lo(gPauseMenuCurrentTab)($at)
/* 13F9D0 8024C690 0C05272D */ jal play_sound
/* 13F9D0 8024C690 0C05272D */ jal sfx_play_sound
/* 13F9D4 8024C694 240400CA */ addiu $a0, $zero, 0xca
/* 13F9D8 8024C698 080931E4 */ j .L8024C790
/* 13F9DC 8024C69C 00000000 */ nop
.L8024C6A0:
/* 13F9E0 8024C6A0 0C05272D */ jal play_sound
/* 13F9E0 8024C6A0 0C05272D */ jal sfx_play_sound
/* 13F9E4 8024C6A4 240400CA */ addiu $a0, $zero, 0xca
/* 13F9E8 8024C6A8 24040024 */ addiu $a0, $zero, 0x24
/* 13F9EC 8024C6AC 0C051F9F */ jal set_window_update

View File

@ -216,7 +216,7 @@ glabel pause_spirits_handle_input
/* 140A9C 8024D75C 92020003 */ lbu $v0, 3($s0)
/* 140AA0 8024D760 10470003 */ beq $v0, $a3, .L8024D770
/* 140AA4 8024D764 00000000 */ nop
/* 140AA8 8024D768 0C05272D */ jal play_sound
/* 140AA8 8024D768 0C05272D */ jal sfx_play_sound
/* 140AAC 8024D76C 240400C7 */ addiu $a0, $zero, 0xc7
.L8024D770:
/* 140AB0 8024D770 3C028027 */ lui $v0, %hi(gPauseMenuPressedButtons)
@ -226,7 +226,7 @@ glabel pause_spirits_handle_input
/* 140AC0 8024D780 00000000 */ nop
/* 140AC4 8024D784 3C018027 */ lui $at, %hi(gPauseMenuCurrentTab)
/* 140AC8 8024D788 A02000D4 */ sb $zero, %lo(gPauseMenuCurrentTab)($at)
/* 140ACC 8024D78C 0C05272D */ jal play_sound
/* 140ACC 8024D78C 0C05272D */ jal sfx_play_sound
/* 140AD0 8024D790 240400CA */ addiu $a0, $zero, 0xca
/* 140AD4 8024D794 080935FC */ j .L8024D7F0
/* 140AD8 8024D798 00000000 */ nop

View File

@ -239,7 +239,7 @@ glabel pause_map_handle_input
/* 141F2C 8024EBEC 30424000 */ andi $v0, $v0, 0x4000
/* 141F30 8024EBF0 10400007 */ beqz $v0, .L8024EC10
/* 141F34 8024EBF4 2402FFFF */ addiu $v0, $zero, -1
/* 141F38 8024EBF8 0C05272D */ jal play_sound
/* 141F38 8024EBF8 0C05272D */ jal sfx_play_sound
/* 141F3C 8024EBFC 240400CA */ addiu $a0, $zero, 0xca
/* 141F40 8024EC00 3C018027 */ lui $at, %hi(gPauseMenuCurrentTab)
/* 141F44 8024EC04 A02000D4 */ sb $zero, %lo(gPauseMenuCurrentTab)($at)

View File

@ -174,7 +174,7 @@ glabel L80245C38_166498
/* 166518 80245CB8 304200FF */ andi $v0, $v0, 0xff
/* 16651C 80245CBC 10E20003 */ beq $a3, $v0, .L80245CCC
/* 166520 80245CC0 00000000 */ nop
/* 166524 80245CC4 0C05272D */ jal play_sound
/* 166524 80245CC4 0C05272D */ jal sfx_play_sound
/* 166528 80245CC8 24042101 */ addiu $a0, $zero, 0x2101
.L80245CCC:
/* 16652C 80245CCC 82620004 */ lb $v0, 4($s3)
@ -203,7 +203,7 @@ glabel L80245C38_166498
/* 166580 80245D20 904200AB */ lbu $v0, 0xab($v0)
/* 166584 80245D24 1082000D */ beq $a0, $v0, .L80245D5C
/* 166588 80245D28 00000000 */ nop
/* 16658C 80245D2C 0C05272D */ jal play_sound
/* 16658C 80245D2C 0C05272D */ jal sfx_play_sound
/* 166590 80245D30 240400C8 */ addiu $a0, $zero, 0xc8
/* 166594 80245D34 8E020000 */ lw $v0, ($s0)
/* 166598 80245D38 904200AB */ lbu $v0, 0xab($v0)
@ -314,7 +314,7 @@ glabel L80245DD0_166630
/* 166724 80245EC4 2404003B */ addiu $a0, $zero, 0x3b
/* 166728 80245EC8 0C051F9F */ jal set_window_update
/* 16672C 80245ECC 0200282D */ daddu $a1, $s0, $zero
/* 166730 80245ED0 0C05272D */ jal play_sound
/* 166730 80245ED0 0C05272D */ jal sfx_play_sound
/* 166734 80245ED4 240400C9 */ addiu $a0, $zero, 0xc9
/* 166738 80245ED8 0000282D */ daddu $a1, $zero, $zero
/* 16673C 80245EDC 00A0302D */ daddu $a2, $a1, $zero
@ -367,7 +367,7 @@ glabel L80245DD0_166630
/* 1667F4 80245F94 24A53754 */ addiu $a1, $a1, %lo(func_80243754)
/* 1667F8 80245F98 0C051F9F */ jal set_window_update
/* 1667FC 80245F9C 2404002D */ addiu $a0, $zero, 0x2d
/* 166800 80245FA0 0C05272D */ jal play_sound
/* 166800 80245FA0 0C05272D */ jal sfx_play_sound
/* 166804 80245FA4 240400D6 */ addiu $a0, $zero, 0xd6
/* 166808 80245FA8 0C00CD3C */ jal set_game_mode
/* 16680C 80245FAC 2404000F */ addiu $a0, $zero, 0xf
@ -376,14 +376,14 @@ glabel L80245DD0_166630
.L80245FB8:
/* 166818 80245FB8 14620005 */ bne $v1, $v0, .L80245FD0
/* 16681C 80245FBC 24020005 */ addiu $v0, $zero, 5
/* 166820 80245FC0 0C05272D */ jal play_sound
/* 166820 80245FC0 0C05272D */ jal sfx_play_sound
/* 166824 80245FC4 240400C9 */ addiu $a0, $zero, 0xc9
/* 166828 80245FC8 080917F9 */ j .L80245FE4
/* 16682C 80245FCC 24020001 */ addiu $v0, $zero, 1
.L80245FD0:
/* 166830 80245FD0 1462001B */ bne $v1, $v0, .L80246040
/* 166834 80245FD4 2C620004 */ sltiu $v0, $v1, 4
/* 166838 80245FD8 0C05272D */ jal play_sound
/* 166838 80245FD8 0C05272D */ jal sfx_play_sound
/* 16683C 80245FDC 240400C9 */ addiu $a0, $zero, 0xc9
/* 166840 80245FE0 24020003 */ addiu $v0, $zero, 3
.L80245FE4:
@ -413,7 +413,7 @@ glabel L80245DD0_166630
.L80246040:
/* 1668A0 80246040 10400229 */ beqz $v0, .L802468E8
/* 1668A4 80246044 00000000 */ nop
/* 1668A8 80246048 0C05272D */ jal play_sound
/* 1668A8 80246048 0C05272D */ jal sfx_play_sound
/* 1668AC 8024604C 240400C9 */ addiu $a0, $zero, 0xc9
/* 1668B0 80246050 2404002D */ addiu $a0, $zero, 0x2d
/* 1668B4 80246054 3C108024 */ lui $s0, %hi(func_80243898)
@ -455,7 +455,7 @@ glabel L80245DD0_166630
/* 166944 802460E4 24A53908 */ addiu $a1, $a1, %lo(func_80243908)
/* 166948 802460E8 0C051F9F */ jal set_window_update
/* 16694C 802460EC 24840038 */ addiu $a0, $a0, 0x38
/* 166950 802460F0 0C05272D */ jal play_sound
/* 166950 802460F0 0C05272D */ jal sfx_play_sound
/* 166954 802460F4 240400C9 */ addiu $a0, $zero, 0xc9
/* 166958 802460F8 24040032 */ addiu $a0, $zero, 0x32
/* 16695C 802460FC 0C051F9F */ jal set_window_update
@ -526,7 +526,7 @@ glabel L802461E8_166A48
/* 166A4C 802461EC 24020006 */ addiu $v0, $zero, 6
/* 166A50 802461F0 14620018 */ bne $v1, $v0, .L80246254
/* 166A54 802461F4 2C620004 */ sltiu $v0, $v1, 4
/* 166A58 802461F8 0C05272D */ jal play_sound
/* 166A58 802461F8 0C05272D */ jal sfx_play_sound
/* 166A5C 802461FC 240400C9 */ addiu $a0, $zero, 0xc9
/* 166A60 80246200 A2600004 */ sb $zero, 4($s3)
/* 166A64 80246204 3C058024 */ lui $a1, %hi(func_802433F4)
@ -558,7 +558,7 @@ glabel L802461E8_166A48
/* 166AC8 80246268 90227A24 */ lbu $v0, %lo(D_80077A24)($at)
/* 166ACC 8024626C 1040007F */ beqz $v0, .L8024646C
/* 166AD0 80246270 00000000 */ nop
/* 166AD4 80246274 0C05272D */ jal play_sound
/* 166AD4 80246274 0C05272D */ jal sfx_play_sound
/* 166AD8 80246278 240400C9 */ addiu $a0, $zero, 0xc9
/* 166ADC 8024627C 3C058024 */ lui $a1, %hi(func_80243CCC)
/* 166AE0 80246280 24A53CCC */ addiu $a1, $a1, %lo(func_80243CCC)
@ -630,7 +630,7 @@ glabel L80246370_166BD0
/* 166BD4 80246374 24020006 */ addiu $v0, $zero, 6
/* 166BD8 80246378 14620018 */ bne $v1, $v0, .L802463DC
/* 166BDC 8024637C 2C620004 */ sltiu $v0, $v1, 4
/* 166BE0 80246380 0C05272D */ jal play_sound
/* 166BE0 80246380 0C05272D */ jal sfx_play_sound
/* 166BE4 80246384 240400C9 */ addiu $a0, $zero, 0xc9
/* 166BE8 80246388 A2600004 */ sb $zero, 4($s3)
/* 166BEC 8024638C 3C058024 */ lui $a1, %hi(func_802433F4)
@ -662,7 +662,7 @@ glabel L80246370_166BD0
/* 166C50 802463F0 90227A24 */ lbu $v0, %lo(D_80077A24)($at)
/* 166C54 802463F4 1040001D */ beqz $v0, .L8024646C
/* 166C58 802463F8 00000000 */ nop
/* 166C5C 802463FC 0C05272D */ jal play_sound
/* 166C5C 802463FC 0C05272D */ jal sfx_play_sound
/* 166C60 80246400 240400C9 */ addiu $a0, $zero, 0xc9
/* 166C64 80246404 92630003 */ lbu $v1, 3($s3)
/* 166C68 80246408 24020004 */ addiu $v0, $zero, 4
@ -676,7 +676,7 @@ glabel L80246420_166C80
/* 166C84 80246424 24020006 */ addiu $v0, $zero, 6
/* 166C88 80246428 14620009 */ bne $v1, $v0, .L80246450
/* 166C8C 8024642C 2C620004 */ sltiu $v0, $v1, 4
/* 166C90 80246430 0C05272D */ jal play_sound
/* 166C90 80246430 0C05272D */ jal sfx_play_sound
/* 166C94 80246434 240400C9 */ addiu $a0, $zero, 0xc9
/* 166C98 80246438 24020003 */ addiu $v0, $zero, 3
/* 166C9C 8024643C A2620004 */ sb $v0, 4($s3)
@ -693,7 +693,7 @@ glabel L80246420_166C80
/* 166CC4 80246464 14430005 */ bne $v0, $v1, .L8024647C
/* 166CC8 80246468 00000000 */ nop
.L8024646C:
/* 166CCC 8024646C 0C05272D */ jal play_sound
/* 166CCC 8024646C 0C05272D */ jal sfx_play_sound
/* 166CD0 80246470 2404021D */ addiu $a0, $zero, 0x21d
/* 166CD4 80246474 08091A3A */ j .L802468E8
/* 166CD8 80246478 00000000 */ nop
@ -706,7 +706,7 @@ glabel L80246420_166C80
/* 166CF0 80246490 90227A24 */ lbu $v0, %lo(D_80077A24)($at)
/* 166CF4 80246494 14400066 */ bnez $v0, .L80246630
/* 166CF8 80246498 00000000 */ nop
/* 166CFC 8024649C 0C05272D */ jal play_sound
/* 166CFC 8024649C 0C05272D */ jal sfx_play_sound
/* 166D00 802464A0 240400C9 */ addiu $a0, $zero, 0xc9
/* 166D04 802464A4 24020002 */ addiu $v0, $zero, 2
/* 166D08 802464A8 3C018025 */ lui $at, %hi(D_8024C098)
@ -812,7 +812,7 @@ glabel L80246420_166C80
/* 166E88 80246628 08091A3A */ j .L802468E8
/* 166E8C 8024662C 00000000 */ nop
.L80246630:
/* 166E90 80246630 0C05272D */ jal play_sound
/* 166E90 80246630 0C05272D */ jal sfx_play_sound
/* 166E94 80246634 240400C9 */ addiu $a0, $zero, 0xc9
/* 166E98 80246638 3C058024 */ lui $a1, %hi(func_80243CCC)
/* 166E9C 8024663C 24A53CCC */ addiu $a1, $a1, %lo(func_80243CCC)
@ -884,7 +884,7 @@ glabel L8024672C_166F8C
/* 166F90 80246730 24020006 */ addiu $v0, $zero, 6
/* 166F94 80246734 14620007 */ bne $v1, $v0, .L80246754
/* 166F98 80246738 2C620004 */ sltiu $v0, $v1, 4
/* 166F9C 8024673C 0C05272D */ jal play_sound
/* 166F9C 8024673C 0C05272D */ jal sfx_play_sound
/* 166FA0 80246740 240400C9 */ addiu $a0, $zero, 0xc9
/* 166FA4 80246744 0C00CD3C */ jal set_game_mode
/* 166FA8 80246748 2404000D */ addiu $a0, $zero, 0xd
@ -901,7 +901,7 @@ glabel L8024672C_166F8C
/* 166FD0 80246770 26317A24 */ addiu $s1, $s1, %lo(D_80077A24)
/* 166FD4 80246774 1440001B */ bnez $v0, .L802467E4
/* 166FD8 80246778 00000000 */ nop
/* 166FDC 8024677C 0C05272D */ jal play_sound
/* 166FDC 8024677C 0C05272D */ jal sfx_play_sound
/* 166FE0 80246780 240400C9 */ addiu $a0, $zero, 0xc9
/* 166FE4 80246784 2404002C */ addiu $a0, $zero, 0x2c
/* 166FE8 80246788 3C058014 */ lui $a1, %hi(main_menu_window_update)
@ -928,7 +928,7 @@ glabel L8024672C_166F8C
/* 16703C 802467DC 08091A3A */ j .L802468E8
/* 167040 802467E0 A0500000 */ sb $s0, ($v0)
.L802467E4:
/* 167044 802467E4 0C05272D */ jal play_sound
/* 167044 802467E4 0C05272D */ jal sfx_play_sound
/* 167048 802467E8 240400C9 */ addiu $a0, $zero, 0xc9
/* 16704C 802467EC 3C058024 */ lui $a1, %hi(func_80243CCC)
/* 167050 802467F0 24A53CCC */ addiu $a1, $a1, %lo(func_80243CCC)
@ -1072,7 +1072,7 @@ glabel L80246960_1671C0
/* 167248 802469E8 24A53754 */ addiu $a1, $a1, %lo(func_80243754)
/* 16724C 802469EC 0C051F9F */ jal set_window_update
/* 167250 802469F0 2404002D */ addiu $a0, $zero, 0x2d
/* 167254 802469F4 0C05272D */ jal play_sound
/* 167254 802469F4 0C05272D */ jal sfx_play_sound
/* 167258 802469F8 240400D6 */ addiu $a0, $zero, 0xd6
/* 16725C 802469FC 08091AC2 */ j .L80246B08
/* 167260 80246A00 2404000F */ addiu $a0, $zero, 0xf
@ -1138,12 +1138,12 @@ glabel L80246ABC_16731C
/* 167344 80246AE4 0C090B65 */ jal func_80242D94
/* 167348 80246AE8 00052840 */ sll $a1, $a1, 1
.L80246AEC:
/* 16734C 80246AEC 0C05272D */ jal play_sound
/* 16734C 80246AEC 0C05272D */ jal sfx_play_sound
/* 167350 80246AF0 240400CA */ addiu $a0, $zero, 0xca
/* 167354 80246AF4 08091AC4 */ j .L80246B10
/* 167358 80246AF8 00000000 */ nop
glabel L80246AFC_16735C
/* 16735C 80246AFC 0C05272D */ jal play_sound
/* 16735C 80246AFC 0C05272D */ jal sfx_play_sound
/* 167360 80246B00 240400CA */ addiu $a0, $zero, 0xca
/* 167364 80246B04 2404000D */ addiu $a0, $zero, 0xd
.L80246B08:

View File

@ -62,7 +62,7 @@ glabel func_802471EC
/* 167B28 802472C8 304200FF */ andi $v0, $v0, 0xff
/* 167B2C 802472CC 10A20003 */ beq $a1, $v0, .L802472DC
/* 167B30 802472D0 00000000 */ nop
/* 167B34 802472D4 0C05272D */ jal play_sound
/* 167B34 802472D4 0C05272D */ jal sfx_play_sound
/* 167B38 802472D8 240400C7 */ addiu $a0, $zero, 0xc7
.L802472DC:
/* 167B3C 802472DC 3C108025 */ lui $s0, %hi(D_8024C084)
@ -85,7 +85,7 @@ glabel func_802471EC
/* 167B7C 8024731C 30428000 */ andi $v0, $v0, 0x8000
/* 167B80 80247320 10400225 */ beqz $v0, .L80247BB8
/* 167B84 80247324 00000000 */ nop
/* 167B88 80247328 0C05272D */ jal play_sound
/* 167B88 80247328 0C05272D */ jal sfx_play_sound
/* 167B8C 8024732C 240400C9 */ addiu $a0, $zero, 0xc9
/* 167B90 80247330 92430003 */ lbu $v1, 3($s2)
/* 167B94 80247334 10600005 */ beqz $v1, .L8024734C
@ -671,7 +671,7 @@ glabel L80247AF8_168358
/* 168420 80247BC0 30424000 */ andi $v0, $v0, 0x4000
/* 168424 80247BC4 1040004D */ beqz $v0, .L80247CFC
/* 168428 80247BC8 00000000 */ nop
/* 16842C 80247BCC 0C05272D */ jal play_sound
/* 16842C 80247BCC 0C05272D */ jal sfx_play_sound
/* 168430 80247BD0 240400CA */ addiu $a0, $zero, 0xca
/* 168434 80247BD4 0240202D */ daddu $a0, $s2, $zero
/* 168438 80247BD8 0000282D */ daddu $a1, $zero, $zero

View File

@ -139,7 +139,7 @@ glabel func_80248BF4
/* 169644 80248DE4 304200FF */ andi $v0, $v0, 0xff
/* 169648 80248DE8 10A20003 */ beq $a1, $v0, .L80248DF8
/* 16964C 80248DEC 00000000 */ nop
/* 169650 80248DF0 0C05272D */ jal play_sound
/* 169650 80248DF0 0C05272D */ jal sfx_play_sound
/* 169654 80248DF4 24042102 */ addiu $a0, $zero, 0x2102
.L80248DF8:
/* 169658 80248DF8 3C028025 */ lui $v0, %hi(D_8024C084)
@ -158,7 +158,7 @@ glabel func_80248BF4
/* 16968C 80248E2C 00400008 */ jr $v0
/* 169690 80248E30 00000000 */ nop
glabel L80248E34_169694
/* 169694 80248E34 0C05272D */ jal play_sound
/* 169694 80248E34 0C05272D */ jal sfx_play_sound
/* 169698 80248E38 24042103 */ addiu $a0, $zero, 0x2103
/* 16969C 80248E3C 3C048025 */ lui $a0, %hi(D_8024C090)
/* 1696A0 80248E40 2484C090 */ addiu $a0, $a0, %lo(D_8024C090)
@ -176,7 +176,7 @@ glabel L80248E64_1696C4
/* 1696C8 80248E68 24110001 */ addiu $s1, $zero, 1
/* 1696CC 80248E6C 10510071 */ beq $v0, $s1, L80249034_169894
/* 1696D0 80248E70 00000000 */ nop
/* 1696D4 80248E74 0C05272D */ jal play_sound
/* 1696D4 80248E74 0C05272D */ jal sfx_play_sound
/* 1696D8 80248E78 24042105 */ addiu $a0, $zero, 0x2105
/* 1696DC 80248E7C 82050001 */ lb $a1, 1($s0)
/* 1696E0 80248E80 82060002 */ lb $a2, 2($s0)
@ -187,7 +187,7 @@ glabel L80248E90_1696F0
/* 1696F0 80248E90 82020004 */ lb $v0, 4($s0)
/* 1696F4 80248E94 10400067 */ beqz $v0, L80249034_169894
/* 1696F8 80248E98 00000000 */ nop
/* 1696FC 80248E9C 0C05272D */ jal play_sound
/* 1696FC 80248E9C 0C05272D */ jal sfx_play_sound
/* 169700 80248EA0 24042105 */ addiu $a0, $zero, 0x2105
/* 169704 80248EA4 82050001 */ lb $a1, 1($s0)
/* 169708 80248EA8 82060002 */ lb $a2, 2($s0)
@ -220,12 +220,12 @@ glabel L80248ED4_169734
.L80248F08:
/* 169768 80248F08 14620005 */ bne $v1, $v0, .L80248F20
/* 16976C 80248F0C 00000000 */ nop
/* 169770 80248F10 0C05272D */ jal play_sound
/* 169770 80248F10 0C05272D */ jal sfx_play_sound
/* 169774 80248F14 2404021D */ addiu $a0, $zero, 0x21d
/* 169778 80248F18 0809240D */ j L80249034_169894
/* 16977C 80248F1C 00000000 */ nop
.L80248F20:
/* 169780 80248F20 0C05272D */ jal play_sound
/* 169780 80248F20 0C05272D */ jal sfx_play_sound
/* 169784 80248F24 240400C9 */ addiu $a0, $zero, 0xc9
/* 169788 80248F28 3C058024 */ lui $a1, %hi(func_80243CCC)
/* 16978C 80248F2C 24A53CCC */ addiu $a1, $a1, %lo(func_80243CCC)
@ -272,7 +272,7 @@ glabel L80248ED4_169734
/* 169828 80248FC8 080924B9 */ j .L802492E4
/* 16982C 80248FCC 2403004E */ addiu $v1, $zero, 0x4e
.L80248FD0:
/* 169830 80248FD0 0C05272D */ jal play_sound
/* 169830 80248FD0 0C05272D */ jal sfx_play_sound
/* 169834 80248FD4 24042103 */ addiu $a0, $zero, 0x2103
/* 169838 80248FD8 3C048025 */ lui $a0, %hi(D_8024C090)
/* 16983C 80248FDC 2484C090 */ addiu $a0, $a0, %lo(D_8024C090)
@ -327,7 +327,7 @@ glabel L80249034_169894
/* 1698F0 80249090 14620048 */ bne $v1, $v0, .L802491B4
/* 1698F4 80249094 00000000 */ nop
.L80249098:
/* 1698F8 80249098 0C05272D */ jal play_sound
/* 1698F8 80249098 0C05272D */ jal sfx_play_sound
/* 1698FC 8024909C 24042104 */ addiu $a0, $zero, 0x2104
/* 169900 802490A0 3C038025 */ lui $v1, %hi(D_8024C090)
/* 169904 802490A4 2463C090 */ addiu $v1, $v1, %lo(D_8024C090)
@ -422,12 +422,12 @@ glabel L80249034_169894
.L802491F8:
/* 169A58 802491F8 14620005 */ bne $v1, $v0, .L80249210
/* 169A5C 802491FC 00000000 */ nop
/* 169A60 80249200 0C05272D */ jal play_sound
/* 169A60 80249200 0C05272D */ jal sfx_play_sound
/* 169A64 80249204 2404021D */ addiu $a0, $zero, 0x21d
/* 169A68 80249208 080924C4 */ j .L80249310
/* 169A6C 8024920C 00000000 */ nop
.L80249210:
/* 169A70 80249210 0C05272D */ jal play_sound
/* 169A70 80249210 0C05272D */ jal sfx_play_sound
/* 169A74 80249214 240400C9 */ addiu $a0, $zero, 0xc9
/* 169A78 80249218 3C058024 */ lui $a1, %hi(func_80243CCC)
/* 169A7C 8024921C 24A53CCC */ addiu $a1, $a1, %lo(func_80243CCC)

View File

@ -464,7 +464,7 @@ glabel func_80244008
/* 172F8C 802446AC 0000202D */ daddu $a0, $zero, $zero
/* 172F90 802446B0 2405FFFF */ addiu $a1, $zero, -1
/* 172F94 802446B4 0080302D */ daddu $a2, $a0, $zero
/* 172F98 802446B8 0C052A46 */ jal set_music_track
/* 172F98 802446B8 0C052A46 */ jal bgm_set_song
/* 172F9C 802446BC 240705DC */ addiu $a3, $zero, 0x5dc
/* 172FA0 802446C0 080911B3 */ j .L802446CC
/* 172FA4 802446C4 24040020 */ addiu $a0, $zero, 0x20

View File

@ -211,7 +211,7 @@ glabel func_80244710
/* 1732E8 80244A08 0000202D */ daddu $a0, $zero, $zero
/* 1732EC 80244A0C 2405FFFF */ addiu $a1, $zero, -1
/* 1732F0 80244A10 0080302D */ daddu $a2, $a0, $zero
/* 1732F4 80244A14 0C052A46 */ jal set_music_track
/* 1732F4 80244A14 0C052A46 */ jal bgm_set_song
/* 1732F8 80244A18 240705DC */ addiu $a3, $zero, 0x5dc
.L80244A1C:
/* 1732FC 80244A1C 0C090464 */ jal func_80241190

View File

@ -48,7 +48,7 @@ glabel func_80245440
/* 173DC4 802454E4 24020007 */ addiu $v0, $zero, 7
/* 173DC8 802454E8 14620008 */ bne $v1, $v0, .L8024550C
/* 173DCC 802454EC 00000000 */ nop
/* 173DD0 802454F0 0C05272D */ jal play_sound
/* 173DD0 802454F0 0C05272D */ jal sfx_play_sound
/* 173DD4 802454F4 240400E7 */ addiu $a0, $zero, 0xe7
/* 173DD8 802454F8 8E030228 */ lw $v1, 0x228($s0)
/* 173DDC 802454FC 8C620000 */ lw $v0, ($v1)
@ -156,7 +156,7 @@ glabel func_80245440
/* 173F58 80245678 0000202D */ daddu $a0, $zero, $zero
/* 173F5C 8024567C 2405FFFF */ addiu $a1, $zero, -1
/* 173F60 80245680 0080302D */ daddu $a2, $a0, $zero
/* 173F64 80245684 0C052A46 */ jal set_music_track
/* 173F64 80245684 0C052A46 */ jal bgm_set_song
/* 173F68 80245688 240705DC */ addiu $a3, $zero, 0x5dc
.L8024568C:
/* 173F6C 8024568C 0C090464 */ jal func_80241190

View File

@ -206,7 +206,7 @@ glabel update_heroes_start_turn
/* 170C14 80242334 0C01C70C */ jal func_80071C30
/* 170C18 80242338 AFB00014 */ sw $s0, 0x14($sp)
/* 170C1C 8024233C 24040299 */ addiu $a0, $zero, 0x299
/* 170C20 80242340 0C05272D */ jal play_sound
/* 170C20 80242340 0C05272D */ jal sfx_play_sound
/* 170C24 80242344 AE6000A0 */ sw $zero, 0xa0($s3)
/* 170C28 80242348 24040027 */ addiu $a0, $zero, 0x27
/* 170C2C 8024234C 0C093E58 */ jal show_battle_message
@ -519,7 +519,7 @@ glabel update_heroes_start_turn
/* 171078 80242798 82230210 */ lb $v1, 0x210($s1)
/* 17107C 8024279C 14620009 */ bne $v1, $v0, .L802427C4
/* 171080 802427A0 24040031 */ addiu $a0, $zero, 0x31
/* 171084 802427A4 0C05272D */ jal play_sound
/* 171084 802427A4 0C05272D */ jal sfx_play_sound
/* 171088 802427A8 240400E7 */ addiu $a0, $zero, 0xe7
/* 17108C 802427AC 8E230228 */ lw $v1, 0x228($s1)
/* 171090 802427B0 8C620000 */ lw $v0, ($v1)

View File

@ -430,7 +430,7 @@ glabel L802470F4_1759D4
/* 1759E4 80247104 3C01800E */ lui $at, %hi(gBattleStatus+0x46C)
/* 1759E8 80247108 AC22C4DC */ sw $v0, %lo(gBattleStatus+0x46C)($at)
.L8024710C:
/* 1759EC 8024710C 0C05272D */ jal play_sound
/* 1759EC 8024710C 0C05272D */ jal sfx_play_sound
/* 1759F0 80247110 24042107 */ addiu $a0, $zero, 0x2107
/* 1759F4 80247114 0200202D */ daddu $a0, $s0, $zero
/* 1759F8 80247118 0C093E58 */ jal show_battle_message

View File

@ -516,7 +516,7 @@ glabel L802461CC_174AAC
/* 174ABC 802461DC 3C01800E */ lui $at, %hi(gBattleStatus+0x46C)
/* 174AC0 802461E0 AC22C4DC */ sw $v0, %lo(gBattleStatus+0x46C)($at)
.L802461E4:
/* 174AC4 802461E4 0C05272D */ jal play_sound
/* 174AC4 802461E4 0C05272D */ jal sfx_play_sound
/* 174AC8 802461E8 24042107 */ addiu $a0, $zero, 0x2107
/* 174ACC 802461EC 0200202D */ daddu $a0, $s0, $zero
/* 174AD0 802461F0 0C093E58 */ jal show_battle_message

View File

@ -215,7 +215,7 @@ glabel update_run_away
/* 173AF4 80245214 00828023 */ subu $s0, $a0, $v0
/* 173AF8 80245218 1A000003 */ blez $s0, .L80245228
/* 173AFC 8024521C A2230078 */ sb $v1, 0x78($s1)
/* 173B00 80245220 0C05272D */ jal play_sound
/* 173B00 80245220 0C05272D */ jal sfx_play_sound
/* 173B04 80245224 24040211 */ addiu $a0, $zero, 0x211
.L80245228:
/* 173B08 80245228 92A20010 */ lbu $v0, 0x10($s5)
@ -279,7 +279,7 @@ glabel update_run_away
/* 173BDC 802452FC 0000202D */ daddu $a0, $zero, $zero
/* 173BE0 80245300 2405FFFF */ addiu $a1, $zero, -1
/* 173BE4 80245304 0080302D */ daddu $a2, $a0, $zero
/* 173BE8 80245308 0C052A46 */ jal set_music_track
/* 173BE8 80245308 0C052A46 */ jal bgm_set_song
/* 173BEC 8024530C 240705DC */ addiu $a3, $zero, 0x5dc
.L80245310:
/* 173BF0 80245310 0C090464 */ jal func_80241190

Some files were not shown because too many files have changed in this diff Show More