diff options
| author | Archez <Archez@users.noreply.github.com> | 2025-04-01 22:33:38 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-01 22:33:38 -0400 |
| commit | 8f126344a4ef22765cfa550146f89bf428e86053 (patch) | |
| tree | 4ab7b0da4758afc7c23d278c3b1960d19630e892 /soh/src/code/audio_seqplayer.c | |
| parent | e8389e0b2e116bac34cbaea1e1eda0280a77da1a (diff) | |
Apply clang-format to files (#5273)
Diffstat (limited to 'soh/src/code/audio_seqplayer.c')
| -rw-r--r-- | soh/src/code/audio_seqplayer.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/soh/src/code/audio_seqplayer.c b/soh/src/code/audio_seqplayer.c index e194fd28b..871f9a376 100644 --- a/soh/src/code/audio_seqplayer.c +++ b/soh/src/code/audio_seqplayer.c @@ -944,12 +944,10 @@ u8 AudioSeq_GetInstrument(SequenceChannel* channel, u8 instId, Instrument** inst return 0; } - if (inst->envelope != NULL) - { + if (inst->envelope != NULL) { adsr->envelope = inst->envelope; adsr->releaseRate = (inst->releaseRate); - } - else { + } else { adsr->envelope = gDefaultEnvelope; } @@ -1064,8 +1062,7 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) { result = (u8)parameters[0]; command = (u8)parameters[0]; - if (seqPlayer->defaultFont != 0xFF) - { + if (seqPlayer->defaultFont != 0xFF) { if (gAudioContext.seqReplaced[seqPlayer->playerIdx]) { seqPlayer->seqId = gAudioContext.seqToPlay[seqPlayer->playerIdx]; gAudioContext.seqReplaced[seqPlayer->playerIdx] = 0; @@ -1075,8 +1072,7 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) { command = sDat.fonts[sDat.numFonts - result - 1]; } - if (AudioHeap_SearchCaches(FONT_TABLE, CACHE_EITHER, command)) - { + if (AudioHeap_SearchCaches(FONT_TABLE, CACHE_EITHER, command)) { channel->fontId = command; } @@ -1181,8 +1177,7 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) { result = (u8)parameters[0]; command = (u8)parameters[0]; - if (seqPlayer->defaultFont != 0xFF) - { + if (seqPlayer->defaultFont != 0xFF) { if (gAudioContext.seqReplaced[seqPlayer->playerIdx]) { seqPlayer->seqId = gAudioContext.seqToPlay[seqPlayer->playerIdx]; gAudioContext.seqReplaced[seqPlayer->playerIdx] = 0; @@ -1190,16 +1185,15 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) { u16 seqId = AudioEditor_GetReplacementSeq(seqPlayer->seqId); SequenceData sDat = ResourceMgr_LoadSeqByName(sequenceMap[seqId]); - // The game apparantely would sometimes do negative array lookups, the result of which would get rejected by AudioHeap_SearchCaches, never - // changing the actual fontid. + // The game apparantely would sometimes do negative array lookups, the result of which would + // get rejected by AudioHeap_SearchCaches, never changing the actual fontid. if (result > sDat.numFonts) break; command = sDat.fonts[(sDat.numFonts - result - 1)]; } - if (AudioHeap_SearchCaches(FONT_TABLE, CACHE_EITHER, command)) - { + if (AudioHeap_SearchCaches(FONT_TABLE, CACHE_EITHER, command)) { channel->fontId = command; } @@ -1353,7 +1347,8 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) { break; case 0xB2: offset = (u16)parameters[0]; - channel->unk_22 = BE16SWAP(*(u16*)(seqPlayer->seqData + (uintptr_t)(offset + scriptState->value * 2))); + channel->unk_22 = + BE16SWAP(*(u16*)(seqPlayer->seqData + (uintptr_t)(offset + scriptState->value * 2))); break; case 0xB4: channel->dynTable = (void*)&seqPlayer->seqData[channel->unk_22]; |
