Started making Tux a single sprite again. Still missing: FireTux, IceTux
[supertux.git] / src / video / gl_renderer.cpp
index 9fa6b03..3eee8f1 100644 (file)
@@ -236,15 +236,6 @@ namespace GL
   }
 
   void
-  Renderer::draw_text(const DrawingRequest& request)
-  {
-    const TextRequest* textrequest = (TextRequest*) request.request_data;
-
-    textrequest->font->draw(this, textrequest->text, request.pos,
-        textrequest->alignment, request.drawing_effect, request.alpha);
-  }
-
-  void
   Renderer::draw_filled_rect(const DrawingRequest& request)
   {
     const FillRectRequest* fillrectrequest
@@ -298,8 +289,16 @@ namespace GL
     // copy array line-by-line
     for (int i = 0; i < SCREEN_HEIGHT; i++) {
       char* src = pixels + (3 * SCREEN_WIDTH * (SCREEN_HEIGHT - i - 1));
+      if(SDL_MUSTLOCK(shot_surf))
+      {
+        SDL_LockSurface(shot_surf);
+      }
       char* dst = ((char*)shot_surf->pixels) + i * shot_surf->pitch;
       memcpy(dst, src, 3 * SCREEN_WIDTH);
+      if(SDL_MUSTLOCK(shot_surf))
+      {
+        SDL_UnlockSurface(shot_surf);
+      }
     }
 
     // free array