\r
setkb(1);\r
/* create the map */\r
- map = allocMap(MAPX,MAPY); //20x15 is the resolution of the screen you can make maps smaller than 20x15 but the null space needs to be bgn properly\r
+ map = allocMap(MAPX,MAPY); //20x15 is the resolution of the screen you can make maps smaller than 20x15 but the null space needs to be drawn properly\r
initMap(&map);\r
mv.map = ↦\r
mv2.map = ↦\r
modexShowPage(spri->page);\r
}\r
}\r
- \r
+\r
}\r
\r
modexLeave();\r
\r
void\r
mapScrollRight(map_view_t *mv, byte offset) {\r
- word x, y; /* coordinate for bging */\r
+ word x, y; /* coordinate for drawing */\r
\r
/* increment the pixel position and update the page */\r
mv->page->dx += offset;\r
mv->page->dx = mv->map->tiles->tileWidth;\r
\r
\r
- /* bg the next column */\r
+ /* draw the next column */\r
x= SCREEN_WIDTH + mv->map->tiles->tileWidth;\r
mapDrawCol(mv, mv->tx + 20 , mv->ty-1, x);\r
}\r
\r
void\r
mapScrollLeft(map_view_t *mv, byte offset) {\r
- word x, y; /* coordinate for bging */\r
+ word x, y; /* coordinate for drawing */\r
\r
/* increment the pixel position and update the page */\r
mv->page->dx -= offset;\r
mv->page->data -= 4;\r
mv->page->dx = mv->map->tiles->tileWidth;\r
\r
- /* bg the next column */\r
+ /* draw the next column */\r
mapDrawCol(mv, mv->tx-1, mv->ty-1, 0);\r
}\r
}\r
\r
void\r
mapScrollUp(map_view_t *mv, byte offset) {\r
- word x, y; /* coordinate for bging */\r
+ word x, y; /* coordinate for drawing */\r
\r
/* increment the pixel position and update the page */\r
mv->page->dy -= offset;\r
mv->page->dy = mv->map->tiles->tileHeight;\r
\r
\r
- /* bg the next row */\r
+ /* draw the next row */\r
y= 0;\r
mapDrawRow(mv, mv->tx-1 , mv->ty-1, y);\r
}\r
\r
void\r
mapScrollDown(map_view_t *mv, byte offset) {\r
- word x, y; /* coordinate for bging */\r
+ word x, y; /* coordinate for drawing */\r
\r
/* increment the pixel position and update the page */\r
mv->page->dy += offset;\r
mv->page->dy = mv->map->tiles->tileHeight;\r
\r
\r
- /* bg the next row */\r
+ /* draw the next row */\r
y= SCREEN_HEIGHT + mv->map->tiles->tileHeight;\r
mapDrawRow(mv, mv->tx-1 , mv->ty+15, y);\r
}\r
mv->dxThresh = mv->map->tiles->tileWidth * 2;\r
mv->dyThresh = mv->map->tiles->tileHeight * 2;\r
\r
- /* bg the tiles */\r
+ /* draw the tiles */\r
modexClearRegion(mv->page, 0, 0, mv->page->width, mv->page->height, 0);\r
py=0;\r
i=mv->ty * mv->map->width + mv->tx;\r
x=x-qq-4;\r
y=y-TILEWH;\r
break;\r
- } //TODO: make flexible animation thingy\r
- if(2>ls && ls>=0) { modexCopyPageRegion(dest->page, src->page, x-2, y-4, x-2, y-4, 28, 40);\r
- modexDrawSpriteRegion(dest->page, x, y, 48, dire, 24, 32, bmp); modexWaitBorder(); }else\r
- if(4>ls && ls>=2) { modexCopyPageRegion(dest->page, src->page, x-2, y-4, x-2, y-4, 28, 40);\r
- modexDrawSpriteRegion(dest->page, x, y, 24, dire, 24, 32, bmp); modexWaitBorder(); }else\r
- if(6>ls && ls>4) { modexCopyPageRegion(dest->page, src->page, x-2, y-4, x-2, y-4, 28, 40);\r
- modexDrawSpriteRegion(dest->page, x, y, 0, dire, 24, 32, bmp); modexWaitBorder(); }else\r
- if(8>ls && ls>6) { modexCopyPageRegion(dest->page, src->page, x-2, y-4, x-2, y-4, 28, 40);\r
- modexDrawSpriteRegion(dest->page, x, y, 24, dire, 24, 32, bmp); modexWaitBorder(); }else ls-=ls;\r
+ }
+ //TODO: make flexible animation thingy\r
+ if(2>ls && ls>=0) { modexCopyPageRegion(dest->page, src->page, x-2, y-4, x-2, y-4, 28, 40);\r
+ modexDrawSpriteRegion(dest->page, x, y, 48, dire, 24, 32, bmp); }else\r
+ if(4>ls && ls>=2) { modexCopyPageRegion(dest->page, src->page, x-2, y-4, x-2, y-4, 28, 40);\r
+ modexDrawSpriteRegion(dest->page, x, y, 24, dire, 24, 32, bmp); }else\r
+ if(6>ls && ls>=4) { modexCopyPageRegion(dest->page, src->page, x-2, y-4, x-2, y-4, 28, 40);\r
+ modexDrawSpriteRegion(dest->page, x, y, 0, dire, 24, 32, bmp); }else\r
+ if(8>ls && ls>=6) { modexCopyPageRegion(dest->page, src->page, x-2, y-4, x-2, y-4, 28, 40);\r
+ modexDrawSpriteRegion(dest->page, x, y, 24, dire, 24, 32, bmp); }else ls-=ls;
+ modexWaitBorder();\r
}\r