diff options
author | Strangerke | 2012-12-22 14:26:07 +0100 |
---|---|---|
committer | Strangerke | 2012-12-22 14:26:07 +0100 |
commit | 0120107a6d0884ddf4655b4c22d13f2b75319152 (patch) | |
tree | b741b8eac261c6bc081e220c9a10db7c9ebe33b4 /engines/hopkins/files.cpp | |
parent | e44df7732925e42d52e5567185a16839e9ba2cfb (diff) | |
download | scummvm-rg350-0120107a6d0884ddf4655b4c22d13f2b75319152.tar.gz scummvm-rg350-0120107a6d0884ddf4655b4c22d13f2b75319152.tar.bz2 scummvm-rg350-0120107a6d0884ddf4655b4c22d13f2b75319152.zip |
HOPKINS: Implement code for OS/2 version
Diffstat (limited to 'engines/hopkins/files.cpp')
-rw-r--r-- | engines/hopkins/files.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/engines/hopkins/files.cpp b/engines/hopkins/files.cpp index 8ab86bb180..c888bcbd67 100644 --- a/engines/hopkins/files.cpp +++ b/engines/hopkins/files.cpp @@ -71,15 +71,18 @@ int FileManager::readStream(Common::ReadStream &stream, void *buf, size_t nbytes void FileManager::initCensorship() { _vm->_globals.CENSURE = false; - constructFilename(_vm->_globals.HOPSYSTEM, "BLOOD.DAT"); - char *data = (char *)loadFile(_vm->_globals.NFICHIER); + // If file doesn't exist, fallback to uncensored + if (!fileExists(_vm->_globals.HOPSYSTEM, "BLOOD.DAT")) { + constructFilename(_vm->_globals.HOPSYSTEM, "BLOOD.DAT"); + char *data = (char *)loadFile(_vm->_globals.NFICHIER); - if (*(data + 6) == 'u' && *(data + 7) == 'k') - _vm->_globals.CENSURE = true; - if (*(data + 6) == 'U' && *(data + 7) == 'K') - _vm->_globals.CENSURE = true; + if (*(data + 6) == 'u' && *(data + 7) == 'k') + _vm->_globals.CENSURE = true; + if (*(data + 6) == 'U' && *(data + 7) == 'K') + _vm->_globals.CENSURE = true; - free(data); + free(data); + } } /** |