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

cyx at users.sourceforge.net cyx at users.sourceforge.net
Fri Dec 12 22:42:38 CET 2008


Revision: 35319
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35319&view=rev
Author:   cyx
Date:     2008-12-12 21:42:38 +0000 (Fri, 12 Dec 2008)

Log Message:
-----------
fixed german version detection, added datafiles remapping as listed in bug tracker item #2422555

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

Modified: scummvm/trunk/engines/tucker/detection.cpp
===================================================================
--- scummvm/trunk/engines/tucker/detection.cpp	2008-12-12 20:10:00 UTC (rev 35318)
+++ scummvm/trunk/engines/tucker/detection.cpp	2008-12-12 21:42:38 UTC (rev 35319)
@@ -67,7 +67,7 @@
 		"tucker",
 		"",
 		AD_ENTRY1s("infobrgr.txt", "4df9eb65722418d1a1723508115b146c", 552),
-		Common::GR_GRE,
+		Common::DE_DEU,
 		Common::kPlatformPC,
 		Common::ADGF_NO_FLAGS
 	},

Modified: scummvm/trunk/engines/tucker/resource.cpp
===================================================================
--- scummvm/trunk/engines/tucker/resource.cpp	2008-12-12 20:10:00 UTC (rev 35318)
+++ scummvm/trunk/engines/tucker/resource.cpp	2008-12-12 21:42:38 UTC (rev 35319)
@@ -162,6 +162,25 @@
 };
 
 uint8 *TuckerEngine::loadFile(uint8 *p) {
+	if (_gameVer.lang == Common::DE_DEU) {
+		if (strcmp(_fileToLoad, "bgtext.c") == 0) {
+			strcpy(_fileToLoad, "bgtextgr.c");
+		} else if (strcmp(_fileToLoad, "charname.c") == 0) {
+			strcpy(_fileToLoad, "charnmgr.c");
+		} else if (strcmp(_fileToLoad, "data5.c") == 0) {
+			strcpy(_fileToLoad, "data5gr.c");
+		} else if (strcmp(_fileToLoad, "infobar.txt") == 0) {
+			strcpy(_fileToLoad, "infobrgr.txt");
+		} else if (strcmp(_fileToLoad, "charsize.dta") == 0) {
+			strcpy(_fileToLoad, "charszgr.dta");
+		} else if (strncmp(_fileToLoad, "objtxt", 6) == 0) {
+			const int num = _fileToLoad[6];
+			snprintf(_fileToLoad, sizeof(_fileToLoad), "objtx%dgr.c", num);
+		} else if (strncmp(_fileToLoad, "pt", 2) == 0) {
+			const int num = _fileToLoad[2];
+			snprintf(_fileToLoad, sizeof(_fileToLoad), "pt%dtxtgr.c", num);
+		}
+	}
 	_fileLoadSize = 0;
 	bool decode = false;
 	if (_useEnc) {
@@ -270,7 +289,7 @@
 	loadImage(_loadTempBuf, 0);
 	switch (_gameVer.lang) {
 	case Common::FR_FRA:
-	case Common::GR_GRE:
+	case Common::DE_DEU:
 		Graphics::setCharset(kCharsetTypeFrGr);
 		break;
 	default:
@@ -507,12 +526,13 @@
 			}
 			const int x = t.getNextInteger();
 			const int y = t.getNextInteger();
-			_dataTable[_dataCount].sourceOffset = y * 320 + x;
-			_dataTable[_dataCount].xSize = t.getNextInteger();
-			_dataTable[_dataCount].ySize = t.getNextInteger();
-			_dataTable[_dataCount].xDest = t.getNextInteger();
-			_dataTable[_dataCount].yDest = t.getNextInteger();
-			_dataTable[_dataCount].index = count;
+			Data *d = &_dataTable[_dataCount];
+			d->sourceOffset = y * 320 + x;
+			d->xSize = t.getNextInteger();
+			d->ySize = t.getNextInteger();
+			d->xDest = t.getNextInteger();
+			d->yDest = t.getNextInteger();
+			d->index = count;
 		}
 		if (flag < 2) {
 			++objNum;

Modified: scummvm/trunk/engines/tucker/tucker.cpp
===================================================================
--- scummvm/trunk/engines/tucker/tucker.cpp	2008-12-12 20:10:00 UTC (rev 35318)
+++ scummvm/trunk/engines/tucker/tucker.cpp	2008-12-12 21:42:38 UTC (rev 35319)
@@ -335,14 +335,7 @@
 	loadCharSizeDta();
 	loadCharset();
 	loadPanel();
-	switch (_gameVer.lang) {
-	case Common::GR_GRE:
-		strcpy(_fileToLoad, "infobrgr.txt");
-		break;
-	default:
-		strcpy(_fileToLoad, "infobar.txt");
-		break;
-	}
+	strcpy(_fileToLoad, "infobar.txt");
 	loadFile(_infoBarBuf);
 	strcpy(_fileToLoad, "data5.c");
 	_data5Buf = loadFile();


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