From 0ed35cf387c0351ed6edc962dfc449844e13102a Mon Sep 17 00:00:00 2001 From: sparky4 Date: Thu, 16 Jun 2016 13:17:38 -0500 Subject: [PATCH] optimize for XT i did ww --- src/lib/scroll16.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index 0e994942..64bac83c 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -487,6 +487,13 @@ void near ScrollRight(map_view_t *mv, player_t *player, word id, word plid) { /* block copy pattern to where we will draw the sprite */ vga_setup_wm1_block_copy(); +// { +// word i; +// byte o,o2; +// o2 = *mv[0].video->page[id].data+4; +// o = *mv[0].video->page[id].data; +// for (i=0;i < mv[0].video->page[id].height;i++,o += mv[0].video->page[id].width+vga_state.vga_stride,o2 += (*mv[0].video->page[id].data >> 2)) vga_wm1_mem_block_copy(o2,o,*mv[0].video->page[id].data >> 2); +// } _fmemmove(mv[0].video->page[id].data+4, mv[0].video->page[id].data, mv[0].video->page[id].pagesize); /* must restore Write Mode 0/Read Mode 0 for this code to continue drawing normally */ vga_restore_rm0wm0(); @@ -496,7 +503,6 @@ void near ScrollRight(map_view_t *mv, player_t *player, word id, word plid) } } - void near ScrollLeft(map_view_t *mv, player_t *player, word id, word plid) { /* decrement the pixel position and update the page */ @@ -507,6 +513,13 @@ void near ScrollLeft(map_view_t *mv, player_t *player, word id, word plid) { /* block copy pattern to where we will draw the sprite */ vga_setup_wm1_block_copy(); +// { +// word i; +// byte o,o2; +// o2 = *mv[0].video->page[id].data-4; +// o = *mv[0].video->page[id].data; +// for (i=0;i < mv[0].video->page[id].height;i++,o += mv[0].video->page[id].width+vga_state.vga_stride,o2 += (*mv[0].video->page[id].data >> 2)) vga_wm1_mem_block_copy(o2,o,*mv[0].video->page[id].data >> 2); +// } _fmemmove(mv[0].video->page[id].data-4, mv[0].video->page[id].data, mv[0].video->page[id].pagesize); /* must restore Write Mode 0/Read Mode 0 for this code to continue drawing normally */ vga_restore_rm0wm0(); @@ -526,6 +539,13 @@ void near ScrollUp(map_view_t *mv, player_t *player, word id, word plid) { /* block copy pattern to where we will draw the sprite */ vga_setup_wm1_block_copy(); +// { +// word i; +// byte o,o2; +// o2 = *mv[0].video->page[id].data-mv[0].video->page[id].pi; +// o = *mv[0].video->page[id].data; +// for (i=0;i < mv[0].video->page[id].height;i++,o += mv[0].video->page[id].width+vga_state.vga_stride,o2 += (*mv[0].video->page[id].data >> 2)) vga_wm1_mem_block_copy(o2,o,*mv[0].video->page[id].data >> 2); +// } _fmemmove(mv[0].video->page[id].data-mv[0].video->page[id].pi, mv[0].video->page[id].data, mv[0].video->page[id].pagesize); /* must restore Write Mode 0/Read Mode 0 for this code to continue drawing normally */ vga_restore_rm0wm0(); @@ -545,6 +565,13 @@ void near ScrollDown(map_view_t *mv, player_t *player, word id, word plid) { /* block copy pattern to where we will draw the sprite */ vga_setup_wm1_block_copy(); +// { +// word i; +// byte o,o2; +// o2 = *mv[0].video->page[id].data+mv[0].video->page[id].pi; +// o = *mv[0].video->page[id].data; +// for (i=0;i < mv[0].video->page[id].height;i++,o += mv[0].video->page[id].width+vga_state.vga_stride,o2 += (*mv[0].video->page[id].data >> 2)) vga_wm1_mem_block_copy(o2,o,*mv[0].video->page[id].data >> 2); +// } _fmemmove(mv[0].video->page[id].data+mv[0].video->page[id].pi, mv[0].video->page[id].data, mv[0].video->page[id].pagesize); /* must restore Write Mode 0/Read Mode 0 for this code to continue drawing normally */ vga_restore_rm0wm0(); -- 2.39.5