aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Menshakov2011-06-12 00:55:23 +0400
committerAlyssa Milburn2011-06-15 17:34:13 +0200
commit92e2dc8899080a591e322bca3ec3e99e2ab12e6b (patch)
treef7ee588edef49c60ca75d5373d1ef23072057524
parent985d2facf23718bf2dc6672914fc6dd4a59e8193 (diff)
downloadscummvm-rg350-92e2dc8899080a591e322bca3ec3e99e2ab12e6b.tar.gz
scummvm-rg350-92e2dc8899080a591e322bca3ec3e99e2ab12e6b.tar.bz2
scummvm-rg350-92e2dc8899080a591e322bca3ec3e99e2ab12e6b.zip
DREAMWEB: cut rendering box to the screen size
-rw-r--r--engines/dreamweb/dreamweb.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp
index 6eee2e1e10..7a9619d1c6 100644
--- a/engines/dreamweb/dreamweb.cpp
+++ b/engines/dreamweb/dreamweb.cpp
@@ -271,6 +271,12 @@ void DreamWebEngine::setPalette(const uint8 *data, uint start, uint count) {
void DreamWebEngine::blit(const uint8 *src, int pitch, int x, int y, int w, int h) {
+ if (y + h > 200)
+ h = 200 - y;
+ if (x + w > 320)
+ w = 320 - x;
+ if (h <= 0 || w <= 0)
+ return;
_system->copyRectToScreen(src, pitch, x, y, w, h);
}
@@ -318,8 +324,6 @@ void multiput(Context &context) {
void multidump(Context &context) {
context.ds = context.data.word(kWorkspace);
int w = (uint8)context.cl, h = (uint8)context.ch;
- if (w == 0 || h == 0)
- return;
int x = (int16)context.di, y = (int16)context.bx;
unsigned offset = x + y * kScreenwidth;
//debug(1, "multidump %ux%u(segment: %04x) -> %d,%d(address: %d)", w, h, (uint16)context.ds, x, y, offset);