From: sparky4 Date: Thu, 26 Jan 2017 16:43:43 +0000 (-0600) Subject: showing row and colum drawing the fore loop in draw row is causing it to be slow... X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=29444623c3880a072e9313f835aacdf6054def9b;p=16.git showing row and colum drawing the fore loop in draw row is causing it to be slow wwwww --- diff --git a/src/lib/16_tail.h b/src/lib/16_tail.h index a90d9ca7..932d557f 100755 --- a/src/lib/16_tail.h +++ b/src/lib/16_tail.h @@ -44,7 +44,7 @@ if(IN_KeyDown(sc_F9)){ pagenorendermap=!pagenorendermap; IN_UserInput(1,1); } \ if(IN_KeyDown(sc_F7)){ ZC_ShowMV(&mv, 0, 1); IN_UserInput(1,1); } \ if(IN_KeyDown(sc_F6)){ ZC_ShowMV(&mv, 0, 0); IN_UserInput(1,1); } \ - if(IN_KeyDown(sc_F3)){ pagedelayrendermap=!pagedelayrendermap; IN_UserInput(1,1); } \ + if(IN_KeyDown(sc_F5)){ pagedelayrendermap=!pagedelayrendermap; IN_UserInput(1,1); } \ if(IN_KeyDown(sc_T)){ gvar.video.rss=!gvar.video.rss; IN_UserInput(1,1); } \ if(IN_KeyDown(sc_P)){ modexpdump(&gvar.video.page[0]); IN_UserInput(1,1); } diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index 0e2e847b..640db904 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -762,11 +762,10 @@ char global_temp_status_textC[512]; void near mapDrawRow(map_view_t *mv, int tx, int ty, word y, player_t *player, word poopoffset) { int x, i; -#ifdef SHOWDRAWRCREND - if(!y) y+=TILEWH*2; - else y-=TILEWH*2; -// printf("y: %d\n", y); -#endif +if(pagedelayrendermap) + if(!y) y+=TILEWH; + else y-=TILEWH; + poopoffset%=player[0].enti.speed; // printf("y: %d\n", poopoffset); // sprintf(global_temp_status_textR, "y:%u", poopoffset); modexprint(mv[0].page, player[0].enti.x, player[0].enti.y-28, 1, 2, 1, global_temp_status_textR); @@ -774,7 +773,7 @@ void near mapDrawRow(map_view_t *mv, int tx, int ty, word y, player_t *player, w i=ty * mv->map->width + tx; for(x=poopoffset; x<(mv->page->sw+mv->dxThresh)/(poopoffset+1) && tx < mv->map->width; x+=mv->map->tiles->tileWidth, tx++) { if(i>=0) { - if(pagedelayrendermap) delay(400); + if(pagedelayrendermap) delay(20); /* we are in the map, so copy! */ mapDrawTile(mv->map->tiles, mv->map->data[i], mv->page, x, y); } @@ -785,11 +784,10 @@ void near mapDrawRow(map_view_t *mv, int tx, int ty, word y, player_t *player, w void near mapDrawCol(map_view_t *mv, int tx, int ty, word x, player_t *player, word poopoffset) { int y, i; -#ifdef SHOWDRAWRCREND - if(!x) x+=TILEWH*2; - else x-=TILEWH*2; -// printf("x: %d\n", x); -#endif +if(pagedelayrendermap) + if(!x) x+=TILEWH; + else x-=TILEWH; + poopoffset%=player[0].enti.speed; //printf("x: %d\n", poopoffset); // sprintf(global_temp_status_textR, "x:%u", poopoffset); modexprint(mv[0].page, player[0].enti.x, player[0].enti.y-28, 1, 2, 1, global_temp_status_textR); @@ -800,7 +798,7 @@ void near mapDrawCol(map_view_t *mv, int tx, int ty, word x, player_t *player, w i + 1 row above and one below */ for(y=poopoffset; y<(mv->page->sh+mv->dyThresh)/(poopoffset+1) && ty < mv->map->height; y+=mv->map->tiles->tileHeight, ty++) { if(i>=0) { - if(pagedelayrendermap) delay(400); + if(pagedelayrendermap) delay(20); /* we are in the map, so copy away! */ mapDrawTile(mv->map->tiles, mv->map->data[i], mv->page, x, y); } diff --git a/src/lib/scroll16.h b/src/lib/scroll16.h index 643c68f0..9c86327e 100755 --- a/src/lib/scroll16.h +++ b/src/lib/scroll16.h @@ -55,10 +55,11 @@ #define PCXBMPPTR PCXBMPVAR //row and colum drawing routines -//#define FULLRCREND -#define SHOWDRAWRCREND -#define DRAWCOLNUM player[plid].enti.q//mv->page[0].dx -#define DRAWROLNUM player[plid].enti.q//mv->page[0].dy +#define FULLRCREND +#define DRAWCOLNUM mv->page[0].dx +#define DRAWROLNUM mv->page[0].dy +//#define DRAWCOLNUM player[plid].enti.q +//#define DRAWROLNUM player[plid].enti.q typedef struct { map_t *map;