{
//no direction
case 2:
- pip[0].video->startclk = (*clockw);
+ //0000pip[0].video->startclk = (*clockw);
break;
//right movement
case 3:
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;
+ //0000pip[0].video->clk = ((*clockw)-pip[0].video->startclk)/18.2;
} else { player[pn].q = 1; player[pn].d = 2; player[pn].tx++; }
}
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))
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;
+ //0000pip[0].video->clk = ((*clockw)-pip[0].video->startclk)/18.2;
} else { player[pn].q = 1; player[pn].d = 2; player[pn].tx--; }
}
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))
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;
+ //0000pip[0].video->clk = ((*clockw)-pip[0].video->startclk)/18.2;
} else { player[pn].q = 1; player[pn].d = 2; player[pn].ty++; }
}
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))
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;
+ //0000pip[0].video->clk = ((*clockw)-pip[0].video->startclk)/18.2;
} else { player[pn].q = 1; player[pn].d = 2; player[pn].ty--; }
}
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))
if(pageflipflop){
if(gv->video.r){
/* block copy pattern to where we will draw the sprite */
- vga_setup_wm1_block_copy();
+ //vga_setup_wm1_block_copy();
//_fmemmove((gv->video.page[(gv->video.p)]).data, (gv->video.page[(!gv->video.p)]).data, gv->video.page[(!gv->video.p)].pagesize);
modexCopyPageRegion(&(gv->video.page[(gv->video.p)]), &(gv->video.page[(!gv->video.p)]), 0, 0, 0, 0, gv->video.page[gv->video.p].width, gv->video.page[!gv->video.p].height);
/* must restore Write Mode 0/Read Mode 0 for this code to continue drawing normally */
- vga_restore_rm0wm0();
+ //vga_restore_rm0wm0();
modexShowPage(&(gv->video.page[gv->video.p]));
gv->video.p=!gv->video.p;
gv->video.r=!gv->video.r;
- gv->video.tickclk = ((*clockw)-gv->video.startclk)/18.2;
+ //0000gv->video.tickclk = ((*clockw)-gv->video.startclk)/18.2;
}
}
}
VGAmodeX(0, 1, &gvar);
#endif
IN_Shutdown();
- printf("Project 16 scroll.exe. This is just a test file!\n");
+ printf("\n\n\n\nProject 16 scroll.exe. This is just a test file!\n");
printf("version %s\n", VERSION);
- printf("tx: %d\n", mv[0].tx);
+ printf("tx: %d ", mv[0].tx);
printf("ty: %d\n", mv[0].ty);
- printf("player.x: %d", player[0].x); printf(" player.y: %d\n", player[0].y);
+ printf("player vars:\n");
+ printf(" x: %d", player[0].x); printf(" y: %d\n", player[0].y);
//if(player[0].hp==0) printf("%d wwww\n", player[0].y+8);
//else printf("\nplayer[0].y: %d\n", player[0].y);
- printf("player.tx: %d", player[0].tx); printf(" player.ty: %d\n", player[0].ty);
- printf("player.triggx: %d", player[0].triggerx); printf(" player.triggy: %d\n", player[0].triggery);
- printf("player.hp: %d", (player[0].hp)); printf(" player.q: %d", player[0].q); printf(" player.info.dir: %d", player[0].info.dir); printf(" player.d: %d ", player[0].d);
- printf("pdir=%d\n", player[0].pdir);
- printf("tile data value at player trigger position: %d\n", mv[0].map->data[(player[0].triggerx-1)+(map.width*(player[0].triggery-1))]);
+ printf(" tx: %d", player[0].tx); printf(" ty: %d\n", player[0].ty);
+ printf(" triggx: %d", player[0].triggerx); printf(" triggy: %d\n", player[0].triggery);
+ printf(" hp: %d", (player[0].hp)); printf(" q: %d", player[0].q); printf(" player.info.dir: %d", player[0].info.dir); printf(" player.d: %d ", player[0].d);
+ printf(" pdir=%d\n", player[0].pdir);
+ printf("tile data value at player trigger position: %d\n\n", mv[0].map->data[(player[0].triggerx-1)+(map.width*(player[0].triggery-1))]);
// printf("palette offset: %d\n", paloffset/3);
//++++ printf("Total used: %zu\n", oldfreemem-GetFreeSize());
//++++ printf("Total free: %zu\n", GetFreeSize());
//not used now printf("temporary player sprite 0: http://www.pixiv.net/member_illust.php?mode=medium&illust_id=45556867\n");
//not used now printf("temporary player sprite 1: http://www.pixiv.net/member_illust.php?mode=medium&illust_id=44606385\n");
- printf("Virtual Screen: %dx", gvar.video.page[0].width); printf("%d\n", gvar.video.page[0].height);
+ printf("Virtual Screen: %dx", gvar.video.page[0].width); printf("%d ", gvar.video.page[0].height);
printf("Screen: %dx", gvar.video.page[0].sw); printf("%d\n", gvar.video.page[0].sh);
- printf("virtual tile resolution: %dx", gvar.video.page[0].tilesw); printf("%d\n", gvar.video.page[0].tilesh);
- printf("tile resolution: %dx", gvar.video.page[0].tw); printf("%d \n", gvar.video.page[0].th);
+ printf("virtual tile resolution: %dx", gvar.video.page[0].tilesw); printf("%d ", gvar.video.page[0].tilesh);
+ printf("tile resolution: %dx", gvar.video.page[0].tw); printf("%d\n", gvar.video.page[0].th);
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 ", gvar.video.p); printf("gvar.video.r=%u ", gvar.video.r);
printf("pageflipflop=%u\n", pageflipflop);
- printf("\ngvar.video.tickclk=%f\n", gvar.video.tickclk);
- printf("gvar.video.clk=%f", gvar.video.clk);
+ //0000printf("\ngvar.video.tickclk=%f\n", gvar.video.tickclk);
+ //0000printf("gvar.video.clk=%f", gvar.video.clk);
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]);