From a2367d26f9d7f8523c313a7b82d0b719de1e6e15 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 20 Nov 2010 03:14:03 +0000 Subject: TINSEL: Preliminary functionality for reading BE data files svn-id: r54392 --- engines/tinsel/handle.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'engines/tinsel/handle.cpp') diff --git a/engines/tinsel/handle.cpp b/engines/tinsel/handle.cpp index 9461cf8c1c..2307d95a61 100644 --- a/engines/tinsel/handle.cpp +++ b/engines/tinsel/handle.cpp @@ -102,11 +102,13 @@ void SetupHandleTable() { int len; uint i; MEMHANDLE *pH; - Common::File f; + TinselFile f; if (f.open(TinselV1PSX? PSX_INDEX_FILENAME : INDEX_FILENAME)) { // get size of index file len = f.size(); + if (TinselV1Mac) + len -= 2; // Macintosh version has two redundant ending bytes if (len > 0) { if ((len % RECORD_SIZE) != 0) { @@ -126,13 +128,13 @@ void SetupHandleTable() { // load data for (i = 0; i < numHandles; i++) { f.read(handleTable[i].szName, 12); - handleTable[i].filesize = f.readUint32LE(); + handleTable[i].filesize = f.readUint32(); // The pointer should always be NULL. We don't // need to read that from the file. handleTable[i]._node = NULL; f.seek(4, SEEK_CUR); // For Discworld 2, read in the flags2 field - handleTable[i].flags2 = t2Flag ? f.readUint32LE() : 0; + handleTable[i].flags2 = t2Flag ? f.readUint32() : 0; } if (f.eos() || f.err()) { -- cgit v1.2.3