aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2016-08-25 01:32:12 +0200
committerWillem Jan Palenstijn2016-08-25 01:32:12 +0200
commit224704ec8807ebaabc80b12dd9c60b666ffa11df (patch)
treedfec8e6ef0bdf3c7a5b7de801f34102313656ee4 /engines
parent3f1f3c5c1ec3dd8d8507530b3a85b89464389632 (diff)
downloadscummvm-rg350-224704ec8807ebaabc80b12dd9c60b666ffa11df.tar.gz
scummvm-rg350-224704ec8807ebaabc80b12dd9c60b666ffa11df.tar.bz2
scummvm-rg350-224704ec8807ebaabc80b12dd9c60b666ffa11df.zip
DIRECTOR: Try to simplify uncompressed detection heuristic
Diffstat (limited to 'engines')
-rw-r--r--engines/director/frame.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp
index 5313103399..7412031245 100644
--- a/engines/director/frame.cpp
+++ b/engines/director/frame.cpp
@@ -572,14 +572,12 @@ Image::ImageDecoder *Frame::getImageFrom(uint16 spriteId) {
debugC(4, kDebugImages, "%d, %d, %d", imgId, w, h);
if (true || bc->flags & 0x20) {
- int w1 = w + 8 - w % 8 + 8;
- debugC(3, kDebugImages, "Disabling compression for %d: %d x %d", imgId, w1, h);
+ int w1 = w + 16 - w % 16;
- if (pic->size() * 8 == w1 * h)
+ if (pic->size() * 8 == w1 * h) {
+ debugC(3, kDebugImages, "Disabling compression for %d: %d x %d", imgId, w1, h);
img = new BITDDecoder(w1, h, false);
- else if (pic->size() * 8 == (w1 + 8) * h)
- img = new BITDDecoder(w1 + 8, h, false);
- else
+ } else
img = new BITDDecoder(w /*+ 8*/, h, true);
} else {
img = new BITDDecoder(w, h, true);