rnd-20140117-1-src
[rocksndiamonds.git] / src / screens.c
index d3cb7b1f806b76902d6fd7c982a7f2da5e756e10..6951099fa7ce61c31adc501dd8ee1aa09eae41fc 100644 (file)
@@ -1317,6 +1317,8 @@ void DrawMainMenuExt(int fade_mask, boolean do_fading)
   static LevelDirTree *leveldir_last_valid = NULL;
   boolean levelset_has_changed = FALSE;
 
+  LimitScreenUpdates(FALSE);
+
   FadeSetLeaveScreen();
 
   /* do not fade out here -- function may continue and fade on editor screen */
@@ -1418,7 +1420,7 @@ void DrawMainMenuExt(int fade_mask, boolean do_fading)
   InitializeMainControls();
 
   DrawCursorAndText_Main(-1, FALSE);
-  DrawPreviewLevel(TRUE);
+  DrawPreviewLevelInitial();
 
   HandleMainMenu(0, 0, 0, 0, MB_MENU_INITIALIZE);
 
@@ -1757,13 +1759,13 @@ void HandleMainMenu_SelectLevel(int step, int direction)
             mci->pos_text->font);
 
     LoadLevel(level_nr);
-    DrawPreviewLevel(TRUE);
+    DrawPreviewLevelInitial();
 
     TapeErase();
     LoadTape(level_nr);
     DrawCompleteVideoDisplay();
 
-    /* needed because DrawPreviewLevel() takes some time */
+    /* needed because DrawPreviewLevelInitial() takes some time */
     BackToFront();
     SyncDisplay();
   }
@@ -1926,11 +1928,13 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button)
     }
   }
 
+#if 0
   if (game_status == GAME_MODE_MAIN)
   {
-    DrawPreviewLevel(FALSE);
+    DrawPreviewLevelAnimation();
     DoAnimation();
   }
+#endif
 }
 
 
@@ -2992,19 +2996,17 @@ void DrawInfoScreen_Version()
   int ystart1 = mSY - SY + 100;
   int ystart2 = mSY - SY + 150;
   int ybottom = mSY - SY + SYSIZE - 20;
-  int xstart1 = mSX + 2 * xstep;
-  int xstart2 = mSX + 19 * xstep;
+  int xstart1 = mSX - SX + 2 * xstep;
+  int xstart2 = mSX - SX + 18 * xstep;
 #if defined(TARGET_SDL)
-  int xstart3 = mSX + 29 * xstep;
+  int xstart3 = mSX - SX + 28 * xstep;
   SDL_version sdl_version_compiled;
-#if defined(TARGET_SDL2)
-  SDL_version sdl_version_linked_ext;
-#endif
   const SDL_version *sdl_version_linked;
+  int driver_name_len = 10;
 #if defined(TARGET_SDL2)
+  SDL_version sdl_version_linked_ext;
   const char *driver_name = NULL;
 #else
-  int driver_name_len = 8;
   char driver_name[driver_name_len];
 #endif
 #endif
@@ -3112,7 +3114,7 @@ void DrawInfoScreen_Version()
   DrawTextF(xstart3, ystart2, font_header, "Used");
 
 #if defined(TARGET_SDL2)
-  driver_name = SDL_GetVideoDriver(0);
+  driver_name = getStringCopyNStatic(SDL_GetVideoDriver(0), driver_name_len);
 #else
   SDL_VideoDriverName(driver_name, driver_name_len);
 #endif
@@ -3123,7 +3125,7 @@ void DrawInfoScreen_Version()
   DrawTextF(xstart3, ystart2, font_text, "%s", driver_name);
 
 #if defined(TARGET_SDL2)
-  driver_name = SDL_GetAudioDriver(0);
+  driver_name = getStringCopyNStatic(SDL_GetAudioDriver(0), driver_name_len);
 #else
   SDL_AudioDriverName(driver_name, driver_name_len);
 #endif
@@ -3305,7 +3307,9 @@ void HandleInfoScreen(int mx, int my, int dx, int dy, int button)
   else
     HandleInfoScreen_Main(mx, my, dx, dy, button);
 
+#if 0
   DoAnimation();
+#endif
 }
 
 
@@ -3851,7 +3855,9 @@ void HandleChooseLevelSet(int mx, int my, int dx, int dy, int button)
 {
   HandleChooseTree(mx, my, dx, dy, button, &leveldir_current);
 
+#if 0
   DoAnimation();
+#endif
 }
 
 void DrawChooseLevelNr()
@@ -3922,7 +3928,9 @@ void HandleChooseLevelNr(int mx, int my, int dx, int dy, int button)
   HandleChooseTree(mx, my, dx, dy, button, &leveldir_current);
 #endif
 
+#if 0
   DoAnimation();
+#endif
 }
 
 void DrawHallOfFame(int highlight_position)
@@ -4068,7 +4076,9 @@ void HandleHallOfFame(int mx, int my, int dx, int dy, int button)
   if (game_status == GAME_MODE_SCORES)
     PlayMenuSoundIfLoop();
 
+#if 0
   DoAnimation();
+#endif
 }
 
 
@@ -6184,7 +6194,9 @@ void HandleSetupScreen(int mx, int my, int dx, int dy, int button)
   else
     HandleSetupScreen_Generic(mx, my, dx, dy, button);
 
+#if 0
   DoAnimation();
+#endif
 }
 
 void HandleGameActions()