diff options
author | Johannes Schickel | 2014-06-04 01:49:30 +0200 |
---|---|---|
committer | Johannes Schickel | 2014-06-04 01:49:30 +0200 |
commit | a1d36da506d60dd6a83d422f98c9db5fcb962ede (patch) | |
tree | ea9ceb240026b760f04a1ac8f550673d65a52584 | |
parent | 70789f39642cc6bfeb9e3c567539249e6ee15cc3 (diff) | |
download | scummvm-rg350-a1d36da506d60dd6a83d422f98c9db5fcb962ede.tar.gz scummvm-rg350-a1d36da506d60dd6a83d422f98c9db5fcb962ede.tar.bz2 scummvm-rg350-a1d36da506d60dd6a83d422f98c9db5fcb962ede.zip |
SCUMM: Move notes into SFX channel structure in AD player.
-rw-r--r-- | engines/scumm/players/player_ad.cpp | 6 | ||||
-rw-r--r-- | engines/scumm/players/player_ad.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/engines/scumm/players/player_ad.cpp b/engines/scumm/players/player_ad.cpp index 9dd25c4a27..be1756290d 100644 --- a/engines/scumm/players/player_ad.cpp +++ b/engines/scumm/players/player_ad.cpp @@ -661,8 +661,8 @@ void Player_AD::parseSlot(int channel) { ++curOffset; _channels[channel].state = kChannelStatePlay; noteOffOn(channel); - parseNote(&_notes[channel * 2 + 0], channel, curOffset + 0); - parseNote(&_notes[channel * 2 + 1], channel, curOffset + 5); + parseNote(&_channels[channel].notes[0], channel, curOffset + 0); + parseNote(&_channels[channel].notes[1], channel, curOffset + 5); return; case 0x80: @@ -699,7 +699,7 @@ void Player_AD::updateSlot(int channel) { continue; } - Note *const note = &_notes[channel * 2 + num]; + Note *const note = &_channels[channel].notes[num]; bool updateNote = false; if (note->state == kNoteStateSustain) { diff --git a/engines/scumm/players/player_ad.h b/engines/scumm/players/player_ad.h index f5342d9e4c..6d7d28f155 100644 --- a/engines/scumm/players/player_ad.h +++ b/engines/scumm/players/player_ad.h @@ -178,13 +178,13 @@ private: const byte *currentOffset; const byte *startOffset; uint8 instrumentData[7]; + + Note notes[2]; } _channels[11]; uint8 _rndSeed; uint8 getRnd(); - Note _notes[22]; - static const uint _noteBiasTable[7]; static const uint _numStepsTable[16]; static const uint _noteAdjustScaleTable[7]; |