aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/callables_ns.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/parallaction/callables_ns.cpp')
-rw-r--r--engines/parallaction/callables_ns.cpp22
1 files changed, 9 insertions, 13 deletions
diff --git a/engines/parallaction/callables_ns.cpp b/engines/parallaction/callables_ns.cpp
index 83601ff4c0..946c1a6b7a 100644
--- a/engines/parallaction/callables_ns.cpp
+++ b/engines/parallaction/callables_ns.cpp
@@ -488,16 +488,10 @@ void Parallaction_ns::_c_moveSheet(void *parm) {
}
void zeroMask(int x, int y, int color, void *data) {
- //_vm->_gfx->zeroMaskValue(x, y, color);
-
- if (!_vm->_gfx->_backgroundInfo->hasMask())
- return;
-
-// BackgroundInfo* info = (BackgroundInfo*)data;
-
- uint16 _ax = x + y * _vm->_gfx->_backgroundInfo->_mask->w;
- _vm->_gfx->_backgroundInfo->_mask->data[_ax >> 2] &= ~(3 << ((_ax & 3) << 1));
+ BackgroundInfo *info = (BackgroundInfo*)data;
+ uint16 _ax = x + y * info->_mask->w;
+ info->_mask->data[_ax >> 2] &= ~(3 << ((_ax & 3) << 1));
}
void Parallaction_ns::_c_sketch(void *parm) {
@@ -523,7 +517,9 @@ void Parallaction_ns::_c_sketch(void *parm) {
newx = _rightHandPositions[2*index];
}
- Graphics::drawLine(oldx, oldy, newx, newy, 0, zeroMask, _gfx->_backgroundInfo);
+ if (_gfx->_backgroundInfo->hasMask()) {
+ Graphics::drawLine(oldx, oldy, newx, newy, 0, zeroMask, _gfx->_backgroundInfo);
+ }
_rightHandAnim->setX(newx);
_rightHandAnim->setY(newy - 20);
@@ -545,11 +541,11 @@ void Parallaction_ns::_c_shade(void *parm) {
_rightHandAnim->getY()
);
- uint16 _di = r.left/4 + r.top * _vm->_gfx->_backgroundInfo->_mask->internalWidth;
+ uint16 _di = r.left/4 + r.top * _gfx->_backgroundInfo->_mask->internalWidth;
for (uint16 _si = r.top; _si < r.bottom; _si++) {
- memset(_vm->_gfx->_backgroundInfo->_mask->data + _di, 0, r.width()/4+1);
- _di += _vm->_gfx->_backgroundInfo->_mask->internalWidth;
+ memset(_gfx->_backgroundInfo->_mask->data + _di, 0, r.width()/4+1);
+ _di += _gfx->_backgroundInfo->_mask->internalWidth;
}
return;