aboutsummaryrefslogtreecommitdiff
path: root/engines/drascula/resource.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2010-02-08 17:48:35 +0000
committerNicola Mettifogo2010-02-08 17:48:35 +0000
commit0aefdb782654e886a4d0a9e1798d124b7ed41260 (patch)
tree63334bfb01c515dd17bf7bc11e6288b4752c6b03 /engines/drascula/resource.cpp
parent16438e5c4d2f1a8bd8375b9068432e97cc465590 (diff)
downloadscummvm-rg350-0aefdb782654e886a4d0a9e1798d124b7ed41260.tar.gz
scummvm-rg350-0aefdb782654e886a4d0a9e1798d124b7ed41260.tar.bz2
scummvm-rg350-0aefdb782654e886a4d0a9e1798d124b7ed41260.zip
Moved ArjFile to drascula.
svn-id: r47999
Diffstat (limited to 'engines/drascula/resource.cpp')
-rw-r--r--engines/drascula/resource.cpp52
1 files changed, 52 insertions, 0 deletions
diff --git a/engines/drascula/resource.cpp b/engines/drascula/resource.cpp
new file mode 100644
index 0000000000..abe68ef86b
--- /dev/null
+++ b/engines/drascula/resource.cpp
@@ -0,0 +1,52 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#include "drascula/drascula.h"
+
+namespace Drascula {
+
+#pragma mark ArjFile implementation
+
+ArjFile::ArjFile() {
+ _fallBack = false;
+}
+
+ArjFile::~ArjFile() {
+}
+
+void ArjFile::registerArchive(const Common::String &filename) {
+ add(filename, new Common::ArjArchive(filename));
+}
+
+Common::SeekableReadStream *ArjFile::open(const Common::String &filename) {
+ if (_fallBack && SearchMan.hasFile(filename)) {
+ return SearchMan.createReadStreamForMember(filename);
+ }
+
+ return createReadStreamForMember(filename);
+}
+
+} // End of namespace Drascula
+