[Scummvm-cvs-logs] SF.net SVN: scummvm:[34769] scummvm/trunk
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sat Oct 11 23:23:53 CEST 2008
Revision: 34769
http://scummvm.svn.sourceforge.net/scummvm/?rev=34769&view=rev
Author: fingolfin
Date: 2008-10-11 21:23:53 +0000 (Sat, 11 Oct 2008)
Log Message:
-----------
Use Common::File instead of FilePtr
Modified Paths:
--------------
scummvm/trunk/engines/scumm/detection.cpp
scummvm/trunk/gui/theme.cpp
Modified: scummvm/trunk/engines/scumm/detection.cpp
===================================================================
--- scummvm/trunk/engines/scumm/detection.cpp 2008-10-11 14:18:11 UTC (rev 34768)
+++ scummvm/trunk/engines/scumm/detection.cpp 2008-10-11 21:23:53 UTC (rev 34769)
@@ -212,11 +212,11 @@
// 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 @@
&& 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 @@
// 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 @@
// 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
Modified: scummvm/trunk/gui/theme.cpp
===================================================================
--- scummvm/trunk/gui/theme.cpp 2008-10-11 14:18:11 UTC (rev 34768)
+++ scummvm/trunk/gui/theme.cpp 2008-10-11 21:23:53 UTC (rev 34769)
@@ -140,8 +140,9 @@
#ifdef USE_ZLIB
Common::ZipArchive zipArchive(node);
if (zipArchive.hasFile("THEMERC")) {
- Common::FilePtr stream(zipArchive.openFile("THEMERC"));
- stxHeader = stream->readLine();
+ Common::File stream;
+ stream.open("THEMERC", zipArchive);
+ stxHeader = stream.readLine();
// TODO: Read first line of file. How?
if (themeConfigParseHeader(stxHeader.c_str(), themeName))
foundHeader = true;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list