X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=main.c;h=3fbe7a6409738e0063998055937a17be70f4221a;hp=6b575bd61f9093c066a90cc6e9be6bf2df7826c5;hb=511783c655d6fdcc22509b09ec1afbfba21299e3;hpb=0179e60b6196d115000cb77fcd4cc880eecb177f diff --git a/main.c b/main.c index 6b575bd..3fbe7a6 100644 --- a/main.c +++ b/main.c @@ -132,8 +132,8 @@ init_space_dots() { for(i = 0; iformat, b, b, b); } } @@ -753,12 +753,13 @@ gameloop() { if(shipx<0 || shipx>XSIZE-surf_ship->w) { // BOUNCE from left and right wall shipx -= shipdx*gamerate; - shipdx *= -0.99; + shipdx *= -99; } // BOUNCE Y if(shipy<0 || shipy>YSIZE-surf_ship->h) { // BOUNCE from top and bottom wall + printf("bouncing top/bottom.\n"); shipy -= shipdy; shipdy *= -0.99; } @@ -768,7 +769,7 @@ gameloop() { // Play the explosion sound play_sound(0); make_bang_dots(shipx,shipy,shipdx,shipdy,surf_ship,30); - shipdx = screendx; + shipdx = 0; shipdy = 0; if(--nships <= 0) { gameover = 1; @@ -797,9 +798,9 @@ gameloop() { play_tune(1); gameover = 0; - shipx = 2*XSIZE/3; + shipx = XSIZE/2; shipy = YSIZE/2; - shipdx = screendx; + shipdx = 0; shipdy = 0; }