From 256c460e1ff6c1c5f8ee5e5536bb4f574b54e6de Mon Sep 17 00:00:00 2001 From: sparky4 Date: Wed, 27 Apr 2016 16:12:32 -0500 Subject: [PATCH] made major changes in code for the future of scroll ^^ --- SCROLL.16L | 35 ----------------------------------- src/lib/scroll16.c | 24 ++++++++++++++---------- 2 files changed, 14 insertions(+), 45 deletions(-) diff --git a/SCROLL.16L b/SCROLL.16L index a0bcf921..e69de29b 100755 --- a/SCROLL.16L +++ b/SCROLL.16L @@ -1,35 +0,0 @@ -starting timer ok -index=4096 -chkmap ok - - 1st vmem_remain=262144 - [0], video->page[i].pagesize=95744 - [0], vmem_remain=166400 - [1], video->page[i].pagesize=95744 - [1], vmem_remain=70656 - [2], video->page[i].pagesize=70400 - [2], vmem_remain=256 - [3], video->page[i].pagesize=256 - [3], vmem_remain=0 -Project 16 scroll.exe. This is just a test file! -version Apr 27 2016 13:47:19 -tx: 12 -ty: 1 -player[0].x: 160 player[0].y: 128 -player[0].tx: 22 player[0].ty: 9 -player[0].triggx: 23 player[0].triggy: 9 -player[0].hp: 4 player[0].q: 1 player[0].info.dir: 2 player[0].d: 2 -pdir=3 -tile data value at player trigger position: 1 -Virtual Screen: 352x272 -Screen: 320x240 -tile resolution: 15x15 middle tile position: 10x8 -video memory remaining: 0 - -page [0]=(a000:05b0) -[1]=(a000:6330) -[2]=(a000:bd5c) -[3]=(a000:ffb4) - - -detected CPU type: 386 or newer diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index 79585313..509f9743 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -459,9 +459,9 @@ void near ScrollDown(map_view_t *mv, player_t *player, word id, word plid) mv[0].video->page[id].data += 4; mv[0].video->page[id].dy = mv[0].map->tiles->tileWidth; } - modexClearRegion(&(mv[0].video->page[id]), 0, 0, - mv[0].video->page[id].width-1, - mv[0].video->page[id].height-1, id*2); +// modexClearRegion(&(mv[0].video->page[id]), 0, 0, +// mv[0].video->page[id].width-1, +// mv[0].video->page[id].height-1, id*2); } sword chkmap(map_t *map, word q) @@ -673,13 +673,13 @@ void shinku(global_game_variables_t *gv) byte o,o2,i; //modexCopyPageRegion(pip[1].page, pip[2].page, 16, 16, 16, 16, (14*8)+4, 8+4); /* block copy to visible RAM from offscreen */ - vga_setup_wm1_block_copy(); - modexCopyPageRegion(&(gv->video.page[shinku_fps_indicator_page]), &(gv->video.page[!shinku_fps_indicator_page]), x, y, x+w, 0, w, h); +// vga_setup_wm1_block_copy(); +// modexCopyPageRegion(&(gv->video.page[shinku_fps_indicator_page]), &(gv->video.page[!shinku_fps_indicator_page]), x, y, x+w, 0, w, h); // o = *(gv->video.page[2].data); // source offscreen // o2 = *(gv->video.page[shinku_fps_indicator_page].data)+(y * vga_state.vga_stride) + (x >> 2); // dest visible (original stride) // for (i=0;i < h;i++,o += vga_state.vga_draw_stride,o2 += vga_state.vga_stride) vga_wm1_mem_block_copy(o2,o,w >> 2); /* must restore Write Mode 0/Read Mode 0 for this code to continue drawing normally */ - vga_restore_rm0wm0(); +// vga_restore_rm0wm0(); if(elapsed_timer(gv) >= (1.0 / gv->kurokku.frames_per_second)) { sprintf(gv->pee, "%.0f fps", (double)gv->kurokku.tiku/ticktock(gv)); @@ -687,13 +687,13 @@ void shinku(global_game_variables_t *gv) modexprint(&(gv->video.page[shinku_fps_indicator_page]), x, y, type, col, bgcol, gv->pee); gv->kurokku.tiku=0; /* block copy to visible RAM from offscreen */ - vga_setup_wm1_block_copy(); +// vga_setup_wm1_block_copy(); // o = *(gv->video.page[shinku_fps_indicator_page].data); // source offscreen // o2 = *(gv->video.page[2].data)+(y * vga_state.vga_stride) + (x >> 2); // dest visible (original stride) // for (i=0;i < h;i++,o += vga_state.vga_draw_stride,o2 += vga_state.vga_stride) vga_wm1_mem_block_copy(o2,o,w >> 2); - modexCopyPageRegion(&(gv->video.page[shinku_fps_indicator_page]), &(gv->video.page[!shinku_fps_indicator_page]), x, y, x, 0, w, h); +// modexCopyPageRegion(&(gv->video.page[shinku_fps_indicator_page]), &(gv->video.page[!shinku_fps_indicator_page]), x, y, x, 0, w, h); /* must restore Write Mode 0/Read Mode 0 for this code to continue drawing normally */ - vga_restore_rm0wm0(); +// vga_restore_rm0wm0(); }else //copy dat sheet gv->kurokku.tiku++; @@ -710,7 +710,11 @@ void shinku(global_game_variables_t *gv) gv->kurokku.frames_per_second=60; break; } - if(pageflipflop) modexShowPage(&(gv->video.page[gv->video.p])); + if(pageflipflop){ + 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); + modexShowPage(&(gv->video.page[gv->video.p])); + + } gv->video.p=!gv->video.p; } -- 2.11.0