aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2013-01-07 19:42:46 +0200
committerFilippos Karapetis2013-01-07 19:42:46 +0200
commit60e11931ba4e4bec8e6e38eb8e946ca71624c274 (patch)
tree7b1c5694effa6fdccc0ed37b56d283a072b14c2c
parent5f171c51bf9bf297459245a1f0abcfaac055f8a9 (diff)
downloadscummvm-rg350-60e11931ba4e4bec8e6e38eb8e946ca71624c274.tar.gz
scummvm-rg350-60e11931ba4e4bec8e6e38eb8e946ca71624c274.tar.bz2
scummvm-rg350-60e11931ba4e4bec8e6e38eb8e946ca71624c274.zip
HOPKINS: Fix fileExists()
-rw-r--r--engines/hopkins/computer.cpp2
-rw-r--r--engines/hopkins/files.cpp5
2 files changed, 3 insertions, 4 deletions
diff --git a/engines/hopkins/computer.cpp b/engines/hopkins/computer.cpp
index 7aa17c9788..bc67ccf23f 100644
--- a/engines/hopkins/computer.cpp
+++ b/engines/hopkins/computer.cpp
@@ -328,7 +328,7 @@ static char _frenchText[] =
*/
void ComputerManager::loadMenu() {
char *ptr;
- if (!_vm->_fileManager.fileExists("LINK", "COMPUTAN.TXT")) {
+ if (_vm->_fileManager.fileExists("LINK", "COMPUTAN.TXT")) {
_vm->_fileManager.constructFilename("LINK", "COMPUTAN.TXT");
ptr = (char *)_vm->_fileManager.loadFile(_vm->_globals._curFilename);
} else if (_vm->_globals._language == LANG_FR) {
diff --git a/engines/hopkins/files.cpp b/engines/hopkins/files.cpp
index 4aeba02a74..0ff2668d07 100644
--- a/engines/hopkins/files.cpp
+++ b/engines/hopkins/files.cpp
@@ -72,7 +72,7 @@ void FileManager::initCensorship() {
_vm->_globals._censorshipFl = false;
// If file doesn't exist, fallback to uncensored
- if (!fileExists("SYSTEM", "BLOOD.DAT")) {
+ if (fileExists("SYSTEM", "BLOOD.DAT")) {
constructFilename("SYSTEM", "BLOOD.DAT");
char *data = (char *)loadFile(_vm->_globals._curFilename);
@@ -117,8 +117,7 @@ bool FileManager::fileExists(const Common::String &folder, const Common::String
Common::String filename = folder.empty() ? file :
Common::String::format("%s/%s", folder.c_str(), file.c_str());
- Common::File f;
- return !f.exists(filename);
+ return Common::File::exists(filename);
}
/**