rnd-20030305-1-src
[rocksndiamonds.git] / src / libgame / misc.c
index 0b1382fa8bd2ef18ab5c6ca5e26111bfecd938e9..e5cdfe26da8efec03bb294f2c2218c7081074b01 100644 (file)
@@ -429,6 +429,7 @@ char *getPath2(char *path1, char *path2)
                                       strlen(path2) + 1);
 
   sprintf(complete_path, "%s/%s", path1, path2);
+
   return complete_path;
 }
 
@@ -439,6 +440,7 @@ char *getPath3(char *path1, char *path2, char *path3)
                                       strlen(path3) + 1);
 
   sprintf(complete_path, "%s/%s/%s", path1, path2, path3);
+
   return complete_path;
 }
 
@@ -447,6 +449,7 @@ char *getStringCat2(char *s1, char *s2)
   char *complete_string = checked_malloc(strlen(s1) + strlen(s2) + 1);
 
   sprintf(complete_string, "%s%s", s1, s2);
+
   return complete_string;
 }
 
@@ -458,8 +461,8 @@ char *getStringCopy(char *s)
     return NULL;
 
   s_copy = checked_malloc(strlen(s) + 1);
-
   strcpy(s_copy, s);
+
   return s_copy;
 }
 
@@ -1568,7 +1571,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 :
-             ANIM_NONE);
+             ANIM_LOOP);
 
     if (string_has_parameter(value, "reverse"))
       result |= ANIM_REVERSE;
@@ -1591,6 +1594,7 @@ static void FreeCustomArtworkList(struct ArtworkListInfo *,
 
 struct FileInfo *getFileListFromConfigList(struct ConfigInfo *config_list,
                                           struct ConfigInfo *suffix_list,
+                                          char **ignore_tokens,
                                           int num_file_list_entries)
 {
   struct FileInfo *file_list;
@@ -1651,9 +1655,9 @@ struct FileInfo *getFileListFromConfigList(struct ConfigInfo *config_list,
     }
 
     /* the following tokens are no file definitions, but other config tokens */
-    if (strcmp(config_list[i].token, "global.num_toons") == 0 ||
-       strcmp(config_list[i].token, "menu.main.hide_static_text") == 0)
-      is_file_entry = FALSE;
+    for (j=0; ignore_tokens[j] != NULL; j++)
+      if (strcmp(config_list[i].token, ignore_tokens[j]) == 0)
+       is_file_entry = FALSE;
 
     if (is_file_entry)
     {