rnd-20030413-1-src
[rocksndiamonds.git] / src / libgame / misc.c
index 321372535fa01086b4881bb31c626b68489d5272..efb56bba2cfc6d9030c5de4e1be6dc74f151f9e4 100644 (file)
@@ -573,6 +573,7 @@ void GetOptions(char *argv[])
   options.graphics_directory = RO_BASE_PATH "/" GRAPHICS_DIRECTORY;
   options.sounds_directory = RO_BASE_PATH "/" SOUNDS_DIRECTORY;
   options.music_directory = RO_BASE_PATH "/" MUSIC_DIRECTORY;
+  options.docs_directory = RO_BASE_PATH "/" DOCS_DIRECTORY;
   options.execute_command = NULL;
   options.serveronly = FALSE;
   options.network = FALSE;
@@ -1500,9 +1501,18 @@ void dumpList(ListNode *node_first)
 
 
 /* ------------------------------------------------------------------------- */
-/* functions for checking filenames                                          */
+/* functions for checking files and filenames                                */
 /* ------------------------------------------------------------------------- */
 
+boolean fileExists(char *filename)
+{
+#if 0
+  printf("checking file '%s'\n", filename);
+#endif
+
+  return (access(filename, F_OK) == 0);
+}
+
 boolean FileIsGraphic(char *filename)
 {
   if (strlen(filename) > 4 &&
@@ -1610,6 +1620,7 @@ int get_parameter_value(char *token, char *value_raw, int type)
              string_has_parameter(value, "pingpong")  ? ANIM_PINGPONG :
              string_has_parameter(value, "pingpong2") ? ANIM_PINGPONG2 :
              string_has_parameter(value, "random")    ? ANIM_RANDOM :
+             string_has_parameter(value, "none")      ? ANIM_NONE :
              ANIM_LOOP);
 
     if (string_has_parameter(value, "reverse"))