modexShowPage(mv.page);\r
}\r
\r
+ /* scroll all the way up */\r
+ for(; y>0; y--) {\r
+ mapScrollUp(&mv, 1);\r
+ modexShowPage(mv.page);\r
+ }\r
+\r
/* spin for a time */\r
for(x=0; x<500; x++) {\r
modexWaitBorder();\r
\r
void\r
mapScrollUp(map_view_t *mv, byte offset) {\r
+ word x, y; /* coordinate for drawing */\r
+\r
+ /* increment the pixel position and update the page */\r
+ mv->page->dy -= offset;\r
+\r
+ /* check to see if this changes the tile */\r
+ if(mv->page->dy == 0 ) {\r
+ /* go down one tile */\r
+ mv->ty--;\r
+ /* Snap the origin downward */\r
+ mv->page->data -= mv->page->width*4;\r
+ mv->page->dy = mv->map->tiles->tileHeight;\r
+\r
+\r
+ /* draw the next row */\r
+ y= 0;\r
+ mapDrawRow(mv, mv->tx-1 , mv->ty-1, y);\r
+ }\r
}\r
\r
\r
/* go down one tile */\r
mv->ty++;\r
/* Snap the origin downward */\r
- mv->page->data += SCREEN_WIDTH*4;\r
+ mv->page->data += mv->page->width*4;\r
mv->page->dy = mv->map->tiles->tileHeight;\r
\r
\r