void mapDrawCol(map_view_t *mv, int tx, int ty, word x);\r
void qclean();\r
void pdump(map_view_t *pee);\r
-void animatePlayer(map_view_t *src, map_view_t *dest, /*map_view_t *top, */sword d, short scrolloffsetswitch, int x, int y, int ls, int lp, bitmap_t *bmp);\r
+void animatePlayer(map_view_t *src, map_view_t *dest, /*map_view_t *top, */sword d, short scrolloffsetswitch, int x, int y, int ls, int lp, bitmap_t *bmp);
\r
#define TILEWH 16\r
#define QUADWH TILEWH/2\r
bg = &mv[0];\r
spri = &mv[1];\r
mask = &mv[2];
- //pgid[0].mv = &mv;
- //pgid[1].mv = &mv2;
- //pgid[2].mv = &mv3;\r
\r
//TODO: LOAD map data and position the map in the middle of the screen if smaller then screen\r
mapGoTo(bg, 0, 0);\r
{\r
INC_PER_FRAME;\r
//animatePlayer(bg, spri, mask, 1, 1, player.x, player.y, persist_aniframe, q, &ptmp);\r
- animatePlayer(bg, spri, player.d-1, 1, player.x, player.y, persist_aniframe, player.q, &ptmp);\r
+ animatePlayer(bg, spri, player.d-1, 1, player.x, player.y, persist_aniframe, player.q, &ptmp);
mapScrollRight(mv, SPEED, 0);\r
- mapScrollRight(mv, SPEED, 1);\r
+ mapScrollRight(mv, SPEED, 1);
//mapScrollRight(mask, SPEED);\r
modexShowPage(spri->page);\r
player.q++;\r
}\r
//tile = tile ? 0 : 1;\r
}*/\r
-}\r
-\r
+}
+
\r
void\r
mapScrollRight(map_view_t *mv, byte offset, word id)
/* draw the next column */\r
x= SCREEN_WIDTH + mv[id].map->tiles->tileWidth;\r
if(id==0)
- mapDrawCol(&mv[id], mv[id].tx + 20 , mv[id].ty-1, x);
+ mapDrawCol(&mv[0], mv[0].tx + 20 , mv[0].ty-1, x);
else
modexCopyPageRegion(mv[id].page, mv[0].page, x, 0, x, 0, mv[id].map->tiles->tileWidth, mv[id].map->tiles->tileHeight*17);
}\r
mv[id].page->data -= 4;\r
mv[id].page->dx = mv[id].map->tiles->tileWidth;\r
\r
- /* draw the next column */\r
+ /* draw the next column */
+ x= 0;\r
if(id==0)\r
- mapDrawCol(&mv[0], mv[id].tx-1, mv[id].ty-1, 0);
+ mapDrawCol(&mv[0], mv[0].tx-1, mv[0].ty-1, 0);
else
- modexCopyPageRegion(mv[id].page, mv[0].page, 0, 0, 0, 0, mv[id].map->tiles->tileWidth, mv[id].map->tiles->tileHeight*17);\r
+ modexCopyPageRegion(mv[id].page, mv[0].page, x, 0, x, 0, mv[id].map->tiles->tileWidth, mv[id].map->tiles->tileHeight*17);\r
}\r
}\r
\r
mv[id].page->dy = mv[id].map->tiles->tileHeight;\r
\r
/* draw the next row */\r
- //y= 0;\r
+ y= 0;\r
if(id==0)\r
- mapDrawRow(&mv[0], mv[id].tx-1 , mv[id].ty-1, 0);
+ mapDrawRow(&mv[0], mv[0].tx-1 , mv[0].ty-1, 0);
else\r
- modexCopyPageRegion(mv[id].page, mv[0].page, 0, 0, 0, 0, mv[id].map->tiles->tileWidth*22, mv[id].map->tiles->tileHeight);
+ modexCopyPageRegion(mv[id].page, mv[0].page, 0, y, 0, y, mv[id].map->tiles->tileWidth*22, mv[id].map->tiles->tileHeight);
}\r
}\r
\r
/* draw the next row */\r
y= SCREEN_HEIGHT + mv[id].map->tiles->tileHeight;\r
if(id==0)\r
- mapDrawRow(&mv[0], mv[id].tx-1 , mv[id].ty+15, y);
+ mapDrawRow(&mv[0], mv[0].tx-1 , mv[0].ty+15, y);
else
modexCopyPageRegion(mv[id].page, mv[0].page, 0, y, 0, y, mv[id].map->tiles->tileWidth*22, mv[id].map->tiles->tileHeight);\r
}\r