X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_tdef.h;h=2d027f613a2f9391aacf554eae5e0c59cf808620;hb=0902e0e217ef1eb91af959aa8ab47f355f6678e9;hp=28f35c0135467097cd6a3282c54134778f9a31cd;hpb=e5bca67ebc01790a89af93e777ca19cd309ec4e5;p=16.git diff --git a/src/lib/16_tdef.h b/src/lib/16_tdef.h index 28f35c01..2d027f61 100755 --- a/src/lib/16_tdef.h +++ b/src/lib/16_tdef.h @@ -66,12 +66,38 @@ typedef struct { //from 16_sprit.h #ifdef __WATCOMC__ +#include + +typedef struct vrs_container{ + // Size of a .vrs blob in memory + // minus header + dword data_size; + union{ + byte far *buffer; + struct vrs_header far *vrs_hdr; + }; + // Array of corresponding vrl line offsets + vrl1_vgax_offset_t **vrl_line_offsets; +} vrs_container_t; + +typedef struct vrl_container{ + // Size of a .vrl blob in memory + // minus header + dword data_size; + union{ + byte far *buffer; + struct vrl1_vgax_header far *vrl_header; + }; + // Pointer to a corresponding vrl line offsets struct + vrl1_vgax_offset_t *line_offsets; +} vrl_container_t; + typedef struct sprite { // VRS container from which we will extract animation and image data - struct vrs_container *spritesheet; + vrs_container_t spritesheet; // Container for a vrl sprite - struct vrl_container *sprite_vrl_cont; + vrl_container_t sprite_vrl_cont; // Current sprite id int curr_spri_id; // Index of a current sprite in an animation sequence @@ -189,6 +215,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 +254,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 +287,28 @@ typedef struct { joyMultXH,joyMultYH; } JoystickDef; +/*typedef struct// inconfig +{ + boolean IN_Started; + boolean CapsLock; + ScanCode CurCode,LastCode; +// +// 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 @@ -376,7 +446,7 @@ typedef struct boolean mmstarted, bombonerror, mmerror; void far *farheap; #ifdef __BORLANDC__ - void far *nearheap; + void *nearheap; #endif #ifdef __WATCOMC__ void __near *nearheap; @@ -493,7 +563,7 @@ typedef struct PMNumBlocks; long PMFrameCount; PageListStruct far *PMPages; - __SEGA *PMSegPages; + memptr/*__SEGA*/ *PMSegPages; pm_mmi_t mm; pm_emmi_t emm; pm_xmmi_t xmm; @@ -538,6 +608,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]; @@ -551,21 +624,25 @@ typedef struct //TODO: USE THIS!!!! //actual global game varables! typedef enum { - ENGI_EXIT, ENGI_QUIT, ENGI_RUN, - ENGI_INPUT, + ENGI_MENU, ENGI_PAUSE } engi_stat_t; +//ENGI_INPUT, typedef struct { + engi_stat_t engi_stat; 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 + map_view_t mv[4]; } global_game_variables_t; #ifdef __WATCOMC__