aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreriktorbjorn2011-06-11 14:02:01 +0200
committerAlyssa Milburn2011-06-15 17:34:10 +0200
commitc8be54bbd85c0d86452cdd1f3b614e12dd52c7f0 (patch)
tree29c0e7c04fcbee47d3a9f227adc625ad7ed681e5
parent9034191796702956e84067fd6cdfbc2bae1bf768 (diff)
downloadscummvm-rg350-c8be54bbd85c0d86452cdd1f3b614e12dd52c7f0.tar.gz
scummvm-rg350-c8be54bbd85c0d86452cdd1f3b614e12dd52c7f0.tar.bz2
scummvm-rg350-c8be54bbd85c0d86452cdd1f3b614e12dd52c7f0.zip
DREAMWEB: Cleaned up the PCX decoder slightly
-rw-r--r--engines/dreamweb/dreamweb.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp
index 4e24c4917f..788f98f148 100644
--- a/engines/dreamweb/dreamweb.cpp
+++ b/engines/dreamweb/dreamweb.cpp
@@ -612,7 +612,6 @@ void readabyte(Context & context);
void showpcx(Context &context) {
Graphics::Surface *s = g_system->lockScreen();
- int y = 0;
openfile(context);
context.ds = context.data.word(kWorkspace);
@@ -688,11 +687,9 @@ normal:
endline:
context.di = context.pop();
- context.push(context.si);
- context.si = 0+(228*13)+32+60;
- context.ds = context.data.word(kBuffers);
+ context.cx = context.pop();
- uint8 *dst = (uint8 *)s->getBasePtr(0, y);
+ uint8 *dst = (uint8 *)s->getBasePtr(0, 480 - (uint16)context.cx);
memset(dst, 0, 640);
for (int i = 0; i < 320; i++) {
@@ -705,16 +702,13 @@ endline:
}
}
- context.si = context.pop();
- context.cx = context.pop();
-
- y++;
-
if (--context.cx) goto convertpcx;
closefile(context);
g_system->unlockScreen();
+
+ // TODO: This is probably not the right place to do this
g_system->updateScreen();
}