aboutsummaryrefslogtreecommitdiff
path: root/scumm/verbs.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/verbs.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/verbs.cpp')
-rw-r--r--scumm/verbs.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/scumm/verbs.cpp b/scumm/verbs.cpp
index 18654ebdc8..b210de6617 100644
--- a/scumm/verbs.cpp
+++ b/scumm/verbs.cpp
@@ -126,7 +126,7 @@ void ScummEngine::checkV2MouseOver(Common::Point pos) {
if (v2_mouseover_box != -1) {
rect = v2_mouseover_boxes[v2_mouseover_box].rect;
- dst = ptr = vs->screenPtr + vs->xstart + rect.top * vs->width + rect.left;
+ dst = ptr = vs->getPixels(rect.left, rect.top);
// Remove highlight.
for (y = rect.height() - 1; y >= 0; y--) {
@@ -134,7 +134,7 @@ void ScummEngine::checkV2MouseOver(Common::Point pos) {
if (dst[x] == v2_mouseover_boxes[v2_mouseover_box].hicolor)
dst[x] = v2_mouseover_boxes[v2_mouseover_box].color;
}
- dst += vs->width;
+ dst += vs->pitch;
}
markRectAsDirty(kVerbVirtScreen, rect);
@@ -143,7 +143,7 @@ void ScummEngine::checkV2MouseOver(Common::Point pos) {
if (new_box != -1) {
rect = v2_mouseover_boxes[new_box].rect;
- dst = ptr = vs->screenPtr + vs->xstart + rect.top * vs->width + rect.left;
+ dst = ptr = vs->getPixels(rect.left, rect.top);
// Apply highlight
for (y = rect.height() - 1; y >= 0; y--) {
@@ -151,7 +151,7 @@ void ScummEngine::checkV2MouseOver(Common::Point pos) {
if (dst[x] == v2_mouseover_boxes[new_box].color)
dst[x] = v2_mouseover_boxes[new_box].hicolor;
}
- dst += vs->width;
+ dst += vs->pitch;
}
markRectAsDirty(kVerbVirtScreen, rect);
@@ -209,9 +209,9 @@ void ScummEngine::redrawV2Inventory() {
// Clear on all invocations
inventoryBox.top = vs->topline + 32;
- inventoryBox.bottom = vs->topline + virtscr[2].height;
+ inventoryBox.bottom = vs->topline + virtscr[2].h;
inventoryBox.left = 0;
- inventoryBox.right = vs->width;
+ inventoryBox.right = vs->w;
restoreBG(inventoryBox);
_string[1].charset = 1;