]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/16_head.h
ok! wwww
[16.git] / src / lib / 16_head.h
index 84a4a9eba1de7a53fba390ab1786bf4fa3d44577..8baff16a12b6609d806963747dc3440bf6a435ae 100644 (file)
 \r
 #ifndef _LIBHEAD_H_\r
 #define _LIBHEAD_H_\r
-#include <i86.h>\r
 #include <dos.h>\r
 #include <stdio.h>\r
+#include <stdlib.h>\r
 #include <conio.h> // just for wait\r
 #include <time.h> // just for wait\r
-#include <stdlib.h>\r
 #include <malloc.h>\r
 #include <ctype.h>\r
-#include <unistd.h>\r
 #include <fcntl.h>\r
+#include <io.h>\r
 #include <sys/stat.h>\r
 #include <mem.h>\r
+#include <string.h>\r
+#ifdef __WATCOMC__\r
+#include <i86.h>\r
+#include <unistd.h>\r
 #include <alloca.h>\r
+#endif\r
 #include "src/lib/nyan/kitten.h"\r
 #include "src/lib/types.h"\r
 \r
 //0000 test type def wwww\r
-struct list {\r
+/*struct list {\r
        struct list __based(__self) *next;\r
        int         value;\r
-};\r
+};*/\r
 \r
 /* Control codes for all keys on the keyboard */\r
 //here temperarly\r
@@ -150,6 +154,11 @@ extern     int                     profilehandle,debughandle;      //make it into game global
 #define __DEBUG__\r
 \r
 #define        nil     ((void *)0)\r
+#ifdef __BORLANDC__\r
+#define _FCORELEFT 0x90000UL-16UL\r
+#endif\r
+#ifdef __WATCOMC__\r
+#define _FCORELEFT 0x90000UL+16UL\r
 \r
 #define peekb(segm,ofs) (*(byte far*)MK_FP((segm),(ofs)))\r
 #define peekw(segm,ofs) (*(word far*)MK_FP((segm),(ofs)))\r
@@ -157,11 +166,24 @@ extern    int                     profilehandle,debughandle;      //make it into game global
 #define pokew(segm,ofs,value) (peekw((segm),(ofs)) = (word)(value))\r
 \r
 typedef union REGPACK  regs_t;\r
-//typedef struct SREGS sregs_t;\r
-//sregs_t sregs;\r
+#endif\r
+\r
 typedef        enum    {false,true}    boolean;\r
-//I hope this is correct!\r
+\r
+#ifdef __WATCOMC__\r
 typedef void __based(__self) * memptr;\r
+#endif\r
+#ifdef __BORLANDC__\r
+typedef void _seg * memptr;\r
+#endif\r
+\r
+typedef struct\r
+{\r
+       int showmemhandle;\r
+       int                     profilehandle,debughandle;\r
+       int heaphandle;\r
+} handle_t;\r
+\r
 typedef struct\r
 {\r
        int old_mode;   //old video mode before game!\r
@@ -169,8 +191,7 @@ typedef struct
        clock_t t;\r
        dword tiku;\r
        word far* clock;\r
-       //handles for log files of the game gose here if wwww\r
-       //int heaphandle;\r
+       handle_t handle;        //handles for file logging\r
 } global_game_variables_t;\r
 \r
 /* local function */\r
@@ -178,11 +199,9 @@ void wait(clock_t wait);
 \r
 long int filesize(FILE *fp);\r
 void printmeminfoline(byte *strc, const byte *pee, size_t h_total, size_t h_used, size_t h_free);\r
-void print_normal_entry(char *text, dword total, dword used, dword free, byte *str);\r
-void convert(const char *format, dword num);\r
 int US_CheckParm(char *parm,char **strings);\r
 \r
-extern void CA_OpenDebug (void);\r
-extern void CA_CloseDebug (void);\r
+extern void CA_OpenDebug (global_game_variables_t *gvar);\r
+extern void CA_CloseDebug (global_game_variables_t *gvar);\r
 \r
 #endif/*_LIBHEAD_H_*/\r