From 6143da7ceab4eb6e5b76ced0df02e94e5eb96238 Mon Sep 17 00:00:00 2001 From: Fabio Battaglia Date: Mon, 25 May 2009 07:42:01 +0000 Subject: tinsel: Discworld PSX uses "index.dat" as scene index file, not "index" svn-id: r40878 --- engines/tinsel/dw.h | 1 + engines/tinsel/handle.cpp | 10 +++++----- engines/tinsel/scn.h | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'engines') diff --git a/engines/tinsel/dw.h b/engines/tinsel/dw.h index aa7fa26080..826c0e38ba 100644 --- a/engines/tinsel/dw.h +++ b/engines/tinsel/dw.h @@ -46,6 +46,7 @@ typedef int HPOLYGON; #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 diff --git a/engines/tinsel/handle.cpp b/engines/tinsel/handle.cpp index cfe91f7216..220bf57aca 100644 --- a/engines/tinsel/handle.cpp +++ b/engines/tinsel/handle.cpp @@ -112,14 +112,14 @@ void SetupHandleTable(void) { 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 @@ void SetupHandleTable(void) { 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 diff --git a/engines/tinsel/scn.h b/engines/tinsel/scn.h index 5b16714b36..2e49765351 100644 --- a/engines/tinsel/scn.h +++ b/engines/tinsel/scn.h @@ -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 -- cgit v1.2.3