From: sparky4 Date: Wed, 8 Jun 2016 16:18:08 +0000 (-0500) Subject: rendering comparisons are made ^^ X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=188213331d2310b79e61059d25f656f6fafc0db9;p=16.git rendering comparisons are made ^^ --- diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index 6705ee71..fe14b507 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -44,11 +44,10 @@ void walk(map_view_t *pip, player_t *player, word pn) { INC_PER_FRAME; animatePlayer(pip, player, pn, 1); - if(!pageflipflop) mapScrollRight(pip, player, !(pip[0].video->p), pn); else{ - mapScrollRight(pip, player, 0, pn); - mapScrollRight(pip, player, 1, pn); + mapScrollRight(pip, player, !(pip[0].video->p), pn); + mapScrollRight(pip, player, (pip[0].video->p), pn); ScrollRight(pip, player, 2, pn); - ScrollRight(pip, player, 3, pn); } + ScrollRight(pip, player, 3, pn); if(!pageflipflop) modexShowPage(pip[1].page); player[pn].q++; pip[0].video->clk = ((*clockw)-pip[0].video->startclk)/18.2; @@ -89,11 +88,10 @@ void walk(map_view_t *pip, player_t *player, word pn) { INC_PER_FRAME; animatePlayer(pip, player, pn, 1); - if(!pageflipflop) mapScrollLeft(pip, player, !(pip[0].video->p), pn); else{ - mapScrollLeft(pip, player, 0, pn); - mapScrollLeft(pip, player, 1, pn); + mapScrollLeft(pip, player, !(pip[0].video->p), pn); + mapScrollLeft(pip, player, (pip[0].video->p), pn); ScrollLeft(pip, player, 2, pn); - ScrollLeft(pip, player, 3, pn); } + ScrollLeft(pip, player, 3, pn); if(!pageflipflop) modexShowPage(pip[1].page); player[pn].q++; pip[0].video->clk = ((*clockw)-pip[0].video->startclk)/18.2; @@ -134,11 +132,10 @@ void walk(map_view_t *pip, player_t *player, word pn) { INC_PER_FRAME; animatePlayer(pip, player, pn, 1); - if(!pageflipflop) mapScrollDown(pip, player, !(pip[0].video->p), pn); else{ - mapScrollDown(pip, player, 0, pn); - mapScrollDown(pip, player, 1, pn); + mapScrollDown(pip, player, !(pip[0].video->p), pn); + mapScrollDown(pip, player, (pip[0].video->p), pn); ScrollDown(pip, player, 2, pn); - ScrollDown(pip, player, 3, pn); } + ScrollDown(pip, player, 3, pn); if(!pageflipflop) modexShowPage(pip[1].page); player[pn].q++; pip[0].video->clk = ((*clockw)-pip[0].video->startclk)/18.2; @@ -179,11 +176,10 @@ void walk(map_view_t *pip, player_t *player, word pn) { INC_PER_FRAME; animatePlayer(pip, player, pn, 1); - if(!pageflipflop) mapScrollUp(pip, player, !(pip[0].video->p), pn); else{ - mapScrollUp(pip, player, 0, pn); - mapScrollUp(pip, player, 1, pn); + mapScrollUp(pip, player, !(pip[0].video->p), pn); + mapScrollUp(pip, player, (pip[0].video->p), pn); ScrollUp(pip, player, 2, pn); - ScrollUp(pip, player, 3, pn); } + ScrollUp(pip, player, 3, pn); if(!pageflipflop) modexShowPage(pip[1].page); player[pn].q++; pip[0].video->clk = ((*clockw)-pip[0].video->startclk)/18.2; @@ -384,7 +380,7 @@ void near mapScrollRight(map_view_t *mv, player_t *player, word id, word plid) /* draw the next column */ x= mv[0].page->sw + mv[id].map->tiles->tileWidth; if(player[plid].q%4) - if(pageflipflop){ + if(!pageflipflop){ if(id==0) mapDrawCol(&mv[0], mv[0].tx + mv[0].page->tw, mv[0].ty-1, x, player, mv->page->dx); else @@ -414,7 +410,7 @@ void near mapScrollLeft(map_view_t *mv, player_t *player, word id, word plid) /* draw the next column */ x= 0; if(player[plid].q%4) - if(pageflipflop){ + if(!pageflipflop){ if(id==0) mapDrawCol(&mv[0], mv[0].tx - 1, mv[0].ty-1, x, player, mv->page->dx); else @@ -443,7 +439,7 @@ void near mapScrollUp(map_view_t *mv, player_t *player, word id, word plid) /* draw the next row */ y= 0; if(player[plid].q%3) - if(pageflipflop){ + if(!pageflipflop){ if(id==0) mapDrawRow(&mv[0], mv[0].tx - 1, mv[0].ty-1, y, player, mv->page->dy); else @@ -471,7 +467,7 @@ void near mapScrollDown(map_view_t *mv, player_t *player, word id, word plid) /* draw the next row */ y= mv[0].page->sh + mv[id].map->tiles->tileHeight; if(player[plid].q%3) - if(pageflipflop){ + if(!pageflipflop){ if(id==0) mapDrawRow(&mv[0], mv[0].tx - 1, mv[0].ty+mv[0].page->th, y, player, mv->page->dy); else @@ -737,7 +733,7 @@ void mapDrawWCol(map_view_t *mv, int tx, int ty, word x) }*/ unsigned char shinku_fps_indicator_page = 2; -boolean pageflipflop=0; +boolean pageflipflop; //gv->video.p /* sync */ @@ -860,7 +856,8 @@ void near animatePlayer(map_view_t *pip, player_t *player, word pn, sword scroll #define FRAME3 modexClearRegion(pip[!(pip->video->p)].page, x, y, 24, 32, dire); #define FRAME4 modexClearRegion(pip[!(pip->video->p)].page, x, y, 24, 32, 1+dire); #endif -// if(pageflipflop) + if(!pageflipflop) + modexCopyPageRegion(pip[1].page, pip[0].page, x-4, y-4, x-4, y-4, 28, 36); //modexCopyPageRegion(page_t *dest, page_t *src, word sx, word sy, word dx, word dy, word width, word height); //modexCopyPageRegion(pip[3].page, pip[!(pip->video->p)].page, x-4, y-4, 0, 128, 28, 36); /*modexCopyPageRegion(pip[pip->video->p].page, diff --git a/src/lib/scroll16.h b/src/lib/scroll16.h index 30bfc1ab..e2177aff 100755 --- a/src/lib/scroll16.h +++ b/src/lib/scroll16.h @@ -66,6 +66,7 @@ typedef struct #define MAPH 30 extern boolean pageflipflop; +extern unsigned char shinku_fps_indicator_page; //map_t allocMap(int w, int h); //void initMap(map_t *map); @@ -90,6 +91,4 @@ void mapDrawWCol(map_view_t *mv, int tx, int ty, word x); void shinku(global_game_variables_t *gv); void near animatePlayer(map_view_t *pip, player_t *player, word playnum, sword scrollswitch); -extern unsigned char shinku_fps_indicator_page; - #endif /*__SCROLL16_H_*/ diff --git a/src/scroll.c b/src/scroll.c index 2bf2f972..9e06c84b 100755 --- a/src/scroll.c +++ b/src/scroll.c @@ -321,7 +321,8 @@ void main(int argc, char *argv[]) printf("tile resolution: %dx", gvar.video.page[0].tw); printf("%d \n", gvar.video.page[0].th); printf("middle tile position: %dx", gvar.video.page[0].tilemidposscreenx); printf("%d\n", gvar.video.page[0].tilemidposscreeny); modexprintmeminfo(&gvar.video); - printf("mv[%u].tx: %d", pan.pn, mv[pan.pn].tx); printf(" mv[%u].ty: %d ", pan.pn, mv[pan.pn].ty); printf("gvar.video.p=%u\n", gvar.video.p); + //printf("mv[%u].tx: %d", pan.pn, mv[pan.pn].tx); printf(" mv[%u].ty: %d ", pan.pn, mv[pan.pn].ty); printf("gvar.video.p=%u\n", gvar.video.p); + printf("pageflipflop=%u\n", pageflipflop); printf("\ngvar.video.tickclk=%f\n", gvar.video.tickclk); printf("gvar.video.clk=%f", gvar.video.clk); printf("\n");