From: Holger Schemel Date: Sat, 7 Nov 2015 18:30:36 +0000 (+0100) Subject: cleanup of game mode handling X-Git-Tag: 4.0.0.0-rc1~126 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=e43c14095cf443505e6c0d0bc140eab2993c98a4 cleanup of game mode handling --- diff --git a/src/events.c b/src/events.c index 5f80c5de..e82d3667 100644 --- a/src/events.c +++ b/src/events.c @@ -66,7 +66,7 @@ static int FilterEventsExt(const Event *event) /* do no reset mouse cursor before all pending events have been processed */ if (gfx.cursor_mode == cursor_mode_last && - ((effectiveGameStatus() == GAME_MODE_TITLE && + ((game_status == GAME_MODE_TITLE && gfx.cursor_mode == CURSOR_NONE) || (game_status == GAME_MODE_PLAYING && gfx.cursor_mode == CURSOR_PLAYFIELD))) @@ -208,7 +208,7 @@ void EventLoop(void) } else { - if (effectiveGameStatus() == GAME_MODE_TITLE) + if (game_status == GAME_MODE_TITLE) { /* when showing title screens, hide mouse pointer (if not moved) */ diff --git a/src/screens.c b/src/screens.c index c51e140f..9de4b55d 100644 --- a/src/screens.c +++ b/src/screens.c @@ -1252,14 +1252,6 @@ void DrawHeadline() setup.internal.program_copyright); } -int effectiveGameStatus() -{ - if (game_status == GAME_MODE_INFO && info_mode == INFO_MODE_TITLE) - return GAME_MODE_TITLE; - - return game_status; -} - void DrawTitleScreenImage(int nr, boolean initial) { int graphic = getTitleScreenGraphic(nr, initial); diff --git a/src/screens.h b/src/screens.h index 2ee562e6..c5e9ea02 100644 --- a/src/screens.h +++ b/src/screens.h @@ -19,8 +19,6 @@ #define SCROLL_PAGE (2 * SCR_FIELDY) -int effectiveGameStatus(); - void DrawMainMenuExt(int); void DrawAndFadeInMainMenu(int); void DrawMainMenu(void); diff --git a/src/tools.c b/src/tools.c index 52a562fb..7e8806e5 100644 --- a/src/tools.c +++ b/src/tools.c @@ -330,8 +330,8 @@ void DrawMaskedBorder_ALL() void DrawMaskedBorder(int redraw_mask) { /* never draw masked screen borders on borderless screens */ - if (effectiveGameStatus() == GAME_MODE_LOADING || - effectiveGameStatus() == GAME_MODE_TITLE) + if (game_status == GAME_MODE_LOADING || + game_status == GAME_MODE_TITLE) return; if (redraw_mask & REDRAW_ALL)