]> 4ch.mooo.com Git - 16.git/commitdiff
modified: 16/modex16/scroll.c
authorsparky4 <sparky4@cock.li>
Sat, 22 Nov 2014 19:35:15 +0000 (13:35 -0600)
committersparky4 <sparky4@cock.li>
Sat, 22 Nov 2014 19:35:15 +0000 (13:35 -0600)
modified:   16/modex16/scroll.exe

16/modex16/scroll.c
16/modex16/scroll.exe

index ece6edfb429f4d4c54d9cc5e4538485e1eabea00..418c3ee2a9ffe7557b0e47310b1fb326abace386 100644 (file)
@@ -114,10 +114,11 @@ void main() {
        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
@@ -140,8 +141,9 @@ void main() {
                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
@@ -165,8 +167,9 @@ void main() {
                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
@@ -191,8 +194,9 @@ void main() {
                {\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
                        }
@@ -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);
 }\r
index 0b089452463d1112ada45a50d35dd87beb527eec..325f3b0ed3fe942f3af089dfe14dc725f691e3e1 100755 (executable)
Binary files a/16/modex16/scroll.exe and b/16/modex16/scroll.exe differ