summaryrefslogtreecommitdiff
path: root/src/code
diff options
context:
space:
mode:
authorengineer124 <47598039+engineer124@users.noreply.github.com>2023-11-17 12:29:42 +1100
committerGitHub <noreply@github.com>2023-11-17 12:29:42 +1100
commit8ab62788b2ad7d8f5c2b556b2416f06c29b6f5be (patch)
tree990393fd382fdd80e72f94dc889f81a638612263 /src/code
parent61e2f12cf5d6e797b3971acfc3689ae758c4149a (diff)
Audio Voice Decompiled (#1490)
* Add Tharo's documentation comments * Voice progress * Match osVoiceControlGain * Match osVoiceStartReadData * Cleanup * Add docs from n64devkit * WIP on osVoiceGetReadData * Add comment * Match voiceinit.c * Remove CONT_ERR, already present in controller.h * Really close to matching osVoiceStopReadData * Progress on voicecheckword * Match osVoiceSetWord * Add error codes * Matched __osVoiceContRead2... Somehow... * Add small amount of docs * __osVoiceContRead36 was basically identical from __osVoiceContRead2 * docs, but maybe a little carried away * Match __osVoiceContWrite4, Write is very similar to Read * Match __osVoiceContWrite20 from __osVoiceContWrite4, ez * Some docs * Improve osVoiceGetReadData * Match osVoiceCheckWord * currentSyllable -> currSyllable * Match osVoiceMaskDictionary * Match __osVoiceSetADConverter * Meme matched osVoiceStopReadData * small cleanup * Missed macros * osVoiceGetReadData Meme Match * Small clean-up * format * Properly split voice files from code * Use proper flags for voice files * Add basic docs for func_801A5AF0 * Import Voice Data * Update matching functions in code_801A51F0 from audio WIP * Update matching functions in code_801A4EB0 from audio WIP * Match func_801A5A1C * Match func_801A5228 * Match func_801A54D0 * Doc padmgr functions used * Match func_801A5680, it's near identical to func_801A54D0 * code_801A51F0 OK * Match func_801A4EB8 * Match func_801A4FD8 (mips2c got it matching directly) * code_801A4EB0 & all of voice, OK * Import bss * Better match for func_801A5A1C * format * Cleanup * Clean up dictionary * Introduce OSVoiceDictionary * More voice docs * Fix bss * Import code_801A4EB0 data * Introduce Word Id enum * Dictionary: u8 -> u16 * Introduce bgms * Fill in bgm enums * Rename bgm to clearer names * Fix spacing * Fix "No_Music" define * remove comment * import rodata * Improve bgm names, found another seqId function * Another seqId function * Another name change * Woods of Mystery -> Sarias Song * Fix match in osVoiceControlGain * Fix bss reordering * Fix bss file split * add saria's song bgm to pierre * Another bgm function found! * Add bgm's to `gSaveContext.seqIndex` * Fix BSS * fix bss * Fix bss * cleanup * more cleanup * cow voice weekeventflag * small cleanup * some docs * cleanup var * global * more docs * PR Review --------- Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com> Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
Diffstat (limited to 'src/code')
-rw-r--r--src/code/padmgr.c3
-rw-r--r--src/code/z_parameter.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/code/padmgr.c b/src/code/padmgr.c
index 1b75721cb..230102459 100644
--- a/src/code/padmgr.c
+++ b/src/code/padmgr.c
@@ -35,6 +35,7 @@
#include "PR/controller.h"
#include "PR/os_motor.h"
#include "fault.h"
+#include "z64voice.h"
extern FaultMgr gFaultMgr;
@@ -527,7 +528,7 @@ void PadMgr_InitVoice(void) {
} else {
sPadMgrInstance->ctrlrType[i] = PADMGR_CONT_VOICE;
sVoiceInitStatus = VOICE_INIT_SUCCESS;
- func_801A4EB0();
+ AudioVoice_Noop();
}
}
}
diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c
index cf7fbd1e3..f3077da95 100644
--- a/src/code/z_parameter.c
+++ b/src/code/z_parameter.c
@@ -3,6 +3,7 @@
#include "sys_cfb.h"
#include "z64snap.h"
#include "z64view.h"
+#include "z64voice.h"
#include "archives/icon_item_static/icon_item_static_yar.h"
#include "interface/parameter_static/parameter_static.h"
#include "interface/do_action_static/do_action_static.h"
@@ -2345,7 +2346,8 @@ void Interface_UpdateButtonsPart1(PlayState* play) {
interfaceCtx->unk_222 = interfaceCtx->unk_224 = 0;
restoreHudVisibility = true;
sPictoState = PICTO_BOX_STATE_OFF;
- } else if (CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_A) || (func_801A5100() == 1)) {
+ } else if (CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_A) ||
+ (AudioVoice_GetWord() == VOICE_WORD_ID_CHEESE)) {
if (!CHECK_EVENTINF(EVENTINF_41) ||
(CHECK_EVENTINF(EVENTINF_41) && (CutsceneManager_GetCurrentCsId() == CS_ID_NONE))) {
Audio_PlaySfx(NA_SE_SY_CAMERA_SHUTTER);