[Scummvm-cvs-logs] CVS: scummvm/scumm/smush codec37.cpp,1.24,1.25 codec47.cpp,1.62,1.63 imuse_channel.cpp,1.22,1.23 smush_font.cpp,1.14,1.15 smush_player.cpp,1.59,1.60
Pawel Kolodziejski
aquadran at users.sourceforge.net
Sun Nov 16 12:55:07 CET 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.186,1.187 akos.cpp,1.88,1.89 bomp.cpp,2.13,2.14 bundle.cpp,1.48,1.49 camera.cpp,2.17,2.18 costume.cpp,1.118,1.119 gfx.cpp,2.231,2.232 imuse.cpp,2.111,2.112 imuse_player.cpp,2.38,2.39 object.cpp,1.147,1.148 script_v2.cpp,2.214,2.215 script_v5.cpp,1.209,1.210 script_v6.cpp,1.210,1.211 string.cpp,1.166,1.167 verbs.cpp,1.81,1.82
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.232,2.233 string.cpp,1.167,1.168
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm/smush
In directory sc8-pr-cvs1:/tmp/cvs-serv31504/smush
Modified Files:
codec37.cpp codec47.cpp imuse_channel.cpp smush_font.cpp
smush_player.cpp
Log Message:
changed some shift operators to *, /
Index: codec37.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/codec37.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- codec37.cpp 3 Oct 2003 18:33:56 -0000 1.24
+++ codec37.cpp 16 Nov 2003 20:52:57 -0000 1.25
@@ -243,7 +243,7 @@
assert(index + 254 < (int32)(sizeof(maketable_bytes) / 2));
for (int32 i = 0; i < 255; i++) {
- int32 j = (i + index) << 1;
+ int32 j = (i + index) * 2;
_offsetTable[i] = maketable_bytes[j + 1] * pitch + maketable_bytes[j];
}
}
@@ -443,8 +443,8 @@
}
void Codec37Decoder::decode(byte *dst, const byte *src) {
- int32 bw = (_width + 3) >> 2, bh = (_height + 3) >> 2;
- int32 pitch = bw << 2;
+ int32 bw = (_width + 3) / 4, bh = (_height + 3) / 4;
+ int32 pitch = bw * 4;
int16 seq_nb = READ_LE_UINT16(src + 2);
int32 decoded_size = READ_LE_UINT32(src + 4);
Index: codec47.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/codec47.cpp,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- codec47.cpp 9 Oct 2003 14:17:06 -0000 1.62
+++ codec47.cpp 16 Nov 2003 20:52:57 -0000 1.63
@@ -309,7 +309,7 @@
int16 tmp;
for (int l = 0; l < 512; l += 2) {
- _table[l >> 1] = (int16)(codec47_table[l + 1] * width + codec47_table[l]);
+ _table[l / 2] = (int16)(codec47_table[l + 1] * width + codec47_table[l]);
}
a = 0;
@@ -496,8 +496,8 @@
void Codec47Decoder::decode2(byte *dst, const byte *src, int width, int height, const byte *param_ptr) {
_d_src = src;
_paramPtr = param_ptr - 0xf8;
- int bw = (width + 7) >> 3;
- int bh = (height + 7) >> 3;
+ int bw = (width + 7) / 8;
+ int bh = (height + 7) / 8;
int next_line = width * 7;
_d_pitch = width;
Index: imuse_channel.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/imuse_channel.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- imuse_channel.cpp 3 Oct 2003 18:33:57 -0000 1.22
+++ imuse_channel.cpp 16 Nov 2003 20:52:57 -0000 1.23
@@ -58,8 +58,8 @@
// 2 - Background music
// 0, 3-511 - SFX and volume
// FIXME: this should be better
- if ((flags != 1) && (flags != 2) && ((flags >> 2) != 0)) {
- _volume = 300 - ((flags >> 3) << 2);
+ if ((flags != 1) && (flags != 2) && ((flags / 4) != 0)) {
+ _volume = 300 - ((flags / 8) * 4);
}
else {
_volume = 127;
Index: smush_font.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_font.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- smush_font.cpp 3 Oct 2003 18:33:57 -0000 1.14
+++ smush_font.cpp 16 Nov 2003 20:52:57 -0000 1.15
@@ -304,7 +304,7 @@
y = dst_height - height;
}
- max_width = (max_width + 1) >> 1;
+ max_width = (max_width + 1) / 2;
x = left + width / 2;
if (x < left + max_width)
Index: smush_player.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_player.cpp,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- smush_player.cpp 13 Nov 2003 10:51:02 -0000 1.59
+++ smush_player.cpp 16 Nov 2003 20:52:57 -0000 1.60
@@ -446,7 +446,7 @@
d_src2 += 2;
int32 count = 1024;
byte variable1 = *d_src2++;
- byte variable2 = variable1 >> 4;
+ byte variable2 = variable1 / 16;
variable1 &= 0x0f;
do {
value = *(d_src2++);
@@ -464,7 +464,7 @@
*dst++ = *d_src2++;
} else {
int16 val = (int8)value << variable1;
- *dst++ = val>> 8;
+ *dst++ = val >> 8;
*dst++ = (byte)(val);
}
} while (--count);
@@ -640,7 +640,7 @@
}
static byte delta_color(byte org_color, int16 delta_color) {
- int t = ((org_color << 7) + org_color + delta_color) >> 7;
+ int t = (org_color * 129 + delta_color) / 128;
if (t > 255)
t = 255;
if (t < 0)
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.186,1.187 akos.cpp,1.88,1.89 bomp.cpp,2.13,2.14 bundle.cpp,1.48,1.49 camera.cpp,2.17,2.18 costume.cpp,1.118,1.119 gfx.cpp,2.231,2.232 imuse.cpp,2.111,2.112 imuse_player.cpp,2.38,2.39 object.cpp,1.147,1.148 script_v2.cpp,2.214,2.215 script_v5.cpp,1.209,1.210 script_v6.cpp,1.210,1.211 string.cpp,1.166,1.167 verbs.cpp,1.81,1.82
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.232,2.233 string.cpp,1.167,1.168
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list