En_Gakufu OK and Documented + Related Audio Functions (#662)

* Gakufu OK, copy progress from audio WIP

* Extraction

* import wip in prep for audio data import

* Add in `code_8019AF00.c` functions

* Finish docs

* Spacing

* Add enum

* Many PR suggestions

* Another enum

* PR Suggestions

* Fix bss

* Move comment higher

* Fix bss

Co-authored-by: angie <angheloalf95@gmail.com>
This commit is contained in:
engineer124
2022-03-28 01:52:43 +11:00
committed by GitHub
parent 928acac500
commit 02cb971616
13 changed files with 488 additions and 101 deletions
+9 -9
View File
@@ -3383,7 +3383,7 @@ void Audio_QueueCmdS8(u32 opArgs, s8 data);
// void func_80194528(void);
// void func_80194548(void);
// void func_80194568(void);
// void func_80194668(void);
u32 Audio_NextRandom(void);
void Audio_InitMesgQueues(void);
void Audio_InvalDCache(void* buf, size_t size);
void Audio_WritebackDCache(void* buf, size_t size);
@@ -3455,13 +3455,13 @@ void func_8019AEC0(UNK_PTR param_1, UNK_PTR param_2);
// void func_8019AF58(void);
// void func_8019AFE8(void);
// void func_8019B02C(void);
// void func_8019B074(void);
// void AudioOcarina_MapSongFromNotesToButtons(void);
// void func_8019B144(void);
// void func_8019B378(void);
// void func_8019B38C(void);
// void func_8019B3D0(void);
// void func_8019B4B8(void);
void func_8019B544(u16 arg0);
void AudioOcarina_StartDefault(u32 arg0);
// void func_8019B568(void);
// void func_8019B5AC(void);
// void func_8019B5EC(void);
@@ -3473,7 +3473,7 @@ void func_8019B544(u16 arg0);
// void func_8019C1D0(void);
// void func_8019C268(void);
// void func_8019C2E4(void);
void func_8019C300(s32 arg0);
u32 AudioOcarina_SetInstrumentId(u8 arg0);
// void func_8019C398(void);
// void func_8019C5A0(void);
// void func_8019C8D8(void);
@@ -3483,12 +3483,12 @@ void func_8019C300(s32 arg0);
// void func_8019CEBC(void);
// void func_8019CF6C(void);
// void func_8019CF78(void);
// void func_8019CF9C(void);
OcarinaStaff* AudioOcarina_GetPlaybackStaff(void);
// void func_8019CFA8(void);
// void func_8019D134(void);
// void func_8019D26C(void);
// void func_8019D488(void);
// void func_8019D4F8(void);
// void AudioOcarina_TerminaWallValidateNotes(void);
void AudioOcarina_TerminaWallGenerateNotes(void);
// void AudioOcarina_MemoryGameSetNumNotes(void);
// void AudioOcarina_MemoryGameGenerateNotes(void);
// void func_8019D600(void);
void func_8019D758(void);
// void func_8019D864(void);
+1 -1
View File
@@ -1774,7 +1774,7 @@ extern UNK_PTR D_801D88A0;
extern UNK_PTR D_801D88A4;
// extern UNK_TYPE1 D_801D88A8;
// extern UNK_TYPE1 D_801D88B8;
// extern UNK_TYPE1 D_801D8A48;
extern OcarinaSongButtons gOcarinaSongButtons[24];
// extern UNK_TYPE1 D_801D8B20;
extern UNK_PTR D_801D8B24;
// extern UNK_TYPE2 D_801D8B28;
+6 -6
View File
@@ -39,7 +39,7 @@ typedef enum {
/* 3 */ OCARINA_BTN_C_LEFT,
/* 4 */ OCARINA_BTN_C_UP,
/* -1 */ OCARINA_BTN_INVALID = 0xFF
} OcarinaButtonIdx;
} OcarinaButtonIndex;
// Uses scientific pitch notation relative to middle C
// https://en.wikipedia.org/wiki/Scientific_pitch_notation
@@ -93,7 +93,7 @@ typedef enum {
/**
* BFlat4Flag Note:
* Flag for resolving whether (noteIdx = NOTE_BFLAT4)
* Flag for resolving whether (pitch = OCARINA_PITCH_BFLAT4)
* gets mapped to either C_RIGHT and C_LEFT
*
* This is required as C_RIGHT and C_LEFT are the only notes
@@ -103,21 +103,21 @@ typedef enum {
*/
typedef struct {
/* 0x0 */ u8 noteIdx; // number of semitones above middle C
/* 0x0 */ u8 pitch; // number of semitones above middle C
/* 0x2 */ u16 length; // number of frames the note is sustained
/* 0x4 */ u8 volume;
/* 0x5 */ u8 vibrato;
/* 0x6 */ s8 bend; // frequency multiplicative offset from the pitch defined by noteIdx
/* 0x6 */ s8 bend; // frequency multiplicative offset from the pitch defined by pitch
/* 0x7 */ u8 BFlat4Flag; // See note above
} OcarinaNote; // size = 0x8
typedef struct {
/* 0x0 */ u8 numButtons;
/* 0x1 */ u8 buttonIdx[8];
/* 0x1 */ u8 buttonIndex[8];
} OcarinaSongButtons; // size = 0x9
typedef struct {
/* 0x0 */ u8 buttonIdx;
/* 0x0 */ u8 buttonIndex;
/* 0x1 */ u8 state; // original name: "status"
/* 0x2 */ u8 pos; // original name: "locate"
} OcarinaStaff; // size = 0x3