diff options
-rw-r--r-- | engines/parallaction/callables_ns.cpp | 22 | ||||
-rw-r--r-- | engines/parallaction/dialogue.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/exec_br.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/parallaction_br.cpp | 12 |
4 files changed, 17 insertions, 21 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; diff --git a/engines/parallaction/dialogue.cpp b/engines/parallaction/dialogue.cpp index a937d91be6..f63cec3c22 100644 --- a/engines/parallaction/dialogue.cpp +++ b/engines/parallaction/dialogue.cpp @@ -466,7 +466,7 @@ public: void Parallaction::enterDialogueMode(ZonePtr z) { debugC(1, kDebugDialogue, "Parallaction::enterDialogueMode(%s)", z->u._filename.c_str()); - _dialogueMan = _vm->createDialogueManager(z); + _dialogueMan = createDialogueManager(z); assert(_dialogueMan); _dialogueMan->start(); _input->_inputMode = Input::kInputModeDialogue; diff --git a/engines/parallaction/exec_br.cpp b/engines/parallaction/exec_br.cpp index c333a284da..5116e21259 100644 --- a/engines/parallaction/exec_br.cpp +++ b/engines/parallaction/exec_br.cpp @@ -89,7 +89,7 @@ void Parallaction_br::setupSubtitles(char *s, char *s2, int y) { // FIXME: render subtitles using the right color (10 instead of 0). // The original game features a nasty hack, having the font rendering routine // replacing color 12 of font RUSSIA with 10 when preparing subtitles. - uint8 color = (_vm->getPlatform() == Common::kPlatformAmiga) ? 11 : 0; + uint8 color = (getPlatform() == Common::kPlatformAmiga) ? 11 : 0; _subtitle[0] = _gfx->createLabel(_labelFont, s, color); _gfx->showLabel(_subtitle[0], CENTER_LABEL_HORIZONTAL, _subtitleY); if (s2) { diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp index 9359796f2d..6e2ab963c2 100644 --- a/engines/parallaction/parallaction_br.cpp +++ b/engines/parallaction/parallaction_br.cpp @@ -356,17 +356,17 @@ void Parallaction_br::parseLocation(const char *filename) { bool visited = getLocationFlags() & kFlagsVisited; // load background, mask and path - _vm->_disk->loadScenery(*out._info, + _disk->loadScenery(*out._info, out._backgroundName.empty() ? 0 : out._backgroundName.c_str(), out._maskName.empty() ? 0 : out._maskName.c_str(), out._pathName.empty() ? 0 : out._pathName.c_str()); // assign background - _vm->_gfx->setBackground(kBackgroundLocation, out._info); + _gfx->setBackground(kBackgroundLocation, out._info); // process zones - ZoneList::iterator zit = _vm->_location._zones.begin(); - for ( ; zit != _vm->_location._zones.end(); ++zit) { + ZoneList::iterator zit = _location._zones.begin(); + for ( ; zit != _location._zones.end(); ++zit) { ZonePtr z = *zit; // restore the flags if the location has already been visited restoreOrSaveZoneFlags(z, visited); @@ -378,13 +378,13 @@ void Parallaction_br::parseLocation(const char *filename) { bool visible = (z->_flags & kFlagsRemove) == 0; if (visible) { - _vm->showZone(z, visible); + showZone(z, visible); } } // load the character (must be done before animations are processed) if (!out._characterName.empty()) { - _vm->changeCharacter(out._characterName.c_str()); + changeCharacter(out._characterName.c_str()); } // process animations |