diff options
author | Paweł Kołodziejski | 2003-07-19 14:26:25 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2003-07-19 14:26:25 +0000 |
commit | 2d48186c038191febc30d3a0b3c652a31484212b (patch) | |
tree | 8c992bb2637dd1852a235f202db0effb52dfb38e /scumm/smush | |
parent | e68d371e6238972ab8aae6715ee01dec94f72861 (diff) | |
download | scummvm-rg350-2d48186c038191febc30d3a0b3c652a31484212b.tar.gz scummvm-rg350-2d48186c038191febc30d3a0b3c652a31484212b.tar.bz2 scummvm-rg350-2d48186c038191febc30d3a0b3c652a31484212b.zip |
added vc7 files and fixed warnings. vc6 is no longer supported by me
svn-id: r9077
Diffstat (limited to 'scumm/smush')
-rw-r--r-- | scumm/smush/codec47.cpp | 10 | ||||
-rw-r--r-- | scumm/smush/saud_channel.cpp | 14 |
2 files changed, 12 insertions, 12 deletions
diff --git a/scumm/smush/codec47.cpp b/scumm/smush/codec47.cpp index 5519dca5a1..ec43bfa36d 100644 --- a/scumm/smush/codec47.cpp +++ b/scumm/smush/codec47.cpp @@ -437,7 +437,7 @@ void Codec47Decoder::makeTables47(int32 width) { int16 *tmp_ptr = _table; int16 *ptr_table = codec47_table; do { - *tmp_ptr++ = ptr_table[1] * width + ptr_table[0]; + *tmp_ptr++ = (int16)(ptr_table[1] * width + ptr_table[0]); ptr_table += 2; } while (tmp_ptr < &_table[255]); a = 0; @@ -445,25 +445,25 @@ void Codec47Decoder::makeTables47(int32 width) { do { for (d = 0; d < _tableSmall[96 + c]; d++) { tmp = _tableSmall[64 + c + d]; - tmp = (byte)(tmp >> 2) * width + (tmp & 3); + tmp = (int16)((byte)(tmp >> 2) * width + (tmp & 3)); _tableSmall[c + d * 2] = (byte)tmp; _tableSmall[c + d * 2 + 1] = tmp >> 8; } for (d = 0; d < _tableSmall[97 + c]; d++) { tmp = _tableSmall[80 + c + d]; - tmp = (byte)(tmp >> 2) * width + (tmp & 3); + tmp = (int16)((byte)(tmp >> 2) * width + (tmp & 3)); _tableSmall[32 + c + d * 2] = (byte)tmp; _tableSmall[32 + c + d * 2 + 1] = tmp >> 8; } for (d = 0; d < _tableBig[384 + a]; d++) { tmp = _tableBig[256 + a + d]; - tmp = (byte)(tmp >> 3) * width + (tmp & 7); + tmp = (int16)((byte)(tmp >> 3) * width + (tmp & 7)); _tableBig[a + d * 2] = (byte)tmp; _tableBig[a + d * 2 + 1] = tmp >> 8; } for (d = 0; d < _tableBig[385 + a]; d++) { tmp = _tableBig[320 + a + d]; - tmp = (byte)(tmp >> 3) * width + (tmp & 7); + tmp = (int16)((byte)(tmp >> 3) * width + (tmp & 7)); _tableBig[128 + a + d * 2] = (byte)tmp; _tableBig[128 + a + d * 2 + 1] = tmp >> 8; } diff --git a/scumm/smush/saud_channel.cpp b/scumm/smush/saud_channel.cpp index 142ab9a17a..9deb5ce2f3 100644 --- a/scumm/smush/saud_channel.cpp +++ b/scumm/smush/saud_channel.cpp @@ -178,14 +178,14 @@ bool SaudChannel::isTerminated() const { } void SaudChannel::recalcVolumeTable() { - const int32 MAX_BALANCE = 100; - int32 volume_left, volume_right; + const int MAX_BALANCE = 100; + int volume_left, volume_right; if (_balance < -MAX_BALANCE || _balance > MAX_BALANCE) { warning("balance is out of range ! : %d", _balance); return; } - int32 left_multiplier = MAX_BALANCE - _balance; - int32 right_multiplier = MAX_BALANCE + _balance; + int left_multiplier = MAX_BALANCE - _balance; + int right_multiplier = MAX_BALANCE + _balance; volume_left = _volume * left_multiplier / (MAX_BALANCE * 2); volume_right = _volume * right_multiplier / (MAX_BALANCE * 2); if (volume_left < 0) @@ -196,10 +196,10 @@ void SaudChannel::recalcVolumeTable() { volume_right = 0; if (volume_right > 128) volume_right = 128; - for (int32 i = 0; i < 256; i++) { - int16 value = volume_left * (int8)i; + for (int i = 0; i < 256; i++) { + int16 value = volume_left * i; _voltable[0][i] = TO_BE_16(value); - value = volume_right * (int8)i; + value = volume_right * i; _voltable[1][i] = TO_BE_16(value); } } |