aboutsummaryrefslogtreecommitdiff
path: root/scumm/gfx.cpp
diff options
context:
space:
mode:
authorMax Horn2002-12-31 04:59:23 +0000
committerMax Horn2002-12-31 04:59:23 +0000
commit4b6605c286110a848452300cd66230b1859ac046 (patch)
treed7fb2309f2320a2c11a860acf87b59e13196fc8d /scumm/gfx.cpp
parent66b3d2f91aff4fcf082f08dc7fc854c186c1bed8 (diff)
downloadscummvm-rg350-4b6605c286110a848452300cd66230b1859ac046.tar.gz
scummvm-rg350-4b6605c286110a848452300cd66230b1859ac046.tar.bz2
scummvm-rg350-4b6605c286110a848452300cd66230b1859ac046.zip
another round of cleanup on the first 6 decoders: only moved around code to work out the extreme similarities between them
svn-id: r6291
Diffstat (limited to 'scumm/gfx.cpp')
-rw-r--r--scumm/gfx.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp
index 42980001bd..f265284b4c 100644
--- a/scumm/gfx.cpp
+++ b/scumm/gfx.cpp
@@ -1260,7 +1260,12 @@ void Gdi::unkDecode1(byte *dst, byte *src, int height)
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 @@ void Gdi::unkDecode1(byte *dst, byte *src, int height)
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::unkDecode1(byte *dst, byte *src, int height)
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 @@ void Gdi::unkDecode3(byte *dst, byte *src, int height)
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 @@ void Gdi::unkDecode3(byte *dst, byte *src, int height)
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::unkDecode3(byte *dst, byte *src, int height)
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::unkDecode4(byte *dst, byte *src, int height)
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::unkDecode5(byte *dst, byte *src, int height)
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 {