rnd-20070825-4-src
[rocksndiamonds.git] / src / screens.c
index a29c3d65e8755d7a97410f19ce7763817f0af18d..3bc6c2b3ef1b50e7b1f5204d027e58be01636da6 100644 (file)
@@ -747,6 +747,12 @@ static void InitializeTitleControls_CheckTitleInfo(boolean initial)
     Bitmap *bitmap = graphic_info[graphic].bitmap;
     int sort_priority = graphic_info[graphic].sort_priority;
 
+#if 0
+    /* skip images and messages (fonts!) when using forced custom graphics */
+    if (setup.override_level_graphics && !initial)
+      continue;
+#endif
+
     if (bitmap != NULL)
       InitializeTitleControlsExt_AddTitleInfo(TRUE, initial, i, sort_priority);
   }
@@ -757,6 +763,12 @@ static void InitializeTitleControls_CheckTitleInfo(boolean initial)
     char *filename = getLevelSetTitleMessageFilename(i, initial);
     int sort_priority = tmi->sort_priority;
 
+#if 0
+    /* skip images and messages (fonts!) when using forced custom graphics */
+    if (setup.override_level_graphics)
+      continue;
+#endif
+
     if (filename != NULL)
       InitializeTitleControlsExt_AddTitleInfo(FALSE, initial, i, sort_priority);
   }
@@ -766,8 +778,10 @@ static void InitializeTitleControls(boolean show_title_initial)
 {
   num_title_screens = 0;
 
+#if 0
   if (show_title_initial)
     InitializeTitleControls_CheckTitleInfo(TRUE);
+#endif
 
   InitializeTitleControls_CheckTitleInfo(FALSE);
 
@@ -1280,6 +1294,7 @@ void DrawMainMenuExt(int redraw_mask, boolean do_fading)
 {
   static LevelDirTree *leveldir_last_valid = NULL;
   boolean levelset_has_changed = FALSE;
+  boolean redraw_all = FALSE;
 
   FadeSetLeaveScreen();
 
@@ -1333,10 +1348,17 @@ void DrawMainMenuExt(int redraw_mask, boolean do_fading)
   /* needed if last screen (level choice) changed graphics, sounds or music */
   ReloadCustomArtwork(0);
 
+  if (redraw_mask & REDRAW_ALL)
+    redraw_all = TRUE;
+
 #if 1
+#if 0
   printf("::: FadeOut @ DrawMainMenuExt ...\n");
+#endif
   FadeOut(redraw_mask);
+#if 0
   printf("::: FadeOut @ DrawMainMenuExt done\n");
+#endif
 
   /* needed if last screen was the editor screen */
   UndrawSpecialEditorDoor();
@@ -1403,7 +1425,7 @@ void DrawMainMenuExt(int redraw_mask, boolean do_fading)
   MapTapeButtons();
   MapScreenMenuGadgets(SCREEN_MASK_MAIN);
 
-#if 1
+#if 0
   DrawMaskedBorder(REDRAW_ALL);
 #endif
 
@@ -1418,6 +1440,15 @@ void DrawMainMenuExt(int redraw_mask, boolean do_fading)
   }
 #endif
 
+#if 1
+  DrawMaskedBorder(REDRAW_ALL);
+#endif
+
+#if 0
+  if (redraw_all)
+    redraw_mask = REDRAW_ALL;
+#endif
+
   FadeIn(redraw_mask);
 
   FadeSetEnterMenu();
@@ -2225,7 +2256,11 @@ static void DrawInfoScreen_Main(int redraw_mask, boolean do_fading)
   info_info = info_info_main;
   num_info_info = 0;
 
+#if 1
+  for (i = 0; info_info[i].type != 0 && i < MAX_MENU_ENTRIES_ON_SCREEN; i++)
+#else
   for (i = 0; info_info[i].type != 0 && i < NUM_MENU_ENTRIES_ON_SCREEN; i++)
+#endif
   {
     if (info_info[i].type & (TYPE_ENTER_MENU|TYPE_ENTER_LIST))
       initCursor(i, IMG_MENU_BUTTON_ENTER_MENU);
@@ -4915,11 +4950,14 @@ static void DrawSetupScreen_Generic()
   if (redraw_mask & REDRAW_ALL)
     redraw_all = TRUE;
 
+#if 0
   printf("::: %s\n", (redraw_mask & REDRAW_FIELD ? "REDRAW_FIELD" :
                      redraw_mask & REDRAW_ALL ? "REDRAW_ALL" :
                      int2str(0, redraw_mask)));
+#endif
 
-#if 1
+#if 0
+  /* !!! usually REDRAW_NONE => DOES NOT WORK (with fade) => CHECK THIS !!! */
   FadeOut(redraw_mask);
 #else
   FadeOut(REDRAW_FIELD);
@@ -4971,7 +5009,11 @@ static void DrawSetupScreen_Generic()
   DrawTextSCentered(mSY - SY + 16, FONT_TITLE_1, title_string);
 
   num_setup_info = 0;
+#if 1
+  for (i = 0; setup_info[i].type != 0 && i < MAX_MENU_ENTRIES_ON_SCREEN; i++)
+#else
   for (i = 0; setup_info[i].type != 0 && i < NUM_MENU_ENTRIES_ON_SCREEN; i++)
+#endif
   {
     void *value_ptr = setup_info[i].value;
 #if 1
@@ -5171,7 +5213,21 @@ void DrawSetupScreen_Input()
   DrawTextSCentered(mSY - SY + 16, FONT_TITLE_1, "Setup Input");
 
 #if 1
+#if 1
+  DrawTextSCentered(SYSIZE - 20, FONT_TITLE_2,
+                   "Joysticks deactivated on this screen");
+#else
+  DrawTextSCentered(SYSIZE - 20, FONT_TEXT_4,
+                   "Joysticks deactivated on this screen");
+#endif
+#endif
+
+#if 1
+#if 1
+  for (i = 0; setup_info[i].type != 0 && i < MAX_MENU_ENTRIES_ON_SCREEN; i++)
+#else
   for (i = 0; setup_info[i].type != 0 && i < NUM_MENU_ENTRIES_ON_SCREEN; i++)
+#endif
   {
     if (setup_info[i].type & (TYPE_ENTER_MENU|TYPE_ENTER_LIST))
       initCursor(i, IMG_MENU_BUTTON_ENTER_MENU);
@@ -5196,9 +5252,15 @@ void DrawSetupScreen_Input()
 #if 0
   DeactivateJoystickForCalibration();
 #endif
+
+#if 0
 #if 1
+  DrawTextSCentered(SYSIZE - 20, FONT_TITLE_2,
+                   "Joysticks deactivated on this screen");
+#else
   DrawTextSCentered(SYSIZE - 20, FONT_TEXT_4,
                    "Joysticks deactivated on this screen");
+#endif
 #endif
 
   /* create gadgets for setup input menu screen */