void mapDrawRow(map_view_t *mv, int tx, int ty, word y);\r
void mapDrawCol(map_view_t *mv, int tx, int ty, word x);\r
\r
+#define SWAP(a, b) tmp=a; a=b; b=tmp;\r
void main() {\r
int show1=1;\r
int tx, ty;\r
int x, y;\r
- page_t screen;\r
+ page_t screen,screen2;\r
map_t map;\r
- map_view_t mv;\r
+ map_view_t mv, mv2;\r
+ map_view_t *draw, *show, *tmp;\r
byte *ptr;\r
\r
/* create the map */\r
map = allocMap(80,60);\r
initMap(&map);\r
mv.map = ↦\r
+ mv2.map = ↦\r
\r
/* draw the tiles */\r
ptr = map.data;\r
screen = modexDefaultPage();\r
screen.width = 352;\r
mv.page = &screen;\r
+ screen2=modexNextPage(mv.page);\r
+ mv2.page = &screen2;\r
mapGoTo(&mv, 0, 0);\r
+ mapGoTo(&mv2, 0, 0);\r
modexShowPage(mv.page);\r
\r
+ /* set up paging */\r
+ show = &mv;\r
+ draw = &mv2;\r
/* scroll all the way to the right */\r
for(x=0; x<(map.width*16-SCREEN_WIDTH); x++) {\r
- mapScrollRight(&mv, 1);\r
- modexShowPage(mv.page);\r
+ mapScrollRight(draw, 1);\r
+ modexShowPage(draw->page);\r
+ mapScrollRight(show, 1);\r
+ //SWAP(draw, show);\r
}\r
\r
/* scroll all the way to the left */\r