aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/resource.h
diff options
context:
space:
mode:
authorJohannes Schickel2006-10-24 00:56:10 +0000
committerJohannes Schickel2006-10-24 00:56:10 +0000
commit3197cb6a2389000ec47bf9d27056403b98ceb0b8 (patch)
treecfc4b5f61408e600d3d7707347ac980714955bb4 /engines/kyra/resource.h
parent0d357aab4d7add6011ee1fbc99c502820daf0278 (diff)
downloadscummvm-rg350-3197cb6a2389000ec47bf9d27056403b98ceb0b8.tar.gz
scummvm-rg350-3197cb6a2389000ec47bf9d27056403b98ceb0b8.tar.bz2
scummvm-rg350-3197cb6a2389000ec47bf9d27056403b98ceb0b8.zip
Never unload files loat on startup like "CAVE.APK" and "LAGOON.APK".
svn-id: r24485
Diffstat (limited to 'engines/kyra/resource.h')
-rw-r--r--engines/kyra/resource.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h
index 34c9a16986..6d0f725184 100644
--- a/engines/kyra/resource.h
+++ b/engines/kyra/resource.h
@@ -35,7 +35,7 @@ namespace Kyra {
class ResourceFile {
public:
- ResourceFile() : _open(false), _filename() {}
+ ResourceFile() : _open(false), _protected(false), _filename() {}
virtual ~ResourceFile() {}
virtual uint8 *getFile(uint file) = 0;
@@ -47,10 +47,12 @@ public:
virtual bool isValid(void) const { return (_filename != 0); }
bool isOpen(void) const { return _open; }
- virtual void close() { _open = false; }
+ virtual void close() { if (!_protected) _open = false; }
+ virtual void protect(const bool prot = true) { _protected = prot; }
virtual void open() { _open = true; }
protected:
bool _open;
+ bool _protected;
uint _filename;
};