aboutsummaryrefslogtreecommitdiff
path: root/engines/voyeur/graphics.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2014-02-02 17:33:42 -0500
committerPaul Gilbert2014-02-02 17:33:42 -0500
commit63a06bc3f74f4951d7a0c12601a54367f15af36f (patch)
tree443732d87ccbd71cf6e2d0c7bccbca60c2efa91c /engines/voyeur/graphics.cpp
parentd536c0afb2e09e106b94554d484e2930e421d472 (diff)
downloadscummvm-rg350-63a06bc3f74f4951d7a0c12601a54367f15af36f.tar.gz
scummvm-rg350-63a06bc3f74f4951d7a0c12601a54367f15af36f.tar.bz2
scummvm-rg350-63a06bc3f74f4951d7a0c12601a54367f15af36f.zip
VOYEUR: Refactored code for showing ending news into separate method
Diffstat (limited to 'engines/voyeur/graphics.cpp')
-rw-r--r--engines/voyeur/graphics.cpp29
1 files changed, 27 insertions, 2 deletions
diff --git a/engines/voyeur/graphics.cpp b/engines/voyeur/graphics.cpp
index bf73822c52..958eb3103b 100644
--- a/engines/voyeur/graphics.cpp
+++ b/engines/voyeur/graphics.cpp
@@ -460,9 +460,34 @@ error("TODO: var22/var24/var2C not initialised before use?");
srcP = srcImgData;
if (isClipped) {
- // loc_26424
- error("TODO: sDrawPic");
+ var22 = (var22 < 0) ? -var22 : 0;
+ var26 = var22 + width2;
+ var24 = (var24 < 0) ? -var24 : 0;
+ width2 = srcPic->_bounds.width();
+ height1 = var24 + height1;
+
+ for (int yp = 0; yp < height1; ++yp) {
+ byteVal2 = 0;
+ for (int xp = 0; xp < width2; ++xp) {
+ if (!byteVal2) {
+ pixel = *srcP++;
+ if (pixel & 0x80) {
+ pixel = 0x7F;
+ byteVal2 = *srcP++;
+ if (!byteVal2)
+ byteVal2 = width2;
+ }
+ }
+
+ if (yp >= var24 && xp >= var22 && xp < var26) {
+ *destP++ = pixel;
+ }
+ }
+
+ if (yp >= var24)
+ destP += widthDiff2;
+ }
} else {
// loc_26543
for (int yp = 0; yp < height1; ++yp) {