]> 4ch.mooo.com Git - 16.git/commitdiff
made major changes in code for the future of scroll ^^
authorsparky4 <sparky4@cock.li>
Wed, 27 Apr 2016 21:12:32 +0000 (16:12 -0500)
committersparky4 <sparky4@cock.li>
Wed, 27 Apr 2016 21:12:32 +0000 (16:12 -0500)
SCROLL.16L
src/lib/scroll16.c

index a0bcf921ff2eebb48acf55fde75b86df1d8fc163..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100755 (executable)
@@ -1,35 +0,0 @@
-starting timer ok\r
-index=4096\r
-chkmap ok      \r
-\r
-       1st vmem_remain=262144\r
-               [0], video->page[i].pagesize=95744\r
-               [0], vmem_remain=166400\r
-               [1], video->page[i].pagesize=95744\r
-               [1], vmem_remain=70656\r
-               [2], video->page[i].pagesize=70400\r
-               [2], vmem_remain=256\r
-               [3], video->page[i].pagesize=256\r
-               [3], vmem_remain=0\r
-Project 16 scroll.exe. This is just a test file!\r
-version Apr 27 2016 13:47:19\r
-tx: 12\r
-ty: 1\r
-player[0].x: 160               player[0].y: 128\r
-player[0].tx: 22               player[0].ty: 9\r
-player[0].triggx: 23   player[0].triggy: 9\r
-player[0].hp: 4        player[0].q: 1  player[0].info.dir: 2   player[0].d: 2\r
-pdir=3\r
-tile data value at player trigger position: 1\r
-Virtual Screen: 352x272\r
-Screen: 320x240\r
-tile resolution: 15x15 middle tile position: 10x8\r
-video memory remaining: 0\r
-\r
-page [0]=(a000:05b0)\r
-[1]=(a000:6330)\r
-[2]=(a000:bd5c)\r
-[3]=(a000:ffb4)\r
-\r
-\r
-detected CPU type: 386 or newer\r
index 79585313fa5f68aed079cc5fb66507d76da05583..509f97430c1b16d00783eb43e918a4fb6f8c00f4 100755 (executable)
@@ -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;
 }