X-Git-Url: http://4ch.mooo.com/gitweb/?p=16.git;a=blobdiff_plain;f=src%2Flib%2F16_tdef.h;h=f4b9d094553fde03019ab16c451c78c848285be5;hp=3fa1feb335ced492a655faf2c2195e411e338469;hb=8db9019df22bf792ea02096dec8c3d862fa00155;hpb=767a51ba929d4110350572d014665644fa2288d5 diff --git a/src/lib/16_tdef.h b/src/lib/16_tdef.h index 3fa1feb3..f4b9d094 100755 --- a/src/lib/16_tdef.h +++ b/src/lib/16_tdef.h @@ -41,6 +41,8 @@ #define BOFS page[1].data #define DOFS page[0].data +#define CONFIGNAME "config.16" + /* * typedefs of the game variables! */ @@ -82,6 +84,8 @@ typedef struct vrs_container{ }; // Array of corresponding vrl line offsets vrl1_vgax_offset_t **vrl_line_offsets; + //sprite buffer + byte far _seg *spribuff; } vrs_container_t; typedef struct vrl_container{ @@ -94,6 +98,8 @@ typedef struct vrl_container{ }; // Pointer to a corresponding vrl line offsets struct vrl1_vgax_offset_t *line_offsets; + //sprite buffer + byte far _seg *spribuff; } vrl_container_t; typedef struct sprite @@ -358,9 +364,29 @@ typedef struct } kurokku_t; //===================================// -#define PALSIZE 768 -#define NUMCHUNKS 416 //keen -#define MAXSCANLINES 240 // size of ylookup table +#define PALSIZE 768 //vga +#define NUMCHUNKS 416 //keen +//#define MAXSCANLINES 240 // size of ylookup table + +#define MAXSHIFTS 4 +#define STARTSPRITES 0 //temp + +typedef struct +{ + int width, + height, + orgx,orgy, + xl,yl,xh,yh, + shifts; +} spritetabletype; + +typedef struct +{ + unsigned sourceoffset[MAXSHIFTS]; + unsigned planesize[MAXSHIFTS]; + unsigned width[MAXSHIFTS]; + byte data[]; +} spritetype; // the memptr for each sprite points to this typedef struct { @@ -374,7 +400,7 @@ typedef struct word quadwh; //preproccessed quad size of tilewidth and tileheight } tile_dimention_t; -#define MAXSCROLLEDGES 6 +#define MAXSCROLLEDGES 2 typedef struct { unsigned panx,pany; // panning adjustments inside port in pixels @@ -386,10 +412,10 @@ typedef struct typedef struct { - //ylookup[MAXSCANLINES], +//---- ylookup[MAXSCANLINES], unsigned int offscreen_ofs; unsigned int pattern_ofs; -// unsigned bufferofs,linewidth,displayofs; +//+-+- unsigned bufferofs,linewidth,displayofs; pan_t pan; } ofs_t; //unfinished @@ -431,7 +457,10 @@ typedef struct word bordercolor; boolean fastpalette; byte far palette1[256][3],far palette2[256][3]; - pictabletype _seg *pictable; +//???? pictabletype _seg *pictable; + //keen/cata vars +// spritetabletype _seg *spritetable; +// unsigned *shifttabletable[8]; } video_t; //from scroll16 @@ -468,11 +497,12 @@ typedef struct //from 16_mm //========================================================================== -#define MAXBLOCKS 800//kd=1300 wolf3d=700 cata=600 +#define MAXBLOCKS 1024 //kd=1300 wolf3d=700 cata=600 typedef struct mmblockstruct { - unsigned start,length; + //word start,length, word blob; //for data larger than 64k + word start; dword length; unsigned attributes; memptr *useptr; // pointer to the segment start struct mmblockstruct far *next; @@ -648,12 +678,12 @@ typedef struct //========================================================================== #define NOMAPS -//#define NOGRAPHICS +#define NOGRAPHICS #define NOAUDIO -#define MAPHEADERLINKED +//#define MAPHEADERLINKED //#define GRHEADERLINKED -#define AUDIOHEADERLINKED +//#define AUDIOHEADERLINKED #define NUMMAPS 4//39 #define NUMSNDCHUNKS 4//3 @@ -667,9 +697,12 @@ typedef struct #define GDICTNAME DATADIR"vgadict." #define GHEADNAME DATADIR"vgahead." #define GFILENAME DATADIR"vgagraph." -#define EXTENSION "hb1" +#define MAPSEGBUF mapsegs +#define MAPSEGPTR MAPSEGBUF[0] +#define MAPSEGINLM (gvar->ca.MAPSEGPTR) + typedef struct { word bit0,bit1; // 0-255 is a character, > is a pointer to a node @@ -685,9 +718,10 @@ typedef struct typedef struct { - int mapon, mapnum; - maptype _seg *mapheaderseg[NUMMAPS]; -} ca_mapinfo_t; + unsigned RLEWtag; + long headeroffsets[100]; + byte tileinfo[]; +} mapfiletype; typedef struct { @@ -708,9 +742,10 @@ typedef struct //TODO: USE THIS!!!! { byte ca_levelbit,ca_levelnum; ca_handle_t file; //files to open - ca_mapinfo_t camap; byte _seg *tinf;//?? where in the id engine is this used and what is it? --sparky4 + int mapon, mapnum; + maptype _seg *mapheaderseg[NUMMAPS]; unsigned _seg *mapsegs[MAPPLANES]; void _seg *grsegs[NUMCHUNKS]; byte far grneeded[NUMCHUNKS]; @@ -722,20 +757,20 @@ typedef struct //TODO: USE THIS!!!! #ifdef GRHEADERLINKED huffnode *grhuffman; #else - huffnode grhuffman[255]; + huffnode grhuffman[63]; #endif #ifdef AUDIOHEADERLINKED huffnode *audiohuffman; #else - huffnode audiohuffman[255]; + huffnode audiohuffman[63]; #endif CASVT chunkcomplen,chunkexplen;//long sd_t sd; //TODO: extend! and learn from keen/wolf/catacomb's code wwww - memptr spribuff; + memptr spribuff; //temp } ca_t; //========================================================================== @@ -749,7 +784,10 @@ typedef struct { vidsw_t vsw; } sw_t;*/ - +#ifdef __WATCOMC__ +extern char global_temp_status_text[512]; +extern char global_temp_status_text2[512]; +#endif typedef struct glob_game_vars { @@ -766,9 +804,4 @@ typedef struct glob_game_vars boolean DLStarted; } global_game_variables_t; -#ifdef __WATCOMC__ -extern char global_temp_status_text[512]; -extern char global_temp_status_text2[512]; -#define EINVFMT EMFILE -#endif #endif /* _TYPEDEFSTRUCT_H_ */