X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=main.c;h=0001c99ca08bc5fe8a3b652d903fbeaa3dd2c399;hp=7c046ddb5bf12dedcbcf8d86a64874af2fa1930c;hb=c7e7c5084a55503896d0ced9a5bf2ab079302adf;hpb=0fa601afde57877514c939ca84b35e9b0134ebe9 diff --git a/main.c b/main.c index 7c046dd..0001c99 100644 --- a/main.c +++ b/main.c @@ -681,9 +681,9 @@ gameloop() { } // SCROLLING - tmp = (ship.y+ship.dy*t_frame-YSCROLLTO)/25 + (ship.dy-screendy); + tmp = (ship.y+ship.h/2+ship.dy*t_frame-YSCROLLTO)/25 + (ship.dy-screendy); screendy += tmp * t_frame/12; - tmp = (ship.x+ship.dx*t_frame-XSCROLLTO)/25 + (ship.dx-screendx); + tmp = (ship.x+ship.w/2+ship.dx*t_frame-XSCROLLTO)/25 + (ship.dx-screendx); screendx += tmp * t_frame/12; // taper off so we don't hit the barrier abruptly. // (if we would hit in < 2 seconds, adjust to 2 seconds). @@ -763,7 +763,7 @@ gameloop() { reset_rocks(); screendx = SCREENDXMIN; screendy = 0; - ship.x = XSIZE/2.2; ship.y = YSIZE/2; + ship.x = XSIZE/2.2; ship.y = YSIZE/2 - ship.w/2; ship.dx = screendx; ship.dy = screendy; ship.lives = 4; ship.flags = MOVE|DRAW|COLLIDE;