[Scummvm-cvs-logs] SF.net SVN: scummvm:[38991] scummvm/trunk/engines/tucker

cyx at users.sourceforge.net cyx at users.sourceforge.net
Sun Mar 1 01:51:59 CET 2009


Revision: 38991
          http://scummvm.svn.sourceforge.net/scummvm/?rev=38991&view=rev
Author:   cyx
Date:     2009-03-01 00:51:59 +0000 (Sun, 01 Mar 2009)

Log Message:
-----------
fix for tracker item #2628896 TUCKER: Invisible Raincoat bug

Modified Paths:
--------------
    scummvm/trunk/engines/tucker/resource.cpp
    scummvm/trunk/engines/tucker/tucker.h

Modified: scummvm/trunk/engines/tucker/resource.cpp
===================================================================
--- scummvm/trunk/engines/tucker/resource.cpp	2009-03-01 00:51:14 UTC (rev 38990)
+++ scummvm/trunk/engines/tucker/resource.cpp	2009-03-01 00:51:59 UTC (rev 38991)
@@ -335,8 +335,7 @@
 }
 
 void TuckerEngine::loadBudSpr(int startOffset) {
-	int endOffset;
-	loadCTable01(0, startOffset, endOffset);
+	int endOffset = loadCTable01(0, startOffset);
 	loadCTable02(0);
 	int frame = 0;
 	int spriteOffset = 0;
@@ -367,12 +366,12 @@
 	}
 }
 
-void TuckerEngine::loadCTable01(int locationNum, int firstSpriteNum, int &lastSpriteNum) {
+int TuckerEngine::loadCTable01(int index, int firstSpriteNum) {
 	loadFile("ctable01.c", _loadTempBuf);
 	DataTokenizer t(_loadTempBuf,  _fileLoadSize);
-	lastSpriteNum = firstSpriteNum;
+	int lastSpriteNum = firstSpriteNum;
 	int count = 0;
-	if (t.findIndex(_locationNum)) {
+	if (t.findIndex(index)) {
 		while (t.findNextToken(kDataTokenDw)) {
 			const int x = t.getNextInteger();
 			if (x < 0) {
@@ -398,6 +397,7 @@
 		}
 	}
 	_ctable01Table_sprite[count] = -1;
+	return lastSpriteNum;
 }
 
 void TuckerEngine::loadCTable02(int fl) {
@@ -593,21 +593,19 @@
 			LocationAnimation *d = &_locationAnimationsTable[_locationAnimationsCount++];
 			d->graphicNum = num;
 			const int seqNum = t.getNextInteger();
-			int i = 0;
-			int j = 1;
 			if (seqNum > 0) {
-				while (j < seqNum) {
-					while (_staticData3Table[i] != 999) {
-						++i;
+				int anim = 0;
+				for (int i = 1; i < seqNum; ++i) {
+					while (_staticData3Table[anim] != 999) {
+						++anim;
 					}
-					++i;
-					++j;
+					++anim;
 				}
-				d->animCurrentCounter = d->animInitCounter = i;
-				while (_staticData3Table[i + 1] != 999) {
-					++i;
+				d->animCurrentCounter = d->animInitCounter = anim;
+				while (_staticData3Table[anim + 1] != 999) {
+					++anim;
 				}
-				d->animLastCounter = i;
+				d->animLastCounter = anim;
 			} else {
 				d->animLastCounter = 0;
 			}

Modified: scummvm/trunk/engines/tucker/tucker.h
===================================================================
--- scummvm/trunk/engines/tucker/tucker.h	2009-03-01 00:51:14 UTC (rev 38990)
+++ scummvm/trunk/engines/tucker/tucker.h	2009-03-01 00:51:59 UTC (rev 38991)
@@ -551,7 +551,7 @@
 	void loadCharSizeDta();
 	void loadPanel();
 	void loadBudSpr(int startOffset);
-	void loadCTable01(int firstObjNum, int firstSpriteNum, int &lastSpriteNum);
+	int loadCTable01(int index, int firstSpriteNum);
 	void loadCTable02(int fl);
 	void loadLoc();
 	void loadObj();


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