[2], vmem_remain=256\r
[3], video->page[i].pagesize=256\r
[3], vmem_remain=0\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=2\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=2\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=2\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=2\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=2\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=3\r
-pip[0].page->tilesw=22 pip[0].page->tw=20\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=4\r
-player[0].d=4\r
-player[0].d=4\r
-player[0].d=4\r
-player[0].d=4\r
-player[0].d=2\r
-player[0].d=4\r
-player[0].d=4\r
-player[0].d=4\r
-player[0].d=4\r
-player[0].d=4\r
-player[0].d=2\r
-player[0].d=4\r
-player[0].d=4\r
-player[0].d=4\r
-player[0].d=4\r
-player[0].d=4\r
-player[0].d=2\r
-player[0].d=4\r
-player[0].d=4\r
-player[0].d=4\r
-player[0].d=4\r
-player[0].d=4\r
-player[0].d=2\r
-player[0].d=4\r
-player[0].d=4\r
-player[0].d=4\r
-player[0].d=4\r
-player[0].d=4\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=2\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=2\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=2\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=2\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=2\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=2\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=2\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=2\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=0\r
-player[0].d=2\r
-player[0].d=1\r
-player[0].d=1\r
-player[0].d=1\r
-player[0].d=1\r
-player[0].d=1\r
-player[0].d=2\r
-player[0].d=1\r
-player[0].d=1\r
-player[0].d=1\r
-player[0].d=1\r
-player[0].d=1\r
-player[0].d=2\r
-player[0].d=1\r
-player[0].d=1\r
-player[0].d=1\r
-player[0].d=1\r
-player[0].d=1\r
-player[0].d=2\r
-player[0].d=1\r
-player[0].d=1\r
-player[0].d=1\r
-player[0].d=1\r
-player[0].d=1\r
-player[0].d=2\r
-player[0].d=2\r
Project 16 scroll.exe. This is just a test file!\r
-version May 3 2016 13:10:29\r
-tx: 2\r
-ty: 0\r
-player.x: 160 player.y: 80\r
-player.tx: 12 player.ty: 5\r
-player.triggx: 11 player.triggy: 5\r
+version May 4 2016 10:25:12\r
+tx: 15\r
+ty: 4\r
+player.x: 160 player.y: 128\r
+player.tx: 25 player.ty: 12\r
+player.triggx: 24 player.triggy: 12\r
player.hp: 4 player.q: 1 player.info.dir: 2 player.d: 2 pdir=1\r
-tile data value at player trigger position: 1\r
+tile data value at player trigger position: 3\r
Virtual Screen: 352x272\r
Screen: 320x240\r
virtual tile resolution: 22x17\r
tile resolution: 20x15 \r
middle tile position: 10x8\r
video memory remaining: 0\r
-page [0]=(a000:0008)\r
- [1]=(a000:5d88)\r
- [2]=(a000:bb8c)\r
- [3]=(a000:000c)\r
-mv[1].tx: 2 mv[1].ty: 0 panswitch=0\r
+page [0]=(a000:163c)\r
+ [1]=(a000:73bc)\r
+ [2]=(a000:bd14)\r
+ [3]=(a000:010c)\r
+mv[1].tx: 15 mv[1].ty: 4 panswitch=0\r
\r
\r
detected CPU type: 386 or newer\r
{
INC_PER_FRAME;
animatePlayer(pip, player, pn, 1);
+ if(!pageflipflop) mapScrollRight(pip, player, !(pip[0].video->p), pn); else{
mapScrollRight(pip, player, 0, pn);
mapScrollRight(pip, player, 1, pn);
ScrollRight(pip, player, 2, pn);
- ScrollRight(pip, player, 3, 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
{
- modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x-4, player[pn].y-TILEWH, player[pn].x-4, player[pn].y-TILEWH, 24, 32);
+ if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x-4, player[pn].y-TILEWH, player[pn].x-4, player[pn].y-TILEWH, 24, 32);
#ifdef SPRITE
PBUFSFUN(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 32, 24, 32, PLAYERBMPDATA);
#else
{
INC_PER_FRAME;
animatePlayer(pip, player, pn, 1);
+ if(!pageflipflop) mapScrollLeft(pip, player, !(pip[0].video->p), pn); else{
mapScrollLeft(pip, player, 0, pn);
mapScrollLeft(pip, player, 1, pn);
ScrollLeft(pip, player, 2, pn);
- ScrollLeft(pip, player, 3, 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
{
- modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x-4, player[pn].y-TILEWH, player[pn].x-4, player[pn].y-TILEWH, 24, 32);
+ if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x-4, player[pn].y-TILEWH, player[pn].x-4, player[pn].y-TILEWH, 24, 32);
#ifdef SPRITE
PBUFSFUN(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 96, 24, 32, PLAYERBMPDATA);
#else
{
INC_PER_FRAME;
animatePlayer(pip, player, pn, 1);
+ if(!pageflipflop) mapScrollDown(pip, player, !(pip[0].video->p), pn); else{
mapScrollDown(pip, player, 0, pn);
mapScrollDown(pip, player, 1, pn);
ScrollDown(pip, player, 2, pn);
- ScrollDown(pip, player, 3, 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
{
- modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x-4, player[pn].y-TILEWH, player[pn].x-4, player[pn].y-TILEWH, 24, 32);
+ if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x-4, player[pn].y-TILEWH, player[pn].x-4, player[pn].y-TILEWH, 24, 32);
#ifdef SPRITE
PBUFSFUN(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 64, 24, 32, PLAYERBMPDATA);
#else
{
INC_PER_FRAME;
animatePlayer(pip, player, pn, 1);
+ if(!pageflipflop) mapScrollUp(pip, player, !(pip[0].video->p), pn); else{
mapScrollUp(pip, player, 0, pn);
mapScrollUp(pip, player, 1, pn);
ScrollUp(pip, player, 2, pn);
- ScrollUp(pip, player, 3, 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
{
- modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x-4, player[pn].y-TILEWH, player[pn].x-4, player[pn].y-TILEWH, 24, 32);
+ if(!pageflipflop) modexCopyPageRegion(pip[1].page, pip[0].page, player[pn].x-4, player[pn].y-TILEWH, player[pn].x-4, player[pn].y-TILEWH, 24, 32);
#ifdef SPRITE
PBUFSFUN(pip[1].page, player[pn].x-4, player[pn].y-TILEWH, 24, 0, 24, 32, PLAYERBMPDATA);
#else
/* draw the next column */
x= mv[0].page->sw + mv[id].map->tiles->tileWidth;
if(player[plid].q%4)
+ if(pageflipflop){
if(id==0)
mapDrawCol(&mv[0], mv[0].tx + mv[0].page->tw, mv[0].ty-1, x, player, mv->page->dx);
else
modexCopyPageRegion(mv[id].page, mv[0].page, x, 0, x, 0, mv[id].map->tiles->tileWidth, mv[id].map->tiles->tileHeight*(mv[0].page->th+2));
- //}
+ }else mapDrawCol(&mv[(!mv[0].video->p)], mv[0].tx + mv[0].page->tw, mv[0].ty-1, x, player, mv->page->dx);
}
/* draw the next column */
x= 0;
if(player[plid].q%4)
+ if(pageflipflop){
if(id==0)
mapDrawCol(&mv[0], mv[0].tx - 1, mv[0].ty-1, x, player, mv->page->dx);
else
modexCopyPageRegion(mv[id].page, mv[0].page, x, 0, x, 0, mv[id].map->tiles->tileWidth, mv[id].map->tiles->tileHeight*(mv[0].page->th+2));
- //}
+ }else mapDrawCol(&mv[(!mv[0].video->p)], mv[0].tx - 1, mv[0].ty-1, x, player, mv->page->dx);
}
/* draw the next row */
y= 0;
if(player[plid].q%3)
+ if(pageflipflop){
if(id==0)
mapDrawRow(&mv[0], mv[0].tx - 1, mv[0].ty-1, y, player, mv->page->dy);
else
modexCopyPageRegion(mv[id].page, mv[0].page, 0, y, 0, y, mv[id].map->tiles->tileWidth*(mv[0].page->tw+2), mv[id].map->tiles->tileHeight);
- //}
+ }else mapDrawRow(&mv[(!mv[0].video->p)], mv[0].tx - 1, mv[0].ty-1, y, player, mv->page->dy);
}
void near mapScrollDown(map_view_t *mv, player_t *player, word id, word plid)
/* draw the next row */
y= mv[0].page->sh + mv[id].map->tiles->tileHeight;
if(player[plid].q%3)
+ if(pageflipflop){
if(id==0)
mapDrawRow(&mv[0], mv[0].tx - 1, mv[0].ty+mv[0].page->th, y, player, mv->page->dy);
else
modexCopyPageRegion(mv[id].page, mv[0].page, 0, y, 0, y, mv[id].map->tiles->tileWidth*(mv[0].page->tw+2), mv[id].map->tiles->tileHeight);
- //}
+ }else mapDrawRow(&mv[(!mv[0].video->p)], mv[0].tx - 1, mv[0].ty+mv[0].page->th, y, player, mv->page->dy);
}
unsigned int i;
/* set up the coordinates */
- mv->tx = tx;
- mv->ty = ty;
- mv->page->dx = mv->map->tiles->tileWidth;
- mv->page->dy = mv->map->tiles->tileHeight;
+ mv[0].tx = mv[1].tx = tx;
+ mv[0].ty = mv[1].ty = ty;
+ mv[0].page->dx = mv[1].page->dx = mv->map->tiles->tileWidth;
+ mv[0].page->dy = mv[1].page->dy = mv->map->tiles->tileHeight;
/* set up the thresholds */
- mv->dxThresh = mv->map->tiles->tileWidth * 2;
- mv->dyThresh = mv->map->tiles->tileHeight * 2;
+ mv[0].dxThresh = mv[1].dxThresh = mv->map->tiles->tileWidth * 2;
+ mv[0].dyThresh = mv[1].dyThresh = mv->map->tiles->tileHeight * 2;
/* draw the tiles */
- modexClearRegion(mv->page, 0, 0, mv->page->width, mv->page->height, 0);
+ modexClearRegion(mv[0].page, 0, 0, mv[0].page->width, mv[0].page->height, 0);
py=0;
- i=mv->ty * mv->map->width + mv->tx;
- for(ty=mv->ty-1; py < mv->page->sh+mv->dyThresh && ty < mv->map->height; ty++, py+=mv->map->tiles->tileHeight) {
- mapDrawWRow(mv, tx-1, ty, py);
+ i=mv[0].ty * mv[0].map->width + mv[0].tx;
+ for(ty=mv[0].ty-1; py < mv[0].page->sh+mv->dyThresh && ty < mv[0].map->height; ty++, py+=mv[0].map->tiles->tileHeight) {
+ 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);
}
case 0:
#ifndef TILERENDER
modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, ((t->debug_data[i])+1));
- //cannot print number value du to it being slow as bakapee
+ modexprint(page, x, y, 1, 15, 0, (char const *)(t->debug_data[i]));
#else
PBUFBFUN (page, x, y, rx, ry, t->tileWidth, t->tileHeight, (t->data));
/* then the sprite. note modding ram ptr means we just draw to (x&3,0) */
/* sync */
void shinku(global_game_variables_t *gv)
{
- word x = (0) + gv->video.page[shinku_fps_indicator_page].dx; // follow the screen
- word y = (0) + gv->video.page[shinku_fps_indicator_page].dy; // follow the screen
+ word x = (0) + gv->video.page[!(gv->video.p)].dx; // follow the screen
+ word y = (0) + gv->video.page[!(gv->video.p)].dy; // follow the screen
word w = 64;
word h = 8;
word col = 7;
{
sprintf(gv->pee, "%.0f fps", (double)gv->kurokku.tiku/ticktock(gv));
//modexClearRegion(&(gv->video.page[shinku_fps_indicator_page]), x, y, w, h, 45);
- modexprint(&(gv->video.page[shinku_fps_indicator_page]), x, y, type, col, bgcol, gv->pee);
+ modexprint(&(gv->video.page[!(gv->video.p)]), x, y, type, col, bgcol, gv->pee);
gv->kurokku.tiku=0;
/* block copy to visible RAM from offscreen */
// vga_setup_wm1_block_copy();
break;
}
if(pageflipflop){
- 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);
- modexShowPage(&(gv->video.page[gv->video.p]));
-
+ 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);
+ modexShowPage(&(gv->video.page[gv->video.p])); //this is slow as fack too!!
+ gv->video.p=!gv->video.p;
}
- gv->video.p=!gv->video.p;
}
void near animatePlayer(map_view_t *pip, player_t *player, word pn, sword scrollswitch)