diff options
author | Simon Howard | 2006-12-21 21:43:47 +0000 |
---|---|---|
committer | Simon Howard | 2006-12-21 21:43:47 +0000 |
commit | 37c6b72103cc9d7965a669cdca01edae83f765e4 (patch) | |
tree | 829da412a95f0138e21ea1122bf756c1bf28d69f /src/m_misc.c | |
parent | f7a83bd1057494c688acfaff9c1453ac4be34711 (diff) | |
download | chocolate-doom-37c6b72103cc9d7965a669cdca01edae83f765e4.tar.gz chocolate-doom-37c6b72103cc9d7965a669cdca01edae83f765e4.tar.bz2 chocolate-doom-37c6b72103cc9d7965a669cdca01edae83f765e4.zip |
Split off IWAD-related code into separate d_iwad.c. On Windows, search
the registry to automatically find the locations of installed IWADs.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 791
Diffstat (limited to 'src/m_misc.c')
-rw-r--r-- | src/m_misc.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/m_misc.c b/src/m_misc.c index 5930140c..42736371 100644 --- a/src/m_misc.c +++ b/src/m_misc.c @@ -122,6 +122,25 @@ void M_MakeDirectory(char *path) #endif } +// Check if a file exists + +boolean M_FileExists(char *filename) +{ + FILE *fstream; + + fstream = fopen(filename, "r"); + + if (fstream != NULL) + { + fclose(fstream); + return true; + } + else + { + return false; + } +} + |