aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorPaweł Kołodziejski2003-07-19 14:26:25 +0000
committerPaweł Kołodziejski2003-07-19 14:26:25 +0000
commit2d48186c038191febc30d3a0b3c652a31484212b (patch)
tree8c992bb2637dd1852a235f202db0effb52dfb38e /scumm
parente68d371e6238972ab8aae6715ee01dec94f72861 (diff)
downloadscummvm-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')
-rw-r--r--scumm/bundle.cpp2
-rw-r--r--scumm/resource.cpp8
-rw-r--r--scumm/smush/codec47.cpp10
-rw-r--r--scumm/smush/saud_channel.cpp14
-rw-r--r--scumm/string.cpp2
5 files changed, 18 insertions, 18 deletions
diff --git a/scumm/bundle.cpp b/scumm/bundle.cpp
index f79245b7e7..2f4ab2f487 100644
--- a/scumm/bundle.cpp
+++ b/scumm/bundle.cpp
@@ -874,7 +874,7 @@ int32 Bundle::decompressCodec(int32 codec, byte *comp_input, byte *comp_output,
while (left--) {
curTableEntry = _destImcTable[curTablePos];
- decompTable = curTableEntry - 2;
+ decompTable = (byte)(curTableEntry - 2);
bitMask = 2 << decompTable;
readPos = src + (tableEntrySum >> 3);
diff --git a/scumm/resource.cpp b/scumm/resource.cpp
index a9ec2a8401..9100f9a83f 100644
--- a/scumm/resource.cpp
+++ b/scumm/resource.cpp
@@ -1141,10 +1141,10 @@ int Scumm::readSoundResourceSmallHeader(int type, int idx) {
*ptr++ = 480 & 0xFF;
memcpy(ptr, "MTrk", 4); ptr += 4;
- *ptr++ = ((sizeof(OLD256_MIDI_HACK) + size + 7) >> 24) & 0xFF;
- *ptr++ = ((sizeof(OLD256_MIDI_HACK) + size + 7) >> 16) & 0xFF;
- *ptr++ = ((sizeof(OLD256_MIDI_HACK) + size + 7) >> 8) & 0xFF;
- *ptr++ = ((sizeof(OLD256_MIDI_HACK) + size + 7) ) & 0xFF;
+ *ptr++ = (byte)(((sizeof(OLD256_MIDI_HACK) + size + 7) >> 24) & 0xFF);
+ *ptr++ = (byte)(((sizeof(OLD256_MIDI_HACK) + size + 7) >> 16) & 0xFF);
+ *ptr++ = (byte)(((sizeof(OLD256_MIDI_HACK) + size + 7) >> 8) & 0xFF);
+ *ptr++ = (byte)(((sizeof(OLD256_MIDI_HACK) + size + 7) ) & 0xFF);
// Conver the ticks into a MIDI tempo.
dw = (500000 * 256) / ticks;
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);
}
}
diff --git a/scumm/string.cpp b/scumm/string.cpp
index 167d3e4ea2..670465345d 100644
--- a/scumm/string.cpp
+++ b/scumm/string.cpp
@@ -101,7 +101,7 @@ void Scumm::CHARSET_1() {
if (VAR(VAR_V5_TALK_STRING_Y) < 0) {
s = (a->scaley * (int)VAR(VAR_V5_TALK_STRING_Y)) / 0xFF;
- _string[0].ypos = ((VAR(VAR_V5_TALK_STRING_Y) - s) >> 1) + s - a->elevation + a->y;
+ _string[0].ypos = (int)(((VAR(VAR_V5_TALK_STRING_Y) - s) >> 1) + s - a->elevation + a->y);
} else {
_string[0].ypos = (int)VAR(VAR_V5_TALK_STRING_Y);
}