diff options
author | Max Horn | 2008-10-11 21:23:53 +0000 |
---|---|---|
committer | Max Horn | 2008-10-11 21:23:53 +0000 |
commit | ec874705ff51225aa47c493ab66b4989dfa16f3a (patch) | |
tree | 471bcc11d8f5a690cc12d15f6677b2d650d6be5c /engines | |
parent | b5f2e4ee8c977f7a437e97a6b92c000d729adc51 (diff) | |
download | scummvm-rg350-ec874705ff51225aa47c493ab66b4989dfa16f3a.tar.gz scummvm-rg350-ec874705ff51225aa47c493ab66b4989dfa16f3a.tar.bz2 scummvm-rg350-ec874705ff51225aa47c493ab66b4989dfa16f3a.zip |
Use Common::File instead of FilePtr
svn-id: r34769
Diffstat (limited to 'engines')
-rw-r--r-- | engines/scumm/detection.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp index 3059fc1033..abc3d5ec17 100644 --- a/engines/scumm/detection.cpp +++ b/engines/scumm/detection.cpp @@ -212,11 +212,11 @@ static Common::Language detectLanguage(const Common::FSList &fslist, byte id) { // ever determine that this is insufficient, we can still // switch to MD5 based detection). const char *filename = (id == GID_CMI) ? "LANGUAGE.TAB" : "LANGUAGE.BND"; - Common::FilePtr tmp; + Common::File tmp; Common::FSNode langFile; if (searchFSNode(fslist, filename, langFile)) - tmp = Common::FilePtr(langFile.openForReading()); - if (!tmp) { + tmp.open(langFile); + if (!tmp.isOpen()) { // try loading in RESOURCE sub dir... Common::FSNode resDir; Common::FSList tmpList; @@ -224,11 +224,11 @@ static Common::Language detectLanguage(const Common::FSList &fslist, byte id) { && resDir.isDirectory() && resDir.getChildren(tmpList, Common::FSNode::kListFilesOnly) && searchFSNode(tmpList, filename, langFile)) { - tmp = Common::FilePtr(langFile.openForReading()); + tmp.open(langFile); } } - if (tmp) { - uint size = tmp->size(); + if (tmp.isOpen()) { + uint size = tmp.size(); if (id == GID_CMI) { switch (size) { case 439080: // 2daf3db71d23d99d19fc9a544fcf6431 @@ -453,8 +453,8 @@ static bool testGame(const GameSettings *g, const DescMap &fileMD5Map, const Com // To do this, we take a close look at the detection file and // try to filter out some cases. - Common::FilePtr tmp(d.node.openForReading()); - if (!tmp) { + Common::File tmp; + if (!tmp.open(d.node)) { warning("SCUMM testGame: failed to open '%s' for read access", d.node.getPath().c_str()); return false; } @@ -468,7 +468,7 @@ static bool testGame(const GameSettings *g, const DescMap &fileMD5Map, const Com // Read a few bytes to narrow down the game. byte buf[6]; - tmp->read(buf, 6); + tmp.read(buf, 6); if (buf[0] == 0xbc && buf[1] == 0xb9) { // The NES version of MM |