X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_tdef.h;h=be166c7e4fb77aaf3845b51355febf10faa7d8dc;hb=c421d6353c601dc59f7d9e42883f0711c6a89805;hp=dbda778a0b9fa4f49dbd188377d5be301c08ba75;hpb=504952db812eb43b41636db1da125be946cfd35f;p=16.git diff --git a/src/lib/16_tdef.h b/src/lib/16_tdef.h index dbda778a..be166c7e 100755 --- a/src/lib/16_tdef.h +++ b/src/lib/16_tdef.h @@ -189,6 +189,30 @@ typedef struct { //from 16_in //========================================================================== +#define KeyInt 9 // The keyboard ISR number + +// +// mouse constants +// +#define MReset 0 +#define MButtons 3 +#define MDelta 11 + +#define MouseInt 0x33 +//#define Mouse(x) _AX = x,geninterrupt(MouseInt) + +// +// joystick constants +// +#define JoyScaleMax 32768 +#define JoyScaleShift 8 +#define MaxJoyValue 5000 + +#define MaxPlayers 4 +#define MaxKbds 2 +#define MaxJoys 2 +#define NumCodes 128 + typedef byte ScanCode; typedef enum { @@ -204,12 +228,10 @@ typedef enum { motion_None = 0, motion_Right = 1,motion_Down = 1 } Motion; -typedef enum { - dir_North,//dir_NorthEast, - dir_West,//dir_Nortinest, - dir_None, - dir_East,//,dir_SouthEast, - dir_South,//dir_Soutinest, +typedef enum { // Quick lookup for total direction + /*dir_NorthWest, */dir_North,/* dir_NorthEast,*/ + dir_West, dir_None, dir_East, + /*dir_SouthWest, */dir_South/*, dir_SouthEast*/ } Direction; typedef struct { boolean near button0,button1,button2,button3; @@ -239,6 +261,33 @@ typedef struct { joyMultXH,joyMultYH; } JoystickDef; +typedef struct// instat +{ + boolean IN_Started; + boolean CapsLock; + ScanCode CurCode,LastCode; +} in_status_t; + +typedef struct// inconfig +{ + in_status_t instat; +// +// configuration variables +// + boolean Keyboard[NumCodes], + JoysPresent[MaxJoys], + MousePresent, + JoyPadPresent; + +// Global variables + boolean Paused; + char LastASCII; + ScanCode LastScan; + + KeyboardDef KbdDefs[MaxKbds]; + JoystickDef JoyDefs[MaxJoys]; +} in_info_t; + //========================================================================== typedef struct @@ -538,6 +587,9 @@ typedef struct //TODO: USE THIS!!!! byte far grneeded[NUMCHUNKS]; memptr/*byte _seg*/ *audiosegs[NUMSNDCHUNKS]; + long _seg *grstarts; // array of offsets in egagraph, -1 for sparse + long _seg *audiostarts; // array of offsets in audio / audiot + //misc memptr memptr tinf[4]; @@ -563,9 +615,12 @@ typedef struct video_t video; // video settings variable ca_t ca; // ca stuff pm_t pm; // pm stuff - loghandle_t handle; //handles for file logging - kurokku_t kurokku; //clock struct - mminfo_t mm; mminfotype mmi; + loghandle_t handle; //handles for file logging + kurokku_t kurokku; //clock struct + mminfo_t mm; mminfotype mmi; // mm stuff +//++++ in_info_t in; // 16_in info + player_t player[MaxPlayers]; // player vars +//==== word far* clockw; /* 18.2hz clock */ } global_game_variables_t; #ifdef __WATCOMC__