From 93fbf84c8088edf7af52a097dbbfaaecd128b316 Mon Sep 17 00:00:00 2001
From: Allanis <allanis@saracraft.net>
Date: Wed, 30 Jan 2013 23:40:27 +0000
Subject: [PATCH] [Fix] Forgot to push the matrix stack.

---
 src/main.c   | 2 +-
 src/opengl.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

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);