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

kirben at users.sourceforge.net kirben at users.sourceforge.net
Sun Mar 12 02:45:07 CET 2006


Revision: 21229
Author:   kirben
Date:     2006-03-12 02:44:42 -0800 (Sun, 12 Mar 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=21229&view=rev

Log Message:
-----------
Adjust basename array setting in HE99+ games, for filename substitution

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/scumm.cpp
Modified: scummvm/trunk/engines/scumm/scumm.cpp
===================================================================
--- scummvm/trunk/engines/scumm/scumm.cpp	2006-03-12 09:51:24 UTC (rev 21228)
+++ scummvm/trunk/engines/scumm/scumm.cpp	2006-03-12 10:44:42 UTC (rev 21229)
@@ -1607,12 +1607,19 @@
 	_hePalettes = (uint8 *)malloc((_numPalettes + 1) * 1024);
 	memset(_hePalettes, 0, (_numPalettes + 1) * 1024);
 
+	byte basename[256];
+	char buf1[128];
+
+	strcpy((char *)basename, _baseName.c_str());
+	if (_substResFileName.almostGameID != 0) {
+		generateSubstResFileName((char *)basename, buf1, sizeof(buf1));
+		strcpy((char *)basename, buf1);
+	}
+
 	// Array 129 is set to base name
-	// FIXME: Of course, we probably would want to insert the value
-	// *after* applying the filename substitution here... ?
-	int len = _baseName.size() + 1;
+	int len = resStrLen(basename);
 	ArrayHeader *ah = defineArray(129, kStringArray, 0, 0, 0, len);
-	memcpy(ah->data, _baseName.c_str(), len);
+	memcpy(ah->data, basename, len);
 
 }
 #endif


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