From eba388b0ff636ad4f2119dd1f4f9d9caaf4212f1 Mon Sep 17 00:00:00 2001 From: sparky4 Date: Tue, 26 Apr 2016 15:31:40 -0500 Subject: [PATCH] about to implement the toggle system of the drawpage stuff ww --- src/lib/scroll16.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index a38264e6..ba227eca 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -604,7 +604,7 @@ void shinku(global_game_variables_t *gv) /* block copy to visible RAM from offscreen */ vga_setup_wm1_block_copy(); o = *(gv->video.page[2].data); // source offscreen - o2 = *(gv->video.page[2].data)+(y * vga_state.vga_stride) + (x >> 2); // dest visible (original stride) + 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(); @@ -614,8 +614,16 @@ void shinku(global_game_variables_t *gv) //modexClearRegion(&(gv->video.page[shinku_fps_indicator_page]), x, y, w, h, 45); 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(); + 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); + /* must restore Write Mode 0/Read Mode 0 for this code to continue drawing normally */ + vga_restore_rm0wm0(); }else //copy dat sheet gv->kurokku.tiku++; + switch(gv->kurokku.fpscap) { case 0: @@ -629,6 +637,7 @@ void shinku(global_game_variables_t *gv) gv->kurokku.frames_per_second=60; break; } + gv->video.p=!gv->video.p; } void near animatePlayer(map_view_t *pip, player_t *player, word pn, sword scrollswitch) -- 2.39.2