aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTravis Howell2006-01-01 09:51:11 +0000
committerTravis Howell2006-01-01 09:51:11 +0000
commit67ac79c5aa0ffd9d672f4b23dbbce3bba1b608c3 (patch)
tree62f2d4bfc7923cdc0e00641647bf3c275d0a48e0 /scumm
parentfccb0d066291b1788daa12834d737e99e2ea50cd (diff)
downloadscummvm-rg350-67ac79c5aa0ffd9d672f4b23dbbce3bba1b608c3.tar.gz
scummvm-rg350-67ac79c5aa0ffd9d672f4b23dbbce3bba1b608c3.tar.bz2
scummvm-rg350-67ac79c5aa0ffd9d672f4b23dbbce3bba1b608c3.zip
Add additional drawStrip case for HE games.
Fixes glitches over key in Darkroom of freddi3. svn-id: r19873
Diffstat (limited to 'scumm')
-rw-r--r--scumm/gfx.cpp81
-rw-r--r--scumm/gfx.h2
2 files changed, 65 insertions, 18 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp
index 5ec16ed260..a91cf87f2c 100644
--- a/scumm/gfx.cpp
+++ b/scumm/gfx.cpp
@@ -1777,7 +1777,7 @@ bool Gdi::decompressBitmap(byte *dst, int dstPitch, const byte *src, int numLine
if (code <= 10) {
switch (code) {
case 1:
- unkDecode7(dst, dstPitch, src, numLinesToProcess);
+ drawStripRaw(dst, dstPitch, src, numLinesToProcess, false);
break;
case 2:
@@ -1817,47 +1817,90 @@ bool Gdi::decompressBitmap(byte *dst, int dstPitch, const byte *src, int numLine
} else {
_decomp_shr = code % 10;
_decomp_mask = 0xFF >> (8 - _decomp_shr);
- code /= 10;
switch (code) {
- case 1:
+ case 14:
+ case 15:
+ case 16:
+ case 17:
+ case 18:
drawStripBasicV(dst, dstPitch, src, numLinesToProcess, false);
break;
- case 2:
+ case 24:
+ case 25:
+ case 26:
+ case 27:
+ case 28:
drawStripBasicH(dst, dstPitch, src, numLinesToProcess, false);
break;
- case 3:
+ case 34:
+ case 35:
+ case 36:
+ case 37:
+ case 38:
useOrDecompress = true;
drawStripBasicV(dst, dstPitch, src, numLinesToProcess, true);
break;
- case 4:
+ case 44:
+ case 45:
+ case 46:
+ case 47:
+ case 48:
useOrDecompress = true;
drawStripBasicH(dst, dstPitch, src, numLinesToProcess, true);
break;
- case 6:
- case 10:
+ case 64:
+ case 65:
+ case 66:
+ case 67:
+ case 68:
+ case 104:
+ case 105:
+ case 106:
+ case 107:
+ case 108:
drawStripComplex(dst, dstPitch, src, numLinesToProcess, false);
break;
- case 8:
- case 12:
+ case 84:
+ case 85:
+ case 86:
+ case 87:
+ case 88:
+ case 124:
+ case 125:
+ case 126:
+ case 127:
+ case 128:
useOrDecompress = true;
drawStripComplex(dst, dstPitch, src, numLinesToProcess, true);
break;
- case 13:
+ case 134:
+ case 135:
+ case 136:
+ case 137:
+ case 138:
drawStripHE(dst, dstPitch, src, 8, numLinesToProcess, false);
break;
- case 14:
+ case 144:
+ case 145:
+ case 146:
+ case 147:
+ case 148:
useOrDecompress = true;
drawStripHE(dst, dstPitch, src, 8, numLinesToProcess, true);
break;
-
+
+ case 149:
+ drawStripRaw(dst, dstPitch, src, numLinesToProcess, true);
+ break;
+
default:
error("Gdi::decompressBitmap: default case %d", code);
}
@@ -2696,20 +2739,24 @@ void Gdi::drawStripBasicV(byte *dst, int dstPitch, const byte *src, int height,
} \
} while (0)
-void Gdi::unkDecode7(byte *dst, int dstPitch, const byte *src, int height) const {
+void Gdi::drawStripRaw(byte *dst, int dstPitch, const byte *src, int height, const bool transpCheck) const {
+ int x;
if (_vm->_features & GF_OLD256) {
uint h = height;
- int x = 8;
+ x = 8;
for (;;) {
*dst = *src++;
NEXT_ROW;
}
} else {
do {
- memcpy(dst, src, 8);
+ for (x = 0; x < 8; x ++) {
+ byte color = *src++;
+ if (!transpCheck || color != _transparentColor)
+ dst[x] = _roomPalette[color] + _paletteMod;
+ }
dst += dstPitch;
- src += 8;
} while (--height);
}
}
diff --git a/scumm/gfx.h b/scumm/gfx.h
index 1f9fc1043e..5f55e16d95 100644
--- a/scumm/gfx.h
+++ b/scumm/gfx.h
@@ -245,7 +245,7 @@ protected:
void drawStripBasicH(byte *dst, int dstPitch, const byte *src, int height, const bool transpCheck) const;
void drawStripBasicV(byte *dst, int dstPitch, const byte *src, int height, const bool transpCheck) const;
- void unkDecode7(byte *dst, int dstPitch, const byte *src, int height) const;
+ void drawStripRaw(byte *dst, int dstPitch, const byte *src, int height, const bool transpCheck) const;
void unkDecode8(byte *dst, int dstPitch, const byte *src, int height) const;
void unkDecode9(byte *dst, int dstPitch, const byte *src, int height) const;
void unkDecode10(byte *dst, int dstPitch, const byte *src, int height) const;