animatePlayer(pip, player, pn, 1);
ScrollRight(pip, player, 3, pn);
ScrollRight(pip, player, 2, pn);
- mapScrollRight(pip, player, (pip[0].video->p), pn);
mapScrollRight(pip, player, !(pip[0].video->p), pn);
+ mapScrollRight(pip, player, (pip[0].video->p), pn);
if(!pageflipflop) modexShowPage(pip[1].page);
player[pn].q++;
pip[0].video->clk = ((*clockw)-pip[0].video->startclk)/18.2;
animatePlayer(pip, player, pn, 1);
ScrollLeft(pip, player, 3, pn);
ScrollLeft(pip, player, 2, pn);
- mapScrollLeft(pip, player, (pip[0].video->p), pn);
mapScrollLeft(pip, player, !(pip[0].video->p), pn);
+ mapScrollLeft(pip, player, (pip[0].video->p), pn);
if(!pageflipflop) modexShowPage(pip[1].page);
player[pn].q++;
pip[0].video->clk = ((*clockw)-pip[0].video->startclk)/18.2;
animatePlayer(pip, player, pn, 1);
ScrollDown(pip, player, 3, pn);
ScrollDown(pip, player, 2, pn);
- mapScrollDown(pip, player, (pip[0].video->p), pn);
mapScrollDown(pip, player, !(pip[0].video->p), pn);
+ mapScrollDown(pip, player, (pip[0].video->p), pn);
if(!pageflipflop) modexShowPage(pip[1].page);
player[pn].q++;
pip[0].video->clk = ((*clockw)-pip[0].video->startclk)/18.2;
animatePlayer(pip, player, pn, 1);
ScrollUp(pip, player, 3, pn);
ScrollUp(pip, player, 2, pn);
- mapScrollUp(pip, player, (pip[0].video->p), pn);
mapScrollUp(pip, player, !(pip[0].video->p), pn);
+ mapScrollUp(pip, player, (pip[0].video->p), pn);
if(!pageflipflop) modexShowPage(pip[1].page);
player[pn].q++;
pip[0].video->clk = ((*clockw)-pip[0].video->startclk)/18.2;
/* check to see if this changes the tile */
if(mv[0].video->page[id].dx >= mv[0].dxThresh )
{
+ /* block copy pattern to where we will draw the sprite */
+ vga_setup_wm1_block_copy();
+ _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();
/* Snap the origin forward */
- mv[0].video->page[id].data += mv[0].video->page[id].pi;
+ mv[0].video->page[id].data += 4;
mv[0].video->page[id].dx = mv[0].map->tiles->tileWidth;
}
}
/* check to see if this changes the tile */
if(mv[0].video->page[id].dx == 0)
{
+ /* block copy pattern to where we will draw the sprite */
+ vga_setup_wm1_block_copy();
+ _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();
/* Snap the origin backward */
- mv[0].video->page[id].data -= mv[0].video->page[id].pi;
+ mv[0].video->page[id].data -= 4;
mv[0].video->page[id].dx = mv[0].map->tiles->tileWidth;
}
}
/* check to see if this changes the tile */
if(mv[0].video->page[id].dy == 0)
{
+ /* block copy pattern to where we will draw the sprite */
+ vga_setup_wm1_block_copy();
+ _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();
/* Snap the origin backward */
- mv[0].video->page[id].data -= mv[0].video->page[id].pi;//4;
+ mv[0].video->page[id].data -= mv[0].video->page[id].pi;
mv[0].video->page[id].dy = mv[0].map->tiles->tileWidth;
}
}
/* check to see if this changes the tile */
if(mv[0].video->page[id].dy >= mv[0].dxThresh )
{
+ /* block copy pattern to where we will draw the sprite */
+ vga_setup_wm1_block_copy();
+ _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();
/* Snap the origin forward */
- mv[0].video->page[id].data += mv[0].video->page[id].pi;//4;
+ mv[0].video->page[id].data += mv[0].video->page[id].pi;
mv[0].video->page[id].dy = mv[0].map->tiles->tileWidth;
}
}
mapDrawWRow(&mv[0], tx-1, ty, py);
i+=mv->map->width - tx;
}
- /* block copy pattern to where we will draw the sprite */
- vga_setup_wm1_block_copy();
- //_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[0].page->width, mv[0].page->height);
- /* must restore Write Mode 0/Read Mode 0 for this code to continue drawing normally */
- vga_restore_rm0wm0();
modexCopyPageRegion(mv[3].page, mv[!(mv->video->p)].page, 0/**/, 0/**/, 0, 128, 28, 36);
}
mv[i].video = &gvar.video;
mv[i].pan = &pan;
}
+
/* 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);
if(!pageflipflop) modexShowPage(mv[1].page);
else modexShowPage(mv[(gvar.video.p)].page);
shinku_fps_indicator_page = 1; // we're on page 1 now, shinku(). follow along please or it will not be visible.
- //modexClearRegion(mv[2].page, 0, 0, mv[2].page->width, mv[2].page->height, 1);
+
+ /* 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);
+ modexClearRegion(mv[3].page, 0, 128, 28, 36, 15);
+
#ifdef MODEX
#ifdef FADE
modexFadeOn(4, gpal);
}
if(IN_KeyDown(67)) //f9
{
- modexClearRegion(mv[3].page, 0, 0/*128*/, 28, 36, 15);
+ 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);
+ modexClearRegion(mv[3].page, 0, 128, 28, 36, 15);
//IN_UserInput(1,1);
}
//TODO fmemtest into page