/*\r
* typedefs of the game variables!\r
*/\r
-typedef struct {\r
- byte *data;\r
- word width;\r
- word height;\r
- byte *palette;\r
- word offset;\r
-} bitmap_t;\r
-\r
-typedef struct {\r
- byte far **data;\r
- word ntiles; // the number of tiles\r
- word twidth; // width of the tiles\r
- word theight; // height of the tiles\r
- byte *palette; // palette for the tile set\r
-} tileset_t;\r
-\r
typedef struct {\r
byte far *plane[4]; // 4 planes of image data\r
word width; // width of the image (spread across 4 planes)\r
};\r
// Array of corresponding vrl line offsets\r
vrl1_vgax_offset_t **vrl_line_offsets;\r
+ //sprite buffer\r
+ byte far _seg *spribuff;\r
} vrs_container_t;\r
\r
typedef struct vrl_container{\r
};\r
// Pointer to a corresponding vrl line offsets struct\r
vrl1_vgax_offset_t *line_offsets;\r
+ //sprite buffer\r
+ byte far _seg *spribuff;\r
} vrl_container_t;\r
\r
typedef struct sprite\r
nibble pred; //prev. direction for animation changing\r
word dire; //sprite in use\r
nibble q; //loop variable for anumation and locking the playing to compleate the animation cycle to prevent issues with misalignment www\r
- word speed; //entity speed!\r
+// word speed; //entity speed!\r
word spt; //speed per tile\r
#ifdef __WATCOMC__\r
sprite_t spri; // sprite used by entity\r
{\r
int profilehandle,debughandle,showmemhandle;\r
int heaphandle;\r
+ byte datadumpfilename[12];\r
+ byte heapdumpfilename[12];\r
} loghandle_t;\r
\r
typedef struct\r
//===================================//\r
#define PALSIZE 768 //vga\r
#define NUMCHUNKS 416 //keen\r
-#define MAXSCANLINES 240 // size of ylookup table\r
+//#define MAXSCANLINES 240 // size of ylookup table\r
\r
#define MAXSHIFTS 4\r
#define STARTSPRITES 0 //temp\r
word quadwh; //preproccessed quad size of tilewidth and tileheight\r
} tile_dimention_t;\r
\r
-#define MAXSCROLLEDGES 6\r
+#define MAXSCROLLEDGES 2\r
typedef struct\r
{\r
unsigned panx,pany; // panning adjustments inside port in pixels\r
word bordercolor;\r
boolean fastpalette;\r
byte far palette1[256][3],far palette2[256][3];\r
- pictabletype _seg *pictable;\r
+//???? pictabletype _seg *pictable;\r
//keen/cata vars\r
// spritetabletype _seg *spritetable;\r
// unsigned *shifttabletable[8];\r
//from 16_mm\r
//==========================================================================\r
\r
-#define MAXBLOCKS 800//kd=1300 wolf3d=700 cata=600\r
+#define MAXBLOCKS 1024 //kd=1300 wolf3d=700 cata=600\r
\r
typedef struct mmblockstruct\r
{\r
- unsigned start,length;\r
+ //word start,length, blob; //for data larger than 64k\r
+ word start; dword length;\r
unsigned attributes;\r
memptr *useptr; // pointer to the segment start\r
struct mmblockstruct far *next;\r
#define NOGRAPHICS\r
#define NOAUDIO\r
\r
-#define MAPHEADERLINKED\r
+//#define MAPHEADERLINKED\r
//#define GRHEADERLINKED\r
-#define AUDIOHEADERLINKED\r
+//#define AUDIOHEADERLINKED\r
\r
#define NUMMAPS 4//39\r
#define NUMSNDCHUNKS 4//3\r
#define GDICTNAME DATADIR"vgadict."\r
#define GHEADNAME DATADIR"vgahead."\r
#define GFILENAME DATADIR"vgagraph."\r
-#define EXTENSION "hb1"\r
\r
\r
+#define MAPSEGBUF mapsegs\r
+#define MAPSEGPTR MAPSEGBUF[0]\r
+#define MAPSEGINLM (gvar->ca.MAPSEGPTR)\r
+\r
typedef struct\r
{\r
word bit0,bit1; // 0-255 is a character, > is a pointer to a node\r
\r
typedef struct\r
{\r
- int mapon, mapnum;\r
- maptype _seg *mapheaderseg[NUMMAPS];\r
-} ca_mapinfo_t;\r
+ unsigned RLEWtag;\r
+ long headeroffsets[100];\r
+ byte tileinfo[];\r
+} mapfiletype;\r
\r
typedef struct\r
{\r
{\r
byte ca_levelbit,ca_levelnum;\r
ca_handle_t file; //files to open\r
- ca_mapinfo_t camap;\r
\r
byte _seg *tinf;//?? where in the id engine is this used and what is it? --sparky4\r
+ int mapon, mapnum;\r
+ maptype _seg *mapheaderseg[NUMMAPS];\r
unsigned _seg *mapsegs[MAPPLANES];\r
void _seg *grsegs[NUMCHUNKS];\r
byte far grneeded[NUMCHUNKS];\r
#ifdef GRHEADERLINKED\r
huffnode *grhuffman;\r
#else\r
- huffnode grhuffman[255];\r
+ huffnode grhuffman[63];\r
#endif\r
\r
#ifdef AUDIOHEADERLINKED\r
huffnode *audiohuffman;\r
#else\r
- huffnode audiohuffman[255];\r
+ huffnode audiohuffman[63];\r
#endif\r
\r
CASVT chunkcomplen,chunkexplen;//long\r
\r
sd_t sd;\r
//TODO: extend! and learn from keen/wolf/catacomb's code wwww\r
- memptr spribuff;\r
+ memptr spribuff[64]; //temp\r
} ca_t;\r
\r
//==========================================================================\r
in_info_t in; // 16_in info\r
player_t player[MaxPlayers]; // player vars\r
map_view_t mv[4];\r
+ map_t map;\r
// sw_t sw;\r
boolean DLStarted;\r
} global_game_variables_t;\r