[Scummvm-cvs-logs] SF.net SVN: scummvm:[40878] scummvm/trunk/engines/tinsel

Hkz at users.sourceforge.net Hkz at users.sourceforge.net
Mon May 25 09:42:02 CEST 2009


Revision: 40878
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40878&view=rev
Author:   Hkz
Date:     2009-05-25 07:42:01 +0000 (Mon, 25 May 2009)

Log Message:
-----------
tinsel: Discworld PSX uses "index.dat" as scene index file, not "index"

Modified Paths:
--------------
    scummvm/trunk/engines/tinsel/dw.h
    scummvm/trunk/engines/tinsel/handle.cpp
    scummvm/trunk/engines/tinsel/scn.h

Modified: scummvm/trunk/engines/tinsel/dw.h
===================================================================
--- scummvm/trunk/engines/tinsel/dw.h	2009-05-25 06:19:37 UTC (rev 40877)
+++ scummvm/trunk/engines/tinsel/dw.h	2009-05-25 07:42:01 UTC (rev 40878)
@@ -46,6 +46,7 @@
 #define	SAMPLE_INDEX		"english.idx"	// sample index filename
 #define	MIDI_FILE		"midi.dat"	// all MIDI sequences
 #define	INDEX_FILENAME		"index"		// name of index file
+#define PSX_INDEX_FILENAME	"index.dat" // name of index file in psx version
 
 #define	NO_SCNHANDLES		300		// number of memory handles for scenes
 #define	MASTER_SCNHANDLE	0		// master scene memory handle

Modified: scummvm/trunk/engines/tinsel/handle.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/handle.cpp	2009-05-25 06:19:37 UTC (rev 40877)
+++ scummvm/trunk/engines/tinsel/handle.cpp	2009-05-25 07:42:01 UTC (rev 40878)
@@ -112,14 +112,14 @@
 	MEMHANDLE *pH;
 	Common::File f;
 
-	if (f.open(INDEX_FILENAME)) {
+	if (f.open(TinselV1PSX? PSX_INDEX_FILENAME : INDEX_FILENAME)) {
 		// get size of index file
 		len = f.size();
 
 		if (len > 0) {
 			if ((len % RECORD_SIZE) != 0) {
 				// index file is corrupt
-				error(FILE_IS_CORRUPT, INDEX_FILENAME);
+				error(FILE_IS_CORRUPT, TinselV1PSX? PSX_INDEX_FILENAME : INDEX_FILENAME);
 			}
 
 			// calc number of handles
@@ -145,16 +145,16 @@
 
 			if (f.ioFailed()) {
 				// index file is corrupt
-				error(FILE_IS_CORRUPT, INDEX_FILENAME);
+				error(FILE_IS_CORRUPT, (TinselV1PSX? PSX_INDEX_FILENAME : INDEX_FILENAME));
 			}
 
 			// close the file
 			f.close();
 		} else {	// index file is corrupt
-			error(FILE_IS_CORRUPT, INDEX_FILENAME);
+			error(FILE_IS_CORRUPT, (TinselV1PSX? PSX_INDEX_FILENAME : INDEX_FILENAME));
 		}
 	} else {	// cannot find the index file
-		error(CANNOT_FIND_FILE, INDEX_FILENAME);
+		error(CANNOT_FIND_FILE, (TinselV1PSX? PSX_INDEX_FILENAME : INDEX_FILENAME));
 	}
 
 	// allocate memory nodes and load all permanent graphics

Modified: scummvm/trunk/engines/tinsel/scn.h
===================================================================
--- scummvm/trunk/engines/tinsel/scn.h	2009-05-25 06:19:37 UTC (rev 40877)
+++ scummvm/trunk/engines/tinsel/scn.h	2009-05-25 07:42:01 UTC (rev 40878)
@@ -31,6 +31,7 @@
 namespace Tinsel {
 
 #define	INDEX_FILENAME		"index"		// name of scene index file
+#define PSX_INDEX_FILENAME	"index.dat" // name of scene index in psx version
 #define	INDEXFILE_LENGTH	12			// length of filenames in the MEMHANDLE structure
 
 #define	GLOBALS_FILENAME	"gdata"		// name of globals file


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