{
INC_PER_FRAME;
animatePlayer(pip, player, pn, 1);
+ pip[0].video->startclk = (*clockw);
if(!pageflipflop) mapScrollRight(pip, player, !(pip[0].video->p), pn); else{
mapScrollRight(pip, player, 0, pn);
mapScrollRight(pip, player, 1, pn);
ScrollRight(pip, player, 3, pn); }
if(!pageflipflop) modexShowPage(pip[1].page);
player[pn].q++;
- } else { player[pn].q = 1; player[pn].d = 2; player[pn].tx++; }
+ } else { player[pn].q = 1; player[pn].d = 2; player[pn].tx++; pip[0].video->clk = (float)((*clockw)-pip[0].video->startclk)/18.2; }
}
else if(player[pn].tx < pip[0].map->width && !(pip[0].map->data[(player[pn].tx)+(pip[0].map->width*(player[pn].ty-1))] == 0))//!(player[pn].tx+1 == TRIGGX && player[pn].ty == TRIGGY))
{
{
INC_PER_FRAME;
animatePlayer(pip, player, pn, 1);
+ pip[0].video->startclk = (*clockw);
if(!pageflipflop) mapScrollLeft(pip, player, !(pip[0].video->p), pn); else{
mapScrollLeft(pip, player, 0, pn);
mapScrollLeft(pip, player, 1, pn);
ScrollLeft(pip, player, 3, pn); }
if(!pageflipflop) modexShowPage(pip[1].page);
player[pn].q++;
- } else { player[pn].q = 1; player[pn].d = 2; player[pn].tx--; }
+ } else { player[pn].q = 1; player[pn].d = 2; player[pn].tx--; pip[0].video->clk = (float)((*clockw)-pip[0].video->startclk)/18.2; }
}
else if(player[pn].tx > 1 && !(pip[0].map->data[(player[pn].tx-2)+(pip[0].map->width*(player[pn].ty-1))] == 0))//!(player[pn].tx-1 == TRIGGX && player[pn].ty == TRIGGY))
{
{
INC_PER_FRAME;
animatePlayer(pip, player, pn, 1);
+ pip[0].video->startclk = (*clockw);
if(!pageflipflop) mapScrollDown(pip, player, !(pip[0].video->p), pn); else{
mapScrollDown(pip, player, 0, pn);
mapScrollDown(pip, player, 1, pn);
ScrollDown(pip, player, 3, pn); }
if(!pageflipflop) modexShowPage(pip[1].page);
player[pn].q++;
- } else { player[pn].q = 1; player[pn].d = 2; player[pn].ty++; }
+ } else { player[pn].q = 1; player[pn].d = 2; player[pn].ty++; pip[0].video->clk = (float)((*clockw)-pip[0].video->startclk)/18.2; }
}
else if(player[pn].ty < pip[0].map->height && !(pip[0].map->data[(player[pn].tx-1)+(pip[0].map->width*(player[pn].ty))] == 0))//!(player[pn].tx == TRIGGX && player[pn].ty+1 == TRIGGY))
{
{
INC_PER_FRAME;
animatePlayer(pip, player, pn, 1);
+ pip[0].video->startclk = (*clockw);
if(!pageflipflop) mapScrollUp(pip, player, !(pip[0].video->p), pn); else{
mapScrollUp(pip, player, 0, pn);
mapScrollUp(pip, player, 1, pn);
ScrollUp(pip, player, 3, pn); }
if(!pageflipflop) modexShowPage(pip[1].page);
player[pn].q++;
- } else { player[pn].q = 1; player[pn].d = 2; player[pn].ty--; }
+ } else { player[pn].q = 1; player[pn].d = 2; player[pn].ty--; pip[0].video->clk = (float)((*clockw)-pip[0].video->startclk)/18.2; }
}
else if(player[pn].ty > 1 && !(pip[0].map->data[(player[pn].tx-1)+(pip[0].map->width*(player[pn].ty-2))] == 0))//!(player[pn].tx == TRIGGX && player[pn].ty-1 == TRIGGY))
{
break;
case 1:
//turn this off if XT
- modexWaitBorder();
- //vga_wait_for_vsync();
+ //modexWaitBorder();
+ vga_wait_for_vsync();
gv->kurokku.frames_per_second=60;
break;
}
printf("middle tile position: %dx", gvar.video.page[0].tilemidposscreenx); printf("%d\n", gvar.video.page[0].tilemidposscreeny);
modexprintmeminfo(&gvar.video);
printf("mv[%u].tx: %d", pan.pn, mv[pan.pn].tx); printf(" mv[%u].ty: %d ", pan.pn, mv[pan.pn].ty); printf("gvar.video.p=%u\n", gvar.video.p);
- //printf("player[1].q: %d", player[1].q); printf(" player[1].d: %d\n", player[1].d);
+ printf("\ngvar.video.startclk=%u ", gvar.video.startclk);
+ printf("gvar.video.clk=%f\n", (float)((*clockw)-gvar.video.startclk)/18.2);
printf("\n");
//printf("map.width=%d map.height=%d map.data[0]=%d\n", mv[0].map->width, mv[0].map->height, mv[0].map->data[0]);