[Fix] Squished an offset bug in splite britting.
This commit is contained in:
parent
053d7b75b6
commit
b75f0f1d6b
@ -322,7 +322,6 @@ static void update_all(void) {
|
||||
if(dt > MINIMUM_FPS) {
|
||||
Vec2 pos;
|
||||
vect_csetmin(&pos, 10., (double)(gl_screen.h-40));
|
||||
gl_print(NULL, &pos, "FPS is really low! Skipping frames.");
|
||||
SDL_GL_SwapBuffers();
|
||||
return;
|
||||
}
|
||||
@ -365,6 +364,6 @@ static void display_fps(const double dt) {
|
||||
Vec2 pos;
|
||||
vect_csetmin(&pos, 10., (double)(gl_screen.h-20));
|
||||
if(show_fps)
|
||||
gl_print(NULL, &pos, "%3.2f", fps);
|
||||
gl_print(NULL, &pos, NULL, "%3.2f", fps);
|
||||
}
|
||||
|
||||
|
@ -331,8 +331,8 @@ void gl_getSpriteFromDir(int* x, int* y, const gl_texture* t, const double dir)
|
||||
// Blit the sprite at given position.
|
||||
void gl_blitSprite(const gl_texture* sprite, const Vec2* pos, const int sx, const int sy, const glColor* c) {
|
||||
// Don't bother drawing if offscreen -- waste of cycles.
|
||||
if(fabs(VX(*pos) -VX(*gl_camera)) > gl_screen.w / 2 + sprite->sw / 2 ||
|
||||
fabs(VY(*pos) -VY(*gl_camera)) > gl_screen.h / 2 + sprite->sh / 2)
|
||||
if(fabs(VX(*pos) -VX(*gl_camera)+gui_xoff) > gl_screen.w / 2 + sprite->sw / 2 ||
|
||||
fabs(VY(*pos) -VY(*gl_camera)+gui_yoff) > gl_screen.h / 2 + sprite->sh / 2)
|
||||
return;
|
||||
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
|
Loading…
Reference in New Issue
Block a user