added cropping text area gadgets that do not fit to the current viewport
[rocksndiamonds.git] / src / libgame / sdl.c
index 094b656511e88ae2614a4503345fbe610e46951a..9f97f5366870ce1d5e63cdc9b43c6b101b4dd100 100644 (file)
@@ -69,6 +69,9 @@ static void FinalizeScreen(int draw_target)
 
 static void UpdateScreenExt(SDL_Rect *rect, boolean with_frame_delay)
 {
+  if (program.headless)
+    return;
+
   static DelayCounter update_screen_delay = { 50 };    // (milliseconds)
   SDL_Surface *screen = backbuffer->surface;
 
@@ -1903,22 +1906,6 @@ void SDLPutPixel(Bitmap *dst_bitmap, int x, int y, Pixel pixel)
 // quick (no, it's slow) and dirty hack to "invert" rectangle inside SDL surface
 // ----------------------------------------------------------------------------
 
-void SDLInvertArea(Bitmap *bitmap, int src_x, int src_y,
-                  int width, int height, Uint32 color)
-{
-  int x, y;
-
-  for (y = src_y; y < src_y + height; y++)
-  {
-    for (x = src_x; x < src_x + width; x++)
-    {
-      Uint32 pixel = SDLGetPixel(bitmap, x, y);
-
-      SDLPutPixel(bitmap, x, y, pixel == BLACK_PIXEL ? color : BLACK_PIXEL);
-    }
-  }
-}
-
 void SDLCopyInverseMasked(Bitmap *src_bitmap, Bitmap *dst_bitmap,
                          int src_x, int src_y, int width, int height,
                          int dst_x, int dst_y)