From: Holger Schemel Date: Fri, 21 Oct 2022 13:37:10 +0000 (+0200) Subject: removed unused function parameters X-Git-Tag: 4.3.3.0~39 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=cb0ddc73cbd791f57009f4b2e9037069fb6cdff0;p=rocksndiamonds.git removed unused function parameters This issue was found by using GCC with option "-Wextra". --- diff --git a/src/Makefile b/src/Makefile index ec8cb5e9..192186e0 100644 --- a/src/Makefile +++ b/src/Makefile @@ -134,6 +134,7 @@ DEBUG = -DDEBUG -g # OPTIONS = $(DEBUG) -O2 -Wall # only for debugging purposes # OPTIONS = $(DEBUG) -Wall # only for debugging purposes OPTIONS = $(DEBUG) -Wall -Wstrict-prototypes -Wmissing-prototypes +# OPTIONS = $(DEBUG) -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes # OPTIONS = $(DEBUG) -Wall -ansi -pedantic # only for debugging purposes # OPTIONS = -O2 -Wall -ansi -pedantic # OPTIONS = -O2 -Wall diff --git a/src/libgame/system.c b/src/libgame/system.c index 97b4269c..fcde13d3 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -690,8 +690,7 @@ void SetRedrawMaskFromArea(int x, int y, int width, int height) redraw_mask = REDRAW_ALL; } -static boolean CheckDrawingArea(int x, int y, int width, int height, - int draw_mask) +static boolean CheckDrawingArea(int x, int y, int draw_mask) { if (draw_mask == REDRAW_NONE) return FALSE; @@ -725,15 +724,15 @@ boolean DrawingDeactivatedField(void) return FALSE; } -boolean DrawingDeactivated(int x, int y, int width, int height) +boolean DrawingDeactivated(int x, int y) { - return CheckDrawingArea(x, y, width, height, gfx.draw_deactivation_mask); + return CheckDrawingArea(x, y, gfx.draw_deactivation_mask); } boolean DrawingOnBackground(int x, int y) { - return (CheckDrawingArea(x, y, 1, 1, gfx.background_bitmap_mask) && - CheckDrawingArea(x, y, 1, 1, gfx.draw_background_mask)); + return (CheckDrawingArea(x, y, gfx.background_bitmap_mask) && + CheckDrawingArea(x, y, gfx.draw_background_mask)); } static boolean InClippedRectangle(Bitmap *bitmap, int *x, int *y, @@ -802,7 +801,7 @@ void BlitBitmap(Bitmap *src_bitmap, Bitmap *dst_bitmap, if (src_bitmap == NULL || dst_bitmap == NULL) return; - if (DrawingDeactivated(dst_x, dst_y, width, height)) + if (DrawingDeactivated(dst_x, dst_y)) return; if (!InClippedRectangle(src_bitmap, &src_x, &src_y, &width, &height, FALSE) || @@ -909,7 +908,7 @@ void FillRectangle(Bitmap *bitmap, int x, int y, int width, int height, if (program.headless) return; - if (DrawingDeactivated(x, y, width, height)) + if (DrawingDeactivated(x, y)) return; if (!InClippedRectangle(bitmap, &x, &y, &width, &height, TRUE)) @@ -936,7 +935,7 @@ void BlitBitmapMasked(Bitmap *src_bitmap, Bitmap *dst_bitmap, int src_x, int src_y, int width, int height, int dst_x, int dst_y) { - if (DrawingDeactivated(dst_x, dst_y, width, height)) + if (DrawingDeactivated(dst_x, dst_y)) return; sysCopyArea(src_bitmap, dst_bitmap, src_x, src_y, width, height, diff --git a/src/libgame/system.h b/src/libgame/system.h index 115a234e..c1da0145 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -2001,7 +2001,7 @@ void ClearRectangle(Bitmap *, int, int, int, int); void ClearRectangleOnBackground(Bitmap *, int, int, int, int); void BlitBitmapMasked(Bitmap *, Bitmap *, int, int, int, int, int, int); boolean DrawingDeactivatedField(void); -boolean DrawingDeactivated(int, int, int, int); +boolean DrawingDeactivated(int, int); boolean DrawingOnBackground(int, int); boolean DrawingAreaChanged(void); void BlitBitmapOnBackground(Bitmap *, Bitmap *, int, int, int, int, int, int); diff --git a/src/tools.c b/src/tools.c index 6660e120..ed526420 100644 --- a/src/tools.c +++ b/src/tools.c @@ -775,7 +775,7 @@ void BackToFront(void) DrawFramesPerSecond(); // remove playfield redraw before potentially merging with doors redraw - if (DrawingDeactivated(REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE)) + if (DrawingDeactivated(REAL_SX, REAL_SY)) redraw_mask &= ~REDRAW_FIELD; // redraw complete window if both playfield and (some) doors need redraw