+typedef struct\r
+{\r
+ int x; //entity exact position on the viewable map\r
+ int y; //entity exact position on the viewable map\r
+ int tx; //entity tile position on the viewable map\r
+ int ty; //entity tile position on the viewable map\r
+\r
+#ifdef __WATCOMC__\r
+ sprite_t spri; // sprite used by entity\r
+#endif\r
+ sword hp; //hitpoints of the entity\r
+} static_map_entity_t;\r
+\r
+//===========================================================================//\r
+\r
+//TODO: 16_mm and 16_ca must handle this\r
+typedef struct {\r
+#ifdef __WATCOMC__\r
+ sprite_t *spri; // I will probibaly use this --sparky4\r
+#endif\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
+typedef struct {\r
+ byte layername[8];\r
+ byte *data; //TODO: 16_mm and 16_ca must handle this\r
+} mapl_t; //map layer array type def\r
+\r
+#define MAPPLANES 3\r
+typedef struct {\r
+ //long planestart[3];\r
+ //unsigned planelength[3];\r
+ mapl_t layerdata[MAPPLANES]; // 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];\r
+} map_t;\r
+\r
+//===================================//\r
+\r
+typedef struct{\r
+ word tw; /* screen width in tiles */\r
+ word th; /* screen height in tiles */\r
+ word tilesw; /* virtual screen width in tiles */\r
+ word tilesh; /* virtual screen height in tiles */\r
+ sword tilemidposscreenx; /* middle tile x position */ /* needed for scroll system to work accordingly */\r
+ sword tilemidposscreeny; /* middle tile y position */ /* needed for scroll system to work accordingly */\r
+ sword tileplayerposscreenx; /* player position on screen */ /* needed for scroll and map system to work accordingly */\r
+ sword tileplayerposscreeny; /* player position on screen */ /* needed for scroll and map system to work accordingly */\r
+} pagetileinfo_t;\r
+\r
+typedef struct {\r
+ nibble/*word*/ id; /* the Identification number of the page~ For layering~ */\r
+ byte far* data; /* the data for the page */\r
+ pagetileinfo_t ti; // the tile information of the page\r
+ word dx; /* col we are viewing on virtual screen (on page[0]) */ /* off screen buffer on the left size */\r
+ word dy; /* row we are viewing on virtual screen (on page[0]) */ /* off screen buffer on the top size */\r
+ word sw; /* screen width */ /* resolution */\r
+ word sh; /* screen heigth */ /* resolution */\r
+ word width; /* virtual width of the page */\r
+ word height; /* virtual height of the page */\r
+ word stridew; /* width/4 */ /* VGA */\r
+ word pagesize; /* page size */\r
+ word pi; /* increment page by this much to preserve location */\r
+ int tlx,tly;\r
+//newer vars\r
+//TODO: find where they are used\r
+ sword delta; // How much should we shift the page for smooth scrolling\r
+} page_t;\r
+\r