aboutsummaryrefslogtreecommitdiff
path: root/scumm/object.cpp
diff options
context:
space:
mode:
authorMax Horn2004-08-14 19:42:00 +0000
committerMax Horn2004-08-14 19:42:00 +0000
commit152a5e97fe5197a5494fdde8967301888f360d2c (patch)
treeed39818d7a6b2f3e1fce0f3b379bedb3652f0d63 /scumm/object.cpp
parentd5f20cacd7061b4cff302f5b4f50c61a14461425 (diff)
downloadscummvm-rg350-152a5e97fe5197a5494fdde8967301888f360d2c.tar.gz
scummvm-rg350-152a5e97fe5197a5494fdde8967301888f360d2c.tar.bz2
scummvm-rg350-152a5e97fe5197a5494fdde8967301888f360d2c.zip
Modified VirtScreen to inherit from Graphics::Surface, and added getPixels()/getBackPixels() accessors (these changes make it a bit easier to implement smooth scrolling); also replaced some uses of rtBuffer by proper access through the corresponding VirtScreen
svn-id: r14612
Diffstat (limited to 'scumm/object.cpp')
-rw-r--r--scumm/object.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/scumm/object.cpp b/scumm/object.cpp
index 1f59bdb41c..8b0d6e65a5 100644
--- a/scumm/object.cpp
+++ b/scumm/object.cpp
@@ -1515,9 +1515,9 @@ void ScummEngine::drawBlastObject(BlastObject *eo) {
bdd.srcheight = READ_LE_UINT16(&((const BompHeader *)bomp)->old.height);
}
- bdd.out = vs->screenPtr + vs->xstart;
- bdd.outwidth = vs->width;
- bdd.outheight = vs->height;
+ bdd.out = vs->getPixels(0, 0);
+ bdd.outwidth = vs->w;
+ bdd.outheight = vs->h;
if (_version == 8) {
bdd.dataptr = bomp + 8; // Why this? See also useBompCursor
} else {
@@ -1570,17 +1570,17 @@ void ScummEngine::removeBlastObject(BlastObject *eo) {
r = eo->rect;
- if (r.bottom < 0 || r.right < 0 || r.top > vs->height || r.left > vs->width)
+ if (r.bottom < 0 || r.right < 0 || r.top > vs->h || r.left > vs->w)
return;
if (r.top < 0)
r.top = 0;
- if (r.bottom > vs->height)
- r.bottom = vs->height;
+ if (r.bottom > vs->h)
+ r.bottom = vs->h;
if (r.left < 0)
r.left = 0;
- if (r.right > vs->width)
- r.right = vs->width;
+ if (r.right > vs->w)
+ r.right = vs->w;
left_strip = r.left / 8;
right_strip = (r.right - 1) / 8;