diff options
author | Filippos Karapetis | 2012-07-14 05:04:00 +0300 |
---|---|---|
committer | Filippos Karapetis | 2012-07-14 05:07:16 +0300 |
commit | e10b59b62492c67fc7eeb6eccd39f0b75722338d (patch) | |
tree | 337585dd17b62c5f8a8b5697fa32bb3c113829cb | |
parent | 856f9326179e186f08abc0163039f51ad31e9afb (diff) | |
download | scummvm-rg350-e10b59b62492c67fc7eeb6eccd39f0b75722338d.tar.gz scummvm-rg350-e10b59b62492c67fc7eeb6eccd39f0b75722338d.tar.bz2 scummvm-rg350-e10b59b62492c67fc7eeb6eccd39f0b75722338d.zip |
TINSEL: Cleanup
-rw-r--r-- | engines/tinsel/handle.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/engines/tinsel/handle.cpp b/engines/tinsel/handle.cpp index c3089db990..14d588dcec 100644 --- a/engines/tinsel/handle.cpp +++ b/engines/tinsel/handle.cpp @@ -99,14 +99,16 @@ void SetupHandleTable() { MEMHANDLE *pH; TinselFile f; - if (f.open(TinselV1PSX? PSX_INDEX_FILENAME : INDEX_FILENAME)) { + const char *indexFileName = TinselV1PSX ? PSX_INDEX_FILENAME : INDEX_FILENAME; + + if (f.open(indexFileName)) { // get size of index file len = f.size(); if (len > 0) { if ((len % RECORD_SIZE) != 0) { // index file is corrupt - error(FILE_IS_CORRUPT, TinselV1PSX? PSX_INDEX_FILENAME : INDEX_FILENAME); + error(FILE_IS_CORRUPT, indexFileName); } // calc number of handles @@ -132,16 +134,16 @@ void SetupHandleTable() { if (f.eos() || f.err()) { // index file is corrupt - error(FILE_IS_CORRUPT, (TinselV1PSX? PSX_INDEX_FILENAME : INDEX_FILENAME)); + error(FILE_IS_CORRUPT, indexFileName); } // close the file f.close(); } else { // index file is corrupt - error(FILE_IS_CORRUPT, (TinselV1PSX? PSX_INDEX_FILENAME : INDEX_FILENAME)); + error(FILE_IS_CORRUPT, indexFileName); } } else { // cannot find the index file - error(CANNOT_FIND_FILE, (TinselV1PSX? PSX_INDEX_FILENAME : INDEX_FILENAME)); + error(CANNOT_FIND_FILE, indexFileName); } // allocate memory nodes and load all permanent graphics |