[Fix] Oops, I was negating the camera's x coord..

This commit is contained in:
Allanis 2013-02-03 15:04:48 +00:00
parent 2eff6f844d
commit c36b877ae9
2 changed files with 3 additions and 3 deletions

View File

@ -245,7 +245,7 @@ void gl_blitSprite(const gl_texture* sprite, const Vec2* pos, const int sx, cons
glMatrixMode(GL_PROJECTION);
glPushMatrix(); // Projection translation matrix.
glTranslated(VX(*pos) -VX(*gl_camera) - sprite->sw/2.,
glTranslated(VX(*pos) - VX(*gl_camera) - sprite->sw/2.,
VY(*pos) -VY(*gl_camera) - sprite->sh/2., 0.);
glScalef((double)gl_screen.w/SCREEN_W, (double)gl_screen.h/SCREEN_H, 0.);

View File

@ -121,7 +121,7 @@ static void rk4_update(Solid* obj, const double dt) {
// Make sure angle doesn't flip.
obj->dir += M_PI/360.*obj->dir_vel*dt;
if(obj->dir > 2*M_PI) obj->dir -= 2*M_PI;
if(obj->dir < 0.0) obj->dir += 2*M_PI;
if(obj->dir < 0.) obj->dir += 2*M_PI;
int N = (dt > RK4_MIN_H) ? (int)(dt/RK4_MIN_H) : 1;
double h = dt / (double)N; // Step.
@ -154,7 +154,7 @@ static void rk4_update(Solid* obj, const double dt) {
ty = iy = vy;
ty += 2.*(iy + h/2.*ty);
ty += 2.*(iy + h/2.*ty);
ty += iy +h*ty;
ty += iy + h*ty;
ty *= h/6.;
py += ty;