aboutsummaryrefslogtreecommitdiff
path: root/Source/Support.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Support.cpp')
-rw-r--r--Source/Support.cpp25
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;
+}
+
+