From 1f8fd7a79343ce670dc62fcb8be48ba78d0c9199 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Mon, 22 Oct 2018 19:18:35 +0200 Subject: [PATCH] removed 'inline' keyword (compilers are better at this today) --- src/game.c | 10 +++++----- src/init.c | 4 ++-- src/libgame/sdl.c | 4 ++-- src/libgame/setup.c | 4 ++-- src/libgame/system.c | 22 +++++++++++----------- src/tools.c | 34 +++++++++++++++++----------------- 6 files changed, 39 insertions(+), 39 deletions(-) diff --git a/src/game.c b/src/game.c index f359a2cb..894ab64e 100644 --- a/src/game.c +++ b/src/game.c @@ -1993,7 +1993,7 @@ static void InitField(int x, int y, boolean init_game) CheckTriggeredElementChange(x, y, element, CE_CREATION_OF_X); } -inline static void InitField_WithBug1(int x, int y, boolean init_game) +static void InitField_WithBug1(int x, int y, boolean init_game) { InitField(x, y, init_game); @@ -2003,7 +2003,7 @@ inline static void InitField_WithBug1(int x, int y, boolean init_game) InitMovDir(x, y); } -inline static void InitField_WithBug2(int x, int y, boolean init_game) +static void InitField_WithBug2(int x, int y, boolean init_game) { int old_element = Feld[x][y]; @@ -4809,7 +4809,7 @@ int NewHiScore(int level_nr) return position; } -inline static int getElementMoveStepsizeExt(int x, int y, int direction) +static int getElementMoveStepsizeExt(int x, int y, int direction) { int element = Feld[x][y]; int dx = (direction == MV_LEFT ? -1 : direction == MV_RIGHT ? +1 : 0); @@ -4831,7 +4831,7 @@ inline static int getElementMoveStepsizeExt(int x, int y, int direction) return step; } -inline static int getElementMoveStepsize(int x, int y) +static int getElementMoveStepsize(int x, int y) { return getElementMoveStepsizeExt(x, y, MovDir[x][y]); } @@ -6497,7 +6497,7 @@ static void Impact(int x, int y) PlayLevelSoundElementAction(x, y, element, ACTION_IMPACT); } -inline static void TurnRoundExt(int x, int y) +static void TurnRoundExt(int x, int y) { static struct { diff --git a/src/init.c b/src/init.c index 2167984b..b53a039c 100644 --- a/src/init.c +++ b/src/init.c @@ -177,7 +177,7 @@ void InitGadgets(void) gadgets_initialized = TRUE; } -inline static void InitElementSmallImagesScaledUp(int graphic) +static void InitElementSmallImagesScaledUp(int graphic) { struct GraphicInfo *g = &graphic_info[graphic]; @@ -240,7 +240,7 @@ static void InitElementSmallImages(void) print_timestamp_done("InitElementSmallImages"); } -inline static void InitScaledImagesScaledUp(int graphic) +static void InitScaledImagesScaledUp(int graphic) { struct GraphicInfo *g = &graphic_info[graphic]; diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index b03f01ad..9a771753 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -525,7 +525,7 @@ void SDLInitVideoDisplay(void) #endif } -inline static void SDLInitVideoBuffer_VideoBuffer(boolean fullscreen) +static void SDLInitVideoBuffer_VideoBuffer(boolean fullscreen) { if (program.headless) return; @@ -555,7 +555,7 @@ inline static void SDLInitVideoBuffer_VideoBuffer(boolean fullscreen) SDLSetWindowTitle(); } -inline static void SDLInitVideoBuffer_DrawBuffer(void) +static void SDLInitVideoBuffer_DrawBuffer(void) { /* SDL cannot directly draw to the visible video framebuffer like X11, but always uses a backbuffer, which is then blitted to the visible diff --git a/src/libgame/setup.c b/src/libgame/setup.c index 50060391..80ebcfa7 100644 --- a/src/libgame/setup.c +++ b/src/libgame/setup.c @@ -436,7 +436,7 @@ char *setLevelArtworkDir(TreeInfo *ti) return *artwork_set_ptr; } -inline static char *getLevelArtworkSet(int type) +static char *getLevelArtworkSet(int type) { if (leveldir_current == NULL) return NULL; @@ -444,7 +444,7 @@ inline static char *getLevelArtworkSet(int type) return LEVELDIR_ARTWORK_SET(leveldir_current, type); } -inline static char *getLevelArtworkDir(int type) +static char *getLevelArtworkDir(int type) { if (leveldir_current == NULL) return UNDEFINED_FILENAME; diff --git a/src/libgame/system.c b/src/libgame/system.c index 64f67a17..63c0de47 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -495,13 +495,13 @@ void SetDoorBackgroundBitmap(Bitmap *background_bitmap_tile) /* video functions */ /* ========================================================================= */ -inline static int GetRealDepth(int depth) +static int GetRealDepth(int depth) { return (depth == DEFAULT_DEPTH ? video.default_depth : depth); } -inline static void sysFillRectangle(Bitmap *bitmap, int x, int y, - int width, int height, Pixel color) +static void sysFillRectangle(Bitmap *bitmap, int x, int y, + int width, int height, Pixel color) { SDLFillRectangle(bitmap, x, y, width, height, color); @@ -509,9 +509,9 @@ inline static void sysFillRectangle(Bitmap *bitmap, int x, int y, SetRedrawMaskFromArea(x, y, width, height); } -inline static void sysCopyArea(Bitmap *src_bitmap, Bitmap *dst_bitmap, - int src_x, int src_y, int width, int height, - int dst_x, int dst_y, int mask_mode) +static void sysCopyArea(Bitmap *src_bitmap, Bitmap *dst_bitmap, + int src_x, int src_y, int width, int height, + int dst_x, int dst_y, int mask_mode) { SDLCopyArea(src_bitmap, dst_bitmap, src_x, src_y, width, height, dst_x, dst_y, mask_mode); @@ -580,7 +580,7 @@ void InitVideoBuffer(int width, int height, int depth, boolean fullscreen) drawto = backbuffer; } -inline static void FreeBitmapPointers(Bitmap *bitmap) +static void FreeBitmapPointers(Bitmap *bitmap) { if (bitmap == NULL) return; @@ -591,8 +591,8 @@ inline static void FreeBitmapPointers(Bitmap *bitmap) bitmap->source_filename = NULL; } -inline static void TransferBitmapPointers(Bitmap *src_bitmap, - Bitmap *dst_bitmap) +static void TransferBitmapPointers(Bitmap *src_bitmap, + Bitmap *dst_bitmap) { if (src_bitmap == NULL || dst_bitmap == NULL) return; @@ -687,8 +687,8 @@ void SetRedrawMaskFromArea(int x, int y, int width, int height) redraw_mask = REDRAW_ALL; } -inline static boolean CheckDrawingArea(int x, int y, int width, int height, - int draw_mask) +static boolean CheckDrawingArea(int x, int y, int width, int height, + int draw_mask) { if (draw_mask == REDRAW_NONE) return FALSE; diff --git a/src/tools.c b/src/tools.c index b23a96dd..f81ff9d9 100644 --- a/src/tools.c +++ b/src/tools.c @@ -1610,8 +1610,8 @@ void getMiniGraphicSource(int graphic, Bitmap **bitmap, int *x, int *y) getSizedGraphicSource(graphic, 0, MINI_TILESIZE, bitmap, x, y); } -inline static void getGraphicSourceExt(int graphic, int frame, Bitmap **bitmap, - int *x, int *y, boolean get_backside) +static void getGraphicSourceExt(int graphic, int frame, Bitmap **bitmap, + int *x, int *y, boolean get_backside) { getSizedGraphicSourceExt(graphic, frame, TILESIZE_VAR, bitmap, x, y, get_backside); @@ -1783,9 +1783,9 @@ void DrawMiniGraphicExt(DrawBuffer *d, int x, int y, int graphic) BlitBitmap(src_bitmap, d, src_x, src_y, MINI_TILEX, MINI_TILEY, x, y); } -inline static void DrawGraphicShiftedNormal(int x, int y, int dx, int dy, - int graphic, int frame, - int cut_mode, int mask_mode) +static void DrawGraphicShiftedNormal(int x, int y, int dx, int dy, + int graphic, int frame, + int cut_mode, int mask_mode) { Bitmap *src_bitmap; int src_x, src_y; @@ -1894,9 +1894,9 @@ inline static void DrawGraphicShiftedNormal(int x, int y, int dx, int dy, } } -inline static void DrawGraphicShiftedDouble(int x, int y, int dx, int dy, - int graphic, int frame, - int cut_mode, int mask_mode) +static void DrawGraphicShiftedDouble(int x, int y, int dx, int dy, + int graphic, int frame, + int cut_mode, int mask_mode) { Bitmap *src_bitmap; int src_x, src_y; @@ -3692,9 +3692,9 @@ void ClearNetworkPlayers(void) DrawNetworkPlayersExt(TRUE); } -inline static void DrawGraphicAnimationExt(DrawBuffer *dst_bitmap, int x, int y, - int graphic, int sync_frame, - int mask_mode) +static void DrawGraphicAnimationExt(DrawBuffer *dst_bitmap, int x, int y, + int graphic, int sync_frame, + int mask_mode) { int frame = getGraphicAnimationFrame(graphic, sync_frame); @@ -3715,7 +3715,7 @@ void DrawFixedGraphicAnimationExt(DrawBuffer *dst_bitmap, int x, int y, DrawFixedGraphicExt(dst_bitmap, x, y, graphic, frame); } -inline static void DrawGraphicAnimation(int x, int y, int graphic) +static void DrawGraphicAnimation(int x, int y, int graphic) { int lx = LEVELX(x), ly = LEVELY(y); @@ -8159,7 +8159,7 @@ unsigned int InitRND(int seed) static struct Mapping_EM_to_RND_object object_mapping[TILE_MAX]; static struct Mapping_EM_to_RND_player player_mapping[MAX_PLAYERS][SPR_MAX]; -inline static int get_effective_element_EM(int tile, int frame_em) +static int get_effective_element_EM(int tile, int frame_em) { int element = object_mapping[tile].element_rnd; int action = object_mapping[tile].action; @@ -8226,7 +8226,7 @@ inline static int get_effective_element_EM(int tile, int frame_em) } } -inline static boolean check_linear_animation_EM(int tile) +static boolean check_linear_animation_EM(int tile) { switch (tile) { @@ -8262,9 +8262,9 @@ inline static boolean check_linear_animation_EM(int tile) return FALSE; } -inline static void set_crumbled_graphics_EM(struct GraphicInfo_EM *g_em, - boolean has_crumbled_graphics, - int crumbled, int sync_frame) +static void set_crumbled_graphics_EM(struct GraphicInfo_EM *g_em, + boolean has_crumbled_graphics, + int crumbled, int sync_frame) { /* if element can be crumbled, but certain action graphics are just empty space (like instantly snapping sand to empty space in 1 frame), do not -- 2.34.1