cleanup of game mode handling
authorHolger Schemel <info@artsoft.org>
Sat, 7 Nov 2015 18:30:36 +0000 (19:30 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 7 Nov 2015 18:30:36 +0000 (19:30 +0100)
src/events.c
src/screens.c
src/screens.h
src/tools.c

index 5f80c5debc113399c863909fe0d9ccf7086b54f1..e82d3667b42958144a01fdce30e24a70a3b8cec9 100644 (file)
@@ -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 &&
 
   /* 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)))
        gfx.cursor_mode == CURSOR_NONE) ||
        (game_status == GAME_MODE_PLAYING &&
        gfx.cursor_mode == CURSOR_PLAYFIELD)))
@@ -208,7 +208,7 @@ void EventLoop(void)
     }
     else
     {
     }
     else
     {
-      if (effectiveGameStatus() == GAME_MODE_TITLE)
+      if (game_status == GAME_MODE_TITLE)
       {
        /* when showing title screens, hide mouse pointer (if not moved) */
 
       {
        /* when showing title screens, hide mouse pointer (if not moved) */
 
index c51e140fef17d3e808560ce55f120383a39e3c65..9de4b55d4bdbddb06d5a1519ff13cf4dfd74151a 100644 (file)
@@ -1252,14 +1252,6 @@ void DrawHeadline()
                    setup.internal.program_copyright);
 }
 
                    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);
 void DrawTitleScreenImage(int nr, boolean initial)
 {
   int graphic = getTitleScreenGraphic(nr, initial);
index 2ee562e698c552dc78ad806cecd6a89e298f3dca..c5e9ea024f9688966172b282f8d2c5371e0e2dbd 100644 (file)
@@ -19,8 +19,6 @@
 #define SCROLL_PAGE    (2 * SCR_FIELDY)
 
 
 #define SCROLL_PAGE    (2 * SCR_FIELDY)
 
 
-int effectiveGameStatus();
-
 void DrawMainMenuExt(int);
 void DrawAndFadeInMainMenu(int);
 void DrawMainMenu(void);
 void DrawMainMenuExt(int);
 void DrawAndFadeInMainMenu(int);
 void DrawMainMenu(void);
index 52a562fbc6c90d700438cbbeab36f178ad0e927f..7e8806e54f67fd3e2e9055f631bee2229863b15b 100644 (file)
@@ -330,8 +330,8 @@ void DrawMaskedBorder_ALL()
 void DrawMaskedBorder(int redraw_mask)
 {
   /* never draw masked screen borders on borderless screens */
 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)
     return;
 
   if (redraw_mask & REDRAW_ALL)