1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-10-17 04:00:51 +00: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:
Tharo 2020-10-26 11:58:56 +00:00 committed by GitHub
commit 695552f0b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 751 additions and 1555 deletions

View file

@ -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