]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/16_head.h
====scroll.exe coverted and bakapi.exe converted!! this is a major commit!
[16.git] / src / lib / 16_head.h
index 225af5d354ee86aac265b88670d2c9b53590c24a..4a923a8c2c8873c72d05d825621707caeee69534 100644 (file)
  *
  */
 
+#if !defined(__LARGE__) && !defined(__COMPACT__) && !defined(__HUGE__)
+#error Invalid memory model for compiling project 16
+#endif
+
+#if !defined(__i86__) && defined(__i386__)
+#error i8088 only
+#endif
+
 #ifndef _LIBHEAD_H_
 #define _LIBHEAD_H_
 #include <i86.h>
 #include <conio.h> // just for wait
 #include <time.h> // just for wait
 #include <stdlib.h>
+#include <malloc.h>
 #include <ctype.h>
+#include <unistd.h>\r
+#include <fcntl.h>\r
+#include <sys/stat.h>
+#include <mem.h>
 #include "src/lib/types.h"
 
 /* Control codes for all keys on the keyboard */
 */
 
 static dword far* clockdw= (dword far*) 0x046C; /* 18.2hz clock */
+//static dword clockdw=0;
+extern int                     profilehandle,debughandle;      //make it into game global
 
 #define        nil     ((void *)0)
 
@@ -136,11 +151,24 @@ static dword far* clockdw= (dword far*) 0x046C; /* 18.2hz clock */
 
 typedef union REGPACK  regs_t;
 typedef        enum    {false,true}    boolean;
+//I hope this is correct!
+//__self
+typedef void __based(__self) * memptr;
+typedef struct
+{\r
+       int old_mode;   //old video mode before game!
+} global_game_variables_t;
 
+/* local function */\r
 void wait(clock_t wait);
 void* AllocateLargestFreeBlock(size_t* Size);
 size_t GetFreeSize(void);
+void far *AllocateLargestFarFreeBlock(size_t far* Size);
+size_t GetFarFreeSize(void);
 long int filesize(FILE *fp);
 int US_CheckParm(char *parm,char **strings);
 
+extern void CA_OpenDebug (void);\r
+extern void CA_CloseDebug (void);
+
 #endif/*_LIBHEAD_H_*/