diff options
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/gfx.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/palette.cpp | 6 | ||||
-rw-r--r-- | engines/scumm/players/player_v1.cpp | 4 | ||||
-rw-r--r-- | engines/scumm/players/player_v2.cpp | 4 | ||||
-rw-r--r-- | engines/scumm/players/player_v2base.cpp | 4 |
5 files changed, 10 insertions, 10 deletions
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp index 48818b8abf..f35c1e52fc 100644 --- a/engines/scumm/gfx.cpp +++ b/engines/scumm/gfx.cpp @@ -1808,7 +1808,7 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, const int y, const // It was added as a kind of hack to fix some corner cases, but it compares // the room width to the virtual screen width; but the former should always // be bigger than the latter (except for MM NES, maybe)... strange - int limit = MAX(_vm->_roomWidth, (int) vs->w) / 8 - x; + int limit = MAX(_vm->_roomWidth, (int)vs->w) / 8 - x; if (limit > numstrip) limit = numstrip; if (limit > _numStrips - sx) diff --git a/engines/scumm/palette.cpp b/engines/scumm/palette.cpp index 5275f1e942..aeb40df003 100644 --- a/engines/scumm/palette.cpp +++ b/engines/scumm/palette.cpp @@ -878,9 +878,9 @@ void ScummEngine::setShadowPalette(int redScale, int greenScale, int blueScale, } for (i = start; i < end; i++) { - int r = (int) ((pal[0] >> 2) * redScale) >> 8; - int g = (int) ((pal[1] >> 2) * greenScale) >> 8; - int b = (int) ((pal[2] >> 2) * blueScale) >> 8; + int r = (int)((pal[0] >> 2) * redScale) >> 8; + int g = (int)((pal[1] >> 2) * greenScale) >> 8; + int b = (int)((pal[2] >> 2) * blueScale) >> 8; pal += 3; uint8 bestitem = 0; diff --git a/engines/scumm/players/player_v1.cpp b/engines/scumm/players/player_v1.cpp index 041f556120..b65c8a4d56 100644 --- a/engines/scumm/players/player_v1.cpp +++ b/engines/scumm/players/player_v1.cpp @@ -416,7 +416,7 @@ void Player_V1::nextPCjrCmd() { switch (_channels[i].hull_counter) { case 1: _channels[i].volume -= _channels[i].attack; - if ((int) _channels[i].volume <= 0) { + if ((int)_channels[i].volume <= 0) { _channels[i].volume = 0; _channels[i].hull_counter++; } @@ -432,7 +432,7 @@ void Player_V1::nextPCjrCmd() { if (--_channels[i].sustctr < 0) { _channels[i].sustctr = _channels[i].sustain_2; _channels[i].volume += _channels[i].sustain_1; - if ((int) _channels[i].volume >= 15) { + if ((int)_channels[i].volume >= 15) { _channels[i].volume = 15; _channels[i].hull_counter++; } diff --git a/engines/scumm/players/player_v2.cpp b/engines/scumm/players/player_v2.cpp index c7ebd8abff..b58be8d881 100644 --- a/engines/scumm/players/player_v2.cpp +++ b/engines/scumm/players/player_v2.cpp @@ -85,7 +85,7 @@ void Player_V2::setMusicVolume (int vol) { if (out > 0xffff) _volumetable[i] = 0xffff; else - _volumetable[i] = (int) out; + _volumetable[i] = (int)out; out /= 1.258925412; /* = 10 ^ (2/20) = 2dB */ } @@ -191,7 +191,7 @@ int Player_V2::readBuffer(int16 *data, const int numSamples) { void Player_V2::lowPassFilter(int16 *sample, uint len) { for (uint i = 0; i < len; i++) { - _level = (int) (_level * _decay + _level = (int)(_level * _decay + sample[0] * (0x10000 - _decay)) >> 16; sample[0] = sample[1] = _level; sample += 2; diff --git a/engines/scumm/players/player_v2base.cpp b/engines/scumm/players/player_v2base.cpp index 8df4afc198..7d3dab7935 100644 --- a/engines/scumm/players/player_v2base.cpp +++ b/engines/scumm/players/player_v2base.cpp @@ -602,8 +602,8 @@ void Player_V2Base::next_freqs(ChannelInfo *channel) { channel->d.freqmod_offset -= channel->d.freqmod_modulo; channel->d.freq = - (int) (freqmod_table[channel->d.freqmod_table + (channel->d.freqmod_offset >> 4)]) - * (int) channel->d.freqmod_multiplier / 256 + (int)(freqmod_table[channel->d.freqmod_table + (channel->d.freqmod_offset >> 4)]) + * (int)channel->d.freqmod_multiplier / 256 + channel->d.base_freq; debug(9, "Freq: %d/%d, %d/%d/%d*%d %d", |