changed how custom elements change to player if they are walkable
[rocksndiamonds.git] / src / init.c
index fbd103da06dece9cb8f34c5f18822cae05964563..d266989d445b0497adffca419ef0b0b0c4fb1e29 100644 (file)
@@ -4905,7 +4905,8 @@ static void InitGlobal(void)
   global.convert_leveldir = NULL;
   global.dumplevel_leveldir = NULL;
   global.dumptape_leveldir = NULL;
-  global.create_images_dir = NULL;
+  global.create_sketch_images_dir = NULL;
+  global.create_collect_images_dir = NULL;
 
   global.frames_per_second = 0;
   global.show_frames_per_second = FALSE;
@@ -5189,13 +5190,21 @@ static void Execute_Command(char *command)
 
     program.headless = TRUE;
   }
-  else if (strPrefix(command, "create images "))
+  else if (strPrefix(command, "create sketch images "))
   {
-    global.create_images_dir = getStringCopy(&command[14]);
+    global.create_sketch_images_dir = getStringCopy(&command[21]);
 
-    if (access(global.create_images_dir, W_OK) != 0)
+    if (access(global.create_sketch_images_dir, W_OK) != 0)
       Fail("image target directory '%s' not found or not writable",
-          global.create_images_dir);
+          global.create_sketch_images_dir);
+  }
+  else if (strPrefix(command, "create collect image "))
+  {
+    global.create_collect_images_dir = getStringCopy(&command[21]);
+
+    if (access(global.create_collect_images_dir, W_OK) != 0)
+      Fail("image target directory '%s' not found or not writable",
+          global.create_collect_images_dir);
   }
   else if (strPrefix(command, "create CE image "))
   {
@@ -6188,8 +6197,6 @@ void OpenAll(void)
 
   print_timestamp_time("[init setup/config stuff (1)]");
 
-  InitScoresInfo();
-
   if (options.execute_command)
     Execute_Command(options.execute_command);
 
@@ -6296,11 +6303,16 @@ void OpenAll(void)
     DumpTapes();
     return;
   }
-  else if (global.create_images_dir)
+  else if (global.create_sketch_images_dir)
   {
     CreateLevelSketchImages();
     return;
   }
+  else if (global.create_collect_images_dir)
+  {
+    CreateCollectElementImages();
+    return;
+  }
 
   InitNetworkServer();