byte *palette;\r
} planar_buf_t;\r
\r
+//===========================================================================//\r
+\r
//TODO: 16_mm and 16_ca must handle this\r
typedef struct {\r
- bitmap_t far *pcximg; //old\r
- //planar_buf_t far *data; //old\r
+ bitmap_t far *pcximg; //I will probibaly use this --sparky4\r
+ //planar_buf_t far *pbdata; //old\r
word tileHeight, tileWidth; //defined by mapfile\r
unsigned int rows, cols;\r
-// #ifdef __DEBUG__\r
-// boolean debug_text; //show the value of the tile! wwww\r
-// byte *debug_data;\r
-// #endif\r
- byte imgname[8]; //image file of tileset\r
-} tiles_t;\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
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;\r
- tiles_t far *layertile[MAPLAYERS];\r
+ byte far *layerdata[MAPLAYERS]; // mapdata for multilayer (map index values for rendering which image on the tile)\r
+ tiles_t far *layertile[MAPLAYERS]; // tilesets for layers (currently ony 4 can be loaded wwww)\r
#endif\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 ry;\r
//word textx=0, texty=0;\r
//if(i==0) i=2;\r
- if(i==0)\r
+ switch(i)\r
{\r
- //wwww\r
- modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, 1); //currently the over scan color!\r
- }\r
- else\r
- {\r
- rx = (((i-1) % ((t->pcximg->width)/t->tileWidth)) * t->tileWidth);\r
- ry = (((i-1) / ((t->pcximg->height)/t->tileHeight)) * t->tileHeight);\r
+ case 0:\r
+ //wwww\r
+ modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, 1); //currently the over scan color!\r
+ break;\r
+ default:\r
+ rx = (((i-1) % ((t->pcximg->width)/t->tileWidth)) * t->tileWidth);\r
+ ry = (((i-1) / ((t->pcximg->height)/t->tileHeight)) * t->tileHeight);\r
////0000printf("i=%d\n", i);\r
-#ifdef __DEBUG_MAP__\r
- switch(dbg_maptext)\r
- {\r
- case 0:\r
-#endif\r
#ifndef TILERENDER\r
- if(!pagenorendermap) modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, i+1);\r
+ if(!pagenorendermap) modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, i+1);\r
#else\r
- modexDrawBmpRegion (page, x, y, rx, ry, t->tileWidth, t->tileHeight, i);\r
- /* then the sprite. note modding ram ptr means we just draw to (x&3,0) */\r
- //draw_vrl1_vgax_modex(x-rx,y-ry,vrl_header,vrl_lineoffs,buffer+sizeof(*vrl_header),bufsz-sizeof(*vrl_header));\r
- //modexDrawBmpRegion (page, x, y, rx, ry, t->tileWidth, t->tileHeight, (t->data));\r
-#endif\r
-#ifdef __DEBUG_MAP__\r
- break;\r
- case 1:\r
- if(!pagenorendermap) modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, i);\r
- sprintf(global_temp_status_text2, "%d", i);\r
- modexprint(page, x, y, 1, 1, 2, global_temp_status_text2);\r
- break;\r
- }\r
+ modexDrawBmpRegion (page, x, y, rx, ry, t->tileWidth, t->tileHeight, i);\r
+ //draw_vrl1_vgax_modex(x-rx,y-ry,vrl_header,vrl_lineoffs,buffer+sizeof(*vrl_header),bufsz-sizeof(*vrl_header));\r
+ //modexDrawBmpRegion (page, x, y, rx, ry, t->tileWidth, t->tileHeight, (t->data));\r
#endif\r
+/*#ifdef __DEBUG_MAP__\r
+ switch(dbg_maptext)\r
+ {\r
+ case 0:\r
+ break;\r
+ case 1:\r
+ sprintf(global_temp_status_text2, "%u", i); modexprint(page, x, y, 1, 1, 2, global_temp_status_text2);\r
+ break;\r
+ }\r
+#endif*/\r
+ break;\r
}\r
}\r
\r