diff options
| author | relnev <relnev@5198baeb-e213-0410-be47-fc2ff85ca46f> | 2003-01-08 04:02:26 +0000 |
|---|---|---|
| committer | relnev <relnev@5198baeb-e213-0410-be47-fc2ff85ca46f> | 2003-01-08 04:02:26 +0000 |
| commit | 55391bbb16fd833d13e14cb6869408d711e2687c (patch) | |
| tree | 8d773adab6de9ae49f70fb310ad8c2b801a25a8d /Source/Support.cpp | |
| parent | 2cbab89e49cbd5b1b5cfd19934212d9b29a7b901 (diff) | |
| download | blackshades-55391bbb16fd833d13e14cb6869408d711e2687c.tar.gz | |
some more hacking...
git-svn-id: svn://svn.icculus.org/blackshades/trunk@35 5198baeb-e213-0410-be47-fc2ff85ca46f
Diffstat (limited to 'Source/Support.cpp')
| -rw-r--r-- | Source/Support.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Source/Support.cpp b/Source/Support.cpp index a262122..3e47035 100644 --- a/Source/Support.cpp +++ b/Source/Support.cpp @@ -1,5 +1,9 @@ #include "Support.h" +#include "Files.h" +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> #include <unistd.h> #include "SDL.h" @@ -42,3 +46,24 @@ void DisposeMouse() { STUB_FUNCTION; } + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +int Files::OpenFile(Str255 Name) +{ + sFile = open((char *)Name, O_RDONLY | O_BINARY); + return sFile; +} + +void Files::EndLoad() +{ + if (sFile != -1) { + FSClose( sFile ); + } + + sFile = -1; +} + + |
