- //when player.tx or player.ty == 0 or player.tx == 20 or player.ty == 15 then stop because that is edge of map and you do not want to walk of the map\r
- if(keyp(77)){
- if(draw->tx >= 0 && draw->tx+20 < MAPX)\r
- for(q=0; q<TILEWH; q++) {\r
- mapScrollRight(draw, SPEED);\r
+ //when player.tx or player.ty == 0 or player.tx == 20 or player.ty == 15 then stop because that is edge of map and you do not want to walk of the map
+ if(keyp(77))
+ {
+ if(draw->tx >= 0 && draw->tx+20 < MAPX && player.tx == draw->tx + 10)
+ {
+ for(q=0; q<(TILEWH/SPEED); q++)
+ {\r
+ modexDrawBmp(draw->page, player.x+((q+1)*SPEED), player.y, &bmp);
+ mapScrollRight(draw, SPEED);