if(player[plid].enti.q==4)\r
#endif\r
// if(id==0)\r
- mapDrawCol(&mv[id], mv[0].tx + mv[0].page->ti.tw, mv[0].ty-1, x, player, DRAWCOLNUM);\r
+ mapDrawCol(&mv[id], mv[0].tx + mv[0].page->ti.tw, mv[0].ty-1, x, player);\r
// else\r
// if(mv[0].video->vga_state.bgps)\r
// modexCopyPageRegion(mv->page, mv[0].page, x, 0, x, 0, mv[0].map->tiles->tileWidth, mv[0].page->height);\r
if(player[plid].enti.q==4)\r
#endif\r
// if(id==0)\r
- mapDrawCol(&mv[id], mv[0].tx - 1, mv[0].ty-1, x, player, DRAWCOLNUM);\r
+ mapDrawCol(&mv[id], mv[0].tx - 1, mv[0].ty-1, x, player);\r
// else\r
// if(mv[0].video->vga_state.bgps)\r
// modexCopyPageRegion(mv->page, mv[0].page, x, 0, x, 0, mv[0].map->tiles->tileWidth, mv[0].page->height);\r
if(player[plid].enti.q==4)\r
#endif\r
// if(id==0)\r
- mapDrawRow(&mv[id], mv[0].tx - 1, mv[0].ty-1, y, player, DRAWROWNUM);\r
+ mapDrawRow(&mv[id], mv[0].tx - 1, mv[0].ty-1, y, player);\r
// else\r
// if(mv[0].video->vga_state.bgps)\r
// modexCopyPageRegion(mv->page, mv[0].page, 0, y, 0, y, mv[0].page->width, mv[0].map->tiles->tileHeight);\r
if(player[plid].enti.q==4)\r
#endif\r
// if(id==0)\r
- mapDrawRow(&mv[id], mv[0].tx - 1, mv[0].ty+mv[0].page->ti.th, y, player, DRAWROWNUM);\r
+ mapDrawRow(&mv[id], mv[0].tx - 1, mv[0].ty+mv[0].page->ti.th, y, player);\r
// else\r
// if(mv[0].video->vga_state.bgps)\r
// modexCopyPageRegion(mv->page, mv[0].page, 0, y, 0, y, mv[0].page->width, mv[0].map->tiles->tileHeight);\r
}\r
}\r
#define PALMAPDRAWW 13\r
-void near mapDrawRow(map_view_t *mv, int tx, int ty, word y, player_t *player, word poopoffset)\r
+void near mapDrawRow(map_view_t *mv, int tx, int ty, word y, player_t *player)\r
{\r
- int i; nibble z;\r
-#ifdef __DEBUG_RF__\r
-if(dbg_pagedelayrendermap) if(!y) y+=TILEWH; else y-=TILEWH;\r
+ int i;\r
+#if defined(FULLRCREND) || defined(__DEBUG_RF__)\r
+ word drawtileoffset=0;\r
+//printf("y: %d ", drawtileoffset);\r
+ drawtileoffset%=player[0].enti.spt;\r
+//printf("%d\n", drawtileoffset);\r
#endif\r
- poopoffset%=player[0].enti.spt;\r
-//printf("y: %d\n", poopoffset);\r
#ifdef __DEBUG_RF__\r
-if(dbg_pagedelayrendermap){ sprintf(global_temp_status_text, "%-3u", poopoffset); modexprint(mv->page, player[0].enti.x, player[0].enti.y-28-(poopoffset*8) , 1, 0, PALMAPDRAWW, 1, 1, global_temp_status_text); }\r
+if(dbg_pagedelayrendermap){ if(!y) y+=TILEWH; else y-=TILEWH;\r
+ sprintf(global_temp_status_text, "%-3u", drawtileoffset); modexprint(mv->page, player[0].enti.x, player[0].enti.y-28-(drawtileoffset*8) , 1, 0, PALMAPDRAWW, 1, 1, global_temp_status_text); }\r
#endif\r
/* the position within the map array */\r
i=ty * mv->map->width + tx;\r
- for( mv->dx=poopoffset; mv->dx<(mv->page->sw+mv->dxThresh)/(poopoffset+1) && tx < mv->map->width; mv->dx+=mv->map->tiles->tileWidth, tx++) {\r
- if(i>=0){\r
+ /*\r
+ */\r
+#ifndef FULLRCREND\r
+ for( mv->dx=drawtileoffset; mv->dx<(mv->page->sw+mv->dxThresh)/(drawtileoffset+1) && tx < mv->map->width; mv->dx+=mv->map->tiles->tileWidth, tx++) {\r
+#else\r
+ for(mv->dx=0; mv->dx<mv->page->sw+mv->dxThresh && tx < mv->map->width; mv->dx+=mv->map->tiles->tileWidth, tx++) {\r
+#endif\r
+ if(i>=0)\r
mapDrawTile(mv->map->tiles, mv->map->layerdata[0].data[i], mv->page, mv->dx, y);\r
- for(z=1;z<=2;z++)\r
- if(mv->map->layerdata[z].data[i]){\r
- sprintf(global_temp_status_text2, "%u", mv->map->layerdata[z].data[i]); modexprint(mv->page, mv->dx, y, 1, 0, PALMAPDRAWW, z+2, 1, global_temp_status_text2);\r
- //mapDrawTile(mv->map->tiles, mv->map->layerdata[z].data[i], mv->page, mv->dx, y);\r
- }\r
- }\r
i++; /* next! */\r
}\r
#ifdef __DEBUG_RF__\r
#endif\r
}\r
\r
-void near mapDrawCol(map_view_t *mv, int tx, int ty, word x, player_t *player, word poopoffset)\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+void near mapDrawCol(map_view_t *mv, int tx, int ty, word x, player_t *player)\r
{\r
- int i; nibble z;\r
-#ifdef __DEBUG_RF__\r
-if(dbg_pagedelayrendermap) if(!x) x+=TILEWH; else x-=TILEWH;\r
+ int i;\r
+#if defined(FULLRCREND) || defined(__DEBUG_RF__)\r
+ word drawtileoffset=0;\r
+//printf("x: %d ", drawtileoffset);\r
+ drawtileoffset%=player[0].enti.spt;\r
+//printf("%d\n", drawtileoffset);\r
#endif\r
- poopoffset%=player[0].enti.spt;\r
-//printf("x: %d\n", poopoffset);\r
#ifdef __DEBUG_RF__\r
-if(dbg_pagedelayrendermap){ sprintf(global_temp_status_text, "%-3u", poopoffset); modexprint(mv->page, player[0].enti.x, player[0].enti.y-28-(poopoffset*8) , 1, 0, PALMAPDRAWW, 1, 1, global_temp_status_text); }\r
+if(dbg_pagedelayrendermap){ if(!x) x+=TILEWH; else x-=TILEWH;\r
+ sprintf(global_temp_status_text, "%-3u", drawtileoffset); modexprint(mv->page, player[0].enti.x, player[0].enti.y-28-(drawtileoffset*8) , 1, 0, PALMAPDRAWW, 1, 1, global_temp_status_text); }\r
#endif\r
/* location in the map array */\r
i=ty * mv->map->width + tx;\r
/* We'll copy all of the columns in the screen,\r
i + 1 row above and one below */\r
- for( mv->dy=poopoffset; mv->dy<(mv->page->sh+mv->dyThresh)/(poopoffset+1) && ty < mv->map->height; mv->dy+=mv->map->tiles->tileHeight, ty++) {\r
- if(i>=0){\r
+#ifndef FULLRCREND\r
+ for( mv->dy=drawtileoffset; mv->dy<(mv->page->sh+mv->dyThresh)/(drawtileoffset+1) && ty < mv->map->height; mv->dy+=mv->map->tiles->tileHeight, ty++) {\r
+#else\r
+ for(mv->dy=0; mv->dy<mv->page->sh+mv->dyThresh && ty < mv->map->height; mv->dy+=mv->map->tiles->tileHeight, ty++) {\r
+#endif\r
+ if(i>=0)\r
mapDrawTile(mv->map->tiles, mv->map->layerdata[0].data[i], mv->page, x, mv->dy);\r
- for(z=1;z<=2;z++)\r
- if(mv->map->layerdata[z].data[i]){\r
- sprintf(global_temp_status_text2, "%u", mv->map->layerdata[z].data[i]); modexprint(mv->page, x, mv->dy, 1, 0, PALMAPDRAWW, z+2, 1, global_temp_status_text2);\r
- //mapDrawTile(mv->map->tiles, mv->map->layerdata[z].data[i], mv->page, x, mv->dy);\r
- }\r
- }\r
i += mv->map->width;\r
}\r
#ifdef __DEBUG_RF__\r
#define PCXBMPPTR PCXBMPVAR\r
\r
//row and colum drawing routines\r
-//#define FULLRCREND\r
+#define FULLRCREND\r
+//#ifdef FULLRCREND\r
#define DRAWCOLNUM mv->page[id].dx\r
#define DRAWROWNUM mv->page[id].dy\r
-//#define DRAWCOLNUM pl[plid].enti.q\r
-//#define DRAWROLNUM pl[plid].enti.q\r
+//#else\r
+//#define DRAWCOLNUM player[plid].enti.q\r
+//#define DRAWROWNUM player[plid].enti.q\r
+//#endif\r
\r
//for null map!\r
#define MAPW 40\r
\r
extern struct glob_game_vars *ggvv;\r
#ifdef __DEBUG_RF__\r
-#define DBG_RFDELAYMETHOD delay(250);\r
+#define DBG_RFDELAYMETHOD delay(500);\r
#endif\r
\r
//===========================================================================//\r
void ZC_mapinitMV(map_view_t *mv, int tx, int ty);\r
void ZC_mapredraw(map_view_t *mv, int tx, int ty);\r
void near mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y);\r
-void near mapDrawRow(map_view_t *mv, int tx, int ty, word y, player_t *player, word poopoffset);\r
-void near mapDrawCol(map_view_t *mv, int tx, int ty, word x, player_t *player, word poopoffset);\r
+void near mapDrawRow(map_view_t *mv, int tx, int ty, word y, player_t *player);\r
+void near mapDrawCol(map_view_t *mv, int tx, int ty, word x, player_t *player);\r
void mapDrawWRow(map_view_t *mv, int tx, int ty, word y);\r
void mapDrawWCol(map_view_t *mv, int tx, int ty, word x);\r
inline void near ScrollRight(map_view_t *mv, player_t *pl, word id, word plid)\r