1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-11 17:30:25 +00:00

Decouple Debug Features From gc-eu-mq-dbg (#2296)

* rename OOT_DEBUG to DEBUG_FEATURES

* makefile changes

* add DEBUG_ASSETS

* fix DEBUG_FEATURES usages

* format

* fix errors

* review

* fix problem and review2

* review

* add DEBUG_FEATURES to DEBUG_ASSETS check

* review

* whoops

* format
This commit is contained in:
fig02 2024-11-17 17:02:07 -05:00 committed by GitHub
parent cf4dc98cc9
commit 17edb82c0d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
168 changed files with 652 additions and 606 deletions

View file

@ -44,7 +44,7 @@ s8 gSfxDefaultReverb = 0;
s32 D_801333EC = 0; // unused
#if OOT_DEBUG
#if DEBUG_FEATURES
u8 D_801333F0 = 0;
u8 gAudioSfxSwapOff = 0;
u8 D_801333F8 = 0;
@ -55,7 +55,7 @@ u8 gSeqCmdWritePos = 0;
u8 gSeqCmdReadPos = 0;
u8 gStartSeqDisabled = false;
#if OOT_DEBUG
#if DEBUG_FEATURES
u8 gAudioDebugPrintSeqCmd = true;
#endif

View file

@ -133,7 +133,7 @@ f32 D_801305E4[4] = { 1.0f, 1.12246f, 1.33484f, 1.33484f }; // 2**({0, 2, 5, 5}/
f32 D_801305F4 = 1.0f;
u8 sGanonsTowerLevelsVol[8] = { 127, 80, 75, 73, 70, 68, 65, 60 };
u8 sEnterGanonsTowerTimer = 0;
#if OOT_DEBUG
#if DEBUG_FEATURES
s8 sSoundMode = SOUNDMODE_SURROUND;
#else
s8 sSoundMode = SOUNDMODE_STEREO;
@ -161,7 +161,7 @@ u8 sAudioExtraFilter2 = 0;
Vec3f* sSariaBgmPtr = NULL;
f32 D_80130650 = 2000.0f;
#if OOT_DEBUG
#if DEBUG_FEATURES
u8 sSeqModeInput = 0;
#endif
@ -1150,7 +1150,7 @@ OcarinaSongButtons gOcarinaSongButtons[OCARINA_SONG_MAX] = {
{ 0, { 0 } },
};
#if OOT_DEBUG
#if DEBUG_FEATURES
u32 sAudioUpdateStartTime;
u32 sAudioUpdateEndTime;
#endif
@ -1163,7 +1163,7 @@ FreqLerp sWaterfallFreqScaleLerp;
f32 D_8016B7D8;
s8 D_8016B7DC;
f32 D_8016B7E0;
#if OOT_DEBUG
#if DEBUG_FEATURES
u16 D_8016B7E4;
struct {
char str[5];
@ -1176,11 +1176,11 @@ u8 sRiverSoundMainBgmLower;
u8 sRiverSoundMainBgmRestore;
u8 sGanonsTowerVol;
SfxPlayerState sSfxChannelState[0x10];
#if OOT_DEBUG
#if DEBUG_FEATURES
char sBinToStrBuf[0x20];
#endif
u8 sMalonSingingTimer;
#if OOT_DEBUG
#if DEBUG_FEATURES
u8 sAudioSpecPeakNumNotes[0x12];
#endif
u8 sMalonSingingDisabled;
@ -1213,7 +1213,7 @@ u16 sMusicStaffCurHeldLength[OCARINA_SONG_MAX];
u16 sMusicStaffExpectedLength[OCARINA_SONG_MAX];
u8 sMusicStaffExpectedPitch[OCARINA_SONG_MAX];
OcarinaNote sScarecrowsLongSongSecondNote;
#if OOT_DEBUG
#if DEBUG_FEATURES
u8 sIsMalonSinging;
f32 sMalonSingingDist;
u32 sDebugPadHold;
@ -2299,7 +2299,7 @@ void AudioOcarina_ResetStaffs(void) {
sOcarinaDropInputTimer = 0;
}
#if OOT_DEBUG
#if DEBUG_FEATURES
#include "debug.inc.c"
#else
void AudioDebug_Draw(GfxPrint* printer) {
@ -2317,7 +2317,7 @@ void Audio_UpdateFanfare(void);
*/
void Audio_Update(void) {
if (func_800FAD34() == 0) {
#if OOT_DEBUG
#if DEBUG_FEATURES
sAudioUpdateTaskStart = gAudioCtx.totalTaskCount;
sAudioUpdateStartTime = osGetTime();
#endif
@ -2336,14 +2336,14 @@ void Audio_Update(void) {
func_800F8F88();
Audio_UpdateActiveSequences();
#if OOT_DEBUG
#if DEBUG_FEATURES
AudioDebug_SetInput();
AudioDebug_ProcessInput();
#endif
AudioThread_ScheduleProcessCmds();
#if OOT_DEBUG
#if DEBUG_FEATURES
sAudioUpdateTaskEnd = gAudioCtx.totalTaskCount;
sAudioUpdateEndTime = osGetTime();
#endif
@ -2767,7 +2767,7 @@ void func_800F4010(Vec3f* pos, u16 sfxId, f32 arg2) {
u8 phi_v0;
u16 sfxId2;
#if OOT_DEBUG
#if DEBUG_FEATURES
D_80131C8C = arg2;
#endif
@ -3358,7 +3358,7 @@ s32 Audio_IsSequencePlaying(u16 seqId) {
void func_800F5ACC(u16 seqId) {
u16 curSeqId = Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN);
#if !OOT_DEBUG
#if !DEBUG_FEATURES
if (1) {}
#endif
@ -3487,7 +3487,7 @@ void Audio_SetSequenceMode(u8 seqMode) {
u16 seqId;
u8 volumeFadeOutTimer;
#if OOT_DEBUG
#if DEBUG_FEATURES
sSeqModeInput = seqMode;
#endif
@ -3627,7 +3627,7 @@ void Audio_UpdateMalonSinging(f32 dist, u16 seqId) {
s8 melodyVolume;
s16 curSeqId;
#if OOT_DEBUG
#if DEBUG_FEATURES
sIsMalonSinging = true;
sMalonSingingDist = dist;
#endif
@ -3941,7 +3941,7 @@ void Audio_SetNatureAmbienceChannelIO(u8 channelIdxRange, u8 ioPort, u8 ioData)
if ((gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId != NA_BGM_NATURE_AMBIENCE) &&
Audio_IsSeqCmdNotQueued(SEQCMD_OP_PLAY_SEQUENCE << 28 | NA_BGM_NATURE_AMBIENCE, SEQCMD_OP_MASK | 0xFF)) {
#if OOT_DEBUG
#if DEBUG_FEATURES
sAudioNatureFailed = true;
#endif
@ -3982,7 +3982,7 @@ void Audio_StartNatureAmbienceSequence(u16 playerIO, u16 channelMask) {
channelIdx = false;
#if OOT_DEBUG
#if DEBUG_FEATURES
if (gStartSeqDisabled) {
channelIdx = true;
SEQCMD_DISABLE_PLAY_SEQUENCES(false);

View file

@ -43,7 +43,7 @@ void Audio_StartSequence(u8 seqPlayerIndex, u8 seqId, u8 seqArgs, u16 fadeInDura
if (!gStartSeqDisabled || (seqPlayerIndex == SEQ_PLAYER_SFX)) {
seqArgs &= 0x7F;
if (OOT_DEBUG && (seqArgs == 0x7F)) {
if (DEBUG_FEATURES && (seqArgs == 0x7F)) {
// `fadeInDuration` interpreted as seconds, 60 is refresh rate and does not account for PAL
skipTicks = (fadeInDuration >> 3) * 60 * gAudioCtx.audioBufferParameters.ticksPerUpdate;
AUDIOCMD_GLOBAL_INIT_SEQPLAYER_SKIP_TICKS((u32)seqPlayerIndex, (u32)seqId, skipTicks);
@ -103,7 +103,7 @@ void Audio_ProcessSeqCmd(u32 cmd) {
f32 freqScaleTarget;
s32 pad;
#if OOT_DEBUG
#if DEBUG_FEATURES
if (gAudioDebugPrintSeqCmd && (cmd & SEQCMD_OP_MASK) != (SEQCMD_OP_SET_SEQPLAYER_IO << 28)) {
AudioDebug_ScrPrt("SEQ H", (cmd >> 16) & 0xFFFF);
AudioDebug_ScrPrt(" L", cmd & 0xFFFF);

View file

@ -34,7 +34,7 @@ u8 sCurSfxPlayerChannelIndex;
u8 gSfxBankMuted[7];
UnusedBankLerp sUnusedBankLerp[7];
#if OOT_DEBUG
#if DEBUG_FEATURES
u16 gAudioSfxSwapSource[10];
u16 gAudioSfxSwapTarget[10];
u8 gAudioSfxSwapMode[10];
@ -74,7 +74,7 @@ void Audio_PlaySfxGeneral(u16 sfxId, Vec3f* pos, u8 token, f32* freqScale, f32*
if (!gSfxBankMuted[SFX_BANK_SHIFT(sfxId)]) {
req = &sSfxRequests[gSfxRequestWriteIndex];
#if OOT_DEBUG
#if DEBUG_FEATURES
if (!gAudioSfxSwapOff) {
for (i = 0; i < 10; i++) {
if (sfxId == gAudioSfxSwapSource[i]) {
@ -172,7 +172,7 @@ void Audio_ProcessSfxRequest(void) {
bankId = SFX_BANK(req->sfxId);
#if OOT_DEBUG
#if DEBUG_FEATURES
if ((1 << bankId) & D_801333F0) {
AudioDebug_ScrPrt("SE", req->sfxId);
bankId = SFX_BANK(req->sfxId);
@ -739,7 +739,7 @@ void Audio_ResetSfx(void) {
gSfxBanks[bankId][i].next = 0xFF;
}
#if OOT_DEBUG
#if DEBUG_FEATURES
if (D_801333F8 == 0) {
for (bankId = 0; bankId < 10; bankId++) {
gAudioSfxSwapSource[bankId] = 0;