if(keyp(77))
{
if(draw->tx >= 0 && draw->tx+20 < MAPX && player.tx == draw->tx + 10)
- {\r
+ {
for(q=0; q<(TILEWH/SPEED); q++)
{\r
- mapScrollRight(draw, SPEED);\r
+ mapScrollRight(draw, SPEED);
+ modexDrawBmp(draw->page, player.x+((q+1)*SPEED), player.y, &bmp);
modexShowPage(draw->page);\r
// mapScrollRight(draw, 1);\r
// SWAP(draw, show);\r
if(draw->tx > 0 && draw->tx+20 <= MAPX && player.tx == draw->tx + 10)
{\r
for(q=0; q<(TILEWH/SPEED); q++)
- {\r
- mapScrollLeft(draw, SPEED);\r
+ {
+ mapScrollLeft(draw, SPEED);
+ modexDrawBmp(draw->page, player.x-((q+1)*SPEED), player.y, &bmp);
modexShowPage(draw->page);\r
// mapScrollLeft(show, 1);\r
// SWAP(draw, show);\r
if(draw->ty >= 0 && draw->ty+15 < MAPY && player.ty == draw->ty + 8)
{\r
for(q=0; q<(TILEWH/SPEED); q++)
- {\r
- mapScrollDown(draw, SPEED);\r
+ {
+ mapScrollDown(draw, SPEED);
+ modexDrawBmp(draw->page, player.x, player.y+((q+1)*SPEED), &bmp);
modexShowPage(draw->page);\r
// mapScrollDown(show, 1);\r
// SWAP(draw, show);\r
{\r
for(q=0; q<(TILEWH/SPEED); q++)
{\r
- mapScrollUp(draw, SPEED);\r
- modexShowPage(draw->page);\r
+ mapScrollUp(draw, SPEED);
+ modexDrawBmp(draw->page, player.x, player.y-((q+1)*SPEED), &bmp);
+ modexShowPage(draw->page);
// mapScrollUp(show, 1);\r
// SWAP(draw, show);\r
}
printf("Project 16 scroll.exe\n");
printf("tx: %d\n", draw->tx);
printf("ty: %d\n", draw->ty);
+ printf("player.x: %d\n", player.x);
+ printf("player.y: %d\n", player.y);
printf("player.tx: %d\n", player.tx);
printf("player.ty: %d\n", player.ty);
}\r