From 110b59090f3c3084e90dea55e7484be24f0abfae Mon Sep 17 00:00:00 2001 From: sparky4 Date: Thu, 16 Jun 2016 13:33:07 -0500 Subject: [PATCH] optimize for XT i did ww --- src/lib/scroll16.c | 4 ++-- src/scroll.c | 23 ++++++++++++----------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index e449a969..f8a40f84 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -648,7 +648,7 @@ void mapGoTo(map_view_t *mv, int tx, int ty) mapDrawWRow(&mv[0], tx-1, ty, py); i+=mv->map->width - tx; } - modexCopyPageRegion(mv[1].page, mv[0].page, 0, 0, 0, 0, mv[0].page->width, mv[0].page->height); + //modexCopyPageRegion(mv[1].page, mv[0].page, 0, 0, 0, 0, mv[0].page->width, mv[0].page->height); { unsigned int k,j,o; /* fill screen with a distinctive pattern */ @@ -659,7 +659,7 @@ void mapGoTo(map_view_t *mv, int tx, int ty) vga_state.vga_graphics_ram[o] = (k^j)&15; // VRL samples put all colors in first 15! } } - //modexCopyPageRegion(mv[3].page, mv[!(mv->video->p)].page, 0/**/, 0/**/, 0, 128, 20, 36); + modexCopyPageRegion(mv[3].page, mv[!(mv->video->p)].page, 0/**/, 0/**/, 0, 128, 20, 36); } diff --git a/src/scroll.c b/src/scroll.c index 34151f1c..2731c0b6 100755 --- a/src/scroll.c +++ b/src/scroll.c @@ -181,6 +181,7 @@ void main(int argc, char *argv[]) /* set up paging */ //TODO: LOAD map data and position the map in the middle of the screen if smaller then screen mapGoTo(mv, 0, 0); + //_fmemcpy(mv[1].page->data, mv[0].page->data, mv[0].page->pagesize); modexCopyPageRegion(mv[1].page, mv[0].page, 0, 0, 0, 0, mv[1].page->width, mv[1].page->height); //TODO: put player in starting position of spot @@ -205,17 +206,17 @@ void main(int argc, char *argv[]) /* buffer pages */ // modexClearRegion(mv[2].page, 0, 0, mv[2].page->width, mv[2].page->height, 47); // modexClearRegion(mv[3].page, 0, 0, mv[3].page->width, mv[3].page->height, 45); - { - unsigned int k,j,o; - /* fill screen with a distinctive pattern */ - for (k=0;k < vga_state.vga_width;k++) { - o = k >> 2; - vga_write_sequencer(0x02/*map mask*/,1 << (k&3)); - for (j=0;j < vga_state.vga_height;j++,o += vga_state.vga_stride) - vga_state.vga_graphics_ram[o] = (k^j)&15; // VRL samples put all colors in first 15! - } - } - modexClearRegion(mv[3].page, 0, 128, 28, 36, 15); +// { +// unsigned int k,j,o; +// /* fill screen with a distinctive pattern */ +// for (k=0;k < vga_state.vga_width;k++) { +// o = k >> 2; +// vga_write_sequencer(0x02/*map mask*/,1 << (k&3)); +// for (j=0;j < vga_state.vga_height;j++,o += vga_state.vga_stride) +// vga_state.vga_graphics_ram[o] = (k^j)&15; // VRL samples put all colors in first 15! +// } +// } + modexClearRegion(mv[3].page, 0, 128, 24, 36, 15); #ifdef MODEX #ifdef FADE -- 2.39.2