aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/queen/music.cpp26
-rw-r--r--engines/queen/music.h8
2 files changed, 17 insertions, 17 deletions
diff --git a/engines/queen/music.cpp b/engines/queen/music.cpp
index df5ff029f0..58ecfa6d16 100644
--- a/engines/queen/music.cpp
+++ b/engines/queen/music.cpp
@@ -40,9 +40,9 @@ namespace Queen {
extern MidiDriver *C_Player_CreateAdLibMidiDriver(Audio::Mixer *);
MidiMusic::MidiMusic(QueenEngine *vm)
- : _isPlaying(false), _looping(false), _randomLoop(false), _masterVolume(192), _buf(0) {
+ : _isPlaying(false), _isLooping(false), _randomLoop(false), _masterVolume(192), _buf(0) {
- memset(_channel, 0, sizeof(_channel));
+ memset(_channelsTable, 0, sizeof(_channelsTable));
_queuePos = _lastSong = _currentSong = 0;
queueClear();
@@ -118,8 +118,8 @@ void MidiMusic::setVolume(int volume) {
_masterVolume = volume;
for (int i = 0; i < 16; ++i) {
- if (_channel[i])
- _channel[i]->volume(_channelVolume[i] * _masterVolume / 255);
+ if (_channelsTable[i])
+ _channelsTable[i]->volume(_channelsVolume[i] * _masterVolume / 255);
}
}
@@ -156,7 +156,7 @@ bool MidiMusic::queueSong(uint16 songNum) {
void MidiMusic::queueClear() {
_lastSong = _songQueue[0];
_queuePos = 0;
- _looping = _randomLoop = false;
+ _isLooping = _randomLoop = false;
memset(_songQueue, 0, sizeof(_songQueue));
}
@@ -170,7 +170,7 @@ void MidiMusic::send(uint32 b) {
if ((b & 0xFFF0) == 0x07B0) {
// Adjust volume changes by master volume
byte volume = (byte)((b >> 16) & 0x7F);
- _channelVolume[channel] = volume;
+ _channelsVolume[channel] = volume;
volume = volume * _masterVolume / 255;
b = (b & 0xFF00FFFF) | (volume << 16);
} else if ((b & 0xF0) == 0xC0 && !_nativeMT32) {
@@ -178,7 +178,7 @@ void MidiMusic::send(uint32 b) {
} else if ((b & 0xFFF0) == 0x007BB0) {
//Only respond to All Notes Off if this channel
//has currently been allocated
- if (!_channel[channel])
+ if (!_channelsTable[channel])
return;
}
@@ -190,17 +190,17 @@ void MidiMusic::send(uint32 b) {
if (channel == 5 && _currentSong == 38)
return;
- if (!_channel[channel])
- _channel[channel] = (channel == 9) ? _driver->getPercussionChannel() : _driver->allocateChannel();
+ if (!_channelsTable[channel])
+ _channelsTable[channel] = (channel == 9) ? _driver->getPercussionChannel() : _driver->allocateChannel();
- if (_channel[channel])
- _channel[channel]->send(b);
+ if (_channelsTable[channel])
+ _channelsTable[channel]->send(b);
}
void MidiMusic::metaEvent(byte type, byte *data, uint16 length) {
switch (type) {
case 0x2F: // End of Track
- if (_looping || _songQueue[1]) {
+ if (_isLooping || _songQueue[1]) {
playMusic();
} else {
stopMusic();
@@ -333,7 +333,7 @@ void MidiMusic::queueUpdatePos() {
} else {
if (_queuePos < (MUSIC_QUEUE_SIZE - 1) && _songQueue[_queuePos + 1])
_queuePos++;
- else if (_looping)
+ else if (_isLooping)
_queuePos = 0;
}
}
diff --git a/engines/queen/music.h b/engines/queen/music.h
index 09d29fb351..3e8fc585ca 100644
--- a/engines/queen/music.h
+++ b/engines/queen/music.h
@@ -50,7 +50,7 @@ public:
void stopSong() { stopMusic(); }
void playMusic();
void stopMusic();
- void setLoop(bool loop) { _looping = loop; }
+ void setLoop(bool loop) { _isLooping = loop; }
void queueTuneList(int16 tuneList);
bool queueSong(uint16 songNum);
void queueClear();
@@ -76,15 +76,15 @@ protected:
MidiDriver *_driver;
MidiParser *_parser;
- MidiChannel *_channel[16];
- byte _channelVolume[16];
+ MidiChannel *_channelsTable[16];
+ byte _channelsVolume[16];
bool _adlib;
bool _nativeMT32;
Common::Mutex _mutex;
Common::RandomSource _rnd;
bool _isPlaying;
- bool _looping;
+ bool _isLooping;
bool _randomLoop;
byte _masterVolume;
uint8 _queuePos;