aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-03-01 07:21:51 +0000
committerTorbjörn Andersson2006-03-01 07:21:51 +0000
commit55739f1715fee58b2dbf3ba82198daad239c9a23 (patch)
tree6163a3e6e66a3ad66e81bbed1173efbf013265f9 /engines/kyra
parent90cbe402b2efbb9e9bcdc64e9262738ef2623a2c (diff)
downloadscummvm-rg350-55739f1715fee58b2dbf3ba82198daad239c9a23.tar.gz
scummvm-rg350-55739f1715fee58b2dbf3ba82198daad239c9a23.tar.bz2
scummvm-rg350-55739f1715fee58b2dbf3ba82198daad239c9a23.zip
Cleaned up updateCallback35() and renamed it setAMDepth(). It looks like the
_unkOutputByte2 variable is there to keep track of the current value of the BD register (AM Depth / Vibrato Depth / Rhythm) svn-id: r20984
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/sound_adlib.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/engines/kyra/sound_adlib.cpp b/engines/kyra/sound_adlib.cpp
index 66a743c4bd..e7a539c852 100644
--- a/engines/kyra/sound_adlib.cpp
+++ b/engines/kyra/sound_adlib.cpp
@@ -219,7 +219,7 @@ private:
int updateCallback32(uint8 *&dataptr, OutputState &state, uint8 value);
int updateCallback33(uint8 *&dataptr, OutputState &state, uint8 value);
int updateCallback34(uint8 *&dataptr, OutputState &state, uint8 value);
- int updateCallback35(uint8 *&dataptr, OutputState &state, uint8 value);
+ int setAMDepth(uint8 *&dataptr, OutputState &state, uint8 value);
int updateCallback36(uint8 *&dataptr, OutputState &state, uint8 value);
int updateCallback37(uint8 *&dataptr, OutputState &state, uint8 value);
int updateCallback38(uint8 *&dataptr, OutputState &state, uint8 value);
@@ -1201,12 +1201,13 @@ int AdlibDriver::updateCallback34(uint8 *&dataptr, OutputState &state, uint8 val
return 0;
}
-int AdlibDriver::updateCallback35(uint8 *&dataptr, OutputState &state, uint8 value) {
- value &= 1;
- value <<= 7;
- _unkOutputByte2 = (_unkOutputByte2 & 0x7F) | value;
+int AdlibDriver::setAMDepth(uint8 *&dataptr, OutputState &state, uint8 value) {
+ if (value & 1)
+ _unkOutputByte2 |= 0x80;
+ else
+ _unkOutputByte2 &= 0x7F;
- // AM depth / Vibrato depth / Rhythm control
+ // The AM Depth bit is set or cleared, the others remain unchanged
output0x388(0xBD00 | _unkOutputByte2);
return 0;
}
@@ -1740,7 +1741,7 @@ const AdlibDriver::ParserOpcode AdlibDriver::_parserOpcodeTable[] = {
// 44
COMMAND(updateCallback33),
COMMAND(updateCallback34),
- COMMAND(updateCallback35),
+ COMMAND(setAMDepth),
COMMAND(updateCallback36),
// 48