diff options
author | Arnaud Boutonné | 2010-11-11 10:36:10 +0000 |
---|---|---|
committer | Arnaud Boutonné | 2010-11-11 10:36:10 +0000 |
commit | 84e4c1742a849e2d8087528c3ba4ecce37896512 (patch) | |
tree | e4363831315adca4e0d63a72a231d3e20c632b98 /engines/hugo/file_v2d.cpp | |
parent | 203ff5e19a6107c71dc27909fa4982278d0436fe (diff) | |
download | scummvm-rg350-84e4c1742a849e2d8087528c3ba4ecce37896512.tar.gz scummvm-rg350-84e4c1742a849e2d8087528c3ba4ecce37896512.tar.bz2 scummvm-rg350-84e4c1742a849e2d8087528c3ba4ecce37896512.zip |
HUGO: Suppress the use of Utils::Error, cleanup
svn-id: r54198
Diffstat (limited to 'engines/hugo/file_v2d.cpp')
-rw-r--r-- | engines/hugo/file_v2d.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/hugo/file_v2d.cpp b/engines/hugo/file_v2d.cpp index c8e94cb8ef..baf7f4c97f 100644 --- a/engines/hugo/file_v2d.cpp +++ b/engines/hugo/file_v2d.cpp @@ -53,11 +53,11 @@ void FileManager_v2d::openDatabaseFiles() { debugC(1, kDebugFile, "openDatabaseFiles"); if (!_stringArchive.open(STRING_FILE)) - Utils::Error(FILE_ERR, "%s", STRING_FILE); + error("File not found: %s", STRING_FILE); if (!_sceneryArchive1.open("scenery.dat")) - Utils::Error(FILE_ERR, "%s", "scenery.dat"); + error("File not found: scenery.dat"); if (!_objectsArchive.open(OBJECTS_FILE)) - Utils::Error(FILE_ERR, "%s", OBJECTS_FILE); + error("File not found: %s", OBJECTS_FILE); } /** @@ -131,7 +131,7 @@ void FileManager_v2d::readOverlay(int screenNum, image_pt image, ovl_t overlayTy i = sceneBlock.ob_len; break; default: - Utils::Error(FILE_ERR, "%s", "Bad ovl_type"); + error("Bad overlayType: %d", overlayType); break; } if (i == 0) { @@ -168,18 +168,18 @@ char *FileManager_v2d::fetchString(int index) { _stringArchive.seek((uint32)index * sizeof(uint32), SEEK_SET); uint32 off1, off2; if (_stringArchive.read((char *)&off1, sizeof(uint32)) == 0) - Utils::Error(FILE_ERR, "%s", "String offset"); + error("An error has occurred: bad String offset"); if (_stringArchive.read((char *)&off2, sizeof(uint32)) == 0) - Utils::Error(FILE_ERR, "%s", "String offset"); + error("An error has occurred: bad String offset"); // Check size of string if ((off2 - off1) >= MAX_BOX) - Utils::Error(FILE_ERR, "%s", "Fetched string too long!"); + error("Fetched string too long!"); // Position to string and read it into gen purpose _textBoxBuffer _stringArchive.seek(off1, SEEK_SET); if (_stringArchive.read(_textBoxBuffer, (uint16)(off2 - off1)) == 0) - Utils::Error(FILE_ERR, "%s", "Fetch_string"); + error("An error has occurred: fetchString"); // Null terminate, decode and return it _textBoxBuffer[off2-off1] = '\0'; |