X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Flib%2F16_tdef.h;h=d1220d54c67826e1af1020a116b95e934f10ab2a;hb=d26e0714368d1cfbe4caee5d6309cf97e0af55db;hp=ec6caf5b6e37250d7135d947f42250cf20173f59;hpb=ee8d91badeddfd72009507e8eb38710532c29901;p=16.git diff --git a/src/lib/16_tdef.h b/src/lib/16_tdef.h index ec6caf5b..d1220d54 100755 --- a/src/lib/16_tdef.h +++ b/src/lib/16_tdef.h @@ -50,10 +50,10 @@ typedef struct { typedef struct { byte far **data; - word ntiles; /* the number of tiles */ - word twidth; /* width of the tiles */ - word theight; /* height of the tiles */ - byte *palette; /* palette for the tile set */ + word ntiles; // the number of tiles + word twidth; // width of the tiles + word theight; // height of the tiles + byte *palette; // palette for the tile set } tileset_t; typedef struct { @@ -64,31 +64,48 @@ typedef struct { byte *palette; } planar_buf_t; +//===========================================================================// + //TODO: 16_mm and 16_ca must handle this typedef struct { - bitmap_t far *btdata; //old - planar_buf_t far *data; //old - word tileHeight, tileWidth; + bitmap_t far *pcximg; //I will probibaly use this --sparky4 + //planar_buf_t far *pbdata; //old + word tileHeight, tileWidth; //defined by mapfile unsigned int rows, cols; -// #ifdef __DEBUG__ -// boolean debug_text; //show the value of the tile! wwww -// byte *debug_data; -// #endif -} tiles_t; + byte imgname[8]; //image file of tileset (set to 8 because DOS ^^;) +} tiles_t; //seems to be the tileset properties //TODO: 16_mm and 16_ca must handle this //TODO: add variables from 16_ca +//#define __NEWMAPTILEDATAVARS__ +#define MAPLAYERS 4 +#ifdef __NEWMAPTILEDATAVARS__ +#define MAPTILESPTR layertile[0] +#define MAPTILESPTK layertile[k] +#define MAPDATAPTR layerdata[0] +#define MAPDATAPTK layerdata[k] +#else +#define MAPTILESPTR tiles//layertile[0] +#define MAPTILESPTK tiles//layertile[k] +#define MAPDATAPTR data//layerdata[0] +#define MAPDATAPTK data//layerdata[k] +#endif typedef struct { //long planestart[3]; //unsigned planelength[3]; +#ifndef __NEWMAPTILEDATAVARS__ byte *data; //TODO: 16_mm and 16_ca must handle this - byte * far *layerdata; //TODO: 16_mm and 16_ca must handle this tiles_t *tiles; //TODO: 16_mm and 16_ca must handle this - tiles_t * far *layertile; //TODO: 16_mm and 16_ca must handle this +#else + byte far *layerdata[MAPLAYERS]; // mapdata for multilayer (map index values for rendering which image on the tile) + tiles_t far *layertile[MAPLAYERS]; // tilesets for layers (currently ony 4 can be loaded wwww) +#endif int width, height; //this has to be signed! - char name[16]; + byte name[16]; } map_t; +//===================================// + typedef struct{ word tw; /* screen width in tiles */ word th; /* screen height in tiles */ @@ -98,12 +115,12 @@ typedef struct{ sword tilemidposscreeny; /* middle tile y position */ /* needed for scroll system to work accordingly */ sword tileplayerposscreenx; /* player position on screen */ /* needed for scroll and map system to work accordingly */ sword tileplayerposscreeny; /* player position on screen */ /* needed for scroll and map system to work accordingly */ -} tileinfo_t; +} pagetileinfo_t; typedef struct { nibble/*word*/ id; /* the Identification number of the page~ For layering~ */ byte far* data; /* the data for the page */ - tileinfo_t ti; + pagetileinfo_t ti; word dx; /* col we are viewing on virtual screen (on page[0]) */ /* off screen buffer on the left size */ word dy; /* row we are viewing on virtual screen (on page[0]) */ /* off screen buffer on the top size */ word sw; /* screen width */ /* resolution */ @@ -494,9 +511,10 @@ typedef struct typedef struct { int mapon, mapnum; - __SEGA *mapsegs[4]; - __SEGA *mapheaderseg[NUMMAPS]; - __SEGA *tinf; + //__SEGA *mapsegs[4]; + //__SEGA *mapheaderseg[NUMMAPS]; + //__SEGA *tinf; + memptr mapsegs; } ca_mapinfo_t; typedef struct @@ -540,6 +558,7 @@ typedef struct #ifdef __WATCOMC__ extern char global_temp_status_text[512]; +extern char global_temp_status_text2[512]; #define EINVFMT EMFILE #endif #endif /* _TYPEDEFSTRUCT_H_ */