{\r
if(player[pn].q<=player[pn].spt)\r
{\r
- pip[pip[0].pan->pn].page[0].dx+=4;\r
+ pip[pip[0].pan->pn].page->dx+=4;\r
modexShowPage(pip[pip[0].pan->pn].page);\r
player[pn].q++;\r
} else { player[pn].q = 1; player[pn].d = 2; pip[pip[0].pan->pn].tx++; }\r
{\r
if(player[pn].q<=player[pn].spt)\r
{\r
- pip[pip[0].pan->pn].page[0].dx-=4;\r
+ pip[pip[0].pan->pn].page->dx-=4;\r
modexShowPage(pip[pip[0].pan->pn].page);\r
player[pn].q++;\r
} else { player[pn].q = 1; player[pn].d = 2; pip[pip[0].pan->pn].tx--; }\r
{\r
if(player[pn].q<=player[pn].spt)\r
{\r
- pip[pip[0].pan->pn].page[0].dy+=4;\r
+ pip[pip[0].pan->pn].page->dy+=4;\r
modexShowPage(pip[pip[0].pan->pn].page);\r
player[pn].q++;\r
} else { player[pn].q = 1; player[pn].d = 2; pip[pip[0].pan->pn].ty++; }\r
{\r
if(player[pn].q<=player[pn].spt)\r
{\r
- pip[pip[0].pan->pn].page[0].dy-=4;\r
+ pip[pip[0].pan->pn].page->dy-=4;\r
modexShowPage(pip[pip[0].pan->pn].page);\r
player[pn].q++;\r
} else { player[pn].q = 1; player[pn].d = 2; pip[pip[0].pan->pn].ty--; }\r
{\r
if(player[pn].q<=player[pn].spt)\r
{\r
- pip[pip[0].pan->pn].page[0].dx+=4;\r
+ pip[pip[0].pan->pn].page->dx+=4;\r
modexShowPageVsync(pip[pip[0].pan->pn].page);\r
player[pn].q++;\r
} else { player[pn].q = 1; player[pn].d = 2; pip[pip[0].pan->pn].tx++; }\r
{\r
if(player[pn].q<=player[pn].spt)\r
{\r
- pip[pip[0].pan->pn].page[0].dx-=4;\r
+ pip[pip[0].pan->pn].page->dx-=4;\r
modexShowPageVsync(pip[pip[0].pan->pn].page);\r
player[pn].q++;\r
} else { player[pn].q = 1; player[pn].d = 2; pip[pip[0].pan->pn].tx--; }\r
{\r
if(player[pn].q<=player[pn].spt)\r
{\r
- pip[pip[0].pan->pn].page[0].dy+=4;\r
+ pip[pip[0].pan->pn].page->dy+=4;\r
modexShowPageVsync(pip[pip[0].pan->pn].page);\r
player[pn].q++;\r
} else { player[pn].q = 1; player[pn].d = 2; pip[pip[0].pan->pn].ty++; }\r
{\r
if(player[pn].q<=player[pn].spt)\r
{\r
- pip[pip[0].pan->pn].page[0].dy-=4;\r
+ pip[pip[0].pan->pn].page->dy-=4;\r
modexShowPageVsync(pip[pip[0].pan->pn].page);\r
player[pn].q++;\r
} else { player[pn].q = 1; player[pn].d = 2; pip[pip[0].pan->pn].ty--; }\r
*/\r
void modexMVSetup(map_view_t *mv, map_t *map, pan_t *pan, global_game_variables_t *gv)\r
{\r
- byte i;\r
+ nibble i;\r
// 1st page\r
mv[0].page = &gv->video.page[0];\r
mv[0].map = map;\r
word x;//, y; /* coordinate for drawing */\r
\r
/* increment the pixel position and update the page */\r
- mv[id].page[0].dx += player[plid].speed;\r
+ mv[id].page->dx += player[plid].speed;\r
\r
/* check to see if this changes the tile */\r
- if(mv[id].page[0].dx >= mv[id].dxThresh )\r
+ if(mv[id].page->dx >= mv[id].dxThresh )\r
{\r
/* go forward one tile */\r
mv[id].tx++;\r
/* Snap the origin forward */\r
mv[id].page->data += 4;\r
\r
- mv[id].page[0].dx = mv[id].map->tiles->tileWidth;\r
+ mv[id].page->dx = mv[id].map->tiles->tileWidth;\r
}\r
\r
/* draw the next column */\r
x= mv[0].page->sw + mv[id].map->tiles->tileWidth;\r
if(player[plid].q%4)\r
if(id==0)\r
- mapDrawCol(&mv[0], mv[0].tx + mv[0].page->tw, mv[0].ty-1, x, player, mv->page[0].dx);\r
+ mapDrawCol(&mv[0], mv[0].tx + mv[0].page->tw, mv[0].ty-1, x, player, mv->page->dx);\r
else\r
if(!pageflipflop && !pageploop)\r
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));\r
word x;//,y; /* coordinate for drawing */\r
\r
/* decrement the pixel position and update the page */\r
- mv[id].page[0].dx -= player[plid].speed;\r
+ mv[id].page->dx -= player[plid].speed;\r
\r
/* check to see if this changes the tile */\r
- if(mv[id].page[0].dx == 0)\r
+ if(mv[id].page->dx == 0)\r
{\r
/* go backward one tile */\r
mv[id].tx--;\r
/* Snap the origin backward */\r
mv[id].page->data -= 4;\r
\r
- mv[id].page[0].dx = mv[id].map->tiles->tileWidth;\r
+ mv[id].page->dx = mv[id].map->tiles->tileWidth;\r
}\r
\r
/* draw the next column */\r
x= 0;\r
if(player[plid].q%4)\r
if(id==0)\r
- mapDrawCol(&mv[0], mv[0].tx - 1, mv[0].ty-1, x, player, mv->page[0].dx);\r
+ mapDrawCol(&mv[0], mv[0].tx - 1, mv[0].ty-1, x, player, mv->page->dx);\r
else\r
if(!pageflipflop && !pageploop)\r
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));\r
word y;//x, /* coordinate for drawing */\r
\r
/* decrement the pixel position and update the page */\r
- mv[id].page[0].dy -= player[plid].speed;\r
+ mv[id].page->dy -= player[plid].speed;\r
\r
/* check to see if this changes the tile */\r
- if(mv[id].page[0].dy == 0 )\r
+ if(mv[id].page->dy == 0 )\r
{\r
/* go down one tile */\r
mv[id].ty--;\r
/* Snap the origin downward */\r
mv[id].page->data -= mv[id].page->pi;\r
\r
- mv[id].page[0].dy = mv[id].map->tiles->tileHeight;\r
+ mv[id].page->dy = mv[id].map->tiles->tileHeight;\r
}\r
\r
/* draw the next row */\r
y= 0;\r
if(player[plid].q%3)\r
if(id==0)\r
- mapDrawRow(&mv[0], mv[0].tx - 1, mv[0].ty-1, y, player, mv->page[0].dy);\r
+ mapDrawRow(&mv[0], mv[0].tx - 1, mv[0].ty-1, y, player, mv->page->dy);\r
else\r
if(!pageflipflop && !pageploop)\r
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);\r
word y;//x, /* coordinate for drawing */\r
\r
/* increment the pixel position and update the page */\r
- mv[id].page[0].dy += player[plid].speed;\r
+ mv[id].page->dy += player[plid].speed;\r
\r
/* check to see if this changes the tile */\r
- if(mv[id].page[0].dy >= mv[id].dyThresh )\r
+ if(mv[id].page->dy >= mv[id].dyThresh )\r
{\r
/* go down one tile */\r
mv[id].ty++;\r
/* Snap the origin downward */\r
mv[id].page->data += mv[id].page->pi;\r
\r
- mv[id].page[0].dy = mv[id].map->tiles->tileHeight;\r
+ mv[id].page->dy = mv[id].map->tiles->tileHeight;\r
}\r
\r
/* draw the next row */\r
y= mv[0].page->sh + mv[id].map->tiles->tileHeight;\r
if(player[plid].q%3)\r
if(id==0)\r
- mapDrawRow(&mv[0], mv[0].tx - 1, mv[0].ty+mv[0].page->th, y, player, mv->page[0].dy);\r
+ mapDrawRow(&mv[0], mv[0].tx - 1, mv[0].ty+mv[0].page->th, y, player, mv->page->dy);\r
else\r
if(!pageflipflop && !pageploop)\r
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);\r
void near ScrollRight(map_view_t *mv, player_t *player, word id, word plid)\r
{\r
/* increment the pixel position and update the page */\r
- mv[id].page[0].dx += player[plid].speed;\r
+ mv[id].page->dx += player[plid].speed;\r
\r
/* check to see if this changes the tile */\r
- if(mv[id].page[0].dx >= mv[0].dxThresh )\r
+ if(mv[id].page->dx >= mv[0].dxThresh )\r
{\r
// vga_setup_wm1_block_copy();\r
// _fmemmove(mv[id].page->data+4, mv[id].page->data, mv[id].page->pagesize);\r
// vga_restore_rm0wm0();\r
/* Snap the origin forward */\r
mv[id].page->data += 4;\r
- mv[id].page[0].dx = mv[0].map->tiles->tileWidth;\r
+ mv[id].page->dx = mv[0].map->tiles->tileWidth;\r
}\r
}\r
\r
void near ScrollLeft(map_view_t *mv, player_t *player, word id, word plid)\r
{\r
/* decrement the pixel position and update the page */\r
- mv[id].page[0].dx -= player[plid].speed;\r
+ mv[id].page->dx -= player[plid].speed;\r
\r
/* check to see if this changes the tile */\r
- if(mv[id].page[0].dx == 0)\r
+ if(mv[id].page->dx == 0)\r
{\r
// vga_setup_wm1_block_copy();\r
// _fmemmove(mv[id].page->data-4, mv[id].page->data, mv[id].page->pagesize);\r
// vga_restore_rm0wm0();\r
/* Snap the origin backward */\r
mv[id].page->data -= 4;\r
- mv[id].page[0].dx = mv[0].map->tiles->tileWidth;\r
+ mv[id].page->dx = mv[0].map->tiles->tileWidth;\r
}\r
}\r
\r
void near ScrollUp(map_view_t *mv, player_t *player, word id, word plid)\r
{\r
/* decrement the pixel position and update the page */\r
- mv[id].page[0].dy -= player[plid].speed;\r
+ mv[id].page->dy -= player[plid].speed;\r
\r
/* check to see if this changes the tile */\r
- if(mv[id].page[0].dy == 0)\r
+ if(mv[id].page->dy == 0)\r
{\r
// vga_setup_wm1_block_copy();\r
// _fmemmove(mv[id].page->data-mv[id].page->pi, mv[id].page->data, mv[id].page->pagesize);\r
// vga_restore_rm0wm0();\r
/* Snap the origin backward */\r
mv[id].page->data -= mv[id].page->pi;\r
- mv[id].page[0].dy = mv[0].map->tiles->tileWidth;\r
+ mv[id].page->dy = mv[0].map->tiles->tileWidth;\r
}\r
}\r
\r
void near ScrollDown(map_view_t *mv, player_t *player, word id, word plid)\r
{\r
/* increment the pixel position and update the page */\r
- mv[id].page[0].dy += player[plid].speed;\r
+ mv[id].page->dy += player[plid].speed;\r
\r
/* check to see if this changes the tile */\r
- if(mv[id].page[0].dy >= mv[0].dxThresh )\r
+ if(mv[id].page->dy >= mv[0].dxThresh )\r
{\r
// vga_setup_wm1_block_copy();\r
// _fmemmove(mv[id].page->data+mv[id].page->pi, mv[id].page->data, mv[id].page->pagesize);\r
// vga_restore_rm0wm0();\r
/* Snap the origin forward */\r
mv[id].page->data += mv[id].page->pi;\r
- mv[id].page[0].dy = mv[0].map->tiles->tileWidth;\r
+ mv[id].page->dy = mv[0].map->tiles->tileWidth;\r
}\r
}\r
\r
/* set up the coordinates */\r
mv[0].tx = mv[1].tx = tx;\r
mv[0].ty = mv[1].ty = ty;\r
- mv[0].page[0].dx = mv[1].page[0].dx = mv[2].page[0].dx = mv[3].page[0].dx = mv->map->tiles->tileWidth;\r
- mv[0].page[0].dy = mv[1].page[0].dy = mv[2].page[0].dy = mv[3].page[0].dy = mv->map->tiles->tileHeight;\r
+ mv[0].page->dx = mv[1].page->dx = mv[2].page->dx = mv[3].page->dx = mv->map->tiles->tileWidth;\r
+ mv[0].page->dy = mv[1].page->dy = mv[2].page->dy = mv[3].page->dy = mv->map->tiles->tileHeight;\r
\r
/* set up the thresholds */\r
mv[0].dxThresh = mv[1].dxThresh = mv[2].dxThresh = mv[3].dxThresh = mv->map->tiles->tileWidth * 2;\r