diff options
author | Johannes Schickel | 2010-01-12 21:07:56 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-01-12 21:07:56 +0000 |
commit | 0d995c592046aadbfcb8f46a252537da312912c5 (patch) | |
tree | 95a0a8d25372f887fe656f6ba61f050cc28845d4 /engines | |
parent | 1ebe047972e2df513449db6aa615f6ab17dd6fb7 (diff) | |
download | scummvm-rg350-0d995c592046aadbfcb8f46a252537da312912c5.tar.gz scummvm-rg350-0d995c592046aadbfcb8f46a252537da312912c5.tar.bz2 scummvm-rg350-0d995c592046aadbfcb8f46a252537da312912c5.zip |
Rename all "Adlib" uses to "AdLib" to match the real name of the sound card / company.
Check this for reference:
http://en.wikipedia.org/wiki/Ad_Lib,_Inc.
http://www.crossfire-designs.de/images/articles/soundcards/adlib.jpg (note the upper left of the card)
This commit does not touch "adlib" and "ADLIB" uses!
Also it does not update all the SCUMM detection entries, which still use "Adlib".
svn-id: r47279
Diffstat (limited to 'engines')
51 files changed, 630 insertions, 630 deletions
diff --git a/engines/agos/midi.cpp b/engines/agos/midi.cpp index fd0e4eaa9d..ed3e3d801b 100644 --- a/engines/agos/midi.cpp +++ b/engines/agos/midi.cpp @@ -130,7 +130,7 @@ void MidiPlayer::send(uint32 b) { // If I understand it correctly, the current standard indicates // that the volume should be reset, but the next revision will // exclude it. On my system, both ALSA and FluidSynth seem to - // reset it, while Adlib does not. Let's follow the majority. + // reset it, while AdLib does not. Let's follow the majority. _current->volume[channel] = 127; } diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp index 46aea246bd..0b5e3f4057 100644 --- a/engines/cine/cine.cpp +++ b/engines/cine/cine.cpp @@ -58,9 +58,9 @@ CineEngine::CineEngine(OSystem *syst, const CINEGameDescription *gameDesc) : Eng // Setup mixer _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume")); _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume")); - // Use music volume for plain sound types (At least the Adlib player uses a plain sound type + // Use music volume for plain sound types (At least the AdLib player uses a plain sound type // so previously the music and sfx volume controls didn't affect it at all). - // FIXME: Make Adlib player differentiate between playing sound effects and music and remove this. + // FIXME: Make AdLib player differentiate between playing sound effects and music and remove this. _mixer->setVolumeForSoundType(Audio::Mixer::kPlainSoundType, ConfMan.getInt("music_volume")); g_cine = this; diff --git a/engines/cine/sound.cpp b/engines/cine/sound.cpp index 287b7a605e..39acb44ecb 100644 --- a/engines/cine/sound.cpp +++ b/engines/cine/sound.cpp @@ -78,7 +78,7 @@ const int PCSoundDriver::_noteTable[] = { const int PCSoundDriver::_noteTableCount = ARRAYSIZE(_noteTable); -struct AdlibRegisterSoundInstrument { +struct AdLibRegisterSoundInstrument { uint8 vibrato; uint8 attackDecay; uint8 sustainRelease; @@ -88,20 +88,20 @@ struct AdlibRegisterSoundInstrument { uint8 freqMod; }; -struct AdlibSoundInstrument { +struct AdLibSoundInstrument { byte mode; byte channel; - AdlibRegisterSoundInstrument regMod; - AdlibRegisterSoundInstrument regCar; + AdLibRegisterSoundInstrument regMod; + AdLibRegisterSoundInstrument regCar; byte waveSelectMod; byte waveSelectCar; byte amDepth; }; -class AdlibSoundDriver : public PCSoundDriver, Audio::AudioStream { +class AdLibSoundDriver : public PCSoundDriver, Audio::AudioStream { public: - AdlibSoundDriver(Audio::Mixer *mixer); - virtual ~AdlibSoundDriver(); + AdLibSoundDriver(Audio::Mixer *mixer); + virtual ~AdLibSoundDriver(); // PCSoundDriver interface virtual void setupChannel(int channel, const byte *data, int instrument, int volume); @@ -117,8 +117,8 @@ public: void initCard(); void update(int16 *buf, int len); void setupInstrument(const byte *data, int channel); - void loadRegisterInstrument(const byte *data, AdlibRegisterSoundInstrument *reg); - virtual void loadInstrument(const byte *data, AdlibSoundInstrument *asi) = 0; + void loadRegisterInstrument(const byte *data, AdLibRegisterSoundInstrument *reg); + virtual void loadInstrument(const byte *data, AdLibSoundInstrument *asi) = 0; protected: FM_OPL *_opl; @@ -128,7 +128,7 @@ protected: byte _vibrato; int _channelsVolumeTable[4]; - AdlibSoundInstrument _instrumentsTable[4]; + AdLibSoundInstrument _instrumentsTable[4]; static const int _freqTable[]; static const int _freqTableCount; @@ -138,41 +138,41 @@ protected: static const int _voiceOperatorsTableCount; }; -const int AdlibSoundDriver::_freqTable[] = { +const int AdLibSoundDriver::_freqTable[] = { 0x157, 0x16C, 0x181, 0x198, 0x1B1, 0x1CB, 0x1E6, 0x203, 0x222, 0x243, 0x266, 0x28A }; -const int AdlibSoundDriver::_freqTableCount = ARRAYSIZE(_freqTable); +const int AdLibSoundDriver::_freqTableCount = ARRAYSIZE(_freqTable); -const int AdlibSoundDriver::_operatorsTable[] = { +const int AdLibSoundDriver::_operatorsTable[] = { 0, 1, 2, 3, 4, 5, 8, 9, 10, 11, 12, 13, 16, 17, 18, 19, 20, 21 }; -const int AdlibSoundDriver::_operatorsTableCount = ARRAYSIZE(_operatorsTable); +const int AdLibSoundDriver::_operatorsTableCount = ARRAYSIZE(_operatorsTable); -const int AdlibSoundDriver::_voiceOperatorsTable[] = { +const int AdLibSoundDriver::_voiceOperatorsTable[] = { 0, 3, 1, 4, 2, 5, 6, 9, 7, 10, 8, 11, 12, 15, 16, 16, 14, 14, 17, 17, 13, 13 }; -const int AdlibSoundDriver::_voiceOperatorsTableCount = ARRAYSIZE(_voiceOperatorsTable); +const int AdLibSoundDriver::_voiceOperatorsTableCount = ARRAYSIZE(_voiceOperatorsTable); -// Future Wars Adlib driver -class AdlibSoundDriverINS : public AdlibSoundDriver { +// Future Wars AdLib driver +class AdLibSoundDriverINS : public AdLibSoundDriver { public: - AdlibSoundDriverINS(Audio::Mixer *mixer) : AdlibSoundDriver(mixer) {} + AdLibSoundDriverINS(Audio::Mixer *mixer) : AdLibSoundDriver(mixer) {} virtual const char *getInstrumentExtension() const { return ".INS"; } - virtual void loadInstrument(const byte *data, AdlibSoundInstrument *asi); + virtual void loadInstrument(const byte *data, AdLibSoundInstrument *asi); virtual void setChannelFrequency(int channel, int frequency); virtual void playSample(const byte *data, int size, int channel, int volume); }; -// Operation Stealth Adlib driver -class AdlibSoundDriverADL : public AdlibSoundDriver { +// Operation Stealth AdLib driver +class AdLibSoundDriverADL : public AdLibSoundDriver { public: - AdlibSoundDriverADL(Audio::Mixer *mixer) : AdlibSoundDriver(mixer) {} + AdLibSoundDriverADL(Audio::Mixer *mixer) : AdLibSoundDriver(mixer) {} virtual const char *getInstrumentExtension() const { return ".ADL"; } - virtual void loadInstrument(const byte *data, AdlibSoundInstrument *asi); + virtual void loadInstrument(const byte *data, AdLibSoundInstrument *asi); virtual void setChannelFrequency(int channel, int frequency); virtual void playSample(const byte *data, int size, int channel, int volume); }; @@ -237,22 +237,22 @@ void PCSoundDriver::resetChannel(int channel) { stopAll(); } -AdlibSoundDriver::AdlibSoundDriver(Audio::Mixer *mixer) +AdLibSoundDriver::AdLibSoundDriver(Audio::Mixer *mixer) : _mixer(mixer) { _sampleRate = _mixer->getOutputRate(); - _opl = makeAdlibOPL(_sampleRate); + _opl = makeAdLibOPL(_sampleRate); memset(_channelsVolumeTable, 0, sizeof(_channelsVolumeTable)); memset(_instrumentsTable, 0, sizeof(_instrumentsTable)); initCard(); _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); } -AdlibSoundDriver::~AdlibSoundDriver() { +AdLibSoundDriver::~AdLibSoundDriver() { _mixer->stopHandle(_soundHandle); OPLDestroy(_opl); } -void AdlibSoundDriver::setupChannel(int channel, const byte *data, int instrument, int volume) { +void AdLibSoundDriver::setupChannel(int channel, const byte *data, int instrument, int volume) { assert(channel < 4); if (data) { if (volume > 80) { @@ -269,9 +269,9 @@ void AdlibSoundDriver::setupChannel(int channel, const byte *data, int instrumen } } -void AdlibSoundDriver::stopChannel(int channel) { +void AdLibSoundDriver::stopChannel(int channel) { assert(channel < 4); - AdlibSoundInstrument *ins = &_instrumentsTable[channel]; + AdLibSoundInstrument *ins = &_instrumentsTable[channel]; if (ins->mode != 0 && ins->channel == 6) { channel = 6; } @@ -284,7 +284,7 @@ void AdlibSoundDriver::stopChannel(int channel) { } } -void AdlibSoundDriver::stopAll() { +void AdLibSoundDriver::stopAll() { int i; for (i = 0; i < 18; ++i) { OPLWriteReg(_opl, 0x40 | _operatorsTable[i], 63); @@ -295,12 +295,12 @@ void AdlibSoundDriver::stopAll() { OPLWriteReg(_opl, 0xBD, 0); } -int AdlibSoundDriver::readBuffer(int16 *buffer, const int numSamples) { +int AdLibSoundDriver::readBuffer(int16 *buffer, const int numSamples) { update(buffer, numSamples); return numSamples; } -void AdlibSoundDriver::initCard() { +void AdLibSoundDriver::initCard() { _vibrato = 0x20; OPLWriteReg(_opl, 0xBD, _vibrato); OPLWriteReg(_opl, 0x08, 0x40); @@ -324,7 +324,7 @@ void AdlibSoundDriver::initCard() { OPLWriteReg(_opl, 1, 0); } -void AdlibSoundDriver::update(int16 *buf, int len) { +void AdLibSoundDriver::update(int16 *buf, int len) { static int samplesLeft = 0; while (len != 0) { int count = samplesLeft; @@ -344,13 +344,13 @@ void AdlibSoundDriver::update(int16 *buf, int len) { } } -void AdlibSoundDriver::setupInstrument(const byte *data, int channel) { +void AdLibSoundDriver::setupInstrument(const byte *data, int channel) { assert(channel < 4); - AdlibSoundInstrument *ins = &_instrumentsTable[channel]; + AdLibSoundInstrument *ins = &_instrumentsTable[channel]; loadInstrument(data, ins); int mod, car, tmp; - const AdlibRegisterSoundInstrument *reg; + const AdLibRegisterSoundInstrument *reg; if (ins->mode != 0) { mod = _operatorsTable[_voiceOperatorsTable[2 * ins->channel + 0]]; @@ -390,7 +390,7 @@ void AdlibSoundDriver::setupInstrument(const byte *data, int channel) { OPLWriteReg(_opl, 0xE0 | car, ins->waveSelectCar); } -void AdlibSoundDriver::loadRegisterInstrument(const byte *data, AdlibRegisterSoundInstrument *reg) { +void AdLibSoundDriver::loadRegisterInstrument(const byte *data, AdLibRegisterSoundInstrument *reg) { reg->vibrato = 0; if (READ_LE_UINT16(data + 18)) { // amplitude vibrato reg->vibrato |= 0x80; @@ -422,7 +422,7 @@ void AdlibSoundDriver::loadRegisterInstrument(const byte *data, AdlibRegisterSou reg->freqMod = READ_LE_UINT16(data + 24); } -void AdlibSoundDriverINS::loadInstrument(const byte *data, AdlibSoundInstrument *asi) { +void AdLibSoundDriverINS::loadInstrument(const byte *data, AdLibSoundInstrument *asi) { asi->mode = *data++; asi->channel = *data++; loadRegisterInstrument(data, &asi->regMod); data += 26; @@ -432,9 +432,9 @@ void AdlibSoundDriverINS::loadInstrument(const byte *data, AdlibSoundInstrument asi->amDepth = data[0]; data += 2; } -void AdlibSoundDriverINS::setChannelFrequency(int channel, int frequency) { +void AdLibSoundDriverINS::setChannelFrequency(int channel, int frequency) { assert(channel < 4); - AdlibSoundInstrument *ins = &_instrumentsTable[channel]; + AdLibSoundInstrument *ins = &_instrumentsTable[channel]; if (ins->mode != 0 && ins->channel == 6) { channel = 6; } @@ -458,12 +458,12 @@ void AdlibSoundDriverINS::setChannelFrequency(int channel, int frequency) { } } -void AdlibSoundDriverINS::playSample(const byte *data, int size, int channel, int volume) { +void AdLibSoundDriverINS::playSample(const byte *data, int size, int channel, int volume) { assert(channel < 4); _channelsVolumeTable[channel] = 127; resetChannel(channel); setupInstrument(data + 257, channel); - AdlibSoundInstrument *ins = &_instrumentsTable[channel]; + AdLibSoundInstrument *ins = &_instrumentsTable[channel]; if (ins->mode != 0 && ins->channel == 6) { channel = 6; } @@ -483,7 +483,7 @@ void AdlibSoundDriverINS::playSample(const byte *data, int size, int channel, in } } -void AdlibSoundDriverADL::loadInstrument(const byte *data, AdlibSoundInstrument *asi) { +void AdLibSoundDriverADL::loadInstrument(const byte *data, AdLibSoundInstrument *asi) { asi->mode = *data++; asi->channel = *data++; asi->waveSelectMod = *data++ & 3; @@ -494,9 +494,9 @@ void AdlibSoundDriverADL::loadInstrument(const byte *data, AdlibSoundInstrument loadRegisterInstrument(data, &asi->regCar); data += 26; } -void AdlibSoundDriverADL::setChannelFrequency(int channel, int frequency) { +void AdLibSoundDriverADL::setChannelFrequency(int channel, int frequency) { assert(channel < 4); - AdlibSoundInstrument *ins = &_instrumentsTable[channel]; + AdLibSoundInstrument *ins = &_instrumentsTable[channel]; if (ins->mode != 0) { channel = ins->channel; if (channel == 9) { @@ -527,11 +527,11 @@ void AdlibSoundDriverADL::setChannelFrequency(int channel, int frequency) { } } -void AdlibSoundDriverADL::playSample(const byte *data, int size, int channel, int volume) { +void AdLibSoundDriverADL::playSample(const byte *data, int size, int channel, int volume) { assert(channel < 4); _channelsVolumeTable[channel] = 127; setupInstrument(data, channel); - AdlibSoundInstrument *ins = &_instrumentsTable[channel]; + AdLibSoundInstrument *ins = &_instrumentsTable[channel]; if (ins->mode != 0 && ins->channel == 6) { OPLWriteReg(_opl, 0xB0 | channel, 0); } @@ -723,9 +723,9 @@ void PCSoundFxPlayer::unload() { PCSound::PCSound(Audio::Mixer *mixer, CineEngine *vm) : Sound(mixer, vm) { if (_vm->getGameType() == GType_FW) { - _soundDriver = new AdlibSoundDriverINS(_mixer); + _soundDriver = new AdLibSoundDriverINS(_mixer); } else { - _soundDriver = new AdlibSoundDriverADL(_mixer); + _soundDriver = new AdLibSoundDriverADL(_mixer); } _player = new PCSoundFxPlayer(_soundDriver); } diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp index 2fb242a145..f61d8f023a 100644 --- a/engines/cruise/cruise_main.cpp +++ b/engines/cruise/cruise_main.cpp @@ -364,7 +364,7 @@ int loadFileSub1(uint8 **ptr, const char *name, uint8 *ptr2) { * strcat(buffer, ".H32"); *} * else - * if (useAdlib) + * if (useAdLib) * { */ strcat(buffer,".ADL"); /* } diff --git a/engines/cruise/sound.cpp b/engines/cruise/sound.cpp index 3a40e35ed3..6288c41474 100644 --- a/engines/cruise/sound.cpp +++ b/engines/cruise/sound.cpp @@ -82,7 +82,7 @@ const int PCSoundDriver::_noteTable[] = { const int PCSoundDriver::_noteTableCount = ARRAYSIZE(_noteTable); -struct AdlibRegisterSoundInstrument { +struct AdLibRegisterSoundInstrument { uint8 vibrato; uint8 attackDecay; uint8 sustainRelease; @@ -92,11 +92,11 @@ struct AdlibRegisterSoundInstrument { uint8 freqMod; }; -struct AdlibSoundInstrument { +struct AdLibSoundInstrument { byte mode; byte channel; - AdlibRegisterSoundInstrument regMod; - AdlibRegisterSoundInstrument regCar; + AdLibRegisterSoundInstrument regMod; + AdLibRegisterSoundInstrument regCar; byte waveSelectMod; byte waveSelectCar; byte amDepth; @@ -107,10 +107,10 @@ struct VolumeEntry { int adjusted; }; -class AdlibSoundDriver : public PCSoundDriver, Audio::AudioStream { +class AdLibSoundDriver : public PCSoundDriver, Audio::AudioStream { public: - AdlibSoundDriver(Audio::Mixer *mixer); - virtual ~AdlibSoundDriver(); + AdLibSoundDriver(Audio::Mixer *mixer); + virtual ~AdLibSoundDriver(); // PCSoundDriver interface virtual void setupChannel(int channel, const byte *data, int instrument, int volume); @@ -126,9 +126,9 @@ public: void initCard(); void update(int16 *buf, int len); void setupInstrument(const byte *data, int channel); - void setupInstrument(const AdlibSoundInstrument *ins, int channel); - void loadRegisterInstrument(const byte *data, AdlibRegisterSoundInstrument *reg); - virtual void loadInstrument(const byte *data, AdlibSoundInstrument *asi) = 0; + void setupInstrument(const AdLibSoundInstrument *ins, int channel); + void loadRegisterInstrument(const byte *data, AdLibRegisterSoundInstrument *reg); + virtual void loadInstrument(const byte *data, AdLibSoundInstrument *asi) = 0; virtual void syncSounds(); void adjustVolume(int channel, int volume); @@ -141,7 +141,7 @@ protected: byte _vibrato; VolumeEntry _channelsVolumeTable[5]; - AdlibSoundInstrument _instrumentsTable[5]; + AdLibSoundInstrument _instrumentsTable[5]; static const int _freqTable[]; static const int _freqTableCount; @@ -151,30 +151,30 @@ protected: static const int _voiceOperatorsTableCount; }; -const int AdlibSoundDriver::_freqTable[] = { +const int AdLibSoundDriver::_freqTable[] = { 0x157, 0x16C, 0x181, 0x198, 0x1B1, 0x1CB, 0x1E6, 0x203, 0x222, 0x243, 0x266, 0x28A }; -const int AdlibSoundDriver::_freqTableCount = ARRAYSIZE(_freqTable); +const int AdLibSoundDriver::_freqTableCount = ARRAYSIZE(_freqTable); -const int AdlibSoundDriver::_operatorsTable[] = { +const int AdLibSoundDriver::_operatorsTable[] = { 0, 1, 2, 3, 4, 5, 8, 9, 10, 11, 12, 13, 16, 17, 18, 19, 20, 21 }; -const int AdlibSoundDriver::_operatorsTableCount = ARRAYSIZE(_operatorsTable); +const int AdLibSoundDriver::_operatorsTableCount = ARRAYSIZE(_operatorsTable); -const int AdlibSoundDriver::_voiceOperatorsTable[] = { +const int AdLibSoundDriver::_voiceOperatorsTable[] = { 0, 3, 1, 4, 2, 5, 6, 9, 7, 10, 8, 11, 12, 15, 16, 16, 14, 14, 17, 17, 13, 13 }; -const int AdlibSoundDriver::_voiceOperatorsTableCount = ARRAYSIZE(_voiceOperatorsTable); +const int AdLibSoundDriver::_voiceOperatorsTableCount = ARRAYSIZE(_voiceOperatorsTable); -class AdlibSoundDriverADL : public AdlibSoundDriver { +class AdLibSoundDriverADL : public AdLibSoundDriver { public: - AdlibSoundDriverADL(Audio::Mixer *mixer) : AdlibSoundDriver(mixer) {} + AdLibSoundDriverADL(Audio::Mixer *mixer) : AdLibSoundDriver(mixer) {} virtual const char *getInstrumentExtension() const { return ".ADL"; } - virtual void loadInstrument(const byte *data, AdlibSoundInstrument *asi); + virtual void loadInstrument(const byte *data, AdLibSoundInstrument *asi); virtual void setChannelFrequency(int channel, int frequency); virtual void playSample(const byte *data, int size, int channel, int volume); }; @@ -287,10 +287,10 @@ void PCSoundDriver::syncSounds() { _sfxVolume = ConfMan.getBool("sfx_mute") ? 0 : MIN(255, ConfMan.getInt("sfx_volume")); } -AdlibSoundDriver::AdlibSoundDriver(Audio::Mixer *mixer) +AdLibSoundDriver::AdLibSoundDriver(Audio::Mixer *mixer) : _mixer(mixer) { _sampleRate = _mixer->getOutputRate(); - _opl = makeAdlibOPL(_sampleRate); + _opl = makeAdLibOPL(_sampleRate); for (int i = 0; i < 5; ++i) { _channelsVolumeTable[i].original = 0; @@ -304,23 +304,23 @@ AdlibSoundDriver::AdlibSoundDriver(Audio::Mixer *mixer) _sfxVolume = ConfMan.getBool("sfx_mute") ? 0 : MIN(255, ConfMan.getInt("sfx_volume")); } -AdlibSoundDriver::~AdlibSoundDriver() { +AdLibSoundDriver::~AdLibSoundDriver() { _mixer->stopHandle(_soundHandle); OPLDestroy(_opl); } -void AdlibSoundDriver::syncSounds() { +void AdLibSoundDriver::syncSounds() { PCSoundDriver::syncSounds(); // Force all instruments to reload on the next playing point for (int i = 0; i < 5; ++i) { adjustVolume(i, _channelsVolumeTable[i].original); - AdlibSoundInstrument *ins = &_instrumentsTable[i]; + AdLibSoundInstrument *ins = &_instrumentsTable[i]; setupInstrument(ins, i); } } -void AdlibSoundDriver::adjustVolume(int channel, int volume) { +void AdLibSoundDriver::adjustVolume(int channel, int volume) { _channelsVolumeTable[channel].original = volume; if (volume > 80) { @@ -342,7 +342,7 @@ void AdlibSoundDriver::adjustVolume(int channel, int volume) { _channelsVolumeTable[channel].adjusted = volume; } -void AdlibSoundDriver::setupChannel(int channel, const byte *data, int instrument, int volume) { +void AdLibSoundDriver::setupChannel(int channel, const byte *data, int instrument, int volume) { assert(channel < 5); if (data) { adjustVolume(channel, volume); @@ -350,9 +350,9 @@ void AdlibSoundDriver::setupChannel(int channel, const byte *data, int instrumen } } -void AdlibSoundDriver::stopChannel(int channel) { +void AdLibSoundDriver::stopChannel(int channel) { assert(channel < 5); - AdlibSoundInstrument *ins = &_instrumentsTable[channel]; + AdLibSoundInstrument *ins = &_instrumentsTable[channel]; if (ins->mode != 0 && ins->channel == 6) { channel = 6; } @@ -365,7 +365,7 @@ void AdlibSoundDriver::stopChannel(int channel) { } } -void AdlibSoundDriver::stopAll() { +void AdLibSoundDriver::stopAll() { int i; for (i = 0; i < 18; ++i) { OPLWriteReg(_opl, 0x40 | _operatorsTable[i], 63); @@ -376,12 +376,12 @@ void AdlibSoundDriver::stopAll() { OPLWriteReg(_opl, 0xBD, 0); } -int AdlibSoundDriver::readBuffer(int16 *buffer, const int numSamples) { +int AdLibSoundDriver::readBuffer(int16 *buffer, const int numSamples) { update(buffer, numSamples); return numSamples; } -void AdlibSoundDriver::initCard() { +void AdLibSoundDriver::initCard() { _vibrato = 0x20; OPLWriteReg(_opl, 0xBD, _vibrato); OPLWriteReg(_opl, 0x08, 0x40); @@ -405,7 +405,7 @@ void AdlibSoundDriver::initCard() { OPLWriteReg(_opl, 1, 0); } -void AdlibSoundDriver::update(int16 *buf, int len) { +void AdLibSoundDriver::update(int16 *buf, int len) { static int samplesLeft = 0; while (len != 0) { int count = samplesLeft; @@ -425,17 +425,17 @@ void AdlibSoundDriver::update(int16 *buf, int len) { } } -void AdlibSoundDriver::setupInstrument(const byte *data, int channel) { +void AdLibSoundDriver::setupInstrument(const byte *data, int channel) { assert(channel < 5); - AdlibSoundInstrument *ins = &_instrumentsTable[channel]; + AdLibSoundInstrument *ins = &_instrumentsTable[channel]; loadInstrument(data, ins); setupInstrument(ins, channel); } -void AdlibSoundDriver::setupInstrument(const AdlibSoundInstrument *ins, int channel) { +void AdLibSoundDriver::setupInstrument(const AdLibSoundInstrument *ins, int channel) { int mod, car, tmp; - const AdlibRegisterSoundInstrument *reg; + const AdLibRegisterSoundInstrument *reg; if (ins->mode != 0) { mod = _operatorsTable[_voiceOperatorsTable[2 * ins->channel + 0]]; @@ -475,7 +475,7 @@ void AdlibSoundDriver::setupInstrument(const AdlibSoundInstrument *ins, int chan OPLWriteReg(_opl, 0xE0 | car, ins->waveSelectCar); } -void AdlibSoundDriver::loadRegisterInstrument(const byte *data, AdlibRegisterSoundInstrument *reg) { +void AdLibSoundDriver::loadRegisterInstrument(const byte *data, AdLibRegisterSoundInstrument *reg) { reg->vibrato = 0; if (READ_LE_UINT16(data + 18)) { // amplitude vibrato reg->vibrato |= 0x80; @@ -507,7 +507,7 @@ void AdlibSoundDriver::loadRegisterInstrument(const byte *data, AdlibRegisterSou reg->freqMod = READ_LE_UINT16(data + 24); } -void AdlibSoundDriverADL::loadInstrument(const byte *data, AdlibSoundInstrument *asi) { +void AdLibSoundDriverADL::loadInstrument(const byte *data, AdLibSoundInstrument *asi) { asi->mode = *data++; asi->channel = *data++; asi->waveSelectMod = *data++ & 3; @@ -518,9 +518,9 @@ void AdlibSoundDriverADL::loadInstrument(const byte *data, AdlibSoundInstrument loadRegisterInstrument(data, &asi->regCar); data += 26; } -void AdlibSoundDriverADL::setChannelFrequency(int channel, int frequency) { +void AdLibSoundDriverADL::setChannelFrequency(int channel, int frequency) { assert(channel < 5); - AdlibSoundInstrument *ins = &_instrumentsTable[channel]; + AdLibSoundInstrument *ins = &_instrumentsTable[channel]; if (ins->mode != 0) { channel = ins->channel; if (channel == 9) { @@ -553,12 +553,12 @@ void AdlibSoundDriverADL::setChannelFrequency(int channel, int frequency) { } } -void AdlibSoundDriverADL::playSample(const byte *data, int size, int channel, int volume) { +void AdLibSoundDriverADL::playSample(const byte *data, int size, int channel, int volume) { assert(channel < 5); adjustVolume(channel, 127); setupInstrument(data, channel); - AdlibSoundInstrument *ins = &_instrumentsTable[channel]; + AdLibSoundInstrument *ins = &_instrumentsTable[channel]; if (ins->mode != 0 && ins->channel == 6) { OPLWriteReg(_opl, 0xB0 | channel, 0); } @@ -780,7 +780,7 @@ void PCSoundFxPlayer::doSync(Common::Serializer &s) { PCSound::PCSound(Audio::Mixer *mixer, CruiseEngine *vm) { _vm = vm; _mixer = mixer; - _soundDriver = new AdlibSoundDriverADL(_mixer); + _soundDriver = new AdLibSoundDriverADL(_mixer); _player = new PCSoundFxPlayer(_soundDriver); } diff --git a/engines/draci/draci.cpp b/engines/draci/draci.cpp index ff3815ffb7..2946b57019 100644 --- a/engines/draci/draci.cpp +++ b/engines/draci/draci.cpp @@ -133,7 +133,7 @@ int DraciEngine::init() { _music = new MusicPlayer(_midiDriver, musicPathMask); _music->setNativeMT32(native_mt32); - //_music->setAdlib(adlib); + //_music->setAdLib(adlib); // Load the game's fonts _smallFont = new Font(kFontSmall); diff --git a/engines/draci/music.cpp b/engines/draci/music.cpp index 1a0e894316..f881c27e7a 100644 --- a/engines/draci/music.cpp +++ b/engines/draci/music.cpp @@ -45,7 +45,7 @@ MusicPlayer::MusicPlayer(MidiDriver *driver, const char *pathMask) : _parser(0), _midiMusicData = NULL; // TODO: Load cmf.ins with the instrument table. It seems that an - // interface for such an operation is supported for Adlib. Maybe for + // interface for such an operation is supported for AdLib. Maybe for // this card, setting instruments is necessary. } diff --git a/engines/gob/detection.cpp b/engines/gob/detection.cpp index 29efe510fa..a6df9d2cd8 100644 --- a/engines/gob/detection.cpp +++ b/engines/gob/detection.cpp @@ -147,7 +147,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob1, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // CD 1.000 version. @@ -427,7 +427,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob1, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Supplied by paul66 in bug report #1652352 @@ -441,7 +441,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob1, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Supplied by paul66 in bug report #1652352 @@ -455,7 +455,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob1, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Supplied by paul66 in bug report #1652352 @@ -469,7 +469,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob1, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Supplied by paul66 in bug report #1652352 @@ -483,7 +483,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob1, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Supplied by Hkz on #scummvm @@ -501,7 +501,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob1, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Supplied by Hkz on #scummvm @@ -519,7 +519,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob1, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Supplied by Hkz on #scummvm @@ -537,7 +537,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob1, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Supplied by Hkz on #scummvm @@ -555,7 +555,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob1, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Supplied by Hkz on #scummvm @@ -573,7 +573,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob1, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -591,7 +591,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob1, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -609,7 +609,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob1, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -627,7 +627,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob1, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -645,7 +645,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob1, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -663,7 +663,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob1, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Found in Found in french ADI 2.5 Anglais Multimedia 5e @@ -677,7 +677,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob1, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Found in Found in french ADI 2.5 Anglais Multimedia 5e @@ -691,7 +691,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob1, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Found in Found in french ADI 2.5 Anglais Multimedia 5e @@ -705,7 +705,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob1, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Found in Found in french ADI 2.5 Anglais Multimedia 5e @@ -719,7 +719,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob1, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Found in Found in french ADI 2.5 Anglais Multimedia 5e @@ -733,7 +733,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob1, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -747,7 +747,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob1, - kFeaturesAdlib, + kFeaturesAdLib, 0, "AVT003.TOT", 0 }, { // Supplied by fac76 in bug report #1883808 @@ -821,7 +821,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Supplied by koalet in bug report #2478585 @@ -839,7 +839,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -853,7 +853,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -867,7 +867,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Supplied by raziel_ in bug report #1891867 @@ -881,7 +881,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -895,7 +895,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Supplied by blackwhiteeagle in bug report #1605235 @@ -909,7 +909,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -923,7 +923,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Supplied by goodoldgeorg in bug report #2602017 @@ -937,7 +937,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -951,7 +951,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Supplied by arcepi in bug report #1659884 @@ -965,7 +965,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -1133,7 +1133,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib, + kFeaturesAdLib, 0, "usa.tot", 0 }, { @@ -1147,7 +1147,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -1193,7 +1193,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -1211,7 +1211,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -1229,7 +1229,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -1247,7 +1247,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -1265,7 +1265,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -1283,7 +1283,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Found in french ADI 2 Francais-Maths CM1 @@ -1297,7 +1297,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Found in french ADI 2.5 Anglais Multimedia 5e @@ -1311,7 +1311,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Supplied by vampir_raziel in bug report #1658373 @@ -1435,7 +1435,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeWeen, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -1449,7 +1449,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeWeen, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Supplied by cybot_tmin in bug report #1667743 @@ -1463,7 +1463,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeWeen, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -1477,7 +1477,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeWeen, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Supplied by cartman_ on #scummvm @@ -1491,7 +1491,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeWeen, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Supplied by glorfindel in bugreport #1722142 @@ -1505,7 +1505,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeWeen, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -1519,7 +1519,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeWeen, - kFeaturesAdlib, + kFeaturesAdLib, 0, "show.tot", 0 }, { @@ -1533,7 +1533,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeWeen, - kFeaturesAdlib, + kFeaturesAdLib, 0, "show.tot", 0 }, { @@ -1645,7 +1645,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib | kFeaturesEGA, + kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, { @@ -1659,7 +1659,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib | kFeaturesEGA, + kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, { @@ -1673,7 +1673,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib | kFeaturesEGA, + kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, { @@ -1687,7 +1687,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib | kFeaturesEGA, + kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, { @@ -1701,7 +1701,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib | kFeaturesEGA, + kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, { @@ -1733,7 +1733,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib | kFeaturesEGA, + kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, { @@ -1747,7 +1747,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib | kFeaturesEGA, + kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, { @@ -1761,7 +1761,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib | kFeaturesEGA, + kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, { @@ -1775,7 +1775,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib | kFeaturesEGA, + kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, { @@ -1789,7 +1789,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib | kFeaturesEGA, + kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, { // Found in french ADI 2 Francais-Maths CM1 @@ -1803,7 +1803,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib | kFeaturesEGA, + kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, { // Found in french ADI 2 Francais-Maths CM1 @@ -1817,7 +1817,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib | kFeaturesEGA, + kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, { // Found in french ADI 2 Francais-Maths CM1 @@ -1831,7 +1831,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib | kFeaturesEGA, + kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, { // Found in french ADI 2 Francais-Maths CM1 @@ -1845,7 +1845,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib | kFeaturesEGA, + kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, { // Found in french ADI 2 Francais-Maths CM1 @@ -1859,7 +1859,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib | kFeaturesEGA, + kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, { @@ -1873,7 +1873,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -1887,7 +1887,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeLostInTime, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -1901,7 +1901,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeLostInTime, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Supplied by cartman_ on #scummvm @@ -1915,7 +1915,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeLostInTime, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Supplied by goodoldgeorg in bug report #2105220 @@ -1929,7 +1929,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeLostInTime, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Supplied by koalet in bug report #2479034 @@ -1947,7 +1947,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeLostInTime, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -2129,7 +2129,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeLostInTime, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -2143,7 +2143,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeLostInTime, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -2157,7 +2157,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeLostInTime, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -2171,7 +2171,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeLostInTime, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -2185,7 +2185,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeLostInTime, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Found in french ADI 2.6 Francais-Maths 4e @@ -2199,7 +2199,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeLostInTime, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -2217,7 +2217,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeLostInTime, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -2235,7 +2235,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeLostInTime, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -2249,7 +2249,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeLostInTime, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -2267,7 +2267,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeLostInTime, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -2295,7 +2295,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeFascination, - kFeaturesAdlib, + kFeaturesAdLib, "disk0.stk", 0, 0 }, { @@ -2309,7 +2309,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeFascination, - kFeaturesAdlib, + kFeaturesAdLib, "intro.stk", 0, 0 }, { // Supplied by sanguine @@ -2323,7 +2323,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeFascination, - kFeaturesAdlib, + kFeaturesAdLib, "disk0.stk", 0, 0 }, { // Supplied by windlepoons in bug report #2809247 @@ -2337,7 +2337,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeFascination, - kFeaturesAdlib, + kFeaturesAdLib, "disk0.stk", 0, 0 }, { @@ -2351,7 +2351,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeFascination, - kFeaturesAdlib, + kFeaturesAdLib, "disk0.stk", 0, 0 }, { @@ -2449,7 +2449,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeLostInTime, - kFeaturesAdlib, + kFeaturesAdLib, "demo.stk", "demo.tot", 0 }, { @@ -2463,7 +2463,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeLostInTime, - kFeaturesAdlib, + kFeaturesAdLib, "demo.stk", "demo.tot", 0 }, { @@ -2477,7 +2477,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob3, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -2491,7 +2491,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob3, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Supplied by raziel_ in bug report #1891869 @@ -2505,7 +2505,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob3, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -2523,7 +2523,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob3, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -2541,7 +2541,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob3, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -2559,7 +2559,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob3, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Supplied by fac76 in bug report #1742716 @@ -2577,7 +2577,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob3, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -2591,7 +2591,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob3, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Supplied by paul66 in bug report #1652352 @@ -2605,7 +2605,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob3, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -2619,7 +2619,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob3, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Supplied by Paranoimia on #scummvm @@ -2633,7 +2633,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob3, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -2647,7 +2647,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob3, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -2661,7 +2661,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob3, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Supplied by SiRoCs in bug report #2098621 @@ -2675,7 +2675,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob3, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -2857,7 +2857,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob3, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -2871,7 +2871,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob3, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -2885,7 +2885,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob3, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -2899,7 +2899,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob3, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -2917,7 +2917,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob3, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -2935,7 +2935,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob3, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -2953,7 +2953,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob3, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { // Found in Found in french ADI 2.5 Anglais Multimedia 5e @@ -2967,7 +2967,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob3, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -3051,7 +3051,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeInca2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -3065,7 +3065,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeInca2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -3079,7 +3079,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeInca2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -3093,7 +3093,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeInca2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -3107,7 +3107,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeInca2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -3121,7 +3121,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeInca2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -3135,7 +3135,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeInca2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -3149,7 +3149,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeInca2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { @@ -3176,7 +3176,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeInca2, - kFeaturesAdlib | kFeaturesBATDemo, + kFeaturesAdLib | kFeaturesBATDemo, 0, 0, 7 }, { @@ -4654,7 +4654,7 @@ static const GOBGameDescription fallbackDescs[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { //3 @@ -4668,7 +4668,7 @@ static const GOBGameDescription fallbackDescs[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob2, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { //4 @@ -4710,7 +4710,7 @@ static const GOBGameDescription fallbackDescs[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeGob3, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { //7 @@ -4752,7 +4752,7 @@ static const GOBGameDescription fallbackDescs[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeLostInTime, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { //10 @@ -4766,7 +4766,7 @@ static const GOBGameDescription fallbackDescs[] = { GUIO_NOSUBTITLES | GUIO_NOSPEECH }, kGameTypeLostInTime, - kFeaturesAdlib, + kFeaturesAdLib, 0, 0, 0 }, { //11 @@ -4962,7 +4962,7 @@ static const GOBGameDescription fallbackDescs[] = { GUIO_NONE }, kGameTypeUrban, - kFeaturesAdlib | kFeatures640 | kFeaturesSCNDemo, + kFeaturesAdLib | kFeatures640 | kFeaturesSCNDemo, "", "", 8 } }; diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index 600d7f8bf8..1b02c73194 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -207,8 +207,8 @@ bool GobEngine::is640() const { return (_features & kFeatures640) != 0; } -bool GobEngine::hasAdlib() const { - return (_features & kFeaturesAdlib) != 0; +bool GobEngine::hasAdLib() const { + return (_features & kFeaturesAdLib) != 0; } bool GobEngine::isSCNDemo() const { diff --git a/engines/gob/gob.h b/engines/gob/gob.h index 9f9a0a054d..468e168f27 100644 --- a/engines/gob/gob.h +++ b/engines/gob/gob.h @@ -121,7 +121,7 @@ enum Features { kFeaturesNone = 0, kFeaturesCD = 1 << 0, kFeaturesEGA = 1 << 1, - kFeaturesAdlib = 1 << 2, + kFeaturesAdLib = 1 << 2, kFeatures640 = 1 << 3, kFeaturesSCNDemo = 1 << 4, kFeaturesBATDemo = 1 << 5, @@ -208,7 +208,7 @@ public: bool isCD() const; bool isEGA() const; bool is640() const; - bool hasAdlib() const; + bool hasAdLib() const; bool isSCNDemo() const; bool isBATDemo() const; bool is800x600() const; diff --git a/engines/gob/sound/adlib.cpp b/engines/gob/sound/adlib.cpp index 7566a9f8c7..e3dff14ace 100644 --- a/engines/gob/sound/adlib.cpp +++ b/engines/gob/sound/adlib.cpp @@ -59,7 +59,7 @@ void AdLib::init() { _rate = _mixer->getOutputRate(); - _opl = makeAdlibOPL(_rate); + _opl = makeAdLibOPL(_rate); _first = true; _ended = false; diff --git a/engines/gob/sound/sound.cpp b/engines/gob/sound/sound.cpp index 2d7ba02385..a0add6f0b6 100644 --- a/engines/gob/sound/sound.cpp +++ b/engines/gob/sound/sound.cpp @@ -51,7 +51,7 @@ Sound::Sound(GobEngine *vm) : _vm(vm) { _cdrom = 0; _bgatmos = 0; - _hasAdLib = (!_vm->_noMusic && _vm->hasAdlib()); + _hasAdLib = (!_vm->_noMusic && _vm->hasAdLib()); if (!_vm->_noMusic && (_vm->getPlatform() == Common::kPlatformAmiga)) { _infogrames = new Infogrames(*_vm->_mixer); @@ -130,13 +130,13 @@ bool Sound::sampleLoad(SoundDesc *sndDesc, SoundType type, const char *fileName, return sndDesc->load(type, data, size); } -void Sound::sampleFree(SoundDesc *sndDesc, bool noteAdlib, int index) { +void Sound::sampleFree(SoundDesc *sndDesc, bool noteAdLib, int index) { if (!sndDesc || sndDesc->empty()) return; if (sndDesc->getType() == SOUND_ADL) { - if (noteAdlib) { + if (noteAdLib) { if (_adlPlayer) if ((index == -1) || (_adlPlayer->getIndex() == index)) _adlPlayer->stopPlay(); @@ -241,7 +241,7 @@ bool Sound::adlibLoadADL(const char *fileName) { if (!_adlPlayer) _adlPlayer = new ADLPlayer(*_vm->_mixer); - debugC(1, kDebugSound, "Adlib: Loading ADL data (\"%s\")", fileName); + debugC(1, kDebugSound, "AdLib: Loading ADL data (\"%s\")", fileName); return _adlPlayer->load(fileName); } @@ -253,7 +253,7 @@ bool Sound::adlibLoadADL(byte *data, uint32 size, int index) { if (!_adlPlayer) _adlPlayer = new ADLPlayer(*_vm->_mixer); - debugC(1, kDebugSound, "Adlib: Loading ADL data (%d)", index); + debugC(1, kDebugSound, "AdLib: Loading ADL data (%d)", index); return _adlPlayer->load(data, size, index); } @@ -262,7 +262,7 @@ void Sound::adlibUnload() { if (!_hasAdLib) return; - debugC(1, kDebugSound, "Adlib: Unloading data"); + debugC(1, kDebugSound, "AdLib: Unloading data"); if (_adlPlayer) _adlPlayer->unload(); @@ -277,7 +277,7 @@ bool Sound::adlibLoadMDY(const char *fileName) { if (!_mdyPlayer) _mdyPlayer = new MDYPlayer(*_vm->_mixer); - debugC(1, kDebugSound, "Adlib: Loading MDY data (\"%s\")", fileName); + debugC(1, kDebugSound, "AdLib: Loading MDY data (\"%s\")", fileName); if (!_vm->_dataIO->existData(fileName)) { warning("Can't open MDY file \"%s\"", fileName); @@ -305,7 +305,7 @@ bool Sound::adlibLoadTBR(const char *fileName) { return false; } - debugC(1, kDebugSound, "Adlib: Loading MDY instruments (\"%s\")", fileName); + debugC(1, kDebugSound, "AdLib: Loading MDY instruments (\"%s\")", fileName); DataStream *stream = _vm->_dataIO->getDataStream(fileName); @@ -326,7 +326,7 @@ void Sound::adlibPlayTrack(const char *trackname) { if (_adlPlayer->isPlaying()) return; - debugC(1, kDebugSound, "Adlib: Playing ADL track \"%s\"", trackname); + debugC(1, kDebugSound, "AdLib: Playing ADL track \"%s\"", trackname); _adlPlayer->unload(); _adlPlayer->load(trackname); @@ -370,7 +370,7 @@ void Sound::adlibPlay() { if (!_hasAdLib) return; - debugC(1, kDebugSound, "Adlib: Starting playback"); + debugC(1, kDebugSound, "AdLib: Starting playback"); if (_adlPlayer) _adlPlayer->startPlay(); @@ -382,7 +382,7 @@ void Sound::adlibStop() { if (!_hasAdLib) return; - debugC(1, kDebugSound, "Adlib: Stopping playback"); + debugC(1, kDebugSound, "AdLib: Stopping playback"); if (_adlPlayer) _adlPlayer->stopPlay(); diff --git a/engines/gob/sound/sound.h b/engines/gob/sound/sound.h index 6f6c1d0469..516fed5c78 100644 --- a/engines/gob/sound/sound.h +++ b/engines/gob/sound/sound.h @@ -55,7 +55,7 @@ public: int sampleGetNextFreeSlot() const; bool sampleLoad(SoundDesc *sndDesc, SoundType type, const char *fileName, bool tryExist = true); - void sampleFree(SoundDesc *sndDesc, bool noteAdlib = false, int index = -1); + void sampleFree(SoundDesc *sndDesc, bool noteAdLib = false, int index = -1); // SoundBlaster diff --git a/engines/groovie/music.cpp b/engines/groovie/music.cpp index 1f38dab97e..d05a4c1b65 100644 --- a/engines/groovie/music.cpp +++ b/engines/groovie/music.cpp @@ -558,7 +558,7 @@ void MusicPlayerXMI::setTimbreAD(byte channel, const Timbre &timbre) { // Prepare the AdLib Instrument array from the GTL entry // - // struct AdlibInstrument used by our AdLib MIDI synth is 30 bytes. + // struct AdLibInstrument used by our AdLib MIDI synth is 30 bytes. // Since we pass data + 2 for non percussion instruments we need to // have a buffer of size 32, so there are no invalid memory reads, // when setting up an AdLib instrument. diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp index 92feec7608..3d24655a9b 100644 --- a/engines/kyra/kyra_v1.cpp +++ b/engines/kyra/kyra_v1.cpp @@ -120,7 +120,7 @@ Common::Error KyraEngine_v1::init() { } else if (_flags.platform == Common::kPlatformAmiga) { _sound = new SoundAmiga(this, _mixer); } else if (midiDriver == MD_ADLIB) { - _sound = new SoundAdlibPC(this, _mixer); + _sound = new SoundAdLibPC(this, _mixer); } else { Sound::kType type; @@ -149,9 +149,9 @@ Common::Error KyraEngine_v1::init() { // Unlike some SCUMM games, it's not that the MIDI sounds are // missing. It's just that at least at the time of writing they - // are decidedly inferior to the Adlib ones. + // are decidedly inferior to the AdLib ones. if (ConfMan.getBool("multi_midi")) { - SoundAdlibPC *adlib = new SoundAdlibPC(this, _mixer); + SoundAdLibPC *adlib = new SoundAdLibPC(this, _mixer); assert(adlib); _sound = new MixedSoundDriver(this, _mixer, soundMidiPc, adlib); diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp index 299963b330..3290e80231 100644 --- a/engines/kyra/lol.cpp +++ b/engines/kyra/lol.cpp @@ -429,7 +429,7 @@ Common::Error LoLEngine::init() { KyraEngine_v1::init(); initStaticResource(); - _envSfxDistThreshold = _sound->getSfxType() == Sound::kAdlib ? 15 : 3; + _envSfxDistThreshold = _sound->getSfxType() == Sound::kAdLib ? 15 : 3; _gui = new GUI_LoL(this); assert(_gui); diff --git a/engines/kyra/scene_hof.cpp b/engines/kyra/scene_hof.cpp index 531dddb828..4559554d77 100644 --- a/engines/kyra/scene_hof.cpp +++ b/engines/kyra/scene_hof.cpp @@ -117,7 +117,7 @@ void KyraEngine_HoF::enterNewScene(uint16 newScene, int facing, int unk1, int un _sceneExit4 = scene.exit4; if (newSoundFile) { - if (_sound->getMusicType() == Sound::kAdlib) { + if (_sound->getMusicType() == Sound::kAdLib) { while (_sound->isPlaying()) _system->delayMillis(10); } else { diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp index 9b3e5afcf1..3e748e7471 100644 --- a/engines/kyra/script_hof.cpp +++ b/engines/kyra/script_hof.cpp @@ -827,7 +827,7 @@ int KyraEngine_HoF::o2_showLetter(EMCState *script) { int KyraEngine_HoF::o2_playFireflyScore(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_playFireflyScore(%p) ()", (const void *)script); - if (_sound->getSfxType() == Sound::kAdlib || _sound->getSfxType() == Sound::kPCSpkr || + if (_sound->getSfxType() == Sound::kAdLib || _sound->getSfxType() == Sound::kPCSpkr || _sound->getSfxType() == Sound::kMidiMT32 || _sound->getSfxType() == Sound::kMidiGM) { snd_playWanderScoreViaMap(86, 1); return 1; @@ -1329,7 +1329,7 @@ int KyraEngine_HoF::o2_midiSoundFadeout(EMCState *script) { int KyraEngine_HoF::o2_getSfxDriver(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_getSfxDriver(%p) ()", (const void *)script); - if (_sound->getSfxType() == Sound::kAdlib) + if (_sound->getSfxType() == Sound::kAdLib) return 1; else if (_sound->getSfxType() == Sound::kPCSpkr) return 4; @@ -1349,7 +1349,7 @@ int KyraEngine_HoF::o2_getVocSupport(EMCState *script) { int KyraEngine_HoF::o2_getMusicDriver(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_getMusicDriver(%p) ()", (const void *)script); - if (_sound->getMusicType() == Sound::kAdlib) + if (_sound->getMusicType() == Sound::kAdLib) return 1; else if (_sound->getMusicType() == Sound::kPCSpkr) return 4; diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h index 6db31bface..ae0510853a 100644 --- a/engines/kyra/sound.h +++ b/engines/kyra/sound.h @@ -51,7 +51,7 @@ public: virtual ~Sound(); enum kType { - kAdlib, + kAdLib, kMidiMT32, kMidiGM, kTowns, diff --git a/engines/kyra/sound_adlib.cpp b/engines/kyra/sound_adlib.cpp index 51f5ba9392..af02a3fa99 100644 --- a/engines/kyra/sound_adlib.cpp +++ b/engines/kyra/sound_adlib.cpp @@ -49,17 +49,17 @@ #include "sound/fmopl.h" #include "sound/audiostream.h" -// Basic Adlib Programming: +// Basic AdLib Programming: // http://www.gamedev.net/reference/articles/article446.asp #define CALLBACKS_PER_SECOND 72 namespace Kyra { -class AdlibDriver : public Audio::AudioStream { +class AdLibDriver : public Audio::AudioStream { public: - AdlibDriver(Audio::Mixer *mixer, bool v2); - ~AdlibDriver(); + AdLibDriver(Audio::Mixer *mixer, bool v2); + ~AdLibDriver(); int callback(int opcode, ...); void callback(); @@ -96,7 +96,7 @@ public: private: struct OpcodeEntry { - typedef int (AdlibDriver::*DriverOpcode)(va_list &list); + typedef int (AdLibDriver::*DriverOpcode)(va_list &list); DriverOpcode function; const char *name; }; @@ -176,7 +176,7 @@ private: uint8 position; uint8 regAx; uint8 regBx; - typedef void (AdlibDriver::*Callback)(Channel&); + typedef void (AdLibDriver::*Callback)(Channel&); Callback primaryEffect; Callback secondaryEffect; uint8 fractionalSpacing; @@ -203,7 +203,7 @@ private: void primaryEffect2(Channel &channel); void secondaryEffect1(Channel &channel); - void resetAdlibState(); + void resetAdLibState(); void writeOPL(byte reg, byte val); void initChannel(Channel &channel); void noteOff(Channel &channel); @@ -236,7 +236,7 @@ private: uint8 *getProgram(int progId) { uint16 offset = READ_LE_UINT16(_soundData + 2 * progId); - //TODO: Check in LoL CD Adlib driver + //TODO: Check in LoL CD AdLib driver if (offset == 0xFFFF) return 0; return _soundData + READ_LE_UINT16(_soundData + 2 * progId); @@ -250,7 +250,7 @@ private: void executePrograms(); struct ParserOpcode { - typedef int (AdlibDriver::*POpcode)(uint8 *&dataptr, Channel &channel, uint8 value); + typedef int (AdLibDriver::*POpcode)(uint8 *&dataptr, Channel &channel, uint8 value); POpcode function; const char *name; }; @@ -269,7 +269,7 @@ private: int update_setBaseOctave(uint8 *&dataptr, Channel &channel, uint8 value); int update_stopChannel(uint8 *&dataptr, Channel &channel, uint8 value); int update_playRest(uint8 *&dataptr, Channel &channel, uint8 value); - int update_writeAdlib(uint8 *&dataptr, Channel &channel, uint8 value); + int update_writeAdLib(uint8 *&dataptr, Channel &channel, uint8 value); int update_setupNoteAndDuration(uint8 *&dataptr, Channel &channel, uint8 value); int update_setBaseNote(uint8 *&dataptr, Channel &channel, uint8 value); int update_setupSecondaryEffect1(uint8 *&dataptr, Channel &channel, uint8 value); @@ -412,7 +412,7 @@ private: bool _v2; }; -AdlibDriver::AdlibDriver(Audio::Mixer *mixer, bool v2) { +AdLibDriver::AdLibDriver(Audio::Mixer *mixer, bool v2) { setupOpcodeList(); setupParserOpcodeTable(); @@ -421,7 +421,7 @@ AdlibDriver::AdlibDriver(Audio::Mixer *mixer, bool v2) { _mixer = mixer; _flags = 0; - _adlib = makeAdlibOPL(getRate()); + _adlib = makeAdLibOPL(getRate()); assert(_adlib); memset(_channels, 0, sizeof(_channels)); @@ -447,7 +447,7 @@ AdlibDriver::AdlibDriver(Audio::Mixer *mixer, bool v2) { // HACK: We use MusicSoundType here for now so we can adjust the volume in the launcher dialog. // This affects SFX too, but if we want to support different volumes for SFX and music we would // have to change our player implementation, currently we setup the volume for an AdLib channel - // in AdlibDriver::adjustVolume, so if that would be called, we would have to know if the channel + // in AdLibDriver::adjustVolume, so if that would be called, we would have to know if the channel // is used by SFX or music, and then adjust the volume accordingly. Since Kyrandia 2 supports // different volumes for SFX and music, looking at the disasm and checking how the original does it // would be a good idea. @@ -461,16 +461,16 @@ AdlibDriver::AdlibDriver(Audio::Mixer *mixer, bool v2) { _syncJumpMask = 0; } -AdlibDriver::~AdlibDriver() { +AdLibDriver::~AdLibDriver() { _mixer->stopHandle(_soundHandle); OPLDestroy(_adlib); _adlib = 0; } -int AdlibDriver::callback(int opcode, ...) { +int AdLibDriver::callback(int opcode, ...) { Common::StackLock lock(_mutex); if (opcode >= _opcodesEntries || opcode < 0) { - warning("AdlibDriver: calling unknown opcode '%d'", opcode); + warning("AdLibDriver: calling unknown opcode '%d'", opcode); return 0; } @@ -485,26 +485,26 @@ int AdlibDriver::callback(int opcode, ...) { // Opcodes -int AdlibDriver::snd_ret0x100(va_list &list) { +int AdLibDriver::snd_ret0x100(va_list &list) { return 0x100; } -int AdlibDriver::snd_ret0x1983(va_list &list) { +int AdLibDriver::snd_ret0x1983(va_list &list) { return 0x1983; } -int AdlibDriver::snd_initDriver(va_list &list) { +int AdLibDriver::snd_initDriver(va_list &list) { _lastProcessed = _soundsPlaying = 0; - resetAdlibState(); + resetAdLibState(); return 0; } -int AdlibDriver::snd_deinitDriver(va_list &list) { - resetAdlibState(); +int AdLibDriver::snd_deinitDriver(va_list &list) { + resetAdLibState(); return 0; } -int AdlibDriver::snd_setSoundData(va_list &list) { +int AdLibDriver::snd_setSoundData(va_list &list) { if (_soundData) { delete[] _soundData; _soundData = 0; @@ -513,12 +513,12 @@ int AdlibDriver::snd_setSoundData(va_list &list) { return 0; } -int AdlibDriver::snd_unkOpcode1(va_list &list) { +int AdLibDriver::snd_unkOpcode1(va_list &list) { warning("unimplemented snd_unkOpcode1"); return 0; } -int AdlibDriver::snd_startSong(va_list &list) { +int AdLibDriver::snd_startSong(va_list &list) { int songId = va_arg(list, int); _flags |= 8; _flagTrigger = 1; @@ -543,13 +543,13 @@ int AdlibDriver::snd_startSong(va_list &list) { return 0; } -int AdlibDriver::snd_isChannelPlaying(va_list &list) { +int AdLibDriver::snd_isChannelPlaying(va_list &list) { int channel = va_arg(list, int); assert(channel >= 0 && channel <= 9); return (_channels[channel].dataptr != 0) ? 1 : 0; } -int AdlibDriver::snd_stopChannel(va_list &list) { +int AdLibDriver::snd_stopChannel(va_list &list) { int channel = va_arg(list, int); int maxChannel; @@ -574,7 +574,7 @@ int AdlibDriver::snd_stopChannel(va_list &list) { return 0; } -int AdlibDriver::snd_readByte(va_list &list) { +int AdLibDriver::snd_readByte(va_list &list) { int a = va_arg(list, int); int b = va_arg(list, int); uint8 *ptr = getProgram(a) + b; @@ -582,7 +582,7 @@ int AdlibDriver::snd_readByte(va_list &list) { return *ptr; } -int AdlibDriver::snd_writeByte(va_list &list) { +int AdLibDriver::snd_writeByte(va_list &list) { int a = va_arg(list, int); int b = va_arg(list, int); uint8 value = va_arg(list, int); @@ -592,36 +592,36 @@ int AdlibDriver::snd_writeByte(va_list &list) { return value; } -int AdlibDriver::snd_getSoundTrigger(va_list &list) { +int AdLibDriver::snd_getSoundTrigger(va_list &list) { return _soundTrigger; } -int AdlibDriver::snd_unkOpcode4(va_list &list) { +int AdLibDriver::snd_unkOpcode4(va_list &list) { warning("unimplemented snd_unkOpcode4"); return 0; } -int AdlibDriver::snd_dummy(va_list &list) { +int AdLibDriver::snd_dummy(va_list &list) { return 0; } -int AdlibDriver::snd_getNullvar4(va_list &list) { +int AdLibDriver::snd_getNullvar4(va_list &list) { warning("unimplemented snd_getNullvar4"); return 0; } -int AdlibDriver::snd_setNullvar3(va_list &list) { +int AdLibDriver::snd_setNullvar3(va_list &list) { warning("unimplemented snd_setNullvar3"); return 0; } -int AdlibDriver::snd_setFlag(va_list &list) { +int AdLibDriver::snd_setFlag(va_list &list) { int oldFlags = _flags; _flags |= va_arg(list, int); return oldFlags; } -int AdlibDriver::snd_clearFlag(va_list &list) { +int AdLibDriver::snd_clearFlag(va_list &list) { int oldFlags = _flags; _flags &= ~(va_arg(list, int)); return oldFlags; @@ -629,7 +629,7 @@ int AdlibDriver::snd_clearFlag(va_list &list) { // timer callback -void AdlibDriver::callback() { +void AdLibDriver::callback() { Common::StackLock lock(_mutex); --_flagTrigger; if (_flagTrigger < 0) @@ -647,7 +647,7 @@ void AdlibDriver::callback() { } } -void AdlibDriver::setupPrograms() { +void AdLibDriver::setupPrograms() { while (_lastProcessed != _soundsPlaying) { uint8 *ptr = getProgram(_soundIdTable[_lastProcessed]); uint8 chan = *ptr++; @@ -712,9 +712,9 @@ void AdlibDriver::setupPrograms() { // effects callbacks. The final opcode in a set can prevent this, if it's a // function and it returns anything other than 1. -void AdlibDriver::executePrograms() { +void AdLibDriver::executePrograms() { // Each channel runs its own program. There are ten channels: One for - // each Adlib channel (0-8), plus one "control channel" (9) which is + // each AdLib channel (0-8), plus one "control channel" (9) which is // the one that tells the other channels what to do. // This is where we ensure that channels that are made to jump "in @@ -812,8 +812,8 @@ void AdlibDriver::executePrograms() { // -void AdlibDriver::resetAdlibState() { - debugC(9, kDebugLevelSound, "resetAdlibState()"); +void AdLibDriver::resetAdLibState() { + debugC(9, kDebugLevelSound, "resetAdLibState()"); _rnd = 0x1234; // Authorize the control of the waveforms @@ -840,11 +840,11 @@ void AdlibDriver::resetAdlibState() { // Old calling style: output0x388(0xABCD) // New calling style: writeOPL(0xAB, 0xCD) -void AdlibDriver::writeOPL(byte reg, byte val) { +void AdLibDriver::writeOPL(byte reg, byte val) { OPLWriteReg(_adlib, reg, val); } -void AdlibDriver::initChannel(Channel &channel) { +void AdLibDriver::initChannel(Channel &channel) { debugC(9, kDebugLevelSound, "initChannel(%lu)", (long)(&channel - _channels)); memset(&channel.dataptr, 0, sizeof(Channel) - ((char *)&channel.dataptr - (char *)&channel)); @@ -857,10 +857,10 @@ void AdlibDriver::initChannel(Channel &channel) { channel.lock = false; } -void AdlibDriver::noteOff(Channel &channel) { +void AdLibDriver::noteOff(Channel &channel) { debugC(9, kDebugLevelSound, "noteOff(%lu)", (long)(&channel - _channels)); - // The control channel has no corresponding Adlib channel + // The control channel has no corresponding AdLib channel if (_curChannel >= 9) return; @@ -877,16 +877,16 @@ void AdlibDriver::noteOff(Channel &channel) { writeOPL(0xB0 + _curChannel, channel.regBx); } -void AdlibDriver::unkOutput2(uint8 chan) { +void AdLibDriver::unkOutput2(uint8 chan) { debugC(9, kDebugLevelSound, "unkOutput2(%d)", chan); - // The control channel has no corresponding Adlib channel + // The control channel has no corresponding AdLib channel if (chan >= 9) return; // I believe this has to do with channels 6, 7, and 8 being special - // when Adlib's rhythm section is enabled. + // when AdLib's rhythm section is enabled. if (_rhythmSectionBits && chan >= 6) return; @@ -917,7 +917,7 @@ void AdlibDriver::unkOutput2(uint8 chan) { // problem, but cannot currently be used because of licensing and // performance issues. // - // Ken Silverman's Adlib emulator (which can be found on his Web page - + // Ken Silverman's AdLib emulator (which can be found on his Web page - // http://www.advsys.net/ken - and as part of AdPlug) also seems to be // immune, but is apparently not as feature complete as MAME's. @@ -928,7 +928,7 @@ void AdlibDriver::unkOutput2(uint8 chan) { // generate an even distribution of almost all numbers from 0 through 65535, // though in my tests some numbers were never generated. -uint16 AdlibDriver::getRandomNr() { +uint16 AdLibDriver::getRandomNr() { _rnd += 0x9248; uint16 lowBits = _rnd & 7; _rnd >>= 3; @@ -936,7 +936,7 @@ uint16 AdlibDriver::getRandomNr() { return _rnd; } -void AdlibDriver::setupDuration(uint8 duration, Channel &channel) { +void AdLibDriver::setupDuration(uint8 duration, Channel &channel) { debugC(9, kDebugLevelSound, "setupDuration(%d, %lu)", duration, (long)(&channel - _channels)); if (channel.durationRandomness) { channel.duration = duration + (getRandomNr() & channel.durationRandomness); @@ -950,7 +950,7 @@ void AdlibDriver::setupDuration(uint8 duration, Channel &channel) { // This function may or may not play the note. It's usually followed by a call // to noteOn(), which will always play the current note. -void AdlibDriver::setupNote(uint8 rawNote, Channel &channel, bool flag) { +void AdLibDriver::setupNote(uint8 rawNote, Channel &channel, bool flag) { debugC(9, kDebugLevelSound, "setupNote(%d, %lu)", rawNote, (long)(&channel - _channels)); assert(_curChannel < 9); @@ -1006,7 +1006,7 @@ void AdlibDriver::setupNote(uint8 rawNote, Channel &channel, bool flag) { writeOPL(0xB0 + _curChannel, channel.regBx); } -void AdlibDriver::setupInstrument(uint8 regOffset, uint8 *dataptr, Channel &channel) { +void AdLibDriver::setupInstrument(uint8 regOffset, uint8 *dataptr, Channel &channel) { debugC(9, kDebugLevelSound, "setupInstrument(%d, %p, %lu)", regOffset, (const void *)dataptr, (long)(&channel - _channels)); assert(_curChannel < 9); @@ -1056,7 +1056,7 @@ void AdlibDriver::setupInstrument(uint8 regOffset, uint8 *dataptr, Channel &chan // Apart from playing the note, this function also updates the variables for // primary effect 2. -void AdlibDriver::noteOn(Channel &channel) { +void AdLibDriver::noteOn(Channel &channel) { debugC(9, kDebugLevelSound, "noteOn(%lu)", (long)(&channel - _channels)); // The "note on" bit is set, and the current note is played. @@ -1072,7 +1072,7 @@ void AdlibDriver::noteOn(Channel &channel) { channel.unk38 = channel.unk36; } -void AdlibDriver::adjustVolume(Channel &channel) { +void AdLibDriver::adjustVolume(Channel &channel) { debugC(9, kDebugLevelSound, "adjustVolume(%lu)", (long)(&channel - _channels)); assert(_curChannel < 9); @@ -1100,7 +1100,7 @@ void AdlibDriver::adjustVolume(Channel &channel) { // unk30 - modifies the frequency // unk31 - determines how often the notes are played -void AdlibDriver::primaryEffect1(Channel &channel) { +void AdLibDriver::primaryEffect1(Channel &channel) { debugC(9, kDebugLevelSound, "Calling primaryEffect1 (channel: %d)", _curChannel); assert(_curChannel < 9); @@ -1186,7 +1186,7 @@ void AdlibDriver::primaryEffect1(Channel &channel) { // Note that unk41 is never initialised. Not that it should matter much, but it // is a bit sloppy. -void AdlibDriver::primaryEffect2(Channel &channel) { +void AdLibDriver::primaryEffect2(Channel &channel) { debugC(9, kDebugLevelSound, "Calling primaryEffect2 (channel: %d)", _curChannel); assert(_curChannel < 9); @@ -1244,7 +1244,7 @@ void AdlibDriver::primaryEffect2(Channel &channel) { // unk22 - the operation to perform // offset - the offset to the data chunk -void AdlibDriver::secondaryEffect1(Channel &channel) { +void AdLibDriver::secondaryEffect1(Channel &channel) { debugC(9, kDebugLevelSound, "Calling secondaryEffect1 (channel: %d)", _curChannel); assert(_curChannel < 9); @@ -1258,7 +1258,7 @@ void AdlibDriver::secondaryEffect1(Channel &channel) { } } -uint8 AdlibDriver::calculateOpLevel1(Channel &channel) { +uint8 AdLibDriver::calculateOpLevel1(Channel &channel) { int8 value = channel.opLevel1 & 0x3F; if (channel.twoChan) { @@ -1272,7 +1272,7 @@ uint8 AdlibDriver::calculateOpLevel1(Channel &channel) { return checkValue(value) | (channel.opLevel1 & 0xC0); } -uint8 AdlibDriver::calculateOpLevel2(Channel &channel) { +uint8 AdLibDriver::calculateOpLevel2(Channel &channel) { int8 value = channel.opLevel2 & 0x3F; value += channel.opExtraLevel1; @@ -1286,12 +1286,12 @@ uint8 AdlibDriver::calculateOpLevel2(Channel &channel) { // parser opcodes -int AdlibDriver::update_setRepeat(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_setRepeat(uint8 *&dataptr, Channel &channel, uint8 value) { channel.repeatCounter = value; return 0; } -int AdlibDriver::update_checkRepeat(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_checkRepeat(uint8 *&dataptr, Channel &channel, uint8 value) { ++dataptr; if (--channel.repeatCounter) { int16 add = READ_LE_UINT16(dataptr - 2); @@ -1300,12 +1300,12 @@ int AdlibDriver::update_checkRepeat(uint8 *&dataptr, Channel &channel, uint8 val return 0; } -int AdlibDriver::update_setupProgram(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_setupProgram(uint8 *&dataptr, Channel &channel, uint8 value) { if (value == 0xFF) return 0; uint8 *ptr = getProgram(value); - //TODO: Check in LoL CD Adlib driver + //TODO: Check in LoL CD AdLib driver if (!ptr) return 0; uint8 chan = *ptr++; @@ -1328,12 +1328,12 @@ int AdlibDriver::update_setupProgram(uint8 *&dataptr, Channel &channel, uint8 va return 0; } -int AdlibDriver::update_setNoteSpacing(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_setNoteSpacing(uint8 *&dataptr, Channel &channel, uint8 value) { channel.spacing1 = value; return 0; } -int AdlibDriver::update_jump(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_jump(uint8 *&dataptr, Channel &channel, uint8 value) { --dataptr; int16 add = READ_LE_UINT16(dataptr); dataptr += 2; dataptr += add; @@ -1342,7 +1342,7 @@ int AdlibDriver::update_jump(uint8 *&dataptr, Channel &channel, uint8 value) { return 0; } -int AdlibDriver::update_jumpToSubroutine(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_jumpToSubroutine(uint8 *&dataptr, Channel &channel, uint8 value) { --dataptr; int16 add = READ_LE_UINT16(dataptr); dataptr += 2; channel.dataptrStack[channel.dataptrStackPos++] = dataptr; @@ -1350,17 +1350,17 @@ int AdlibDriver::update_jumpToSubroutine(uint8 *&dataptr, Channel &channel, uint return 0; } -int AdlibDriver::update_returnFromSubroutine(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_returnFromSubroutine(uint8 *&dataptr, Channel &channel, uint8 value) { dataptr = channel.dataptrStack[--channel.dataptrStackPos]; return 0; } -int AdlibDriver::update_setBaseOctave(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_setBaseOctave(uint8 *&dataptr, Channel &channel, uint8 value) { channel.baseOctave = value; return 0; } -int AdlibDriver::update_stopChannel(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_stopChannel(uint8 *&dataptr, Channel &channel, uint8 value) { channel.priority = 0; if (_curChannel != 9) noteOff(channel); @@ -1368,40 +1368,40 @@ int AdlibDriver::update_stopChannel(uint8 *&dataptr, Channel &channel, uint8 val return 2; } -int AdlibDriver::update_playRest(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_playRest(uint8 *&dataptr, Channel &channel, uint8 value) { setupDuration(value, channel); noteOff(channel); return (value != 0); } -int AdlibDriver::update_writeAdlib(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_writeAdLib(uint8 *&dataptr, Channel &channel, uint8 value) { writeOPL(value, *dataptr++); return 0; } -int AdlibDriver::update_setupNoteAndDuration(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_setupNoteAndDuration(uint8 *&dataptr, Channel &channel, uint8 value) { setupNote(value, channel); value = *dataptr++; setupDuration(value, channel); return (value != 0); } -int AdlibDriver::update_setBaseNote(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_setBaseNote(uint8 *&dataptr, Channel &channel, uint8 value) { channel.baseNote = value; return 0; } -int AdlibDriver::update_setupSecondaryEffect1(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_setupSecondaryEffect1(uint8 *&dataptr, Channel &channel, uint8 value) { channel.unk18 = value; channel.unk19 = value; channel.unk20 = channel.unk21 = *dataptr++; channel.unk22 = *dataptr++; channel.offset = READ_LE_UINT16(dataptr); dataptr += 2; - channel.secondaryEffect = &AdlibDriver::secondaryEffect1; + channel.secondaryEffect = &AdLibDriver::secondaryEffect1; return 0; } -int AdlibDriver::update_stopOtherChannel(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_stopOtherChannel(uint8 *&dataptr, Channel &channel, uint8 value) { Channel &channel2 = _channels[value]; channel2.duration = 0; channel2.priority = 0; @@ -1409,7 +1409,7 @@ int AdlibDriver::update_stopOtherChannel(uint8 *&dataptr, Channel &channel, uint return 0; } -int AdlibDriver::update_waitForEndOfProgram(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_waitForEndOfProgram(uint8 *&dataptr, Channel &channel, uint8 value) { uint8 *ptr = getProgram(value); uint8 chan = *ptr; @@ -1420,49 +1420,49 @@ int AdlibDriver::update_waitForEndOfProgram(uint8 *&dataptr, Channel &channel, u return 2; } -int AdlibDriver::update_setupInstrument(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_setupInstrument(uint8 *&dataptr, Channel &channel, uint8 value) { setupInstrument(_curRegOffset, getInstrument(value), channel); return 0; } -int AdlibDriver::update_setupPrimaryEffect1(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_setupPrimaryEffect1(uint8 *&dataptr, Channel &channel, uint8 value) { channel.unk29 = value; channel.unk30 = READ_BE_UINT16(dataptr); dataptr += 2; - channel.primaryEffect = &AdlibDriver::primaryEffect1; + channel.primaryEffect = &AdLibDriver::primaryEffect1; channel.unk31 = 0xFF; return 0; } -int AdlibDriver::update_removePrimaryEffect1(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_removePrimaryEffect1(uint8 *&dataptr, Channel &channel, uint8 value) { --dataptr; channel.primaryEffect = 0; channel.unk30 = 0; return 0; } -int AdlibDriver::update_setBaseFreq(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_setBaseFreq(uint8 *&dataptr, Channel &channel, uint8 value) { channel.baseFreq = value; return 0; } -int AdlibDriver::update_setupPrimaryEffect2(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_setupPrimaryEffect2(uint8 *&dataptr, Channel &channel, uint8 value) { channel.unk32 = value; channel.unk33 = *dataptr++; uint8 temp = *dataptr++; channel.unk34 = temp + 1; channel.unk35 = temp << 1; channel.unk36 = *dataptr++; - channel.primaryEffect = &AdlibDriver::primaryEffect2; + channel.primaryEffect = &AdLibDriver::primaryEffect2; return 0; } -int AdlibDriver::update_setPriority(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_setPriority(uint8 *&dataptr, Channel &channel, uint8 value) { channel.priority = value; return 0; } -int AdlibDriver::updateCallback23(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::updateCallback23(uint8 *&dataptr, Channel &channel, uint8 value) { value >>= 1; _unkValue1 = _unkValue2 = value; _unkValue3 = 0xFF; @@ -1470,7 +1470,7 @@ int AdlibDriver::updateCallback23(uint8 *&dataptr, Channel &channel, uint8 value return 0; } -int AdlibDriver::updateCallback24(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::updateCallback24(uint8 *&dataptr, Channel &channel, uint8 value) { if (_unkValue5) { if (_unkValue4 & value) { _unkValue5 = 0; @@ -1486,50 +1486,50 @@ int AdlibDriver::updateCallback24(uint8 *&dataptr, Channel &channel, uint8 value return 2; } -int AdlibDriver::update_setExtraLevel1(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_setExtraLevel1(uint8 *&dataptr, Channel &channel, uint8 value) { channel.opExtraLevel1 = value; adjustVolume(channel); return 0; } -int AdlibDriver::update_setupDuration(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_setupDuration(uint8 *&dataptr, Channel &channel, uint8 value) { setupDuration(value, channel); return (value != 0); } -int AdlibDriver::update_playNote(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_playNote(uint8 *&dataptr, Channel &channel, uint8 value) { setupDuration(value, channel); noteOn(channel); return (value != 0); } -int AdlibDriver::update_setFractionalNoteSpacing(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_setFractionalNoteSpacing(uint8 *&dataptr, Channel &channel, uint8 value) { channel.fractionalSpacing = value & 7; return 0; } -int AdlibDriver::update_setTempo(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_setTempo(uint8 *&dataptr, Channel &channel, uint8 value) { _tempo = value; return 0; } -int AdlibDriver::update_removeSecondaryEffect1(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_removeSecondaryEffect1(uint8 *&dataptr, Channel &channel, uint8 value) { --dataptr; channel.secondaryEffect = 0; return 0; } -int AdlibDriver::update_setChannelTempo(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_setChannelTempo(uint8 *&dataptr, Channel &channel, uint8 value) { channel.tempo = value; return 0; } -int AdlibDriver::update_setExtraLevel3(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_setExtraLevel3(uint8 *&dataptr, Channel &channel, uint8 value) { channel.opExtraLevel3 = value; return 0; } -int AdlibDriver::update_setExtraLevel2(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_setExtraLevel2(uint8 *&dataptr, Channel &channel, uint8 value) { int channelBackUp = _curChannel; _curChannel = value; @@ -1541,7 +1541,7 @@ int AdlibDriver::update_setExtraLevel2(uint8 *&dataptr, Channel &channel, uint8 return 0; } -int AdlibDriver::update_changeExtraLevel2(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_changeExtraLevel2(uint8 *&dataptr, Channel &channel, uint8 value) { int channelBackUp = _curChannel; _curChannel = value; @@ -1556,7 +1556,7 @@ int AdlibDriver::update_changeExtraLevel2(uint8 *&dataptr, Channel &channel, uin // Apart from initialising to zero, these two functions are the only ones that // modify _vibratoAndAMDepthBits. -int AdlibDriver::update_setAMDepth(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_setAMDepth(uint8 *&dataptr, Channel &channel, uint8 value) { if (value & 1) _vibratoAndAMDepthBits |= 0x80; else @@ -1566,7 +1566,7 @@ int AdlibDriver::update_setAMDepth(uint8 *&dataptr, Channel &channel, uint8 valu return 0; } -int AdlibDriver::update_setVibratoDepth(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_setVibratoDepth(uint8 *&dataptr, Channel &channel, uint8 value) { if (value & 1) _vibratoAndAMDepthBits |= 0x40; else @@ -1576,13 +1576,13 @@ int AdlibDriver::update_setVibratoDepth(uint8 *&dataptr, Channel &channel, uint8 return 0; } -int AdlibDriver::update_changeExtraLevel1(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_changeExtraLevel1(uint8 *&dataptr, Channel &channel, uint8 value) { channel.opExtraLevel1 += value; adjustVolume(channel); return 0; } -int AdlibDriver::updateCallback38(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::updateCallback38(uint8 *&dataptr, Channel &channel, uint8 value) { int channelBackUp = _curChannel; _curChannel = value; @@ -1611,7 +1611,7 @@ int AdlibDriver::updateCallback38(uint8 *&dataptr, Channel &channel, uint8 value return 0; } -int AdlibDriver::updateCallback39(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::updateCallback39(uint8 *&dataptr, Channel &channel, uint8 value) { assert(_curChannel < 9); uint16 unk = *dataptr++; @@ -1631,35 +1631,35 @@ int AdlibDriver::updateCallback39(uint8 *&dataptr, Channel &channel, uint8 value return 0; } -int AdlibDriver::update_removePrimaryEffect2(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_removePrimaryEffect2(uint8 *&dataptr, Channel &channel, uint8 value) { --dataptr; channel.primaryEffect = 0; return 0; } -int AdlibDriver::updateCallback41(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::updateCallback41(uint8 *&dataptr, Channel &channel, uint8 value) { channel.unk16 = value; setupNote(channel.rawNote, channel, true); return 0; } -int AdlibDriver::update_resetToGlobalTempo(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_resetToGlobalTempo(uint8 *&dataptr, Channel &channel, uint8 value) { --dataptr; channel.tempo = _tempo; return 0; } -int AdlibDriver::update_nop(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_nop(uint8 *&dataptr, Channel &channel, uint8 value) { --dataptr; return 0; } -int AdlibDriver::update_setDurationRandomness(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_setDurationRandomness(uint8 *&dataptr, Channel &channel, uint8 value) { channel.durationRandomness = value; return 0; } -int AdlibDriver::update_changeChannelTempo(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_changeChannelTempo(uint8 *&dataptr, Channel &channel, uint8 value) { int tempo = channel.tempo + (int8)value; if (tempo <= 0) @@ -1671,7 +1671,7 @@ int AdlibDriver::update_changeChannelTempo(uint8 *&dataptr, Channel &channel, ui return 0; } -int AdlibDriver::updateCallback46(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::updateCallback46(uint8 *&dataptr, Channel &channel, uint8 value) { uint8 entry = *dataptr++; _tablePtr1 = _unkTable2[entry++]; _tablePtr2 = _unkTable2[entry]; @@ -1682,7 +1682,7 @@ int AdlibDriver::updateCallback46(uint8 *&dataptr, Channel &channel, uint8 value return 0; } -int AdlibDriver::update_setupRhythmSection(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_setupRhythmSection(uint8 *&dataptr, Channel &channel, uint8 value) { int channelBackUp = _curChannel; int regOffsetBackUp = _curRegOffset; @@ -1727,7 +1727,7 @@ int AdlibDriver::update_setupRhythmSection(uint8 *&dataptr, Channel &channel, ui return 0; } -int AdlibDriver::update_playRhythmSection(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_playRhythmSection(uint8 *&dataptr, Channel &channel, uint8 value) { // Any instrument that we want to play, and which was already playing, // is temporarily keyed off. Instruments that were off already, or // which we don't want to play, retain their old on/off status. This is @@ -1747,7 +1747,7 @@ int AdlibDriver::update_playRhythmSection(uint8 *&dataptr, Channel &channel, uin return 0; } -int AdlibDriver::update_removeRhythmSection(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_removeRhythmSection(uint8 *&dataptr, Channel &channel, uint8 value) { --dataptr; _rhythmSectionBits = 0; @@ -1758,7 +1758,7 @@ int AdlibDriver::update_removeRhythmSection(uint8 *&dataptr, Channel &channel, u return 0; } -int AdlibDriver::updateCallback51(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::updateCallback51(uint8 *&dataptr, Channel &channel, uint8 value) { uint8 value2 = *dataptr++; if (value & 1) { @@ -1799,7 +1799,7 @@ int AdlibDriver::updateCallback51(uint8 *&dataptr, Channel &channel, uint8 value return 0; } -int AdlibDriver::updateCallback52(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::updateCallback52(uint8 *&dataptr, Channel &channel, uint8 value) { uint8 value2 = *dataptr++; if (value & 1) { @@ -1840,7 +1840,7 @@ int AdlibDriver::updateCallback52(uint8 *&dataptr, Channel &channel, uint8 value return 0; } -int AdlibDriver::updateCallback53(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::updateCallback53(uint8 *&dataptr, Channel &channel, uint8 value) { uint8 value2 = *dataptr++; if (value & 1) { @@ -1881,17 +1881,17 @@ int AdlibDriver::updateCallback53(uint8 *&dataptr, Channel &channel, uint8 value return 0; } -int AdlibDriver::update_setSoundTrigger(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_setSoundTrigger(uint8 *&dataptr, Channel &channel, uint8 value) { _soundTrigger = value; return 0; } -int AdlibDriver::update_setTempoReset(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::update_setTempoReset(uint8 *&dataptr, Channel &channel, uint8 value) { channel.tempoReset = value; return 0; } -int AdlibDriver::updateCallback56(uint8 *&dataptr, Channel &channel, uint8 value) { +int AdLibDriver::updateCallback56(uint8 *&dataptr, Channel &channel, uint8 value) { channel.unk39 = value; channel.unk40 = *dataptr++; return 0; @@ -1899,9 +1899,9 @@ int AdlibDriver::updateCallback56(uint8 *&dataptr, Channel &channel, uint8 value // static res -#define COMMAND(x) { &AdlibDriver::x, #x } +#define COMMAND(x) { &AdLibDriver::x, #x } -void AdlibDriver::setupOpcodeList() { +void AdLibDriver::setupOpcodeList() { static const OpcodeEntry opcodeList[] = { COMMAND(snd_ret0x100), COMMAND(snd_ret0x1983), @@ -1927,7 +1927,7 @@ void AdlibDriver::setupOpcodeList() { _opcodesEntries = ARRAYSIZE(opcodeList); } -void AdlibDriver::setupParserOpcodeTable() { +void AdLibDriver::setupParserOpcodeTable() { static const ParserOpcode parserOpcodeTable[] = { // 0 COMMAND(update_setRepeat), @@ -1944,7 +1944,7 @@ void AdlibDriver::setupParserOpcodeTable() { // 8 COMMAND(update_stopChannel), COMMAND(update_playRest), - COMMAND(update_writeAdlib), + COMMAND(update_writeAdLib), COMMAND(update_setupNoteAndDuration), // 12 @@ -2051,16 +2051,16 @@ void AdlibDriver::setupParserOpcodeTable() { // This table holds the register offset for operator 1 for each of the nine // channels. To get the register offset for operator 2, simply add 3. -const uint8 AdlibDriver::_regOffset[] = { +const uint8 AdLibDriver::_regOffset[] = { 0x00, 0x01, 0x02, 0x08, 0x09, 0x0A, 0x10, 0x11, 0x12 }; // Given the size of this table, and the range of its values, it's probably the // F-Numbers (10 bits) for the notes of the 12-tone scale. However, it does not -// match the table in the Adlib documentation I've seen. +// match the table in the AdLib documentation I've seen. -const uint16 AdlibDriver::_unkTable[] = { +const uint16 AdLibDriver::_unkTable[] = { 0x0134, 0x0147, 0x015A, 0x016F, 0x0184, 0x019C, 0x01B4, 0x01CE, 0x01E9, 0x0207, 0x0225, 0x0246 }; @@ -2068,16 +2068,16 @@ const uint16 AdlibDriver::_unkTable[] = { // These tables are currently only used by updateCallback46(), which only ever // uses the first element of one of the sub-tables. -const uint8 *AdlibDriver::_unkTable2[] = { - AdlibDriver::_unkTable2_1, - AdlibDriver::_unkTable2_2, - AdlibDriver::_unkTable2_1, - AdlibDriver::_unkTable2_2, - AdlibDriver::_unkTable2_3, - AdlibDriver::_unkTable2_2 +const uint8 *AdLibDriver::_unkTable2[] = { + AdLibDriver::_unkTable2_1, + AdLibDriver::_unkTable2_2, + AdLibDriver::_unkTable2_1, + AdLibDriver::_unkTable2_2, + AdLibDriver::_unkTable2_3, + AdLibDriver::_unkTable2_2 }; -const uint8 AdlibDriver::_unkTable2_1[] = { +const uint8 AdLibDriver::_unkTable2_1[] = { 0x50, 0x50, 0x4F, 0x4F, 0x4E, 0x4E, 0x4D, 0x4D, 0x4C, 0x4C, 0x4B, 0x4B, 0x4A, 0x4A, 0x49, 0x49, 0x48, 0x48, 0x47, 0x47, 0x46, 0x46, 0x45, 0x45, @@ -2098,7 +2098,7 @@ const uint8 AdlibDriver::_unkTable2_1[] = { }; // no don't ask me WHY this table exsits! -const uint8 AdlibDriver::_unkTable2_2[] = { +const uint8 AdLibDriver::_unkTable2_2[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, @@ -2117,7 +2117,7 @@ const uint8 AdlibDriver::_unkTable2_2[] = { 0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F }; -const uint8 AdlibDriver::_unkTable2_3[] = { +const uint8 AdLibDriver::_unkTable2_3[] = { 0x40, 0x40, 0x40, 0x3F, 0x3F, 0x3F, 0x3E, 0x3E, 0x3E, 0x3D, 0x3D, 0x3D, 0x3C, 0x3C, 0x3C, 0x3B, 0x3B, 0x3B, 0x3A, 0x3A, 0x3A, 0x39, 0x39, 0x39, @@ -2144,7 +2144,7 @@ const uint8 AdlibDriver::_unkTable2_3[] = { // This could be some sort of pitch bend, but I have yet to see it used for // anything so it's hard to say. -const uint8 AdlibDriver::_unkTables[][32] = { +const uint8 AdLibDriver::_unkTables[][32] = { // 0 { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, @@ -2224,17 +2224,17 @@ const uint8 AdlibDriver::_unkTables[][32] = { // used in other places throughout the game, but the player is less likely to // spend enough time there to notice. -const int SoundAdlibPC::_kyra1SoundTriggers[] = { +const int SoundAdLibPC::_kyra1SoundTriggers[] = { 0, 4, 5, 3 }; -const int SoundAdlibPC::_kyra1NumSoundTriggers = ARRAYSIZE(SoundAdlibPC::_kyra1SoundTriggers); +const int SoundAdLibPC::_kyra1NumSoundTriggers = ARRAYSIZE(SoundAdLibPC::_kyra1SoundTriggers); -SoundAdlibPC::SoundAdlibPC(KyraEngine_v1 *vm, Audio::Mixer *mixer) +SoundAdLibPC::SoundAdLibPC(KyraEngine_v1 *vm, Audio::Mixer *mixer) : Sound(vm, mixer), _driver(0), _trackEntries(), _soundDataPtr(0) { memset(_trackEntries, 0, sizeof(_trackEntries)); _v2 = (_vm->gameFlags().gameID == GI_KYRA2) || (_vm->gameFlags().gameID == GI_LOL && !_vm->gameFlags().isDemo); - _driver = new AdlibDriver(mixer, _v2); + _driver = new AdLibDriver(mixer, _v2); assert(_driver); _sfxPlayingSound = -1; @@ -2250,18 +2250,18 @@ SoundAdlibPC::SoundAdlibPC(KyraEngine_v1 *vm, Audio::Mixer *mixer) } } -SoundAdlibPC::~SoundAdlibPC() { +SoundAdLibPC::~SoundAdLibPC() { delete _driver; delete[] _soundDataPtr; } -bool SoundAdlibPC::init() { +bool SoundAdLibPC::init() { _driver->callback(2); _driver->callback(16, int(4)); return true; } -void SoundAdlibPC::process() { +void SoundAdLibPC::process() { uint8 trigger = _driver->callback(11); if (trigger < _numSoundTriggers) { @@ -2275,7 +2275,7 @@ void SoundAdlibPC::process() { } } -void SoundAdlibPC::playTrack(uint8 track) { +void SoundAdLibPC::playTrack(uint8 track) { if (_musicEnabled) { // WORKAROUND: There is a bug in the Kyra 1 "Pool of Sorrow" // music which causes the channels to get progressively out of @@ -2290,22 +2290,22 @@ void SoundAdlibPC::playTrack(uint8 track) { } } -void SoundAdlibPC::haltTrack() { +void SoundAdLibPC::haltTrack() { unk1(); unk2(); //_vm->_system->delayMillis(3 * 60); } -bool SoundAdlibPC::isPlaying() { +bool SoundAdLibPC::isPlaying() { return _driver->callback(7, int(0)) != 0; } -void SoundAdlibPC::playSoundEffect(uint8 track) { +void SoundAdLibPC::playSoundEffect(uint8 track) { if (_sfxEnabled) play(track); } -void SoundAdlibPC::play(uint8 track) { +void SoundAdLibPC::play(uint8 track) { uint16 soundId = 0; if (_v2) @@ -2368,19 +2368,19 @@ void SoundAdlibPC::play(uint8 track) { _driver->callback(6, soundId); } -void SoundAdlibPC::beginFadeOut() { +void SoundAdLibPC::beginFadeOut() { playSoundEffect(1); } -void SoundAdlibPC::loadSoundFile(uint file) { +void SoundAdLibPC::loadSoundFile(uint file) { internalLoadFile(fileListEntry(file)); } -void SoundAdlibPC::loadSoundFile(Common::String file) { +void SoundAdLibPC::loadSoundFile(Common::String file) { internalLoadFile(file); } -void SoundAdlibPC::internalLoadFile(Common::String file) { +void SoundAdLibPC::internalLoadFile(Common::String file) { file += ".ADL"; if (_soundFileLoaded == file) return; @@ -2429,12 +2429,12 @@ void SoundAdlibPC::internalLoadFile(Common::String file) { _soundFileLoaded = file; } -void SoundAdlibPC::unk1() { +void SoundAdLibPC::unk1() { playSoundEffect(0); //_vm->_system->delayMillis(5 * 60); } -void SoundAdlibPC::unk2() { +void SoundAdLibPC::unk2() { playSoundEffect(0); } diff --git a/engines/kyra/sound_adlib.h b/engines/kyra/sound_adlib.h index 25ef320dc5..0607e1dd7a 100644 --- a/engines/kyra/sound_adlib.h +++ b/engines/kyra/sound_adlib.h @@ -47,7 +47,7 @@ #include "common/mutex.h" namespace Kyra { -class AdlibDriver; +class AdLibDriver; /** * AdLib implementation of the sound output device. @@ -57,15 +57,15 @@ class AdlibDriver; * Kyrandia 1 are using exact the same format, the * one of Kyrandia 2 slightly differs. * - * See AdlibDriver for more information. - * @see AdlibDriver + * See AdLibDriver for more information. + * @see AdLibDriver */ -class SoundAdlibPC : public Sound { +class SoundAdLibPC : public Sound { public: - SoundAdlibPC(KyraEngine_v1 *vm, Audio::Mixer *mixer); - ~SoundAdlibPC(); + SoundAdLibPC(KyraEngine_v1 *vm, Audio::Mixer *mixer); + ~SoundAdLibPC(); - kType getMusicType() const { return kAdlib; } + kType getMusicType() const { return kAdLib; } bool init(); void process(); @@ -89,7 +89,7 @@ private: void unk1(); void unk2(); - AdlibDriver *_driver; + AdLibDriver *_driver; bool _v2; uint8 _trackEntries[500]; diff --git a/engines/m4/mads_anim.cpp b/engines/m4/mads_anim.cpp index 76f6fd712d..7a8d55c545 100644 --- a/engines/m4/mads_anim.cpp +++ b/engines/m4/mads_anim.cpp @@ -577,7 +577,7 @@ void AnimviewView::readNextCommand() { { char buffer[100]; strcpy(buffer, aaFile.soundName.c_str()); - buffer[0] = 'A'; // A for Adlib resource + buffer[0] = 'A'; // A for AdLib resource /*Common::SeekableReadStream *stream = */_vm->_resourceManager->get(buffer); diff --git a/engines/made/made.cpp b/engines/made/made.cpp index d665c66115..1e173c0629 100644 --- a/engines/made/made.cpp +++ b/engines/made/made.cpp @@ -105,7 +105,7 @@ MadeEngine::MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc) : Eng _music = new MusicPlayer(driver); _music->setNativeMT32(native_mt32); - //_music->setAdlib(adlib); + //_music->setAdLib(adlib); // Set default sound frequency switch (getGameID()) { diff --git a/engines/queen/midiadlib.cpp b/engines/queen/midiadlib.cpp index 6c6b39c6bc..aaee240e34 100644 --- a/engines/queen/midiadlib.cpp +++ b/engines/queen/midiadlib.cpp @@ -30,13 +30,13 @@ namespace Queen { -class AdlibMidiChannel; +class AdLibMidiChannel; -class AdlibMidiDriver : public MidiDriver_Emulated { +class AdLibMidiDriver : public MidiDriver_Emulated { public: - AdlibMidiDriver(Audio::Mixer *mixer) : MidiDriver_Emulated(mixer) {} - ~AdlibMidiDriver() {} + AdLibMidiDriver(Audio::Mixer *mixer) : MidiDriver_Emulated(mixer) {} + ~AdLibMidiDriver() {} // MidiDriver int open(); @@ -123,9 +123,9 @@ private: static const int16 _midiNoteFreqTable[]; }; -int AdlibMidiDriver::open() { +int AdLibMidiDriver::open() { MidiDriver_Emulated::open(); - _opl = makeAdlibOPL(getRate()); + _opl = makeAdLibOPL(getRate()); adlibSetupCard(); for (int i = 0; i < 11; ++i) { _adlibChannelsVolume[i] = 0; @@ -136,12 +136,12 @@ int AdlibMidiDriver::open() { return 0; } -void AdlibMidiDriver::close() { +void AdLibMidiDriver::close() { _mixer->stopHandle(_mixerSoundHandle); OPLDestroy(_opl); } -void AdlibMidiDriver::send(uint32 b) { +void AdLibMidiDriver::send(uint32 b) { int channel = b & 15; int cmd = (b >> 4) & 7; int param1 = (b >> 8) & 255; @@ -168,7 +168,7 @@ void AdlibMidiDriver::send(uint32 b) { } } -void AdlibMidiDriver::metaEvent(byte type, byte *data, uint16 length) { +void AdLibMidiDriver::metaEvent(byte type, byte *data, uint16 length) { int event = 0; if (length > 4 && READ_BE_UINT32(data) == 0x3F00) { event = data[4]; @@ -196,12 +196,12 @@ void AdlibMidiDriver::metaEvent(byte type, byte *data, uint16 length) { warning("Unhandled meta event %d len %d", event, length); } -void AdlibMidiDriver::generateSamples(int16 *data, int len) { +void AdLibMidiDriver::generateSamples(int16 *data, int len) { memset(data, 0, sizeof(int16) * len); YM3812UpdateOne(_opl, data, len); } -void AdlibMidiDriver::handleSequencerSpecificMetaEvent1(int channel, const uint8 *data) { +void AdLibMidiDriver::handleSequencerSpecificMetaEvent1(int channel, const uint8 *data) { for (int i = 0; i < 28; ++i) { _adlibMetaSequenceData[i] = data[i]; } @@ -219,17 +219,17 @@ void AdlibMidiDriver::handleSequencerSpecificMetaEvent1(int channel, const uint8 } } -void AdlibMidiDriver::handleSequencerSpecificMetaEvent2(uint8 value) { +void AdLibMidiDriver::handleSequencerSpecificMetaEvent2(uint8 value) { _adlibRhythmEnabled = value; _midiNumberOfChannels = _adlibRhythmEnabled ? 11 : 9; adlibSetAmpVibratoRhythm(); } -void AdlibMidiDriver::handleSequencerSpecificMetaEvent3(uint8 value) { +void AdLibMidiDriver::handleSequencerSpecificMetaEvent3(uint8 value) { adlibSetNoteMul(value); } -void AdlibMidiDriver::handleMidiEvent0x90_NoteOn(int channel, int param1, int param2) { // note, volume +void AdLibMidiDriver::handleMidiEvent0x90_NoteOn(int channel, int param1, int param2) { // note, volume if (param2 == 0) { adlibTurnNoteOff(channel); _adlibChannelsVolume[channel] = param2; @@ -241,11 +241,11 @@ void AdlibMidiDriver::handleMidiEvent0x90_NoteOn(int channel, int param1, int pa } } -void AdlibMidiDriver::adlibWrite(uint8 port, uint8 value) { +void AdLibMidiDriver::adlibWrite(uint8 port, uint8 value) { OPLWriteReg(_opl, port, value); } -void AdlibMidiDriver::adlibSetupCard() { +void AdLibMidiDriver::adlibSetupCard() { for (int i = 1; i <= 0xF5; ++i) { adlibWrite(i, 0); } @@ -263,7 +263,7 @@ void AdlibMidiDriver::adlibSetupCard() { adlibSetWaveformSelect(1); } -void AdlibMidiDriver::adlibSetupChannels(int fl) { +void AdLibMidiDriver::adlibSetupChannels(int fl) { if (fl != 0) { _midiChannelsNote1Table[8] = 24; _midiChannelsNote2Table[8] = 8192; @@ -282,7 +282,7 @@ void AdlibMidiDriver::adlibSetupChannels(int fl) { adlibSetAmpVibratoRhythm(); } -void AdlibMidiDriver::adlibResetAmpVibratoRhythm(int am, int vib, int kso) { +void AdLibMidiDriver::adlibResetAmpVibratoRhythm(int am, int vib, int kso) { _adlibAMDepthEq48 = am; _adlibVibratoDepthEq14 = vib; _adlibKeyboardSplitOn = kso; @@ -290,7 +290,7 @@ void AdlibMidiDriver::adlibResetAmpVibratoRhythm(int am, int vib, int kso) { adlibSetCSMKeyboardSplit(); } -void AdlibMidiDriver::adlibResetChannels() { +void AdLibMidiDriver::adlibResetChannels() { for (int i = 0; i < 18; ++i) { adlibSetupChannelFromSequence(i, _adlibChannelsNoFeedback[i] ? _adlibInitSequenceData2 : _adlibInitSequenceData1, 0); } @@ -304,7 +304,7 @@ void AdlibMidiDriver::adlibResetChannels() { } } -void AdlibMidiDriver::adlibSetAmpVibratoRhythm() { +void AdLibMidiDriver::adlibSetAmpVibratoRhythm() { uint8 value = 0; if (_adlibAMDepthEq48) { value |= 0x80; @@ -318,12 +318,12 @@ void AdlibMidiDriver::adlibSetAmpVibratoRhythm() { adlibWrite(0xBD, value | _adlibVibratoRhythm); } -void AdlibMidiDriver::adlibSetCSMKeyboardSplit() { +void AdLibMidiDriver::adlibSetCSMKeyboardSplit() { uint8 value = _adlibKeyboardSplitOn ? 0x40 : 0; adlibWrite(8, value); } -void AdlibMidiDriver::adlibSetNoteMul(int mul) { +void AdLibMidiDriver::adlibSetNoteMul(int mul) { if (mul > 12) { mul = 12; } else if (mul < 1) { @@ -332,7 +332,7 @@ void AdlibMidiDriver::adlibSetNoteMul(int mul) { _adlibNoteMul = mul; } -void AdlibMidiDriver::adlibSetWaveformSelect(int fl) { +void AdLibMidiDriver::adlibSetWaveformSelect(int fl) { _adlibWaveformSelect = fl ? 0x20 : 0; for (int i = 0; i < 18; ++i) { adlibWrite(0xE0 + _adlibChannelsMappingTable1[i], 0); @@ -340,7 +340,7 @@ void AdlibMidiDriver::adlibSetWaveformSelect(int fl) { adlibWrite(1, _adlibWaveformSelect); } -void AdlibMidiDriver::adlibSetPitchBend(int channel, int range) { +void AdLibMidiDriver::adlibSetPitchBend(int channel, int range) { if ((_adlibRhythmEnabled && channel <= 6) || channel < 9) { if (range > 16383) { range = 16383; @@ -350,11 +350,11 @@ void AdlibMidiDriver::adlibSetPitchBend(int channel, int range) { } } -void AdlibMidiDriver::adlibPlayNote(int channel) { +void AdLibMidiDriver::adlibPlayNote(int channel) { _midiChannelsFreqTable[channel] = adlibPlayNoteHelper(channel, _midiChannelsNote1Table[channel], _midiChannelsNote2Table[channel], _midiChannelsOctTable[channel]); } -uint8 AdlibMidiDriver::adlibPlayNoteHelper(int channel, int note1, int note2, int oct) { +uint8 AdLibMidiDriver::adlibPlayNoteHelper(int channel, int note1, int note2, int oct) { int n = ((note2 * _midiChannelsNoteTable[channel]) >> 8) - 8192; if (n != 0) { n >>= 5; @@ -383,7 +383,7 @@ uint8 AdlibMidiDriver::adlibPlayNoteHelper(int channel, int note1, int note2, in return value; } -void AdlibMidiDriver::adlibTurnNoteOff(int channel) { +void AdLibMidiDriver::adlibTurnNoteOff(int channel) { if ((_adlibRhythmEnabled && channel <= 6) || channel < 9) { _midiChannelsOctTable[channel] = 0; _midiChannelsFreqTable[channel] &= ~0x20; @@ -394,7 +394,7 @@ void AdlibMidiDriver::adlibTurnNoteOff(int channel) { } } -void AdlibMidiDriver::adlibTurnNoteOn(int channel, int note) { +void AdLibMidiDriver::adlibTurnNoteOn(int channel, int note) { note -= 12; if (note < 0) { note = 0; @@ -418,14 +418,14 @@ void AdlibMidiDriver::adlibTurnNoteOn(int channel, int note) { } } -void AdlibMidiDriver::adlibSetupChannelFromSequence(int channel, const uint8 *src, int fl) { +void AdLibMidiDriver::adlibSetupChannelFromSequence(int channel, const uint8 *src, int fl) { for (int i = 0; i < 13; ++i) { _adlibSetupChannelSequence2[i] = src[i]; } adlibSetupChannel(channel, _adlibSetupChannelSequence2, fl); } -void AdlibMidiDriver::adlibSetupChannel(int channel, const uint16 *src, int fl) { +void AdLibMidiDriver::adlibSetupChannel(int channel, const uint16 *src, int fl) { for (int i = 0; i < 13; ++i) { _adlibSetupChannelSequence1[14 * channel + i] = src[i]; } @@ -433,7 +433,7 @@ void AdlibMidiDriver::adlibSetupChannel(int channel, const uint16 *src, int fl) adlibSetupChannelHelper(channel); } -void AdlibMidiDriver::adlibSetNoteVolume(int channel, int volume) { +void AdLibMidiDriver::adlibSetNoteVolume(int channel, int volume) { if (_midiNumberOfChannels > channel) { if (volume > 127) { volume = 127; @@ -452,7 +452,7 @@ void AdlibMidiDriver::adlibSetNoteVolume(int channel, int volume) { } } -void AdlibMidiDriver::adlibSetupChannelHelper(int channel) { +void AdLibMidiDriver::adlibSetupChannelHelper(int channel) { adlibSetAmpVibratoRhythm(); adlibSetCSMKeyboardSplit(); adlibSetChannel0x40(channel); @@ -463,7 +463,7 @@ void AdlibMidiDriver::adlibSetupChannelHelper(int channel) { adlibSetChannel0xE0(channel); } -void AdlibMidiDriver::adlibSetChannel0x40(int channel) { +void AdLibMidiDriver::adlibSetChannel0x40(int channel) { int index, value, fl; if (_adlibRhythmEnabled) { @@ -488,7 +488,7 @@ void AdlibMidiDriver::adlibSetChannel0x40(int channel) { adlibWrite(0x40 + _adlibChannelsMappingTable1[channel], value); } -void AdlibMidiDriver::adlibSetChannel0xC0(int channel) { +void AdLibMidiDriver::adlibSetChannel0xC0(int channel) { if (_adlibChannelsNoFeedback[channel] == 0) { const uint8 *p = &_adlibSetupChannelSequence1[channel * 14]; uint8 value = p[2] << 1; @@ -499,19 +499,19 @@ void AdlibMidiDriver::adlibSetChannel0xC0(int channel) { } } -void AdlibMidiDriver::adlibSetChannel0x60(int channel) { +void AdLibMidiDriver::adlibSetChannel0x60(int channel) { const uint8 *p = &_adlibSetupChannelSequence1[channel * 14]; uint8 value = (p[3] << 4) | (p[6] & 15); adlibWrite(0x60 + _adlibChannelsMappingTable1[channel], value); } -void AdlibMidiDriver::adlibSetChannel0x80(int channel) { +void AdLibMidiDriver::adlibSetChannel0x80(int channel) { const uint8 *p = &_adlibSetupChannelSequence1[channel * 14]; uint8 value = (p[4] << 4) | (p[7] & 15); adlibWrite(0x80 + _adlibChannelsMappingTable1[channel], value); } -void AdlibMidiDriver::adlibSetChannel0x20(int channel) { +void AdLibMidiDriver::adlibSetChannel0x20(int channel) { const uint8 *p = &_adlibSetupChannelSequence1[channel * 14]; uint8 value = p[1] & 15; if (p[9]) { @@ -529,7 +529,7 @@ void AdlibMidiDriver::adlibSetChannel0x20(int channel) { adlibWrite(0x20 + _adlibChannelsMappingTable1[channel], value); } -void AdlibMidiDriver::adlibSetChannel0xE0(int channel) { +void AdLibMidiDriver::adlibSetChannel0xE0(int channel) { uint8 value = 0; if (_adlibWaveformSelect) { const uint8 *p = &_adlibSetupChannelSequence1[channel * 14]; @@ -538,71 +538,71 @@ void AdlibMidiDriver::adlibSetChannel0xE0(int channel) { adlibWrite(0xE0 + _adlibChannelsMappingTable1[channel], value); } -const uint8 AdlibMidiDriver::_adlibChannelsMappingTable1[] = { +const uint8 AdLibMidiDriver::_adlibChannelsMappingTable1[] = { 0, 1, 2, 3, 4, 5, 8, 9, 10, 11, 12, 13, 16, 17, 18, 19, 20, 21 }; -const uint8 AdlibMidiDriver::_adlibChannelsNoFeedback[] = { +const uint8 AdLibMidiDriver::_adlibChannelsNoFeedback[] = { 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1 }; -const uint8 AdlibMidiDriver::_adlibChannelsMappingTable2[] = { +const uint8 AdLibMidiDriver::_adlibChannelsMappingTable2[] = { 0, 1, 2, 0, 1, 2, 3, 4, 5, 3, 4, 5, 6, 7, 8, 6, 7, 8 }; -const uint8 AdlibMidiDriver::_adlibChannelsMappingTable3[] = { +const uint8 AdLibMidiDriver::_adlibChannelsMappingTable3[] = { 0, 1, 2, 0, 1, 2, 3, 4, 5, 3, 4, 5, 6, 10, 8, 6, 7, 9 }; -const uint8 AdlibMidiDriver::_adlibChannelsKeyScalingTable1[] = { +const uint8 AdLibMidiDriver::_adlibChannelsKeyScalingTable1[] = { 0, 3, 1, 4, 2, 5, 6, 9, 7, 10, 8, 11, 12, 15, 13, 16, 14, 17 }; -const uint8 AdlibMidiDriver::_adlibChannelsKeyScalingTable2[] = { +const uint8 AdLibMidiDriver::_adlibChannelsKeyScalingTable2[] = { 0, 3, 1, 4, 2, 5, 6, 9, 7, 10, 8, 11, 12, 15, 16, 255, 14, 255, 17, 255, 13, 255 }; -const uint8 AdlibMidiDriver::_adlibChannelsVolumeTable[] = { +const uint8 AdLibMidiDriver::_adlibChannelsVolumeTable[] = { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }; -const uint8 AdlibMidiDriver::_adlibInitSequenceData1[] = { +const uint8 AdLibMidiDriver::_adlibInitSequenceData1[] = { 1, 1, 3, 15, 5, 0, 1, 3, 15, 0, 0, 0, 1, 0 }; -const uint8 AdlibMidiDriver::_adlibInitSequenceData2[] = { +const uint8 AdLibMidiDriver::_adlibInitSequenceData2[] = { 0, 1, 1, 15, 7, 0, 2, 4, 0, 0, 0, 1, 0, 0 }; -const uint8 AdlibMidiDriver::_adlibInitSequenceData3[] = { +const uint8 AdLibMidiDriver::_adlibInitSequenceData3[] = { 0, 0, 0, 10, 4, 0, 8, 12, 11, 0, 0, 0, 1, 0 }; -const uint8 AdlibMidiDriver::_adlibInitSequenceData4[] = { +const uint8 AdLibMidiDriver::_adlibInitSequenceData4[] = { 0, 0, 0, 13, 4, 0, 6, 15, 0, 0, 0, 0, 1, 0 }; -const uint8 AdlibMidiDriver::_adlibInitSequenceData5[] = { +const uint8 AdLibMidiDriver::_adlibInitSequenceData5[] = { 0, 12, 0, 15, 11, 0, 8, 5, 0, 0, 0, 0, 0, 0 }; -const uint8 AdlibMidiDriver::_adlibInitSequenceData6[] = { +const uint8 AdLibMidiDriver::_adlibInitSequenceData6[] = { 0, 4, 0, 15, 11, 0, 7, 5, 0, 0, 0, 0, 0, 0 }; -const uint8 AdlibMidiDriver::_adlibInitSequenceData7[] = { +const uint8 AdLibMidiDriver::_adlibInitSequenceData7[] = { 0, 1, 0, 15, 11, 0, 5, 5, 0, 0, 0, 0, 0, 0 }; -const uint8 AdlibMidiDriver::_adlibInitSequenceData8[] = { +const uint8 AdLibMidiDriver::_adlibInitSequenceData8[] = { 0, 1, 0, 15, 11, 0, 7, 5, 0, 0, 0, 0, 0, 0 }; -const int16 AdlibMidiDriver::_midiChannelsNoteTable[] = { +const int16 AdLibMidiDriver::_midiChannelsNoteTable[] = { 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256 }; -const int16 AdlibMidiDriver::_midiNoteFreqTable[] = { +const int16 AdLibMidiDriver::_midiNoteFreqTable[] = { 690, 692, 695, 697, 700, 702, 705, 707, 710, 713, 715, 718, 720, 723, 726, 728, 731, 733, 736, 739, 741, 744, 747, 749, 752, 755, 758, 760, 763, 766, 769, 771, 774, 777, 780, 783, @@ -621,8 +621,8 @@ const int16 AdlibMidiDriver::_midiNoteFreqTable[] = { -363, -361, -359, -356, -354, -351, -349, -347, -344, -342, -339, -337 }; -MidiDriver *C_Player_CreateAdlibMidiDriver(Audio::Mixer *mixer) { - return new AdlibMidiDriver(mixer); +MidiDriver *C_Player_CreateAdLibMidiDriver(Audio::Mixer *mixer) { + return new AdLibMidiDriver(mixer); } } // End of namespace Queen diff --git a/engines/queen/music.cpp b/engines/queen/music.cpp index 69d83b2c68..bd8e73657e 100644 --- a/engines/queen/music.cpp +++ b/engines/queen/music.cpp @@ -36,7 +36,7 @@ namespace Queen { -extern MidiDriver *C_Player_CreateAdlibMidiDriver(Audio::Mixer *); +extern MidiDriver *C_Player_CreateAdLibMidiDriver(Audio::Mixer *); MidiMusic::MidiMusic(QueenEngine *vm) : _isPlaying(false), _looping(false), _randomLoop(false), _masterVolume(192), _buf(0) { @@ -68,9 +68,9 @@ MidiMusic::MidiMusic(QueenEngine *vm) if (_adlib) { // int infoOffset = _numSongs * 4 + 2; // if (READ_LE_UINT16(_musicData + 2) != infoOffset) { -// defaultAdlibVolume = _musicData[infoOffset]; +// defaultAdLibVolume = _musicData[infoOffset]; // } - _driver = C_Player_CreateAdlibMidiDriver(vm->_mixer); + _driver = C_Player_CreateAdLibMidiDriver(vm->_mixer); } else { _driver = MidiDriver::createMidi(midiDriver); if (_nativeMT32) { diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp index 52befa3dd3..34b35305c2 100644 --- a/engines/saga/music.cpp +++ b/engines/saga/music.cpp @@ -370,9 +370,9 @@ void Music::play(uint32 resourceId, MusicFlags flags) { // file, and I've tentatively reached the conclusion // that they are both General MIDI. My guess is that // the FM file has been reorchestrated to sound better - // on Adlib and other FM synths. + // on AdLib and other FM synths. // - // Sev says the Adlib music does not sound like in the + // Sev says the AdLib music does not sound like in the // original, but I still think assuming General MIDI is // the right thing to do. Some music, like the End // Title (song 0) sound absolutely atrocious when piped @@ -391,7 +391,7 @@ void Music::play(uint32 resourceId, MusicFlags flags) { // Note that the IHNM demo has only got one music file // (music.rsc). It is assumed that it contains FM music - if (hasAdlib() || _vm->getFeatures() & GF_IHNM_DEMO) { + if (hasAdLib() || _vm->getFeatures() & GF_IHNM_DEMO) { context = _vm->_resource->getContext(GAME_MUSICFILE_FM); } else { context = _vm->_resource->getContext(GAME_MUSICFILE_GM); diff --git a/engines/saga/music.h b/engines/saga/music.h index 0469db7cf1..44a87f28b3 100644 --- a/engines/saga/music.h +++ b/engines/saga/music.h @@ -109,8 +109,8 @@ public: ~Music(); void setNativeMT32(bool b) { _player->setNativeMT32(b); } bool hasNativeMT32() { return _player->hasNativeMT32(); } - void setAdlib(bool b) { _adlib = b; } - bool hasAdlib() { return _adlib; } + void setAdLib(bool b) { _adlib = b; } + bool hasAdLib() { return _adlib; } void setPassThrough(bool b) { _player->setPassThrough(b); } bool isPlaying(); bool hasDigitalMusic() { return _digitalMusic; } diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp index 5553291cef..d3b3a5b745 100644 --- a/engines/saga/saga.cpp +++ b/engines/saga/saga.cpp @@ -237,7 +237,7 @@ Common::Error SagaEngine::run() { _music = new Music(this, _mixer, _driver); _music->setNativeMT32(native_mt32); - _music->setAdlib(adlib); + _music->setAdLib(adlib); _render = new Render(this, _system); if (!_render->initialized()) { return Common::kUnknownError; diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index 9d7f9b4c06..81481a042f 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -2057,14 +2057,14 @@ int SoundResource::getChannelFilterMask(int hardwareMask) { case SCI_VERSION_0_EARLY: // TODO: MT32 driver uses no hardware mask at all and uses all channels switch (hardwareMask) { - case 0x01: // Adlib needs an additional reverse check against bit 3 + case 0x01: // AdLib needs an additional reverse check against bit 3 reverseHardwareMask = 0x08; break; } data++; // Skip over digital sample flag // Now all 16 channels follow. Each one is specified by a single byte // Upper 4 bits of the byte is a voices count - // Lower 4 bits -> bit 0 means use as Adlib driver + // Lower 4 bits -> bit 0 means use as AdLib driver // bit 1 means use as PCjr driver // bit 3 means is control channel (bit 0 needs to be unset) for (int channelNr = 0; channelNr < 16; channelNr++) { diff --git a/engines/sci/sound/iterator/core.cpp b/engines/sci/sound/iterator/core.cpp index be17a77459..1a53333e4e 100644 --- a/engines/sci/sound/iterator/core.cpp +++ b/engines/sci/sound/iterator/core.cpp @@ -227,11 +227,11 @@ Common::Error SfxPlayer::init(ResourceManager *resMan, int expected_latency) { switch (musicDriver) { case MD_ADLIB: - // FIXME: There's no Amiga sound option, so we hook it up to Adlib + // FIXME: There's no Amiga sound option, so we hook it up to AdLib if (((SciEngine *)g_engine)->getPlatform() == Common::kPlatformAmiga) _mididrv = MidiPlayer_Amiga_create(); else - _mididrv = MidiPlayer_Adlib_create(); + _mididrv = MidiPlayer_AdLib_create(); break; case MD_PCJR: _mididrv = MidiPlayer_PCJr_create(); diff --git a/engines/sci/sound/iterator/iterator.cpp b/engines/sci/sound/iterator/iterator.cpp index 9c340b5604..ab5f4db33f 100644 --- a/engines/sci/sound/iterator/iterator.cpp +++ b/engines/sci/sound/iterator/iterator.cpp @@ -1075,7 +1075,7 @@ void Sci1SongIterator::init() { priority = 0; _ccc = 0; - _deviceId = 0x00; // Default to Sound Blaster/Adlib for purposes of cue computation + _deviceId = 0x00; // Default to Sound Blaster/AdLib for purposes of cue computation _numChannels = 0; _initialised = false; _delayRemaining = 0; diff --git a/engines/sci/sound/midiparser_sci.h b/engines/sci/sound/midiparser_sci.h index ff818eb381..900b3006ea 100644 --- a/engines/sci/sound/midiparser_sci.h +++ b/engines/sci/sound/midiparser_sci.h @@ -32,7 +32,7 @@ /* Sound drivers info: (from driver cmd0) - Adlib/SB : track 0 , voices 9 , patch 3 ah=1 + AdLib/SB : track 0 , voices 9 , patch 3 ah=1 ProAudioSp: track 0 , voices 9 , patch 3 ah=17 GenerlMIDI: track 7 , voices 32, patch 4 ah=1 SCI1.1 Game Blast: track 9 , voices 12, patch 101 ah=1 diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp index 15d691a8e4..bd95c09f29 100644 --- a/engines/sci/sound/music.cpp +++ b/engines/sci/sound/music.cpp @@ -64,11 +64,11 @@ void SciMusic::init() { switch (midiType) { case MD_ADLIB: - // FIXME: There's no Amiga sound option, so we hook it up to Adlib + // FIXME: There's no Amiga sound option, so we hook it up to AdLib if (((SciEngine *)g_engine)->getPlatform() == Common::kPlatformAmiga) _pMidiDrv = MidiPlayer_Amiga_create(); else - _pMidiDrv = MidiPlayer_Adlib_create(); + _pMidiDrv = MidiPlayer_AdLib_create(); break; case MD_PCJR: _pMidiDrv = MidiPlayer_PCJr_create(); diff --git a/engines/sci/sound/music.h b/engines/sci/sound/music.h index adf64727ec..4edb7b9099 100644 --- a/engines/sci/sound/music.h +++ b/engines/sci/sound/music.h @@ -42,7 +42,7 @@ namespace Sci { enum TrackType { - kTrackAdlib = 0, + kTrackAdLib = 0, kTrackGameBlaster = 9, kTrackMT32 = 12, kTrackSpeaker = 18, @@ -217,8 +217,8 @@ protected: MidiPlayer *_pMidiDrv; uint32 _dwTempo; - // Mixed Adlib/MIDI mode: when enabled from the ScummVM sound options screen, - // and a sound has a digital track, the sound from the Adlib track is played + // Mixed AdLib/MIDI mode: when enabled from the ScummVM sound options screen, + // and a sound has a digital track, the sound from the AdLib track is played bool _bMultiMidi; private: static void miditimerCallback(void *p); diff --git a/engines/sci/sound/softseq/adlib.cpp b/engines/sci/sound/softseq/adlib.cpp index 89e2fd8ff3..62912fc0e1 100644 --- a/engines/sci/sound/softseq/adlib.cpp +++ b/engines/sci/sound/softseq/adlib.cpp @@ -42,15 +42,15 @@ namespace Sci { // FIXME: We don't seem to be sending the polyphony init data, so disable this for now #define ADLIB_DISABLE_VOICE_MAPPING -class MidiDriver_Adlib : public MidiDriver_Emulated { +class MidiDriver_AdLib : public MidiDriver_Emulated { public: enum { kVoices = 9, kRhythmKeys = 62 }; - MidiDriver_Adlib(Audio::Mixer *mixer) : MidiDriver_Emulated(mixer), _playSwitch(true), _masterVolume(15), _rhythmKeyMap(0), _opl(0) { } - virtual ~MidiDriver_Adlib() { } + MidiDriver_AdLib(Audio::Mixer *mixer) : MidiDriver_Emulated(mixer), _playSwitch(true), _masterVolume(15), _rhythmKeyMap(0), _opl(0) { } + virtual ~MidiDriver_AdLib() { } // MidiDriver int open(bool isSCI0); @@ -77,7 +77,7 @@ private: kRightChannel = 2 }; - struct AdlibOperator { + struct AdLibOperator { bool amplitudeMod; bool vibrato; bool envelopeType; @@ -92,14 +92,14 @@ private: byte waveForm; // (0-3) }; - struct AdlibModulator { + struct AdLibModulator { byte feedback; // (0-7) bool algorithm; }; - struct AdlibPatch { - AdlibOperator op[2]; - AdlibModulator mod; + struct AdLibPatch { + AdLibOperator op[2]; + AdLibModulator mod; }; struct Channel { @@ -116,7 +116,7 @@ private: pitchWheel(8192), lastVoice(0), enableVelocity(false) { } }; - struct AdlibVoice { + struct AdLibVoice { int8 channel; // MIDI channel that this voice is assigned to or -1 int8 note; // Currently playing MIDI note or -1 int patch; // Currently playing patch or -1 @@ -124,7 +124,7 @@ private: bool isSustained; // Flag indicating a note that is being sustained by the hold pedal uint16 age; // Age of the current note - AdlibVoice() : channel(-1), note(-1), patch(-1), velocity(0), isSustained(false), age(0) { } + AdLibVoice() : channel(-1), note(-1), patch(-1), velocity(0), isSustained(false), age(0) { } }; bool _stereo; @@ -133,9 +133,9 @@ private: bool _playSwitch; int _masterVolume; Channel _channels[MIDI_CHANNELS]; - AdlibVoice _voices[kVoices]; + AdLibVoice _voices[kVoices]; byte *_rhythmKeyMap; - Common::Array<AdlibPatch> _patches; + Common::Array<AdLibPatch> _patches; void loadInstrument(const byte *ins); void voiceOn(int voice, int note, int velocity); @@ -143,7 +143,7 @@ private: void setPatch(int voice, int patch); void setNote(int voice, int note, bool key); void setVelocity(int voice); - void setOperator(int oper, AdlibOperator &op); + void setOperator(int oper, AdLibOperator &op); void setRegister(int reg, int value, int channels = kLeftChannel | kRightChannel); void renewNotes(int channel, bool key); void noteOn(int channel, int note, int velocity); @@ -158,23 +158,23 @@ private: int calcVelocity(int voice, int op); }; -class MidiPlayer_Adlib : public MidiPlayer { +class MidiPlayer_AdLib : public MidiPlayer { public: - MidiPlayer_Adlib() { _driver = new MidiDriver_Adlib(g_system->getMixer()); } - ~MidiPlayer_Adlib() {} + MidiPlayer_AdLib() { _driver = new MidiDriver_AdLib(g_system->getMixer()); } + ~MidiPlayer_AdLib() {} int open(ResourceManager *resMan); void close(); byte getPlayId(SciVersion soundVersion); - int getPolyphony() const { return MidiDriver_Adlib::kVoices; } + int getPolyphony() const { return MidiDriver_AdLib::kVoices; } bool hasRhythmChannel() const { return false; } - void setVolume(byte volume) { static_cast<MidiDriver_Adlib *>(_driver)->setVolume(volume); } - void playSwitch(bool play) { static_cast<MidiDriver_Adlib *>(_driver)->playSwitch(play); } + void setVolume(byte volume) { static_cast<MidiDriver_AdLib *>(_driver)->setVolume(volume); } + void playSwitch(bool play) { static_cast<MidiDriver_AdLib *>(_driver)->playSwitch(play); } void loadInstrument(int idx, byte *data); }; -static const byte registerOffset[MidiDriver_Adlib::kVoices] = { +static const byte registerOffset[MidiDriver_AdLib::kVoices] = { 0x00, 0x01, 0x02, 0x08, 0x09, 0x0A, 0x10, 0x11, 0x12 }; @@ -206,7 +206,7 @@ static const int ym3812_note[13] = { 0x2ae }; -int MidiDriver_Adlib::open(bool isSCI0) { +int MidiDriver_AdLib::open(bool isSCI0) { int rate = _mixer->getOutputRate(); _stereo = STEREO; @@ -238,20 +238,20 @@ int MidiDriver_Adlib::open(bool isSCI0) { return 0; } -void MidiDriver_Adlib::close() { +void MidiDriver_AdLib::close() { _mixer->stopHandle(_mixerSoundHandle); delete _opl; delete[] _rhythmKeyMap; } -void MidiDriver_Adlib::setVolume(byte volume) { +void MidiDriver_AdLib::setVolume(byte volume) { _masterVolume = volume; renewNotes(-1, true); } // MIDI messages can be found at http://www.midi.org/techspecs/midimessages.php -void MidiDriver_Adlib::send(uint32 b) { +void MidiDriver_AdLib::send(uint32 b) { byte command = b & 0xf0; byte channel = b & 0xf; byte op1 = (b >> 8) & 0xff; @@ -321,7 +321,7 @@ void MidiDriver_Adlib::send(uint32 b) { } } -void MidiDriver_Adlib::generateSamples(int16 *data, int len) { +void MidiDriver_AdLib::generateSamples(int16 *data, int len) { if (isStereo()) len <<= 1; _opl->readBuffer(data, len); @@ -333,8 +333,8 @@ void MidiDriver_Adlib::generateSamples(int16 *data, int len) { } } -void MidiDriver_Adlib::loadInstrument(const byte *ins) { - AdlibPatch patch; +void MidiDriver_AdLib::loadInstrument(const byte *ins) { + AdLibPatch patch; // Set data for the operators for (int i = 0; i < 2; i++) { @@ -361,7 +361,7 @@ void MidiDriver_Adlib::loadInstrument(const byte *ins) { _patches.push_back(patch); } -void MidiDriver_Adlib::voiceMapping(int channel, int voices) { +void MidiDriver_AdLib::voiceMapping(int channel, int voices) { int curVoices = 0; for (int i = 0; i < kVoices; i++) @@ -380,7 +380,7 @@ void MidiDriver_Adlib::voiceMapping(int channel, int voices) { } } -void MidiDriver_Adlib::assignVoices(int channel, int voices) { +void MidiDriver_AdLib::assignVoices(int channel, int voices) { assert(voices > 0); for (int i = 0; i < kVoices; i++) @@ -393,7 +393,7 @@ void MidiDriver_Adlib::assignVoices(int channel, int voices) { _channels[channel].extraVoices += voices; } -void MidiDriver_Adlib::releaseVoices(int channel, int voices) { +void MidiDriver_AdLib::releaseVoices(int channel, int voices) { if (_channels[channel].extraVoices >= voices) { _channels[channel].extraVoices -= voices; return; @@ -420,7 +420,7 @@ void MidiDriver_Adlib::releaseVoices(int channel, int voices) { } } -void MidiDriver_Adlib::donateVoices() { +void MidiDriver_AdLib::donateVoices() { int freeVoices = 0; for (int i = 0; i < kVoices; i++) @@ -443,7 +443,7 @@ void MidiDriver_Adlib::donateVoices() { } } -void MidiDriver_Adlib::renewNotes(int channel, bool key) { +void MidiDriver_AdLib::renewNotes(int channel, bool key) { for (int i = 0; i < kVoices; i++) { // Update all notes playing this channel if ((channel == -1) || (_voices[i].channel == channel)) { @@ -453,7 +453,7 @@ void MidiDriver_Adlib::renewNotes(int channel, bool key) { } } -void MidiDriver_Adlib::noteOn(int channel, int note, int velocity) { +void MidiDriver_AdLib::noteOn(int channel, int note, int velocity) { if (velocity == 0) return noteOff(channel, note); @@ -486,7 +486,7 @@ void MidiDriver_Adlib::noteOn(int channel, int note, int velocity) { } // FIXME: Temporary, see comment at top of file regarding ADLIB_DISABLE_VOICE_MAPPING -int MidiDriver_Adlib::findVoiceBasic(int channel) { +int MidiDriver_AdLib::findVoiceBasic(int channel) { int voice = -1; int oldestVoice = -1; int oldestAge = -1; @@ -521,7 +521,7 @@ int MidiDriver_Adlib::findVoiceBasic(int channel) { return voice; } -int MidiDriver_Adlib::findVoice(int channel) { +int MidiDriver_AdLib::findVoice(int channel) { int voice = -1; int oldestVoice = -1; uint32 oldestAge = 0; @@ -558,7 +558,7 @@ int MidiDriver_Adlib::findVoice(int channel) { return voice; } -void MidiDriver_Adlib::noteOff(int channel, int note) { +void MidiDriver_AdLib::noteOff(int channel, int note) { for (int i = 0; i < kVoices; i++) { if ((_voices[i].channel == channel) && (_voices[i].note == note)) { if (_channels[channel].holdPedal) @@ -570,7 +570,7 @@ void MidiDriver_Adlib::noteOff(int channel, int note) { } } -void MidiDriver_Adlib::voiceOn(int voice, int note, int velocity) { +void MidiDriver_AdLib::voiceOn(int voice, int note, int velocity) { int channel = _voices[voice].channel; int patch; @@ -590,14 +590,14 @@ void MidiDriver_Adlib::voiceOn(int voice, int note, int velocity) { setNote(voice, note, true); } -void MidiDriver_Adlib::voiceOff(int voice) { +void MidiDriver_AdLib::voiceOff(int voice) { _voices[voice].isSustained = false; setNote(voice, _voices[voice].note, 0); _voices[voice].note = -1; _voices[voice].age = 0; } -void MidiDriver_Adlib::setNote(int voice, int note, bool key) { +void MidiDriver_AdLib::setNote(int voice, int note, bool key) { int channel = _voices[voice].channel; int n, fre, oct; float delta; @@ -636,8 +636,8 @@ void MidiDriver_Adlib::setNote(int voice, int note, bool key) { setVelocity(voice); } -void MidiDriver_Adlib::setVelocity(int voice) { - AdlibPatch &patch = _patches[_voices[voice].patch]; +void MidiDriver_AdLib::setVelocity(int voice) { + AdLibPatch &patch = _patches[_voices[voice].patch]; int pan = _channels[_voices[voice].channel].pan; setVelocityReg(registerOffset[voice] + 3, calcVelocity(voice, 1), patch.op[1].kbScaleLevel, pan); @@ -646,7 +646,7 @@ void MidiDriver_Adlib::setVelocity(int voice) { setVelocityReg(registerOffset[voice], calcVelocity(voice, 0), patch.op[0].kbScaleLevel, pan); } -int MidiDriver_Adlib::calcVelocity(int voice, int op) { +int MidiDriver_AdLib::calcVelocity(int voice, int op) { if (_isSCI0) { int velocity = _masterVolume; @@ -666,7 +666,7 @@ int MidiDriver_Adlib::calcVelocity(int voice, int op) { // Early SCI0 does (velocity * (insVelocity / 15)) return velocity * insVelocity / 15; } else { - AdlibOperator &oper = _patches[_voices[voice].patch].op[op]; + AdLibOperator &oper = _patches[_voices[voice].patch].op[op]; int velocity = _channels[_voices[voice].channel].volume + 1; velocity = velocity * (velocityMap1[_voices[voice].velocity] + 1) / 64; velocity = velocity * (_masterVolume + 1) / 16; @@ -678,7 +678,7 @@ int MidiDriver_Adlib::calcVelocity(int voice, int op) { } } -void MidiDriver_Adlib::setVelocityReg(int regOffset, int velocity, int kbScaleLevel, int pan) { +void MidiDriver_AdLib::setVelocityReg(int regOffset, int velocity, int kbScaleLevel, int pan) { if (!_playSwitch) velocity = 0; @@ -698,14 +698,14 @@ void MidiDriver_Adlib::setVelocityReg(int regOffset, int velocity, int kbScaleLe } } -void MidiDriver_Adlib::setPatch(int voice, int patch) { +void MidiDriver_AdLib::setPatch(int voice, int patch) { if ((patch < 0) || ((uint)patch >= _patches.size())) { warning("ADLIB: Invalid patch %i requested", patch); patch = 0; } _voices[voice].patch = patch; - AdlibModulator &mod = _patches[patch].mod; + AdLibModulator &mod = _patches[patch].mod; // Set the common settings for both operators setOperator(registerOffset[voice], _patches[patch].op[0]); @@ -716,7 +716,7 @@ void MidiDriver_Adlib::setPatch(int voice, int patch) { setRegister(0xC0 + voice, (mod.feedback << 1) | algorithm); } -void MidiDriver_Adlib::setOperator(int reg, AdlibOperator &op) { +void MidiDriver_AdLib::setOperator(int reg, AdLibOperator &op) { setRegister(0x40 + reg, (op.kbScaleLevel << 6) | op.totalLevel); setRegister(0x60 + reg, (op.attackRate << 4) | op.decayRate); setRegister(0x80 + reg, (op.sustainLevel << 4) | op.releaseRate); @@ -725,7 +725,7 @@ void MidiDriver_Adlib::setOperator(int reg, AdlibOperator &op) { setRegister(0xE0 + reg, op.waveForm); } -void MidiDriver_Adlib::setRegister(int reg, int value, int channels) { +void MidiDriver_AdLib::setRegister(int reg, int value, int channels) { if (channels & kLeftChannel) { _opl->write(0x220, reg); _opl->write(0x221, value); @@ -739,12 +739,12 @@ void MidiDriver_Adlib::setRegister(int reg, int value, int channels) { } } -void MidiDriver_Adlib::playSwitch(bool play) { +void MidiDriver_AdLib::playSwitch(bool play) { _playSwitch = play; renewNotes(-1, play); } -bool MidiDriver_Adlib::loadResource(const byte *data, uint size) { +bool MidiDriver_AdLib::loadResource(const byte *data, uint size) { if ((size != 1344) && (size != 2690) && (size != 5382)) { warning("ADLIB: Unsupported patch format (%i bytes)", size); return false; @@ -766,7 +766,7 @@ bool MidiDriver_Adlib::loadResource(const byte *data, uint size) { return true; } -uint32 MidiDriver_Adlib::property(int prop, uint32 param) { +uint32 MidiDriver_AdLib::property(int prop, uint32 param) { switch(prop) { case MIDI_PROP_MASTER_VOLUME: if (param != 0xffff) @@ -779,7 +779,7 @@ uint32 MidiDriver_Adlib::property(int prop, uint32 param) { } -int MidiPlayer_Adlib::open(ResourceManager *resMan) { +int MidiPlayer_AdLib::open(ResourceManager *resMan) { assert(resMan != NULL); // Load up the patch.003 file, parse out the instruments @@ -787,7 +787,7 @@ int MidiPlayer_Adlib::open(ResourceManager *resMan) { bool ok = false; if (res) { - ok = static_cast<MidiDriver_Adlib *>(_driver)->loadResource(res->data, res->size); + ok = static_cast<MidiDriver_AdLib *>(_driver)->loadResource(res->data, res->size); } else { // Early SCI0 games have the sound bank embedded in the adlib driver @@ -801,7 +801,7 @@ int MidiPlayer_Adlib::open(ResourceManager *resMan) { byte *buf = new byte[patchSize]; if (f.seek(0x45a) && (f.read(buf, patchSize) == patchSize)) - ok = static_cast<MidiDriver_Adlib *>(_driver)->loadResource(buf, patchSize); + ok = static_cast<MidiDriver_AdLib *>(_driver)->loadResource(buf, patchSize); delete[] buf; } @@ -813,10 +813,10 @@ int MidiPlayer_Adlib::open(ResourceManager *resMan) { return -1; } - return static_cast<MidiDriver_Adlib *>(_driver)->open(getSciVersion() <= SCI_VERSION_0_LATE); + return static_cast<MidiDriver_AdLib *>(_driver)->open(getSciVersion() <= SCI_VERSION_0_LATE); } -void MidiPlayer_Adlib::close() { +void MidiPlayer_AdLib::close() { if (_driver) { _driver->close(); delete _driver; @@ -824,7 +824,7 @@ void MidiPlayer_Adlib::close() { } } -byte MidiPlayer_Adlib::getPlayId(SciVersion soundVersion) { +byte MidiPlayer_AdLib::getPlayId(SciVersion soundVersion) { switch (soundVersion) { case SCI_VERSION_0_EARLY: return 0x01; @@ -835,8 +835,8 @@ byte MidiPlayer_Adlib::getPlayId(SciVersion soundVersion) { } } -MidiPlayer *MidiPlayer_Adlib_create() { - return new MidiPlayer_Adlib(); +MidiPlayer *MidiPlayer_AdLib_create() { + return new MidiPlayer_AdLib(); } } // End of namespace Sci diff --git a/engines/sci/sound/softseq/mididriver.h b/engines/sci/sound/softseq/mididriver.h index c2045e4f54..4e45e26898 100644 --- a/engines/sci/sound/softseq/mididriver.h +++ b/engines/sci/sound/softseq/mididriver.h @@ -102,7 +102,7 @@ public: } }; -extern MidiPlayer *MidiPlayer_Adlib_create(); +extern MidiPlayer *MidiPlayer_AdLib_create(); extern MidiPlayer *MidiPlayer_Amiga_create(); extern MidiPlayer *MidiPlayer_PCJr_create(); extern MidiPlayer *MidiPlayer_PCSpeaker_create(); diff --git a/engines/scumm/imuse/imuse.cpp b/engines/scumm/imuse/imuse.cpp index 80b08f7ad4..3a672d57b5 100644 --- a/engines/scumm/imuse/imuse.cpp +++ b/engines/scumm/imuse/imuse.cpp @@ -152,7 +152,7 @@ bool IMuseInternal::isMT32(int sound) { tag = READ_BE_UINT32(ptr + 4); switch (tag) { case MKID_BE('ADL '): - case MKID_BE('ASFX'): // Special AD class for old Adlib sound effects + case MKID_BE('ASFX'): // Special AD class for old AdLib sound effects case MKID_BE('SPK '): return false; @@ -199,7 +199,7 @@ bool IMuseInternal::isMIDI(int sound) { tag = READ_BE_UINT32(ptr + 4); switch (tag) { case MKID_BE('ADL '): - case MKID_BE('ASFX'): // Special AD class for old Adlib sound effects + case MKID_BE('ASFX'): // Special AD class for old AdLib sound effects case MKID_BE('SPK '): return false; @@ -235,7 +235,7 @@ MidiDriver *IMuseInternal::getBestMidiDriver(int sound) { if (_midi_native) { driver = _midi_native; } else { - // Route it through Adlib anyway. + // Route it through AdLib anyway. driver = _midi_adlib; } } else { @@ -1709,13 +1709,13 @@ void IMuseInternal::reallocateMidiChannels(MidiDriver *midi) { } } -void IMuseInternal::setGlobalAdlibInstrument(byte slot, byte *data) { +void IMuseInternal::setGlobalAdLibInstrument(byte slot, byte *data) { if (slot < 32) { _global_adlib_instruments[slot].adlib(data); } } -void IMuseInternal::copyGlobalAdlibInstrument(byte slot, Instrument *dest) { +void IMuseInternal::copyGlobalAdLibInstrument(byte slot, Instrument *dest) { if (slot >= 32) return; _global_adlib_instruments[slot].copy_to(dest); diff --git a/engines/scumm/imuse/imuse_internal.h b/engines/scumm/imuse/imuse_internal.h index 93244b8c1d..172bcaecd4 100644 --- a/engines/scumm/imuse/imuse_internal.h +++ b/engines/scumm/imuse/imuse_internal.h @@ -503,8 +503,8 @@ protected: int setImuseMasterVolume(uint vol); void reallocateMidiChannels(MidiDriver *midi); - void setGlobalAdlibInstrument(byte slot, byte *data); - void copyGlobalAdlibInstrument(byte slot, Instrument *dest); + void setGlobalAdLibInstrument(byte slot, byte *data); + void copyGlobalAdLibInstrument(byte slot, Instrument *dest); bool isNativeMT32() { return _native_mt32; } protected: diff --git a/engines/scumm/imuse/imuse_part.cpp b/engines/scumm/imuse/imuse_part.cpp index 04bc4a2389..40889ec24f 100644 --- a/engines/scumm/imuse/imuse_part.cpp +++ b/engines/scumm/imuse/imuse_part.cpp @@ -200,7 +200,7 @@ void Part::set_instrument(byte * data) { } void Part::load_global_instrument(byte slot) { - _player->_se->copyGlobalAdlibInstrument(slot, &_instrument); + _player->_se->copyGlobalAdLibInstrument(slot, &_instrument); if (clearToTransmit()) _instrument.send(_mc); } diff --git a/engines/scumm/imuse/imuse_player.cpp b/engines/scumm/imuse/imuse_player.cpp index 4376a94d99..73aec472e4 100644 --- a/engines/scumm/imuse/imuse_player.cpp +++ b/engines/scumm/imuse/imuse_player.cpp @@ -374,7 +374,7 @@ void Player::sysEx(const byte *p, uint16 len) { _midi->sysEx_customInstrument(p[0], 'EUP ', p + 1); } else { // SysEx manufacturer 0x97 has been spotted in the - // Monkey Island 2 Adlib music, so don't make this a + // Monkey Island 2 AdLib music, so don't make this a // fatal error. See bug #1481383. if (a == 0) warning("Unknown SysEx manufacturer 0x00 0x%02X 0x%02X", p[0], p[1]); diff --git a/engines/scumm/imuse/instrument.cpp b/engines/scumm/imuse/instrument.cpp index bc8380f1b1..efe15f308f 100644 --- a/engines/scumm/imuse/instrument.cpp +++ b/engines/scumm/imuse/instrument.cpp @@ -144,12 +144,12 @@ public: : (MidiDriver::_mt32ToGm[_program] < 128)); } }; -class Instrument_Adlib : public InstrumentInternal { +class Instrument_AdLib : public InstrumentInternal { private: #include "common/pack-start.h" // START STRUCT PACKING - struct AdlibInstrument { + struct AdLibInstrument { byte flags_1; byte oplvl_1; byte atdec_1; @@ -170,11 +170,11 @@ private: #include "common/pack-end.h" // END STRUCT PACKING - AdlibInstrument _instrument; + AdLibInstrument _instrument; public: - Instrument_Adlib(const byte *data); - Instrument_Adlib(Serializer *s); + Instrument_AdLib(const byte *data); + Instrument_AdLib(Serializer *s); void saveOrLoad(Serializer *s); void send(MidiChannel *mc); void copy_to(Instrument *dest) { dest->adlib((byte *)&_instrument); } @@ -290,8 +290,8 @@ void Instrument::adlib(const byte *instrument) { clear(); if (!instrument) return; - _type = itAdlib; - _instrument = new Instrument_Adlib(instrument); + _type = itAdLib; + _instrument = new Instrument_AdLib(instrument); } void Instrument::roland(const byte *instrument) { @@ -316,8 +316,8 @@ void Instrument::saveOrLoad (Serializer *s) { case itProgram: _instrument = new Instrument_Program(s); break; - case itAdlib: - _instrument = new Instrument_Adlib(s); + case itAdLib: + _instrument = new Instrument_AdLib(s); break; case itRoland: _instrument = new Instrument_Roland(s); @@ -371,29 +371,29 @@ void Instrument_Program::send(MidiChannel *mc) { //////////////////////////////////////// // -// Instrument_Adlib class members +// Instrument_AdLib class members // //////////////////////////////////////// -Instrument_Adlib::Instrument_Adlib(const byte *data) { +Instrument_AdLib::Instrument_AdLib(const byte *data) { memcpy(&_instrument, data, sizeof(_instrument)); } -Instrument_Adlib::Instrument_Adlib(Serializer *s) { +Instrument_AdLib::Instrument_AdLib(Serializer *s) { if (!s->isSaving()) saveOrLoad(s); else memset(&_instrument, 0, sizeof(_instrument)); } -void Instrument_Adlib::saveOrLoad(Serializer *s) { +void Instrument_AdLib::saveOrLoad(Serializer *s) { if (s->isSaving()) s->saveBytes(&_instrument, sizeof(_instrument)); else s->loadBytes(&_instrument, sizeof(_instrument)); } -void Instrument_Adlib::send(MidiChannel *mc) { +void Instrument_AdLib::send(MidiChannel *mc) { mc->sysEx_customInstrument('ADL ', (byte *)&_instrument); } diff --git a/engines/scumm/imuse/instrument.h b/engines/scumm/imuse/instrument.h index 4d4e40c528..f6108daf16 100644 --- a/engines/scumm/imuse/instrument.h +++ b/engines/scumm/imuse/instrument.h @@ -54,7 +54,7 @@ public: enum { itNone = 0, itProgram = 1, - itAdlib = 2, + itAdLib = 2, itRoland = 3 }; diff --git a/engines/scumm/imuse/sysex_scumm.cpp b/engines/scumm/imuse/sysex_scumm.cpp index 87873d1693..c96b2f757b 100644 --- a/engines/scumm/imuse/sysex_scumm.cpp +++ b/engines/scumm/imuse/sysex_scumm.cpp @@ -103,7 +103,7 @@ void sysexHandler_Scumm(Player *player, const byte *msg, uint16 len) { case 2: // Start of song. Ignore for now. break; - case 16: // Adlib instrument definition(Part) + case 16: // AdLib instrument definition(Part) a = *p++ & 0x0F; ++p; // Skip hardware type part = player->getPart(a); @@ -118,11 +118,11 @@ void sysexHandler_Scumm(Player *player, const byte *msg, uint16 len) { } break; - case 17: // Adlib instrument definition(Global) + case 17: // AdLib instrument definition(Global) p += 2; // Skip hardware type and... whatever came right before it a = *p++; player->decode_sysex_bytes(p, buf, len - 3); - se->setGlobalAdlibInstrument(a, buf); + se->setGlobalAdLibInstrument(a, buf); break; case 33: // Parameter adjust diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 2478a1c819..e474e8b5a8 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1691,7 +1691,7 @@ void ScummEngine::setupMusic(int midi) { if (missingFile) { GUI::MessageDialog dialog( "Native MIDI support requires the Roland Upgrade from LucasArts,\n" - "but " + fileName + " is missing. Using Adlib instead.", "Ok"); + "but " + fileName + " is missing. Using AdLib instead.", "Ok"); dialog.runModal(); _musicType = MDT_ADLIB; } diff --git a/engines/scumm/vars.cpp b/engines/scumm/vars.cpp index e1614ecda5..f2031d197a 100644 --- a/engines/scumm/vars.cpp +++ b/engines/scumm/vars.cpp @@ -702,7 +702,7 @@ void ScummEngine::resetScummVars() { // 0 PC Speaker // 1 Tandy // 2 CMS - // 3 Adlib + // 3 AdLib // 4 Roland switch (_musicType) { case MDT_NONE: diff --git a/engines/sky/music/adlibchannel.cpp b/engines/sky/music/adlibchannel.cpp index 87de3cf1b9..e9c20de8c7 100644 --- a/engines/sky/music/adlibchannel.cpp +++ b/engines/sky/music/adlibchannel.cpp @@ -31,7 +31,7 @@ namespace Sky { -AdlibChannel::AdlibChannel(FM_OPL *opl, uint8 *pMusicData, uint16 startOfData) { +AdLibChannel::AdLibChannel(FM_OPL *opl, uint8 *pMusicData, uint16 startOfData) { _opl = opl; _musicData = pMusicData; _channelData.loopPoint = startOfData; @@ -79,15 +79,15 @@ AdlibChannel::AdlibChannel(FM_OPL *opl, uint8 *pMusicData, uint16 startOfData) { _instruments = (InstrumentStruct*)(_instrumentMap+0x80); } -AdlibChannel::~AdlibChannel() { +AdLibChannel::~AdLibChannel() { stopNote(); } -bool AdlibChannel::isActive() { +bool AdLibChannel::isActive() { return _channelData.channelActive; } -void AdlibChannel::updateVolume(uint16 pVolume) { +void AdLibChannel::updateVolume(uint16 pVolume) { // Do nothing. The mixer handles the music volume for us. } @@ -95,21 +95,21 @@ void AdlibChannel::updateVolume(uint16 pVolume) { asm driver did (_musicData[0xF5F..0x105E]), so the cache is indeed shared by all instances of the class. */ -void AdlibChannel::setRegister(uint8 regNum, uint8 value) { +void AdLibChannel::setRegister(uint8 regNum, uint8 value) { if (_adlibRegMirror[regNum] != value) { OPLWriteReg (_opl, regNum, value); _adlibRegMirror[regNum] = value; } } -void AdlibChannel::stopNote() { +void AdLibChannel::stopNote() { if (_channelData.note & 0x20) { _channelData.note &= ~0x20; setRegister(0xB0 | _channelData.adlibChannelNumber, _channelData.note); } } -int32 AdlibChannel::getNextEventTime() { +int32 AdLibChannel::getNextEventTime() { int32 retV = 0; uint8 cnt, lVal = 0; for (cnt = 0; cnt < 4; cnt++) { @@ -125,7 +125,7 @@ int32 AdlibChannel::getNextEventTime() { return retV; } -uint8 AdlibChannel::process(uint16 aktTime) { +uint8 AdLibChannel::process(uint16 aktTime) { if (!_channelData.channelActive) { return 0; } @@ -156,7 +156,7 @@ uint8 AdlibChannel::process(uint16 aktTime) { case 12: com90_setLoopPoint(); break; default: - error("AdlibChannel: Unknown music opcode 0x%02X", opcode); + error("AdLibChannel: Unknown music opcode 0x%02X", opcode); break; } } else { @@ -185,7 +185,7 @@ uint8 AdlibChannel::process(uint16 aktTime) { return returnVal; } -void AdlibChannel::setupInstrument(uint8 opcode) { +void AdLibChannel::setupInstrument(uint8 opcode) { uint16 nextNote; if (_channelData.tremoVibro) { uint8 newInstrument = _instrumentMap[opcode]; @@ -205,7 +205,7 @@ void AdlibChannel::setupInstrument(uint8 opcode) { _channelData.note = (uint8)((nextNote >> 8) | 0x20); } -void AdlibChannel::setupChannelVolume(uint8 volume) { +void AdLibChannel::setupChannelVolume(uint8 volume) { uint8 resultOp; uint32 resVol = ((volume + 1) * (_channelData.instrumentData->totOutLev_Op2 + 1)) << 1; resVol &= 0xFFFF; @@ -226,7 +226,7 @@ void AdlibChannel::setupChannelVolume(uint8 volume) { setRegister(0x40 | _channelData.adlibReg1, resultOp); } -void AdlibChannel::adlibSetupInstrument() { +void AdLibChannel::adlibSetupInstrument() { setRegister(0x60 | _channelData.adlibReg1, _channelData.instrumentData->ad_Op1); setRegister(0x60 | _channelData.adlibReg2, _channelData.instrumentData->ad_Op2); setRegister(0x80 | _channelData.adlibReg1, _channelData.instrumentData->sr_Op1); @@ -238,7 +238,7 @@ void AdlibChannel::adlibSetupInstrument() { setRegister(0x20 | _channelData.adlibReg2, _channelData.instrumentData->ampMod_Op2); } -uint16 AdlibChannel::getNextNote(uint8 param) { +uint16 AdLibChannel::getNextNote(uint8 param) { int16 freqIndex = ((int16)_channelData.freqOffset) - 0x40; if (freqIndex >= 0x3F) freqIndex++; @@ -255,18 +255,18 @@ uint16 AdlibChannel::getNextNote(uint8 param) { //- command 90h routines -void AdlibChannel::com90_caseNoteOff() { +void AdLibChannel::com90_caseNoteOff() { if (_musicData[_channelData.eventDataPtr] == _channelData.lastCommand) stopNote(); _channelData.eventDataPtr++; } -void AdlibChannel::com90_stopChannel() { +void AdLibChannel::com90_stopChannel() { stopNote(); _channelData.channelActive = false; } -void AdlibChannel::com90_setupInstrument() { +void AdLibChannel::com90_setupInstrument() { _channelData.channelVolume = 0x7F; _channelData.freqOffset = 0x40; _channelData.assignedInstrument = _musicData[_channelData.eventDataPtr]; @@ -275,11 +275,11 @@ void AdlibChannel::com90_setupInstrument() { adlibSetupInstrument(); } -uint8 AdlibChannel::com90_updateTempo() { +uint8 AdLibChannel::com90_updateTempo() { return _musicData[_channelData.eventDataPtr++]; } -void AdlibChannel::com90_getFreqOffset() { +void AdLibChannel::com90_getFreqOffset() { _channelData.freqOffset = _musicData[_channelData.eventDataPtr++]; if (_channelData.note & 0x20) { uint16 nextNote = getNextNote( @@ -290,23 +290,23 @@ void AdlibChannel::com90_getFreqOffset() { } } -void AdlibChannel::com90_getChannelVolume() { +void AdLibChannel::com90_getChannelVolume() { _channelData.channelVolume = _musicData[_channelData.eventDataPtr++]; } -void AdlibChannel::com90_getTremoVibro() { +void AdLibChannel::com90_getTremoVibro() { _channelData.tremoVibro = _musicData[_channelData.eventDataPtr++]; } -void AdlibChannel::com90_loopMusic() { +void AdLibChannel::com90_loopMusic() { _channelData.eventDataPtr = _channelData.loopPoint; } -void AdlibChannel::com90_keyOff() { +void AdLibChannel::com90_keyOff() { stopNote(); } -void AdlibChannel::com90_setLoopPoint() { +void AdLibChannel::com90_setLoopPoint() { _channelData.loopPoint = _channelData.eventDataPtr; } diff --git a/engines/sky/music/adlibchannel.h b/engines/sky/music/adlibchannel.h index b37936ec70..628ceabdb9 100644 --- a/engines/sky/music/adlibchannel.h +++ b/engines/sky/music/adlibchannel.h @@ -59,19 +59,19 @@ typedef struct { uint8 tremoVibro; uint8 freqOffset; uint16 frequency; -} AdlibChannelType; +} AdLibChannelType; -class AdlibChannel : public ChannelBase { +class AdLibChannel : public ChannelBase { public: - AdlibChannel (FM_OPL *opl, uint8 *pMusicData, uint16 startOfData); - virtual ~AdlibChannel(); + AdLibChannel (FM_OPL *opl, uint8 *pMusicData, uint16 startOfData); + virtual ~AdLibChannel(); virtual uint8 process(uint16 aktTime); virtual void updateVolume(uint16 pVolume); virtual bool isActive(); private: FM_OPL *_opl; uint8 *_musicData; - AdlibChannelType _channelData; + AdLibChannelType _channelData; InstrumentStruct *_instruments; uint16 *_frequenceTable; diff --git a/engines/sky/music/adlibmusic.cpp b/engines/sky/music/adlibmusic.cpp index 74735b30d8..0ceec7a07f 100644 --- a/engines/sky/music/adlibmusic.cpp +++ b/engines/sky/music/adlibmusic.cpp @@ -33,22 +33,22 @@ namespace Sky { -AdlibMusic::AdlibMusic(Audio::Mixer *pMixer, Disk *pDisk) : MusicBase(pDisk) { +AdLibMusic::AdLibMusic(Audio::Mixer *pMixer, Disk *pDisk) : MusicBase(pDisk) { _driverFileBase = 60202; _mixer = pMixer; _sampleRate = pMixer->getOutputRate(); - _opl = makeAdlibOPL(_sampleRate); + _opl = makeAdLibOPL(_sampleRate); _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); } -AdlibMusic::~AdlibMusic() { +AdLibMusic::~AdLibMusic() { OPLDestroy(_opl); _mixer->stopHandle(_soundHandle); } -int AdlibMusic::readBuffer(int16 *data, const int numSamples) { +int AdLibMusic::readBuffer(int16 *data, const int numSamples) { if (_musicData == NULL) { // no music loaded memset(data, 0, numSamples * sizeof(int16)); @@ -76,7 +76,7 @@ int AdlibMusic::readBuffer(int16 *data, const int numSamples) { return numSamples; } -void AdlibMusic::setupPointers() { +void AdLibMusic::setupPointers() { if (SkyEngine::_systemVars.gameVersion == 109) { // disk demo uses a different adlib driver version, some offsets have changed //_musicDataLoc = (_musicData[0x11CC] << 8) | _musicData[0x11CB]; @@ -94,16 +94,16 @@ void AdlibMusic::setupPointers() { _nextMusicPoll = 0; } -void AdlibMusic::setupChannels(uint8 *channelData) { +void AdLibMusic::setupChannels(uint8 *channelData) { _numberOfChannels = channelData[0]; channelData++; for (uint8 cnt = 0; cnt < _numberOfChannels; cnt++) { uint16 chDataStart = READ_LE_UINT16((uint16 *)channelData + cnt) + _musicDataLoc; - _channels[cnt] = new AdlibChannel(_opl, _musicData, chDataStart); + _channels[cnt] = new AdLibChannel(_opl, _musicData, chDataStart); } } -void AdlibMusic::startDriver() { +void AdLibMusic::startDriver() { uint16 cnt = 0; while (_initSequence[cnt] || _initSequence[cnt + 1]) { OPLWriteReg (_opl, _initSequence[cnt], _initSequence[cnt + 1]); @@ -111,20 +111,20 @@ void AdlibMusic::startDriver() { } } -void AdlibMusic::setVolume(uint16 param) { +void AdLibMusic::setVolume(uint16 param) { _musicVolume = param; _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, 2 * param); } -bool AdlibMusic::isStereo() const { +bool AdLibMusic::isStereo() const { return false; } -bool AdlibMusic::endOfData() const { +bool AdLibMusic::endOfData() const { return false; } -int AdlibMusic::getRate() const { +int AdLibMusic::getRate() const { return _sampleRate; } diff --git a/engines/sky/music/adlibmusic.h b/engines/sky/music/adlibmusic.h index 7727979b4a..f3356a91a8 100644 --- a/engines/sky/music/adlibmusic.h +++ b/engines/sky/music/adlibmusic.h @@ -33,10 +33,10 @@ namespace Sky { -class AdlibMusic : public Audio::AudioStream, public MusicBase { +class AdLibMusic : public Audio::AudioStream, public MusicBase { public: - AdlibMusic(Audio::Mixer *pMixer, Disk *pDisk); - ~AdlibMusic(); + AdLibMusic(Audio::Mixer *pMixer, Disk *pDisk); + ~AdLibMusic(); // AudioStream API int readBuffer(int16 *buffer, const int numSamples); diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp index a1a1024e39..7fd13661ad 100644 --- a/engines/sky/sky.cpp +++ b/engines/sky/sky.cpp @@ -259,7 +259,7 @@ Common::Error SkyEngine::init() { MidiDriverType midiDriver = MidiDriver::detectMusicDriver(MDT_ADLIB | MDT_MIDI | MDT_PREFER_MIDI); if (midiDriver == MD_ADLIB) { _systemVars.systemFlags |= SF_SBLASTER; - _skyMusic = new AdlibMusic(_mixer, _skyDisk); + _skyMusic = new AdLibMusic(_mixer, _skyDisk); } else { _systemVars.systemFlags |= SF_ROLAND; if ((midiDriver == MD_MT32) || ConfMan.getBool("native_mt32")) diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp index f002a3beca..e6167c225e 100644 --- a/engines/tinsel/tinsel.cpp +++ b/engines/tinsel/tinsel.cpp @@ -861,7 +861,7 @@ TinselEngine::TinselEngine(OSystem *syst, const TinselGameDescription *gameDesc) _midiMusic = new MidiMusicPlayer(_driver); _pcmMusic = new PCMMusicPlayer(); //_midiMusic->setNativeMT32(native_mt32); - //_midiMusic->setAdlib(adlib); + //_midiMusic->setAdLib(adlib); _musicVolume = ConfMan.getInt("music_volume"); |