X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_head.h;h=2d18e0af7017831a4781eb824f1b5f139af88ed9;hb=5af1604f7af6c1d1ab94299bfe6a4195b203a323;hp=0f0c74f79af05ae5107a28ed49e89d7cce172dff;hpb=f2a811af6076e5d139acaef8c0fcf7c40244d8ed;p=16.git diff --git a/src/lib/16_head.h b/src/lib/16_head.h index 0f0c74f7..2d18e0af 100755 --- a/src/lib/16_head.h +++ b/src/lib/16_head.h @@ -20,9 +20,9 @@ * */ -#if !defined(__LARGE__) && !defined(__COMPACT__) && !defined(__HUGE__) -#error Invalid memory model for compiling project 16 -#endif +//#if !defined(__LARGE__) && !defined(__COMPACT__) && !defined(__HUGE__) +//#error Invalid memory model for compiling project 16 +//#endif #if !defined(__i86__) && defined(__i386__) #error i8088 only @@ -33,7 +33,7 @@ #include #include #include -#include // just for wait +#include // this is where Open Watcom hides the outp() etc. functions // just for wait #include // just for wait #include #include @@ -58,7 +58,6 @@ #include "src/lib/16_t.h" #include "src/lib/16_tdef.h" #include "src/lib/nyan/kitten.h" -#include "src/lib/16_dbg.h" #define VERSION __DATE__ " " __TIME__ @@ -160,15 +159,10 @@ extern int profilehandle,debughandle; //make it into game global //#define OLD16_VL #define nil ((void *)0) -#ifdef __BORLANDC__ -//#define _FCORELEFT 0x90000UL-16UL -#define _FCORELEFT HC_farcoreleft() -#define sprite -#endif + #ifdef __WATCOMC__ -//#define _FCORELEFT 0x90000UL+16UL -#define _FCORELEFT HC_farcoreleft() -/*static union REGS CPURegs; +//----#define _FCORELEFT 0x90000UL+16UL +extern union REGS CPURegs; #define _AX CPURegs.x.ax #define _BX CPURegs.x.bx @@ -186,17 +180,12 @@ extern int profilehandle,debughandle; //make it into game global #define _DH CPURegs.h.dh #define _DL CPURegs.h.dl -#define geninterrupt(n) int86(n,&CPURegs,&CPURegs);*/ -#define peekb(segm,ofs) (*(byte far*)MK_FP((segm),(ofs))) -#define peekw(segm,ofs) (*(word far*)MK_FP((segm),(ofs))) -#define pokeb(segm,ofs,value) (peekb((segm),(ofs)) = (byte)(value)) -#define pokew(segm,ofs,value) (peekw((segm),(ofs)) = (word)(value)) +#define geninterrupt(n) int86(n,&CPURegs,&CPURegs); + typedef union REGPACK regs_t; #endif -#define INPUT_STATUS_1 0x03da - // local function // long int filesize(FILE *fp); void clrstdin(); @@ -207,6 +196,7 @@ void printmeminfoline(byte *strc, const byte *pee, size_t h_total, size_t h_used int US_CheckParm(char *parm,char **strings); byte dirchar(byte in); void print_mem(void const *vp, size_t n); +void hres (void); #define PRINT_OPAQUE_STRUCT(p) print_mem((p), sizeof(*(p)))