X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Flibgame%2Fsdl.c;h=9f97f5366870ce1d5e63cdc9b43c6b101b4dd100;hb=c118d37bf6ad02e90d4ea7c4a4d7d34d8f745c26;hp=094b656511e88ae2614a4503345fbe610e46951a;hpb=77c205677b99af7f0dd31e8833887d75e89db7d1;p=rocksndiamonds.git diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index 094b6565..9f97f536 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -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)