aboutsummaryrefslogtreecommitdiff
path: root/engines/sword1/sword1.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-06-20 18:08:03 +0000
committerTorbjörn Andersson2006-06-20 18:08:03 +0000
commit1569d5fadc511780cd24bd835fc8983a76a714ba (patch)
treef2696fa56025c7efab6b5d2b7c288cc1ee9aafe3 /engines/sword1/sword1.cpp
parenta7908a01bf75254c4c430457cf6647e68d8aa1c1 (diff)
downloadscummvm-rg350-1569d5fadc511780cd24bd835fc8983a76a714ba.tar.gz
scummvm-rg350-1569d5fadc511780cd24bd835fc8983a76a714ba.tar.bz2
scummvm-rg350-1569d5fadc511780cd24bd835fc8983a76a714ba.zip
Cleanup.
svn-id: r23194
Diffstat (limited to 'engines/sword1/sword1.cpp')
-rw-r--r--engines/sword1/sword1.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp
index e57cadcff3..11053ad4e3 100644
--- a/engines/sword1/sword1.cpp
+++ b/engines/sword1/sword1.cpp
@@ -352,7 +352,6 @@ void SwordEngine::showFileErrorMsg(uint8 type, bool *fileExists) {
}
void SwordEngine::checkCdFiles(void) { // check if we're running from cd, hdd or what...
- Common::File test;
bool fileExists[30];
bool isFullVersion = false; // default to demo version
bool missingTypes[8] = { false, false, false, false, false, false, false, false };
@@ -363,8 +362,7 @@ void SwordEngine::checkCdFiles(void) { // check if we're running from cd, hdd or
// check all files and look out if we can find a file that wouldn't exist if this was the demo version
for (int fcnt = 0; fcnt < ARRAYSIZE(_cdFileList); fcnt++) {
- if (test.open(_cdFileList[fcnt].name)) {
- test.close();
+ if (Common::File::exists(_cdFileList[fcnt].name)) {
fileExists[fcnt] = true;
flagsToBool(foundTypes, _cdFileList[fcnt].flags);
if (!(_cdFileList[fcnt].flags & FLAG_DEMO))
@@ -442,9 +440,8 @@ void SwordEngine::checkCdFiles(void) { // check if we're running from cd, hdd or
_systemVars.isDemo = (_features & GF_DEMO) != 0;
_systemVars.cutscenePackVersion = 0;
#ifdef USE_MPEG2
- if (test.open("intro.snd")) {
+ if (Common::File::exists("intro.snd")) {
_systemVars.cutscenePackVersion = 1;
- test.close();
}
#endif
}