aboutsummaryrefslogtreecommitdiff
path: root/common/file.h
diff options
context:
space:
mode:
authorMax Horn2003-09-17 21:06:16 +0000
committerMax Horn2003-09-17 21:06:16 +0000
commit468275bb94f975b9e1c2e7e90a03caa37bd0e142 (patch)
tree1c3a7f30ca33043dba1a7de1119d6c50da7181fa /common/file.h
parentc0d1061a2dcfd8c50c70ca99b99a41e81207fa86 (diff)
downloadscummvm-rg350-468275bb94f975b9e1c2e7e90a03caa37bd0e142.tar.gz
scummvm-rg350-468275bb94f975b9e1c2e7e90a03caa37bd0e142.tar.bz2
scummvm-rg350-468275bb94f975b9e1c2e7e90a03caa37bd0e142.zip
added a static method setDefaultDirectory to class File; used this to simplify some code; added a global g_sound pointer in bs2, this cuts down on uses of g_sword2 (of course both should be removed on the long run); some other minor tweaks/fixes
svn-id: r10278
Diffstat (limited to 'common/file.h')
-rw-r--r--common/file.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/common/file.h b/common/file.h
index 7d6ab8f395..c07d4e9d4a 100644
--- a/common/file.h
+++ b/common/file.h
@@ -33,17 +33,21 @@ private:
byte _encbyte;
char *_name; // For debugging
- FILE *fopenNoCase(const char *filename, const char *directory, const char *mode);
+ static FILE *fopenNoCase(const char *filename, const char *directory, const char *mode);
+
+ static char *_defaultDirectory;
public:
enum {
kFileReadMode = 1,
kFileWriteMode = 2
};
-
+
+ static void setDefaultDirectory(const char *directory);
+
File();
virtual ~File();
- bool open(const char *filename, const char *directory, int mode = kFileReadMode, byte encbyte = 0);
+ bool open(const char *filename, const char *directory = NULL, int mode = kFileReadMode, byte encbyte = 0);
void close();
bool isOpen();
bool ioFailed();