[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.14,2.15
Max Horn
fingolfin at users.sourceforge.net
Mon Dec 30 21:00:02 CET 2002
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv20523
Modified Files:
gfx.cpp
Log Message:
another round of cleanup on the first 6 decoders: only moved around code to work out the extreme similarities between them
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.14
retrieving revision 2.15
diff -u -d -r2.14 -r2.15
--- gfx.cpp 31 Dec 2002 04:45:21 -0000 2.14
+++ gfx.cpp 31 Dec 2002 04:59:23 -0000 2.15
@@ -1260,7 +1260,12 @@
againPos:
if (!READ_BIT) {
- } else if (READ_BIT) {
+ } else if (!READ_BIT) {
+ FILL_BITS;
+ color = bits & _decomp_mask;
+ bits >>= _decomp_shr;
+ cl -= _decomp_shr;
+ } else {
incm = (bits & 7) - 4;
cl -= 3;
bits >>= 3;
@@ -1282,11 +1287,6 @@
bits |= (*src++) << (cl - 8);
goto againPos;
}
- } else {
- FILL_BITS;
- color = bits & _decomp_mask;
- cl -= _decomp_shr;
- bits >>= _decomp_shr;
}
} while (--x);
dst += _vm->_realWidth - 8;
@@ -1296,10 +1296,10 @@
void Gdi::unkDecode2(byte *dst, byte *src, int height)
{
byte color = *src++;
- int8 inc = -1;
uint bits = *src++;
byte cl = 8;
byte bit;
+ int8 inc = -1;
do {
int x = 8;
@@ -1344,7 +1344,12 @@
againPos:
if (!READ_BIT) {
- } else if (READ_BIT) {
+ } else if (!READ_BIT) {
+ FILL_BITS;
+ color = bits & _decomp_mask;
+ bits >>= _decomp_shr;
+ cl -= _decomp_shr;
+ } else {
incm = (bits & 7) - 4;
cl -= 3;
bits >>= 3;
@@ -1368,11 +1373,6 @@
bits |= (*src++) << (cl - 8);
goto againPos;
}
- } else {
- FILL_BITS;
- color = bits & _decomp_mask;
- cl -= _decomp_shr;
- bits >>= _decomp_shr;
}
} while (--x);
dst += _vm->_realWidth - 8;
@@ -1382,10 +1382,10 @@
void Gdi::unkDecode4(byte *dst, byte *src, int height)
{
byte color = *src++;
- int8 inc = -1;
uint bits = *src++;
byte cl = 8;
byte bit;
+ int8 inc = -1;
int x = 8;
do {
@@ -1416,10 +1416,10 @@
void Gdi::unkDecode5(byte *dst, byte *src, int height)
{
byte color = *src++;
- int8 inc = -1;
uint bits = *src++;
byte cl = 8;
byte bit;
+ int8 inc = -1;
do {
int x = 8;
@@ -1447,10 +1447,10 @@
void Gdi::unkDecode6(byte *dst, byte *src, int height)
{
byte color = *src++;
- int8 inc = -1;
uint bits = *src++;
byte cl = 8;
byte bit;
+ int8 inc = -1;
int x = 8;
do {
More information about the Scummvm-git-logs
mailing list