]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/16_tdef.h
==== INITIAL LAYER MAP STUFF DONE, added mapdraw layer ontop of bg, going to implemen...
[16.git] / src / lib / 16_tdef.h
index 4700625ef6ef33979c4d44b8939400e6c20763dc..24552c73877b3810d6bce11013e8ede783aa0d51 100755 (executable)
@@ -48,6 +48,22 @@ typedef struct {
        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
+       word height;            // height of the image (spread across 4 planes)\r
+       word pwidth;            // the number of bytes in each plane\r
+       byte *palette;\r
+} planar_buf_t;\r
+\r
 //from 16_sprit.h\r
 #ifdef __WATCOMC__\r
 typedef struct sprite\r
@@ -71,67 +87,42 @@ typedef struct sprite
 } sprite_t;\r
 #endif\r
 \r
-typedef struct {\r
-       //byte far **data;\r
-//#ifdef       __WATCOMC__\r
-       //sprite_t *spri;\r
-//#endif\r
-       bitmap_t far *data;     // actual tileset info\r
-//in the bitmap_t\r
-//     byte *palette;          // palette for the tile set\r
-       word ntiles;                    // the number of tiles\r
-       word twidth;            // width of the tiles\r
-       word theight;           // height of the tiles\r
-       byte    imgname[8];             // image filename of tileset\r
-} tileset_t;\r
-\r
-//not currently using\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
-       word height;            // height of the image (spread across 4 planes)\r
-       word pwidth;            // the number of bytes in each plane\r
-       byte *palette;\r
-} planar_buf_t;\r
+//===========================================================================//\r
 \r
-//tile properties\r
+//TODO: 16_mm and 16_ca must handle this\r
 typedef struct {\r
-       //bitmap_t far *btdata;         //old\r
-       tileset_t       tileset;                        //new\r
-       word tileHeight, tileWidth;\r
-       word rows, cols;\r
-} tiles_t;\r
+       bitmap_t far *pcximg;           // old\r
+#ifdef __WATCOMC__\r
+       sprite_t *spri;                 // I will probibaly use this --sparky4\r
+#endif\r
+       //planar_buf_t far *pbdata;     //old\r
+       word tileHeight, tileWidth;     //defined by mapfile\r
+       unsigned int rows, cols;\r
+       byte    imgname[8];             //image file of tileset (set to 8 because DOS ^^;)\r
+} tiles_t;     //seems to be the tileset properties\r
 \r
 //TODO: 16_mm and 16_ca must handle this\r
 //TODO: add variables from 16_ca\r
-#define MAPLAYERS 4\r
-//#define __NEWMAPTILEDATAVARS__\r
-\r
-#ifdef __NEWMAPTILEDATAVARS__\r
-#define MAPTILESPTR            layertile[0]\r
-#define MAPTILESPTK            layertile[k]\r
-#define MAPDATAPTR             layerdata[0]\r
-#define MAPDATAPTK             layerdata[k]\r
-#else\r
+typedef struct {\r
+       byte    *layername;\r
+       byte    *data;                  //TODO: 16_mm and 16_ca must handle this\r
+} mapl_t;      //map layer array type def\r
+\r
+#define MAPLAYERS 3\r
+\r
 #define MAPTILESPTR            tiles//layertile[0]\r
 #define MAPTILESPTK            tiles//layertile[k]\r
-#define MAPDATAPTR             data//layerdata[0]\r
-#define MAPDATAPTK             data//layerdata[k]\r
-#endif\r
 typedef struct {\r
        //long          planestart[3];\r
        //unsigned      planelength[3];\r
-#ifndef __NEWMAPTILEDATAVARS__\r
-       byte            *data;                  //TODO: 16_mm and 16_ca must handle this\r
-       tiles_t         *tiles;         //TODO: 16_mm and 16_ca must handle this\r
-#else\r
-       byte far        *layerdata[MAPLAYERS];  //mapindex for specific layer\r
-       tiles_t far     *layertile[MAPLAYERS];\r
-#endif\r
+       mapl_t layerdata[MAPLAYERS];    // mapdata for multilayer (map index values for rendering which image on the tile)\r
+       tiles_t *tiles;         //TODO: 16_mm and 16_ca must handle this        // tilesets for layers (currently ony 4 can be loaded wwww)\r
        int width, height;              //this has to be signed!\r
-       byte name[16];          //mapname/maptitle\r
+       byte name[16];\r
 } map_t;\r
 \r
+//===================================//\r
+\r
 typedef struct{\r
        word tw;                /* screen width in tiles */\r
        word th;                /* screen height in tiles */\r
@@ -277,6 +268,7 @@ typedef struct
        word clock_start;       //timer start\r
        word *clock;    //current time on clock\r
        boolean fpscap; //cap the fps var\r
+       nibble wcpu;    //stored value of cpu type\r
 } kurokku_t;\r
 \r
 //video\r
@@ -328,6 +320,7 @@ typedef struct
        nibble __near *p;       // pointer to video's render page num\r
        nibble __near *sp;      // pointer to video's show page num\r
        int dx, dy;     // draw row and col var\r
+       word dxt,dyt;\r
 //newer vars!\r
        int delta, d;\r
 } map_view_t;\r