From: sparky4 Date: Thu, 26 Jan 2017 17:00:13 +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=786882743258ea46b79ece3cb64b7be1e5156a46;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/scroll16.c b/src/lib/scroll16.c index 640db904..42b061d4 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -766,12 +766,17 @@ 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); + poopoffset%=player[0].enti.speed; poopoffset++; +//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-(poopoffset*8), 1, 2, 1, global_temp_status_textR); /* the position within the map array */ 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++) { + + + + for( x=poopoffset*mv->map->tiles->tileWidth; + x<(mv->page->sw+mv->dxThresh)/(poopoffset+1) && tx < mv->map->width; + x+=mv->map->tiles->tileWidth, tx++) { if(i>=0) { if(pagedelayrendermap) delay(20); /* we are in the map, so copy! */ @@ -788,15 +793,17 @@ if(pagedelayrendermap) if(!x) x+=TILEWH; else x-=TILEWH; - poopoffset%=player[0].enti.speed; + poopoffset%=player[0].enti.speed; poopoffset++; //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); + sprintf(global_temp_status_textR, "x:%u", poopoffset); modexprint(mv[0].page, player[0].enti.x, player[0].enti.y-28-(poopoffset*8), 1, 2, 1, global_temp_status_textR); /* location in the map array */ i=ty * mv->map->width + tx; /* We'll copy all of the columns in the screen, 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++) { + for( y=poopoffset*mv->map->tiles->tileHeight; + y<(mv->page->sh+mv->dyThresh)/(poopoffset+1) && ty < mv->map->height; + y+=mv->map->tiles->tileHeight, ty++) { if(i>=0) { if(pagedelayrendermap) delay(20); /* we are in the map, so copy away! */ diff --git a/src/lib/scroll16.h b/src/lib/scroll16.h index 9c86327e..a3287434 100755 --- a/src/lib/scroll16.h +++ b/src/lib/scroll16.h @@ -55,11 +55,11 @@ #define PCXBMPPTR PCXBMPVAR //row and colum drawing routines -#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 +//#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; @@ -70,6 +70,7 @@ typedef struct { word dyThresh; //Threshold for physical tile switch video_t *video; //pointer to game variables of the video nibble *panp; // pointer to video's pan page num + int drawx, drawy; // draw row and col var //newer vars! int dx, dy, delta, d; } map_view_t;