mirror of
https://github.com/zeldaret/oot
synced 2026-08-22 06:44:46 -04:00
code_800F7260 (#433)
* Split code_800F7260 * More function splits, migrate rodata * Initial progress * Small progress * More substantial progress, finally figured out structs * 2 functions left * Move prototypes to functions.h * Remove unused asm, move most externs to variables.h * Fix merge * Ran formatter * Brackets to avoid && & Co-authored-by: krimtonz <33664508+krimtonz@users.noreply.github.com> * More variables to variables.h * Braces around early return Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * ARRAY_COUNT in sBankSizes and remove unnecessary temp vars Co-authored-by: krimtonz <33664508+krimtonz@users.noreply.github.com> Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
This commit is contained in:
+36
-31
@@ -2136,7 +2136,7 @@ void func_800E4FB0(void);
|
||||
// ? func_800E5A8C(?);
|
||||
// ? func_800E5AD8(?);
|
||||
// ? func_800E5AFC(?);
|
||||
// ? func_800E5B20(?);
|
||||
void func_800E5B20(u32, s8);
|
||||
// ? func_800E5B50(?);
|
||||
// ? func_800E5B80(?);
|
||||
// ? func_800E5C10(?);
|
||||
@@ -2152,7 +2152,7 @@ void func_800E4FB0(void);
|
||||
// ? func_800E6300(?);
|
||||
// ? func_800E6680(?);
|
||||
// ? func_800E66C0(?);
|
||||
// ? func_800E67C0(?);
|
||||
s32 Audio_NextRandom(void);
|
||||
// ? func_800E6818(?);
|
||||
// ? func_800E6840(?);
|
||||
void func_800E6880(void* mem, s32 size);
|
||||
@@ -2247,7 +2247,7 @@ void func_800ED858(u8);
|
||||
// ? func_800F28B4(?);
|
||||
// ? func_800F29FC(?);
|
||||
// ? func_800F2A04(?);
|
||||
// ? func_800F2D6C(?);
|
||||
void func_800F2D6C(u8*, u16);
|
||||
// ? func_800F2E28(?);
|
||||
// ? func_800F3054(?);
|
||||
// ? func_800F3188(?);
|
||||
@@ -2256,7 +2256,7 @@ void func_800ED858(u8);
|
||||
// ? func_800F35EC(?);
|
||||
// ? func_800F37B8(?);
|
||||
// ? func_800F3990(?);
|
||||
// ? func_800F3A08(?);
|
||||
void func_800F3A08(u8, u8, u8);
|
||||
// ? func_800F3ED4(?);
|
||||
void func_800F3F3C(u8);
|
||||
// ? func_800F3F84(?);
|
||||
@@ -2313,36 +2313,41 @@ void func_800F711C();
|
||||
// ? func_800F7170(?);
|
||||
// ? func_800F71BC(?);
|
||||
void func_800F7260(u16);
|
||||
// ? func_800F72B8(?);
|
||||
// ? func_800F731C(?);
|
||||
void Audio_PlaySoundGeneral(u16 sfxId, Vec3f* a1, u32 a2, u32* a3, u32* a4, u32* a5);
|
||||
void func_800F72B8(u8);
|
||||
void func_800F731C(u8);
|
||||
void Audio_PlaySoundGeneral(u16 sfxId, Vec3f* a1, u8 a2, u32* a3, u32* a4, u32* a5);
|
||||
// ? func_800F74E0(?);
|
||||
// ? func_800F7680(?);
|
||||
// ? func_800F7B54(?);
|
||||
// ? func_800F7CEC(?);
|
||||
// ? func_800F8480(?);
|
||||
// ? func_800F87A0(?);
|
||||
// ? func_800F8884(?);
|
||||
void func_800F7680(void);
|
||||
void func_800F7B54(u8, u8);
|
||||
void func_800F7CEC(u8);
|
||||
void func_800F8480(u8);
|
||||
void func_800F87A0(u8);
|
||||
void func_800F8884(u8, Vec3f*);
|
||||
void func_800F89A0(u8, Vec3f*);
|
||||
void func_800F89E8(Vec3f*);
|
||||
void func_800F8D04(u16 arg0);
|
||||
// ? func_800F8D04(?);
|
||||
// ? func_800F8E3C(?);
|
||||
// ? func_800F8F34(?);
|
||||
// ? func_800F8F88(?);
|
||||
// ? func_800F8FF4(?);
|
||||
// ? func_800F905C(?);
|
||||
void func_800F8A44(Vec3f*, u16);
|
||||
void func_800F8BA0(u8, u16);
|
||||
void func_800F8D04(u32 sfxId);
|
||||
void func_800F8E3C(void);
|
||||
void func_800F8EA0(u8, u8, u16);
|
||||
void func_800F8F34(u8);
|
||||
void func_800F8F88(void);
|
||||
u8 func_800F8FF4(u32 sfxId);
|
||||
void func_800F905C(void);
|
||||
// ? func_800F9280(?);
|
||||
// ? func_800F9474(?);
|
||||
// ? func_800F94FC(?);
|
||||
void Audio_SetBGM(u32 bgmID);
|
||||
// ? func_800FA034(?);
|
||||
u16 func_800FA0B4(s32 a0);
|
||||
// ? func_800FA11C(?);
|
||||
// ? func_800FA240(?);
|
||||
// ? func_800FA3DC(?);
|
||||
// ? func_800FAD34(?);
|
||||
// ? func_800FADF8(?);
|
||||
// ? func_800FAEB4(?);
|
||||
void func_800F9474(u8, u16);
|
||||
void func_800F94FC(u32);
|
||||
void Audio_SetBGM(u32 bgmId);
|
||||
void func_800FA034(void);
|
||||
u16 func_800FA0B4(u8 a0);
|
||||
s32 func_800FA11C(u32, s32);
|
||||
void func_800FA174(u8);
|
||||
void func_800FA18C(u8, u8);
|
||||
void func_800FA240(u8, u8, u8, u8);
|
||||
void func_800FA3DC(void);
|
||||
u8 func_800FAD34(void);
|
||||
void func_800FADF8(void);
|
||||
void func_800FAEB4(void);
|
||||
void GfxPrint_InitDlist(GfxPrint*);
|
||||
void GfxPrint_SetColor(GfxPrint*, u32, u32, u32, u32);
|
||||
void GfxPrint_SetPosPx(GfxPrint*, s32, s32);
|
||||
|
||||
+33
-24
@@ -612,8 +612,9 @@ extern s16 D_80130328[];
|
||||
//extern ? D_80130500;
|
||||
extern f32 D_80130510;
|
||||
extern s32 D_80130514;
|
||||
//extern ? D_80130570;
|
||||
//extern ? D_80130578;
|
||||
extern u8 D_80130570[8];
|
||||
extern u8 D_80130578[4][7];
|
||||
extern u8 D_80130594[4][7];
|
||||
//extern ? D_801305B0;
|
||||
//extern ? D_801305B4;
|
||||
//extern ? D_801305B8;
|
||||
@@ -752,22 +753,23 @@ extern u8* gScarecrowSpawnSongPtr;
|
||||
//extern ? D_80131F68;
|
||||
//extern ? D_80131F6C;
|
||||
//extern ? D_8013331C;
|
||||
//extern ? D_80133340;
|
||||
extern u8 D_80133340[4];
|
||||
//extern ? D_80133344;
|
||||
//extern ? D_80133390;
|
||||
//extern ? D_80133398;
|
||||
//extern ? D_801333A0;
|
||||
//extern ? D_801333A4;
|
||||
//extern ? D_801333A8;
|
||||
//extern ? D_801333C4;
|
||||
//extern ? D_801333CC;
|
||||
//extern ? D_801333D0;
|
||||
extern s32 D_8013338C;
|
||||
extern UNK_TYPE D_80133390[];
|
||||
extern UNK_TYPE D_80133398[];
|
||||
extern u8 D_801333A0;
|
||||
extern u8 D_801333A4;
|
||||
extern SoundBankEntry* gSoundBanks[7];
|
||||
extern u8 sBankSizes[7];
|
||||
extern u8 D_801333CC;
|
||||
extern u16 D_801333D0;
|
||||
extern Vec3f D_801333D4;
|
||||
extern u32 D_801333E0;
|
||||
extern u32 D_801333E8;
|
||||
//extern ? D_801333F0;
|
||||
//extern ? D_801333F4;
|
||||
//extern ? D_801333F8;
|
||||
extern f32 D_801333E0;
|
||||
extern f32 D_801333E8;
|
||||
extern u8 D_801333F0;
|
||||
extern u8 D_801333F4;
|
||||
extern u8 D_801333F8;
|
||||
//extern ? D_80133400;
|
||||
//extern ? D_80133404;
|
||||
//extern ? D_80133408;
|
||||
@@ -3529,17 +3531,24 @@ extern FaultThreadStruct gFaultStruct;
|
||||
//extern ? D_8016BAB8;
|
||||
//extern ? D_8016BABC;
|
||||
//extern ? D_8016BAC0;
|
||||
extern SoundBankEntry D_8016BAD0[9];
|
||||
extern SoundBankEntry D_8016BC80[12];
|
||||
extern SoundBankEntry D_8016BEC0[22];
|
||||
extern SoundBankEntry D_8016C2E0[20];
|
||||
extern SoundBankEntry D_8016C6A0[8];
|
||||
extern SoundBankEntry D_8016C820[3];
|
||||
extern SoundBankEntry D_8016C8B0[5];
|
||||
//extern ? D_8016C9A0;
|
||||
//extern ? D_8016E1A0;
|
||||
//extern ? D_8016E1A8;
|
||||
//extern ? D_8016E1B0;
|
||||
extern u8 D_8016E1A0[7];
|
||||
extern u8 D_8016E1A8[7];
|
||||
extern u8 D_8016E1B0[7];
|
||||
//extern ? D_8016E1B8;
|
||||
//extern ? D_8016E260;
|
||||
//extern ? D_8016E264;
|
||||
extern u8 D_8016E260;
|
||||
extern u8 D_8016E264[];
|
||||
//extern ? D_8016E270;
|
||||
//extern ? D_8016E2E0;
|
||||
//extern ? D_8016E2F8;
|
||||
//extern ? D_8016E310;
|
||||
extern u16 D_8016E2E0[];
|
||||
extern u16 D_8016E2F8[];
|
||||
extern u8 D_8016E310[];
|
||||
//extern ? D_8016E320;
|
||||
//extern ? D_8016E348;
|
||||
//extern ? D_8016E350;
|
||||
|
||||
@@ -742,4 +742,47 @@ typedef struct {
|
||||
/* 0x16 */ u16 unk_16;
|
||||
} Reverb; // size >= 0x18
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ f32* posX;
|
||||
/* 0x04 */ f32* posY;
|
||||
/* 0x08 */ f32* posZ;
|
||||
/* 0x0C */ u8 unk_C;
|
||||
/* 0x10 */ u32* unk_10;
|
||||
/* 0x14 */ u32* unk_14;
|
||||
/* 0x18 */ u32* unk_18;
|
||||
/* 0x1C */ f32 unk_1C;
|
||||
/* 0x20 */ u32 unk_20;
|
||||
/* 0x24 */ u8 unk_24;
|
||||
/* 0x26 */ u16 unk_26;
|
||||
/* 0x28 */ u16 unk_28; // "flag"
|
||||
/* 0x2A */ u8 unk_2A;
|
||||
/* 0x2B */ u8 unk_2B;
|
||||
/* 0x2C */ u8 prev; // prev bank index
|
||||
/* 0x2D */ u8 next; // next bank index
|
||||
/* 0x2E */ u8 unk_2E;
|
||||
/* 0x2F */ u8 unk_2F;
|
||||
} SoundBankEntry; // size = 0x30
|
||||
|
||||
/*
|
||||
* SFX IDs
|
||||
*
|
||||
* index 0000000111111111 observed in audio code
|
||||
* & 200 0000001000000000 single bit
|
||||
* & 400 0000010000000000 single bit
|
||||
* & 800 0000100000000000 single bit, what we currently call SFX_FLAG
|
||||
* & 600 0000011000000000 2 bits
|
||||
* & A00 0000101000000000 2 bits
|
||||
* & C00 0000110000000000 2 bits, observed in audio code
|
||||
* & E00 0000111000000000 all 3 bits
|
||||
* bank 1111000000000000 observed in audio code
|
||||
*
|
||||
*/
|
||||
|
||||
#define SFX_BANK_SHIFT(sfxId) ((sfxId >> 0xC) & 0xFF)
|
||||
|
||||
#define SFX_BANK_MASK(sfxId) (sfxId & 0xF000)
|
||||
|
||||
#define SFX_INDEX(sfxId) (sfxId & 0x01FF)
|
||||
#define SFX_BANK(sfxId) SFX_BANK_SHIFT(SFX_BANK_MASK(sfxId))
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user