improved code for drawing init text to screen
[rocksndiamonds.git] / src / init.c
index d5120fb2df7c5e09fa6d4841b95956f8aa482c18..ae0e16c8b9c0cc41e23d2b793e7f2777fb5ed116 100644 (file)
@@ -5069,9 +5069,11 @@ static void Execute_Command(char *command)
           strPrefix(command, "autowarp ") ||
           strPrefix(command, "autotest ") ||
           strPrefix(command, "autosave ") ||
+          strPrefix(command, "autoupload ") ||
           strPrefix(command, "autofix "))
   {
-    char *str_ptr = getStringCopy(&command[8]);        // read command parameters
+    char *arg_ptr = strchr(command, ' ');
+    char *str_ptr = getStringCopy(arg_ptr);    // read command parameters
 
     global.autoplay_mode =
       (strPrefix(command, "autoplay") ? AUTOPLAY_MODE_PLAY :
@@ -5079,6 +5081,7 @@ static void Execute_Command(char *command)
        strPrefix(command, "autowarp") ? AUTOPLAY_MODE_WARP :
        strPrefix(command, "autotest") ? AUTOPLAY_MODE_TEST :
        strPrefix(command, "autosave") ? AUTOPLAY_MODE_SAVE :
+       strPrefix(command, "autoupload") ? AUTOPLAY_MODE_UPLOAD :
        strPrefix(command, "autofix")  ? AUTOPLAY_MODE_FIX :
        AUTOPLAY_MODE_NONE);
 
@@ -5527,7 +5530,7 @@ static void InitGfx(void)
 
   DrawProgramInfo();
 
-  DrawInitText("Loading graphics", 120, FC_GREEN);
+  DrawInitTextHead("Loading graphics");
 
   // initialize settings for busy animation with default values
   int parameter[NUM_GFX_ARGS];
@@ -6193,6 +6196,9 @@ void OpenAll(void)
 
   InitGlobal();                        // initialize some global variables
 
+  InitRND(NEW_RANDOMIZE);
+  InitSimpleRandom(NEW_RANDOMIZE);
+
   print_timestamp_time("[init global stuff]");
 
   InitSetup();
@@ -6228,9 +6234,6 @@ void OpenAll(void)
   InitMixer();
   print_timestamp_time("[init setup/config stuff (6)]");
 
-  InitRND(NEW_RANDOMIZE);
-  InitSimpleRandom(NEW_RANDOMIZE);
-
   InitJoysticks();
 
   print_timestamp_time("[init setup/config stuff]");