From e1dc4cf448ea475691ff0be0e89712fb6be91129 Mon Sep 17 00:00:00 2001 From: inspectredc <78732756+inspectredc@users.noreply.github.com> Date: Fri, 19 Jul 2024 02:56:53 +0100 Subject: [PATCH] Nicer AudioSeq_SequenceChannelProcessScript match (#1996) * Nicer AudioSeq_SequenceChannelProcessScript match * cadmic suggestion --- src/audio/lib/seqplayer.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/audio/lib/seqplayer.c b/src/audio/lib/seqplayer.c index 620f7a4534..80f35bf2d0 100644 --- a/src/audio/lib/seqplayer.c +++ b/src/audio/lib/seqplayer.c @@ -1475,16 +1475,14 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) { case 0xE7: cmdArgU16 = (u16)cmdArgs[0]; data = &seqPlayer->seqData[cmdArgU16]; - channel->muteBehavior = data[0]; - data += 3; - channel->noteAllocPolicy = data[-2]; - AudioSeq_SetChannelPriorities(channel, data[-1]); - channel->transposition = (s8)data[0]; - data += 4; - channel->newPan = data[-3]; - channel->panChannelWeight = data[-2]; - channel->targetReverbVol = data[-1]; - channel->reverbIndex = data[0]; + channel->muteBehavior = *data++; + channel->noteAllocPolicy = *data++; + AudioSeq_SetChannelPriorities(channel, *data++); + channel->transposition = (s8)*data++; + channel->newPan = *data++; + channel->panChannelWeight = *data++; + channel->targetReverbVol = *data++; + channel->reverbIndex = *data++; //! @bug: Not marking reverb state as changed channel->changes.s.pan = true; break;