aboutsummaryrefslogtreecommitdiff
path: root/engines/toon/picture.cpp
diff options
context:
space:
mode:
authorsylvaintv2011-03-13 23:11:47 +0100
committersylvaintv2011-03-13 23:11:47 +0100
commit3964ce81233c3e76b90cd8363781ac2a0558ed12 (patch)
tree4e5ed9fc6b8fb7d650d3ff3f948c0005a3ba9348 /engines/toon/picture.cpp
parent9e1245c420c8cd4547eb0828c434856c97260c0b (diff)
downloadscummvm-rg350-3964ce81233c3e76b90cd8363781ac2a0558ed12.tar.gz
scummvm-rg350-3964ce81233c3e76b90cd8363781ac2a0558ed12.tar.bz2
scummvm-rg350-3964ce81233c3e76b90cd8363781ac2a0558ed12.zip
TOON: Add more dirtyRect checks
Diffstat (limited to 'engines/toon/picture.cpp')
-rw-r--r--engines/toon/picture.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/engines/toon/picture.cpp b/engines/toon/picture.cpp
index a6ac177e82..b0932bd32a 100644
--- a/engines/toon/picture.cpp
+++ b/engines/toon/picture.cpp
@@ -48,12 +48,12 @@ bool Picture::loadPicture(Common::String file, bool totalPalette /*= false*/) {
decompressLZSS(fileData + 8, _data, dstsize);
// size can only be 640x400 or 1280x400
- if (dstsize > 640 * 400 + 768)
- _width = 1280;
+ if (dstsize > TOON_SCREEN_WIDTH * TOON_SCREEN_HEIGHT + 768)
+ _width = TOON_BACKBUFFER_WIDTH;
else
- _width = 640;
+ _width = TOON_SCREEN_WIDTH;
- _height = 400;
+ _height = TOON_SCREEN_HEIGHT;
// do we have a palette ?
_paletteEntries = (dstsize & 0x7ff) / 3;
@@ -78,12 +78,12 @@ bool Picture::loadPicture(Common::String file, bool totalPalette /*= false*/) {
}
// size can only be 640x400 or 1280x400
- if (decSize > 640 * 400 + 768)
- _width = 1280;
+ if (decSize > TOON_SCREEN_WIDTH * TOON_SCREEN_HEIGHT + 768)
+ _width = TOON_BACKBUFFER_WIDTH;
else
- _width = 640;
+ _width = TOON_SCREEN_WIDTH;
- _height = 400;
+ _height = TOON_SCREEN_HEIGHT;
// decompress the picture into our buffer
decompressSPCN(fileData + 16 + _paletteEntries * 3, _data, decSize);
@@ -100,12 +100,12 @@ bool Picture::loadPicture(Common::String file, bool totalPalette /*= false*/) {
rnc.unpackM1(fileData, _data);
// size can only be 640x400 or 1280x400
- if (decSize > 640 * 400 + 768)
- _width = 1280;
+ if (decSize > TOON_SCREEN_WIDTH * TOON_SCREEN_HEIGHT + 768)
+ _width = TOON_BACKBUFFER_WIDTH;
else
- _width = 640;
+ _width = TOON_SCREEN_WIDTH;
- _height = 400;
+ _height = TOON_SCREEN_HEIGHT;
return true;
}
case kCompRNC2: {
@@ -118,12 +118,12 @@ bool Picture::loadPicture(Common::String file, bool totalPalette /*= false*/) {
decSize = rnc.unpackM2(fileData, _data);
- if (decSize > 640 * 400 + 768)
- _width = 1280;
+ if (decSize > TOON_SCREEN_WIDTH * TOON_SCREEN_HEIGHT + 768)
+ _width = TOON_BACKBUFFER_WIDTH;
else
- _width = 640;
+ _width = TOON_SCREEN_WIDTH;
- _height = 400;
+ _height = TOON_SCREEN_HEIGHT;
return true;
}
}