aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/graphics.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2008-01-12 10:46:51 +0000
committerNicola Mettifogo2008-01-12 10:46:51 +0000
commit7d635a4b9c0d7bd250779ae2295ae4758106a7e8 (patch)
tree9bc2e45361af9347f77c942784fe6369d3f14bc5 /engines/parallaction/graphics.cpp
parent48bd0ca6b6e62105e7536fe00d4c9a87174859e7 (diff)
downloadscummvm-rg350-7d635a4b9c0d7bd250779ae2295ae4758106a7e8.tar.gz
scummvm-rg350-7d635a4b9c0d7bd250779ae2295ae4758106a7e8.tar.bz2
scummvm-rg350-7d635a4b9c0d7bd250779ae2295ae4758106a7e8.zip
Added function to encapsulate/protect manipulation of background.
svn-id: r30441
Diffstat (limited to 'engines/parallaction/graphics.cpp')
-rw-r--r--engines/parallaction/graphics.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp
index 595c264c59..65938fc176 100644
--- a/engines/parallaction/graphics.cpp
+++ b/engines/parallaction/graphics.cpp
@@ -394,6 +394,19 @@ void Gfx::copyScreen(Gfx::Buffers srcbuffer, Gfx::Buffers dstbuffer) {
return;
}
+void Gfx::patchBackground(Graphics::Surface &surf, int16 x, int16 y, bool mask) {
+
+ if (mask) {
+ uint16 z = queryMask(y);
+ blitCnv(&surf, x, y, z, kBitBack);
+ blitCnv(&surf, x, y, z, kBit2);
+ } else {
+ flatBlitCnv(&surf, x, y, kBitBack);
+ flatBlitCnv(&surf, x, y, kBit2);
+ }
+
+}
+
void Gfx::floodFill(Gfx::Buffers buffer, const Common::Rect& r, byte color) {
byte *d = (byte*)_buffers[buffer]->getBasePtr(r.left, r.top);