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/sky | |
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/sky')
-rw-r--r-- | engines/sky/music/adlibchannel.cpp | 46 | ||||
-rw-r--r-- | engines/sky/music/adlibchannel.h | 10 | ||||
-rw-r--r-- | engines/sky/music/adlibmusic.cpp | 24 | ||||
-rw-r--r-- | engines/sky/music/adlibmusic.h | 6 | ||||
-rw-r--r-- | engines/sky/sky.cpp | 2 |
5 files changed, 44 insertions, 44 deletions
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")) |