aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/exec_ns.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/exec_ns.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/exec_ns.cpp')
-rw-r--r--engines/parallaction/exec_ns.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/engines/parallaction/exec_ns.cpp b/engines/parallaction/exec_ns.cpp
index f2ee015498..91a8809070 100644
--- a/engines/parallaction/exec_ns.cpp
+++ b/engines/parallaction/exec_ns.cpp
@@ -133,15 +133,9 @@ DECLARE_INSTRUCTION_OPCODE(put) {
int16 x = inst->_opA.getRValue();
int16 y = inst->_opB.getRValue();
+ bool mask = (inst->_flags & kInstMaskedPut) == kInstMaskedPut;
- if (inst->_flags & kInstMaskedPut) {
- uint16 z = _gfx->queryMask(y);
- _gfx->blitCnv(&v18, x, y, z, Gfx::kBitBack);
- _gfx->blitCnv(&v18, x, y, z, Gfx::kBit2);
- } else {
- _gfx->flatBlitCnv(&v18, x, y, Gfx::kBitBack);
- _gfx->flatBlitCnv(&v18, x, y, Gfx::kBit2);
- }
+ _gfx->patchBackground(v18, x, y, mask);
}
DECLARE_INSTRUCTION_OPCODE(null) {