aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2013-06-19 23:02:40 -0400
committerPaul Gilbert2013-06-19 23:02:40 -0400
commit4c70e6afceeb262e2500a3d0920a762fedbf4e2f (patch)
tree106a9a147164960db2ce1c38260b15f7dbaa84c8 /engines
parent3e62f279d55b5ceb11c72887800fc5ed07e4e31b (diff)
downloadscummvm-rg350-4c70e6afceeb262e2500a3d0920a762fedbf4e2f.tar.gz
scummvm-rg350-4c70e6afceeb262e2500a3d0920a762fedbf4e2f.tar.bz2
scummvm-rg350-4c70e6afceeb262e2500a3d0920a762fedbf4e2f.zip
VOYEUR: On-screen text finally showing up
Diffstat (limited to 'engines')
-rw-r--r--engines/voyeur/files.cpp2
-rw-r--r--engines/voyeur/graphics.cpp38
-rw-r--r--engines/voyeur/graphics.h2
3 files changed, 21 insertions, 21 deletions
diff --git a/engines/voyeur/files.cpp b/engines/voyeur/files.cpp
index 09fbc17c56..f0a7468be8 100644
--- a/engines/voyeur/files.cpp
+++ b/engines/voyeur/files.cpp
@@ -925,7 +925,7 @@ int ViewPortResource::drawText(const Common::String &msg) {
}
}
- if (gfxManager._saveBack && fontInfo._fontSaveBack && (_flags & 0x8000)) {
+ if (gfxManager._saveBack && fontInfo._fontSaveBack && (_flags & DISPFLAG_VIEWPORT)) {
addSaveRect(_pageIndex, _fontRect);
}
diff --git a/engines/voyeur/graphics.cpp b/engines/voyeur/graphics.cpp
index c2f6768fc9..3220977252 100644
--- a/engines/voyeur/graphics.cpp
+++ b/engines/voyeur/graphics.cpp
@@ -123,7 +123,7 @@ void GraphicsManager::addRectNoSaveBack(ViewPortResource *viewPort, int idx, con
}
void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *destDisplay,
- const Common::Point &offset) {
+ const Common::Point &initialOffset) {
int var4C = 0;
int width1, width2;
int widthDiff, widthDiff2;
@@ -157,8 +157,8 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des
destPic = destViewPort->_currentPic;
}
- Common::Point ofs = Common::Point(offset.x + srcPic->_bounds.left - destPic->_bounds.left,
- offset.y + srcPic->_bounds.top - destPic->_bounds.top);
+ Common::Point offset = Common::Point(initialOffset.x + srcPic->_bounds.left - destPic->_bounds.left,
+ initialOffset.y + srcPic->_bounds.top - destPic->_bounds.top);
width1 = width2 = srcPic->_bounds.width();
height1 = srcPic->_bounds.height();
srcOffset = 0;
@@ -179,12 +179,12 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des
newBounds = Common::Rect(0, 0, destPic->_bounds.width(), destPic->_bounds.height());
}
- var24 = ofs.y - newBounds.top;
+ var24 = offset.y - newBounds.top;
if (var24 < 0) {
var52 = width2;
srcOffset -= var24 * var52;
height1 += var24;
- ofs.y = newBounds.top;
+ offset.y = newBounds.top;
if (height1 <= 0)
return;
@@ -192,18 +192,18 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des
isClipped = true;
}
- var20 = newBounds.bottom - (ofs.y + height1);
+ var20 = newBounds.bottom - (offset.y + height1);
if (var20 < 0) {
height1 += var20;
if (height1 <= 0)
return;
}
- var22 = ofs.x - newBounds.left;
+ var22 = offset.x - newBounds.left;
if (var22 < 0) {
srcOffset -= var22;
width2 += var22;
- ofs.x = newBounds.left;
+ offset.x = newBounds.left;
if (width2 <= 0)
return;
@@ -211,7 +211,7 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des
isClipped = true;
}
- var26 = newBounds.right - (ofs.x + width2);
+ var26 = newBounds.right - (offset.x + width2);
if (var26 < 0) {
width2 += var26;
if (width2 <= 0)
@@ -221,7 +221,7 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des
}
}
- screenOffset = ofs.y * destPic->_bounds.width() + ofs.x;
+ screenOffset = offset.y * destPic->_bounds.width() + offset.x;
widthDiff = width1 - width2;
widthDiff2 = destPic->_bounds.width() - width2;
@@ -245,8 +245,8 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des
++destViewPort->_rectListCount[destViewPort->_pageIndex];
}
} else {
- int xs = ofs.x + destPic->_bounds.left;
- int ys = ofs.y + destPic->_bounds.top;
+ int xs = offset.x + destPic->_bounds.left;
+ int ys = offset.y + destPic->_bounds.top;
backBounds = Common::Rect(xs, ys, xs + width2, ys + height1);
(this->*destViewPort->_addFn)(destViewPort, destViewPort->_bounds.top, backBounds);
@@ -281,21 +281,21 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des
return;
if (srcPic->_pick == 0xff) {
- if (srcFlags & 8) {
+ if (srcFlags & DISPFLAG_8) {
error("TODO: sDrawPic");
} else {
// loc_258B8
srcP = srcImgData + srcOffset;
- if (destFlags & 8) {
+ if (destFlags & DISPFLAG_8) {
// loc_258D8
destP = destImgData + screenOffset;
- if (srcFlags & 2) {
+ if (srcFlags & DISPFLAG_2) {
// loc_258F5f
} else {
// loc_25D40
- if (srcFlags & 0x100) {
+ if (srcFlags & DISPFLAG_100) {
// loc_25D4A
} else {
// loc_2606D
@@ -312,9 +312,9 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des
// loc_2615E
destP = destImgData + screenOffset;
- if (srcFlags & 2) {
+ if (srcFlags & DISPFLAG_2) {
// loc_2617e
- if (srcFlags & 0x100) {
+ if (srcFlags & DISPFLAG_100) {
// loc_26188
srcP = srcImgData;
if (isClipped) {
@@ -459,7 +459,7 @@ error("TODO: var22/var24/var2C not initialised before use?");
void GraphicsManager::fillPic(DisplayResource *display, byte onOff) {
PictureResource *pic;
- if (display->_flags & 0x8000) {
+ if (display->_flags & DISPFLAG_VIEWPORT) {
pic = ((ViewPortResource *)display)->_currentPic;
} else {
pic = (PictureResource *)display;
diff --git a/engines/voyeur/graphics.h b/engines/voyeur/graphics.h
index 02e9698a5e..6e6fdb154e 100644
--- a/engines/voyeur/graphics.h
+++ b/engines/voyeur/graphics.h
@@ -102,7 +102,7 @@ public:
void addRectNoSaveBack(ViewPortResource *viewPort, int idx, const Common::Rect &bounds);
void EMSMapPageHandle(int v1, int v2, int v3);
- void sDrawPic(DisplayResource *srcDisplay, DisplayResource *destDisplay, const Common::Point &offset);
+ void sDrawPic(DisplayResource *srcDisplay, DisplayResource *destDisplay, const Common::Point &initialOffset);
void fillPic(DisplayResource *display, byte onOff = 0);
void sDisplayPic(PictureResource *pic);
void flipPage();