From 92ae204856b3b41863f4244dd75cc5c7268f034d Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sat, 22 Oct 2022 12:26:28 +0200 Subject: [PATCH] removed unused function parameters This issue was found by using GCC with option "-Wextra". --- src/game.c | 10 +++------- src/game_em/export.h | 2 +- src/game_em/game.c | 2 +- src/game_mm/export.h | 2 +- src/game_mm/mm_game.c | 6 +++--- src/game_sp/MainGameLoop.c | 2 +- src/game_sp/MainGameLoop.h | 2 +- src/game_sp/export.h | 2 +- src/game_sp/main.c | 4 ++-- 9 files changed, 14 insertions(+), 18 deletions(-) diff --git a/src/game.c b/src/game.c index 3a2c1a11..ce032327 100644 --- a/src/game.c +++ b/src/game.c @@ -11990,25 +11990,23 @@ void GameActions(void) void GameActions_EM_Main(void) { byte effective_action[MAX_PLAYERS]; - boolean warp_mode = (tape.playing && tape.warp_forward && !tape.pausing); int i; for (i = 0; i < MAX_PLAYERS; i++) effective_action[i] = stored_player[i].effective_action; - GameActions_EM(effective_action, warp_mode); + GameActions_EM(effective_action); } void GameActions_SP_Main(void) { byte effective_action[MAX_PLAYERS]; - boolean warp_mode = (tape.playing && tape.warp_forward && !tape.pausing); int i; for (i = 0; i < MAX_PLAYERS; i++) effective_action[i] = stored_player[i].effective_action; - GameActions_SP(effective_action, warp_mode); + GameActions_SP(effective_action); for (i = 0; i < MAX_PLAYERS; i++) { @@ -12021,9 +12019,7 @@ void GameActions_SP_Main(void) void GameActions_MM_Main(void) { - boolean warp_mode = (tape.playing && tape.warp_forward && !tape.pausing); - - GameActions_MM(local_player->effective_mouse_action, warp_mode); + GameActions_MM(local_player->effective_mouse_action); } void GameActions_RND_Main(void) diff --git a/src/game_em/export.h b/src/game_em/export.h index bb700894..409a04e4 100644 --- a/src/game_em/export.h +++ b/src/game_em/export.h @@ -108,7 +108,7 @@ void em_close_all(void); void InitGfxBuffers_EM(void); void InitGameEngine_EM(void); -void GameActions_EM(byte[MAX_PLAYERS], boolean); +void GameActions_EM(byte[MAX_PLAYERS]); unsigned int InitEngineRandom_EM(int); diff --git a/src/game_em/game.c b/src/game_em/game.c index 8443ff05..cb7a1cbf 100644 --- a/src/game_em/game.c +++ b/src/game_em/game.c @@ -82,7 +82,7 @@ void InitGameEngine_EM(void) RedrawPlayfield_EM(FALSE); } -void GameActions_EM(byte action[MAX_PLAYERS], boolean warp_mode) +void GameActions_EM(byte action[MAX_PLAYERS]) { int i; boolean any_player_dropping = FALSE; diff --git a/src/game_mm/export.h b/src/game_mm/export.h index 21e20cdc..3e51848e 100644 --- a/src/game_mm/export.h +++ b/src/game_mm/export.h @@ -218,7 +218,7 @@ void InitGfxBuffers_MM(void); void InitGameEngine_MM(void); void InitGameActions_MM(void); -void GameActions_MM(struct MouseActionInfo, boolean); +void GameActions_MM(struct MouseActionInfo); void DrawLaser_MM(void); void DrawTileCursor_MM(int, boolean); diff --git a/src/game_mm/mm_game.c b/src/game_mm/mm_game.c index 0403795f..093e8373 100644 --- a/src/game_mm/mm_game.c +++ b/src/game_mm/mm_game.c @@ -3056,7 +3056,7 @@ void ColorCycling(void) } } -static void GameActions_MM_Ext(struct MouseActionInfo action, boolean warp_mode) +static void GameActions_MM_Ext(struct MouseActionInfo action) { int element; int x, y, i; @@ -3673,12 +3673,12 @@ static void GameActions_MM_Ext(struct MouseActionInfo action, boolean warp_mode) return; } -void GameActions_MM(struct MouseActionInfo action, boolean warp_mode) +void GameActions_MM(struct MouseActionInfo action) { boolean element_clicked = ClickElement(action.lx, action.ly, action.button); boolean button_released = (action.button == MB_RELEASED); - GameActions_MM_Ext(action, warp_mode); + GameActions_MM_Ext(action); CheckSingleStepMode_MM(element_clicked, button_released); } diff --git a/src/game_sp/MainGameLoop.c b/src/game_sp/MainGameLoop.c index c6d2d6dc..294e4143 100644 --- a/src/game_sp/MainGameLoop.c +++ b/src/game_sp/MainGameLoop.c @@ -25,7 +25,7 @@ void subMainGameLoop_Init(void) RedDiskReleasePhase = 0; // (re-)enable red disk release } -void subMainGameLoop_Main(byte action, boolean warp_mode) +void subMainGameLoop_Main(byte action) { // --------------------------------------------------------------------------- // --------------------- START OF GAME-BUSY LOOP ----------------------------- diff --git a/src/game_sp/MainGameLoop.h b/src/game_sp/MainGameLoop.h index 0dd629fb..7e7ba1e5 100644 --- a/src/game_sp/MainGameLoop.h +++ b/src/game_sp/MainGameLoop.h @@ -14,7 +14,7 @@ extern int ExitToMenuFlag; extern int LeadOutCounter; void subMainGameLoop_Init(void); -void subMainGameLoop_Main(byte, boolean); +void subMainGameLoop_Main(byte); void subCalculateScreenScrollPos(void); #endif // MAINGAMELOOP_H diff --git a/src/game_sp/export.h b/src/game_sp/export.h index 0ba8ac7d..cd1804dd 100644 --- a/src/game_sp/export.h +++ b/src/game_sp/export.h @@ -172,7 +172,7 @@ void InitPrecedingPlayfieldMemory(void); void InitGfxBuffers_SP(void); void InitGameEngine_SP(void); -void GameActions_SP(byte[MAX_PLAYERS], boolean); +void GameActions_SP(byte[MAX_PLAYERS]); unsigned int InitEngineRandom_SP(int); diff --git a/src/game_sp/main.c b/src/game_sp/main.c index 7eed1dd5..206ae571 100644 --- a/src/game_sp/main.c +++ b/src/game_sp/main.c @@ -72,7 +72,7 @@ static void UpdateGameDoorValues_SP(void) game_sp.score = 0; // (currently no score in Supaplex engine) } -void GameActions_SP(byte action[MAX_PLAYERS], boolean warp_mode) +void GameActions_SP(byte action[MAX_PLAYERS]) { byte single_player_action = action[0]; int x, y; @@ -80,7 +80,7 @@ void GameActions_SP(byte action[MAX_PLAYERS], boolean warp_mode) UpdateEngineValues(mScrollX / TILEX, mScrollY / TILEY, MurphyScreenXPos / TILEX, MurphyScreenYPos / TILEY); - subMainGameLoop_Main(single_player_action, warp_mode); + subMainGameLoop_Main(single_player_action); RedrawPlayfield_SP(FALSE); -- 2.34.1