X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=main.c;h=c32feb36862a7bf3a7e4f9daa5a359f376a2b8f8;hp=58d68d70e5ab68b6ed7ea2b2afdee8c197d8dd00;hb=9ffdd66ad5f2c29a2125bbd458a700625f178065;hpb=841f94c4182f8dff0253db9bae4922c3c9039a5f diff --git a/main.c b/main.c index 58d68d7..c32feb3 100644 --- a/main.c +++ b/main.c @@ -613,16 +613,10 @@ gameloop() { shipy += shipdy*t_frame; // SCROLLING - tmp = shipy - (YSIZE / 2); - tmp += shipdy * 25; - tmp /= -25; - tmp = ((screendy * (t_frame - 12)) + (tmp * t_frame)) / 12; - screendy = -tmp; - tmp = shipx - (XSIZE / 3); - tmp += shipdx * 25; - tmp /= -25; - tmp = ((screendx * (t_frame - 12)) + (tmp * t_frame)) / 12; - screendx = -tmp; + tmp = (shipy-YSCROLLTO)/25 + (shipdy-screendy); + screendy += tmp * t_frame/12; + tmp = (shipx-XSCROLLTO)/25 + (shipdx-screendx); + screendx += tmp * t_frame/12; // taper off if we would hit the barrier in under 2 seconds. if(back_dist + (screendx - SCREENDXMIN)*TO_TICKS(2) < 0) { @@ -753,7 +747,6 @@ main(int argc, char **argv) { return 1; } - reset_rocks(); gameloop(); return 0;