[Scummvm-cvs-logs] SF.net SVN: scummvm:[54613] scummvm/trunk/engines/mohawk

bgk at users.sourceforge.net bgk at users.sourceforge.net
Mon Nov 29 21:54:36 CET 2010


Revision: 54613
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54613&view=rev
Author:   bgk
Date:     2010-11-29 20:54:36 +0000 (Mon, 29 Nov 2010)

Log Message:
-----------
MOHAWK: Added helpher functions to redraw a resource. Do not redraw all the resources on mouse up.

Modified Paths:
--------------
    scummvm/trunk/engines/mohawk/myst.cpp
    scummvm/trunk/engines/mohawk/myst.h

Modified: scummvm/trunk/engines/mohawk/myst.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/myst.cpp	2010-11-29 20:54:23 UTC (rev 54612)
+++ scummvm/trunk/engines/mohawk/myst.cpp	2010-11-29 20:54:36 UTC (rev 54613)
@@ -250,12 +250,12 @@
 	else if (getFeatures() & GF_DEMO)
 		changeToStack(kDemoStack);
 	else
-		changeToStack(kSeleniticStack);
+		changeToStack(kIntroStack);
 
 	if (getFeatures() & GF_DEMO)
 		changeToCard(2000);
 	else
-		changeToCard(1282);
+		changeToCard(1);
 
 	// Load game from launcher/command line if requested
 	if (ConfMan.hasKey("save_slot") && !(getFeatures() & GF_DEMO)) {
@@ -310,8 +310,6 @@
 					debug(2, "Sending mouse up event to resource %d\n", _curResource);
 					_resources[_curResource]->handleMouseUp(&event.mouse);
 				}
-
-				drawResourceImages();
 				break;
 			case Common::EVENT_LBUTTONDOWN:
 				_mouseClicked = true;
@@ -901,6 +899,16 @@
 	_gfx->updateScreen();
 }
 
+void MohawkEngine_Myst::redrawResource(MystResource *_resource) {
+	_resource->drawConditionalDataToScreen(_scriptParser->getVar(_resource->getType8Var()));
+}
+
+void MohawkEngine_Myst::redrawArea(uint16 var) {
+	for (uint16 i = 0; i < _resources.size(); i++)
+		if (_resources[i]->type == 8 && _resources[i]->getType8Var() == var)
+			redrawResource(_resources[i]);
+}
+
 MystResource *MohawkEngine_Myst::loadResource(Common::SeekableReadStream *rlstStream, MystResource *parent) {
 	MystResource *resource = 0;
 	uint16 type = rlstStream->readUint16LE();

Modified: scummvm/trunk/engines/mohawk/myst.h
===================================================================
--- scummvm/trunk/engines/mohawk/myst.h	2010-11-29 20:54:23 UTC (rev 54612)
+++ scummvm/trunk/engines/mohawk/myst.h	2010-11-29 20:54:36 UTC (rev 54613)
@@ -195,6 +195,8 @@
 	bool _showResourceRects;
 	MystResource *loadResource(Common::SeekableReadStream *rlstStream, MystResource *parent);
 	void setResourceEnabled(uint16 resourceId, bool enable);
+	void redrawArea(uint16 var);
+	void redrawResource(MystResource *_resource);
 
 	void setCacheState(bool state) { _cache.enabled = state; }
 	bool getCacheState(void) { return _cache.enabled; }


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