diff options
Diffstat (limited to 'engines/scumm/player_apple2.cpp')
-rw-r--r-- | engines/scumm/player_apple2.cpp | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/engines/scumm/player_apple2.cpp b/engines/scumm/player_apple2.cpp index a8e150caa9..58e4f78a94 100644 --- a/engines/scumm/player_apple2.cpp +++ b/engines/scumm/player_apple2.cpp @@ -61,8 +61,8 @@ public: private: void _update(int interval /*a*/, int count /*y*/) { // D076 - assert(interval > 0); // 0 == 256? - assert(count > 0); // 0 == 256? + assert(interval > 0); // 0 == 256? + assert(count > 0); // 0 == 256? for (; count >= 0; --count) { _player->speakerToggle(); @@ -99,7 +99,7 @@ public: ++_pos; return false; - } + } return true; } @@ -112,7 +112,7 @@ private: assert(interval > 0); // 0 == 256? int a = (interval >> 3) + count; - for (int y = a; y > 0; --y) { + for (int y = a; y > 0; --y) { _player->generateSamples(1292 - 5*interval); _player->speakerToggle(); @@ -206,7 +206,7 @@ private: _bitmask1 = 0x3; _bitmask2 = 0x3; - + _updateInterval2 = param0; if (_updateInterval2 == 0) _bitmask2 = 0x0; @@ -234,9 +234,9 @@ private: if (_updateRemain2 == 0) { _updateRemain2 = _updateInterval2; - // use only first voice's data (bitmask1) if both voices are triggered + // use only first voice's data (bitmask1) if both voices are triggered if (_updateRemain1 != 0) { - _speakerShiftReg ^= _bitmask2; + _speakerShiftReg ^= _bitmask2; } } @@ -256,7 +256,7 @@ private: protected: const byte *_params; - + byte _updateRemain1; byte _updateRemain2; @@ -309,7 +309,7 @@ private: for (int i = count; i > 0; --i) { _player->generateSamples(10 + 5*interval); _player->speakerToggle(); - + _player->generateSamples(5 + 5*interval); _player->speakerToggle(); } @@ -332,20 +332,20 @@ private: // LD000[loc] ^ LD00A[loc] const byte AppleII_SoundFunction5_Noise::_noiseTable[256] = { - 0x65, 0x1b, 0xda, 0x11, 0x61, 0xe5, 0x77, 0x57, 0x92, 0xc8, 0x51, 0x1c, 0xd4, 0x91, 0x62, 0x63, - 0x00, 0x38,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 0x0c, 0x5d, 0x1b, 0x61, 0x10, 0x3c, + 0x64, 0xf0, 0xf0, 0x08, 0x63, 0x03, 0x00, 0x55, 0x35, 0xc0, 0x00, 0x20, 0x74, 0xa5, 0x1e, 0xe3, + 0x00, 0x06, 0x3c, 0x52, 0xd1, 0x70, 0xd0, 0x57, 0x02, 0xf0, 0x00, 0xb6, 0xfc, 0x02, 0x11, 0x9a, + 0x3b, 0xc8, 0x38, 0xdf, 0x1a, 0xb0, 0xd1, 0xb8, 0xd0, 0x18, 0x8a, 0x4a, 0xea, 0x1b, 0x12, 0x5d, + 0x29, 0x58, 0xd8, 0x43, 0xb8, 0x2d, 0xd2, 0x61, 0x10, 0x3c, 0x0c, 0x5d, 0x1b, 0x61, 0x10, 0x3c, 0x0a, 0x5d, 0x1d, 0x61, 0x10, 0x3c, 0x0b, 0x19, 0x88, 0x21, 0xc0, 0x21, 0x07, 0x00, 0x65, 0x62, - 0x08, 0xe9, 0x36, 0x40, 0x20, 0x41, 0x06, 0x00, 0x20, 0x00, 0x00, 0xed, 0xa3, 0x00, 0x88, 0x06, - 0x98, 0x01, 0x5d, 0x7f, 0x02, 0x1d, 0x78, 0x03, 0x60, 0xcb, 0x3a, 0x01, 0xbd, 0x78, 0x02, 0x5d, - 0x7e, 0x03, 0x1d, 0xf5, 0xa6, 0x40, 0x81, 0xb4, 0xd0, 0x8d, 0xd3, 0xd0, 0x6d, 0xd5, 0x61, 0x48, - 0x61, 0x4d, 0xd1, 0xc8, 0xb1, 0xd8, 0x69, 0xff, 0x61, 0xd9, 0xed, 0xa0, 0xfe, 0x19, 0x91, 0x37, + 0x08, 0xe9, 0x36, 0x40, 0x20, 0x41, 0x06, 0x00, 0x20, 0x00, 0x00, 0xed, 0xa3, 0x00, 0x88, 0x06, + 0x98, 0x01, 0x5d, 0x7f, 0x02, 0x1d, 0x78, 0x03, 0x60, 0xcb, 0x3a, 0x01, 0xbd, 0x78, 0x02, 0x5d, + 0x7e, 0x03, 0x1d, 0xf5, 0xa6, 0x40, 0x81, 0xb4, 0xd0, 0x8d, 0xd3, 0xd0, 0x6d, 0xd5, 0x61, 0x48, + 0x61, 0x4d, 0xd1, 0xc8, 0xb1, 0xd8, 0x69, 0xff, 0x61, 0xd9, 0xed, 0xa0, 0xfe, 0x19, 0x91, 0x37, 0x19, 0x37, 0x00, 0xf1, 0x00, 0x01, 0x1f, 0x00, 0xad, 0xc1, 0x01, 0x01, 0x2e, 0x00, 0x40, 0xc6, 0x7a, 0x9b, 0x95, 0x43, 0xfc, 0x18, 0xd2, 0x9e, 0x2a, 0x5a, 0x4b, 0x2a, 0xb6, 0x87, 0x30, 0x6c }; @@ -394,20 +394,20 @@ void Player_AppleII::startSound(int nr) { case 0: // empty (nothing to play) resetState(); return; - case 1: - _soundFunc = new AppleII_SoundFunction1_FreqUpDown(); + case 1: + _soundFunc = new AppleII_SoundFunction1_FreqUpDown(); break; - case 2: - _soundFunc = new AppleII_SoundFunction2_SymmetricWave(); + case 2: + _soundFunc = new AppleII_SoundFunction2_SymmetricWave(); break; - case 3: - _soundFunc = new AppleII_SoundFunction3_AsymmetricWave(); + case 3: + _soundFunc = new AppleII_SoundFunction3_AsymmetricWave(); break; - case 4: - _soundFunc = new AppleII_SoundFunction4_Polyphone(); + case 4: + _soundFunc = new AppleII_SoundFunction4_Polyphone(); break; - case 5: - _soundFunc = new AppleII_SoundFunction5_Noise(); + case 5: + _soundFunc = new AppleII_SoundFunction5_Noise(); break; } _soundFunc->init(this, _params); @@ -484,7 +484,7 @@ int Player_AppleII::readBuffer(int16 *buffer, const int numSamples) { // toggle speaker on/off void Player_AppleII::speakerToggle() { - _speakerState ^= 0x1; + _speakerState ^= 0x1; } void Player_AppleII::generateSamples(int cycles) { @@ -492,8 +492,8 @@ void Player_AppleII::generateSamples(int cycles) { } void Player_AppleII::wait(int interval, int count /*y*/) { - assert(count > 0); // 0 == 256? - assert(interval > 0); // 0 == 256? + assert(count > 0); // 0 == 256? + assert(interval > 0); // 0 == 256? generateSamples(11 + count*(8 + 5 * interval)); } |