Removed useless references to the global _vm.

svn-id: r39879
This commit is contained in:
Nicola Mettifogo 2009-04-06 17:31:22 +00:00
parent 0e05ec8cc8
commit 8151a1d878
4 changed files with 17 additions and 21 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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) {

View File

@ -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