aboutsummaryrefslogtreecommitdiff
path: root/engines/sky/music/adlibchannel.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2010-01-12 21:07:56 +0000
committerJohannes Schickel2010-01-12 21:07:56 +0000
commit0d995c592046aadbfcb8f46a252537da312912c5 (patch)
tree95a0a8d25372f887fe656f6ba61f050cc28845d4 /engines/sky/music/adlibchannel.cpp
parent1ebe047972e2df513449db6aa615f6ab17dd6fb7 (diff)
downloadscummvm-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/music/adlibchannel.cpp')
-rw-r--r--engines/sky/music/adlibchannel.cpp46
1 files changed, 23 insertions, 23 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;
}