diff options
author | Paul Gilbert | 2010-11-20 03:14:03 +0000 |
---|---|---|
committer | Paul Gilbert | 2010-11-20 03:14:03 +0000 |
commit | a2367d26f9d7f8523c313a7b82d0b719de1e6e15 (patch) | |
tree | e63bfc6e1a8bd82f00ed24fdf167c6259676cc38 /engines/tinsel/handle.cpp | |
parent | b2ba35124c707ca33e0372690a0eb25e316bce8a (diff) | |
download | scummvm-rg350-a2367d26f9d7f8523c313a7b82d0b719de1e6e15.tar.gz scummvm-rg350-a2367d26f9d7f8523c313a7b82d0b719de1e6e15.tar.bz2 scummvm-rg350-a2367d26f9d7f8523c313a7b82d0b719de1e6e15.zip |
TINSEL: Preliminary functionality for reading BE data files
svn-id: r54392
Diffstat (limited to 'engines/tinsel/handle.cpp')
-rw-r--r-- | engines/tinsel/handle.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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()) { |