From: sparky4 Date: Sat, 22 Nov 2014 19:35:15 +0000 (-0600) Subject: modified: 16/modex16/scroll.c X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=7967c77f796905e1cddfdd50e5f071484dcb5ca4;p=16.git modified: 16/modex16/scroll.c modified: 16/modex16/scroll.exe --- diff --git a/16/modex16/scroll.c b/16/modex16/scroll.c index ece6edfb..418c3ee2 100644 --- a/16/modex16/scroll.c +++ b/16/modex16/scroll.c @@ -114,10 +114,11 @@ void main() { if(keyp(77)) { if(draw->tx >= 0 && draw->tx+20 < MAPX && player.tx == draw->tx + 10) - { + { for(q=0; q<(TILEWH/SPEED); q++) { - mapScrollRight(draw, SPEED); + mapScrollRight(draw, SPEED); + modexDrawBmp(draw->page, player.x+((q+1)*SPEED), player.y, &bmp); modexShowPage(draw->page); // mapScrollRight(draw, 1); // SWAP(draw, show); @@ -140,8 +141,9 @@ void main() { if(draw->tx > 0 && draw->tx+20 <= MAPX && player.tx == draw->tx + 10) { for(q=0; q<(TILEWH/SPEED); q++) - { - mapScrollLeft(draw, SPEED); + { + mapScrollLeft(draw, SPEED); + modexDrawBmp(draw->page, player.x-((q+1)*SPEED), player.y, &bmp); modexShowPage(draw->page); // mapScrollLeft(show, 1); // SWAP(draw, show); @@ -165,8 +167,9 @@ void main() { if(draw->ty >= 0 && draw->ty+15 < MAPY && player.ty == draw->ty + 8) { for(q=0; q<(TILEWH/SPEED); q++) - { - mapScrollDown(draw, SPEED); + { + mapScrollDown(draw, SPEED); + modexDrawBmp(draw->page, player.x, player.y+((q+1)*SPEED), &bmp); modexShowPage(draw->page); // mapScrollDown(show, 1); // SWAP(draw, show); @@ -191,8 +194,9 @@ void main() { { for(q=0; q<(TILEWH/SPEED); q++) { - mapScrollUp(draw, SPEED); - modexShowPage(draw->page); + mapScrollUp(draw, SPEED); + modexDrawBmp(draw->page, player.x, player.y-((q+1)*SPEED), &bmp); + modexShowPage(draw->page); // mapScrollUp(show, 1); // SWAP(draw, show); } @@ -219,6 +223,8 @@ void main() { 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); } diff --git a/16/modex16/scroll.exe b/16/modex16/scroll.exe index 0b089452..325f3b0e 100755 Binary files a/16/modex16/scroll.exe and b/16/modex16/scroll.exe differ