X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Finit.c;h=3f8c253b14c014b904424b6ba23351ddbcb03482;hb=2cfee1e01acbf98c4ff8bb0f9fc04b7b5605751f;hp=6ccc8822c02361fb4c4d51c5e74206857ee1e3c3;hpb=009c5cf7cf504775f90e2223241fe19131182e96;p=rocksndiamonds.git diff --git a/src/init.c b/src/init.c index 6ccc8822..3f8c253b 100644 --- a/src/init.c +++ b/src/init.c @@ -5068,15 +5068,20 @@ static void Execute_Command(char *command) strPrefix(command, "autoffwd ") || 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 : strPrefix(command, "autoffwd") ? AUTOPLAY_MODE_FFWD : 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); @@ -6191,6 +6196,9 @@ void OpenAll(void) InitGlobal(); // initialize some global variables + InitRND(NEW_RANDOMIZE); + InitSimpleRandom(NEW_RANDOMIZE); + print_timestamp_time("[init global stuff]"); InitSetup(); @@ -6226,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]");