From: sparky4 Date: Wed, 8 Jun 2016 16:38:43 +0000 (-0500) Subject: rendering comparisons are made ^^ X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=895b5d145c4fc5597fefd85a43e5636222e44cd5;p=16.git rendering comparisons are made ^^ --- diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index fe14b507..94a9d59f 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -604,7 +604,11 @@ void mapGoTo(map_view_t *mv, int tx, int ty) i+=mv->map->width - tx; } //modexCopyPageRegion(mv[1].page, mv[0].page, 0, 0, 0, 0, mv[0].page->width, mv[0].page->height); - _fmemmove(mv[1].page->data, mv[0].page->data, mv[0].page->pagesize); + /* block copy pattern to where we will draw the sprite */ + vga_setup_wm1_block_copy(); + _fmemcpy(mv[1].page->data, mv[0].page->data, mv[0].page->pagesize); + /* must restore Write Mode 0/Read Mode 0 for this code to continue drawing normally */ + vga_restore_rm0wm0(); modexCopyPageRegion(mv[3].page, mv[!(mv->video->p)].page, 0/**/, 0/**/, 0, 128, 28, 36); } @@ -789,7 +793,11 @@ void shinku(global_game_variables_t *gv) if(pageflipflop){ if(gv->video.r){ //modexCopyPageRegion(&(gv->video.page[(gv->video.p)]), &(gv->video.page[(!gv->video.p)]), 0, 0, 0, 0, gv->video.page[gv->video.p].width, gv->video.page[!gv->video.p].height); + /* block copy pattern to where we will draw the sprite */ + vga_setup_wm1_block_copy(); _fmemmove((gv->video.page[(gv->video.p)]).data, (gv->video.page[(!gv->video.p)]).data, gv->video.page[(!gv->video.p)].pagesize); + /* must restore Write Mode 0/Read Mode 0 for this code to continue drawing normally */ + vga_restore_rm0wm0(); modexShowPage(&(gv->video.page[gv->video.p])); gv->video.p=!gv->video.p; gv->video.r=!gv->video.r; diff --git a/src/scroll.c b/src/scroll.c index 9e06c84b..e33d0c03 100755 --- a/src/scroll.c +++ b/src/scroll.c @@ -190,7 +190,7 @@ void main(int argc, char *argv[]) //IN_initplayer(&player, 1); #ifndef SPRITE - modexClearRegion(mv[1].page, player[0].x-4, player[0].y-TILEWH, 24, 32, 15); + modexClearRegion(mv[1].page, player[0].x, player[0].y-TILEWH, 24, 32, 15); #else //PBUFSFUN(mv[1].page, player[0].x-4, player[0].y-TILEWH, 24, 64, 24, 32, PLAYERBMPDATA); PBUFSFUN(mv[1].page, player[0].x-4, player[0].y-TILEWH, 24, 64, 24, 32, &pp); @@ -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 ", gvar.video.p); printf("gvar.video.r=%u ", gvar.video.r); printf("pageflipflop=%u\n", pageflipflop); printf("\ngvar.video.tickclk=%f\n", gvar.video.tickclk); printf("gvar.video.clk=%f", gvar.video.clk);