[Scummvm-cvs-logs] SF.net SVN: scummvm:[39879] scummvm/trunk/engines/parallaction

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Mon Apr 6 19:31:23 CEST 2009


Revision: 39879
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39879&view=rev
Author:   peres001
Date:     2009-04-06 17:31:22 +0000 (Mon, 06 Apr 2009)

Log Message:
-----------
Removed useless references to the global _vm.

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/callables_ns.cpp
    scummvm/trunk/engines/parallaction/dialogue.cpp
    scummvm/trunk/engines/parallaction/exec_br.cpp
    scummvm/trunk/engines/parallaction/parallaction_br.cpp

Modified: scummvm/trunk/engines/parallaction/callables_ns.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/callables_ns.cpp	2009-04-06 17:21:23 UTC (rev 39878)
+++ scummvm/trunk/engines/parallaction/callables_ns.cpp	2009-04-06 17:31:22 UTC (rev 39879)
@@ -488,16 +488,10 @@
 }
 
 void zeroMask(int x, int y, int color, void *data) {
-	//_vm->_gfx->zeroMaskValue(x, y, color);
+	BackgroundInfo *info = (BackgroundInfo*)data;
 
-	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));
-
+	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 @@
 		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 @@
 		_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;

Modified: scummvm/trunk/engines/parallaction/dialogue.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/dialogue.cpp	2009-04-06 17:21:23 UTC (rev 39878)
+++ scummvm/trunk/engines/parallaction/dialogue.cpp	2009-04-06 17:31:22 UTC (rev 39879)
@@ -466,7 +466,7 @@
 
 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;

Modified: scummvm/trunk/engines/parallaction/exec_br.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/exec_br.cpp	2009-04-06 17:21:23 UTC (rev 39878)
+++ scummvm/trunk/engines/parallaction/exec_br.cpp	2009-04-06 17:31:22 UTC (rev 39879)
@@ -89,7 +89,7 @@
 	// 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) {

Modified: scummvm/trunk/engines/parallaction/parallaction_br.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction_br.cpp	2009-04-06 17:21:23 UTC (rev 39878)
+++ scummvm/trunk/engines/parallaction/parallaction_br.cpp	2009-04-06 17:31:22 UTC (rev 39879)
@@ -356,17 +356,17 @@
 	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 @@
 
 		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


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list