diff --git a/src/main.c b/src/main.c index 21161c1..e1a4d34 100644 --- a/src/main.c +++ b/src/main.c @@ -40,7 +40,7 @@ int main(int argc, const char** argv) { switch(event.type) { case SDL_KEYDOWN: switch(event.key.keysym.sym) { - case SDLK_q: + case SDLK_ESCAPE: quit = 1; break; case SDLK_a: diff --git a/src/opengl.c b/src/opengl.c index 61cd30f..78b8cd6 100644 --- a/src/opengl.c +++ b/src/opengl.c @@ -175,6 +175,7 @@ void gl_free(gl_texture* texture) { // Blit the sprite at given position. void gl_blitSprite(gl_texture* sprite, Vec2* pos, const int sx, const int sy) { glMatrixMode(GL_TEXTURE); + glPushMatrix(); glTranslatef(sprite->sw * (FP)(sx)/sprite->rw, sprite->sh*(sprite->sy-(FP)sy-1)/sprite->rh, 0.0f);