[Scummvm-cvs-logs] SF.net SVN: scummvm: [24650] scummvm/trunk/engines/scumm

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Tue Nov 7 21:55:13 CET 2006


Revision: 24650
          http://svn.sourceforge.net/scummvm/?rev=24650&view=rev
Author:   fingolfin
Date:     2006-11-07 12:55:05 -0800 (Tue, 07 Nov 2006)

Log Message:
-----------
cleanup

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/boxes.cpp
    scummvm/trunk/engines/scumm/script_v5.cpp
    scummvm/trunk/engines/scumm/scumm.cpp
    scummvm/trunk/engines/scumm/verbs.cpp

Modified: scummvm/trunk/engines/scumm/boxes.cpp
===================================================================
--- scummvm/trunk/engines/scumm/boxes.cpp	2006-11-07 20:30:39 UTC (rev 24649)
+++ scummvm/trunk/engines/scumm/boxes.cpp	2006-11-07 20:55:05 UTC (rev 24650)
@@ -1043,11 +1043,11 @@
 	box2 = getBoxCoordinates(box1nr);
 	box = getBoxCoordinates(box2nr);
 
-	// Roughly, the idea of this algorithm is to check if we can find
-	// two sides of the two given boxes which touch.
+	// Roughly, the idea of this algorithm is to search for sies of the given
+	// boxes that touch each other.
 	// In order to keep te code simple, we only match the upper sides;
 	// then, we "rotate" the box coordinates four times each, for a total
-	// of 16 comparisions (four sides compared with four sides each).
+	// of 16 comparisions.
 	for (int j = 0; j < 4; j++) {
 		for (int k = 0; k < 4; k++) {
 			// Are the "upper" sides of the boxes on a single vertical line
@@ -1165,9 +1165,9 @@
  * Compute the "gate" between two boxes. The gate is a pair of two lines which
  * both start on box 'box1' and end on 'box2'. For both lines, one of its
  * end points is the corner point of one of the two boxes. The other end point
- * is a point on the other point closest to first end point.
- * This way the lines bound a 'corridor' between the two boxes, through which
- * the actor has to walk to get from box1 to box2.
+ * is the point on the other box closest to the first end point.
+ * This way the lines form the boundary of a 'corridor' between the two boxes,
+ * through which the actor has to walk to get from box1 to box2.
  */
 void getGates(const BoxCoords &box1, const BoxCoords &box2, Common::Point gateA[2], Common::Point gateB[2]) {
 	int i, j;

Modified: scummvm/trunk/engines/scumm/script_v5.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v5.cpp	2006-11-07 20:30:39 UTC (rev 24649)
+++ scummvm/trunk/engines/scumm/script_v5.cpp	2006-11-07 20:55:05 UTC (rev 24650)
@@ -2161,7 +2161,6 @@
 	// WORKAROUND: In the scene where Largo is talking to Mad Marty, the
 	// Woodtick music often resumes before Largo's theme has finished. As
 	// far as I can tell, this is a script bug.
-
 	if (_game.id == GID_MONKEY2 && sound == 110 && _sound->isSoundRunning(151)) {
 		debug(1, "Delaying Woodtick music until Largo's theme has finished\n");
 		_scriptPointer = oldaddr;
@@ -2230,8 +2229,8 @@
 
 	getWordVararg(data);
 
-	// FIXME: Script 171 loads a complete room resource, instead of the actual script.
-	// Causing invalid opcode cases, see bug #1290485
+	// WORKAROUND bug #1290485: Script 171 loads a complete room resource,
+	// instead of the actual script, causing invalid opcode cases
 	if (_game.id == GID_ZAK && _game.platform == Common::kPlatformFMTowns && script == 171)
 		return;
 
@@ -2379,7 +2378,7 @@
 		case 5:		// SO_VERB_AT
 			vs->curRect.left = getVarOrDirectWord(PARAM_1);
 			vs->curRect.top = getVarOrDirectWord(PARAM_2);
-			// Macintosh verison of indy3ega used different interface, so adjust values.
+			// Macintosh version of indy3ega used different interface, so adjust values.
 			if ((_game.platform == Common::kPlatformMacintosh) && (_game.id == GID_INDY3)) {
 				switch (verb) {
 				case 1:

Modified: scummvm/trunk/engines/scumm/scumm.cpp
===================================================================
--- scummvm/trunk/engines/scumm/scumm.cpp	2006-11-07 20:30:39 UTC (rev 24649)
+++ scummvm/trunk/engines/scumm/scumm.cpp	2006-11-07 20:55:05 UTC (rev 24650)
@@ -2215,9 +2215,8 @@
 
 void ScummEngine::errorString(const char *buf1, char *buf2) {
 	if (_currentScript != 0xFF) {
-		ScriptSlot *ss = &vm.slot[_currentScript];
 		sprintf(buf2, "(%d:%d:0x%lX): %s", _roomResource,
-			ss->number, (long)(_scriptPointer - _scriptOrgPointer), buf1);
+			vm.slot[_currentScript].number, (long)(_scriptPointer - _scriptOrgPointer), buf1);
 	} else {
 		strcpy(buf2, buf1);
 	}

Modified: scummvm/trunk/engines/scumm/verbs.cpp
===================================================================
--- scummvm/trunk/engines/scumm/verbs.cpp	2006-11-07 20:30:39 UTC (rev 24649)
+++ scummvm/trunk/engines/scumm/verbs.cpp	2006-11-07 20:55:05 UTC (rev 24650)
@@ -619,18 +619,16 @@
 	if (_game.id == GID_FT)
 		return;
 
-	if (_verbMouseOver == verb)
-		return;
-
-	if (_verbs[_verbMouseOver].type != kImageVerbType) {
-		drawVerb(_verbMouseOver, 0);
-		_verbMouseOver = verb;
+	if (_verbMouseOver != verb) {
+		if (_verbs[_verbMouseOver].type != kImageVerbType) {
+			drawVerb(_verbMouseOver, 0);
+		}
+	
+		if (_verbs[verb].type != kImageVerbType && _verbs[verb].hicolor) {
+			drawVerb(verb, 1);
+			_verbMouseOver = verb;
+		}
 	}
-
-	if (_verbs[verb].type != kImageVerbType && _verbs[verb].hicolor) {
-		drawVerb(verb, 1);
-		_verbMouseOver = verb;
-	}
 }
 
 int ScummEngine::findVerbAtPos(int x, int y) const {


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