diff options
| author | briaguya <70942617+briaguya-ai@users.noreply.github.com> | 2022-12-21 03:46:12 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-21 03:46:12 -0500 |
| commit | 5ce4e75bd2e3ec6a7003c6b33a07487aafcdc78e (patch) | |
| tree | a9beb83e8985eb0624b6b865f163bea4b0007d53 /soh/src/code/code_800F9280.c | |
| parent | 4d8c70fb1f9bd1cfba0b65fb3e38e2aac39a65a2 (diff) | |
| parent | 0e7a89d1174a9080d1d88e9556e6b11e4ab8726e (diff) | |
Merge pull request #2227 from HarbourMasters/develop-bradley
bradley -> dev
Diffstat (limited to 'soh/src/code/code_800F9280.c')
| -rw-r--r-- | soh/src/code/code_800F9280.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/soh/src/code/code_800F9280.c b/soh/src/code/code_800F9280.c index 49ca751f1..2a051beca 100644 --- a/soh/src/code/code_800F9280.c +++ b/soh/src/code/code_800F9280.c @@ -8,6 +8,8 @@ typedef struct { u8 unk_1; // importance? } Struct_8016E320; +#define GET_PLAYER_IDX(cmd) (cmd & 0xF000000) >> 24 + Struct_8016E320 D_8016E320[4][5]; u8 D_8016E348[4]; u32 sAudioSeqCmds[0x100]; @@ -122,7 +124,7 @@ void Audio_ProcessSeqCmd(u32 cmd) { } op = cmd >> 28; - playerIdx = (cmd & 0xF000000) >> 24; + playerIdx = GET_PLAYER_IDX(cmd); switch (op) { case 0x0: @@ -371,12 +373,12 @@ void Audio_QueueSeqCmd(u32 cmd) u8 op = cmd >> 28; if (op == 0 || op == 2 || op == 12) { u8 seqId = cmd & 0xFF; - u8 playerIdx = (cmd >> 24) & 0xFF; + u8 playerIdx = GET_PLAYER_IDX(cmd); u16 newSeqId = SfxEditor_GetReplacementSeq(seqId); - gAudioContext.seqReplaced[playerIdx] = (seqId != newSeqId); - gAudioContext.seqToPlay[playerIdx] = newSeqId; - cmd |= (seqId & 0xFF); - } + gAudioContext.seqReplaced[playerIdx] = (seqId != newSeqId); + gAudioContext.seqToPlay[playerIdx] = newSeqId; + cmd |= (seqId & 0xFF); + } sAudioSeqCmds[sSeqCmdWrPos++] = cmd; } |
