added new animation mode (modifier) 'once' for global animations
[rocksndiamonds.git] / src / libgame / misc.c
index 19a649b91a522ee1288c9ea2f0e199fe00726ba9..ff86123df0eb47d240a8c19997724dd73a99b28c 100644 (file)
@@ -2705,6 +2705,9 @@ int get_parameter_value(char *value_raw, char *suffix, int type)
              string_has_parameter(value, "all")        ? ANIM_ALL :
              ANIM_DEFAULT);
 
+    if (string_has_parameter(value, "once"))
+      result |= ANIM_ONCE;
+
     if (string_has_parameter(value, "reverse"))
       result |= ANIM_REVERSE;
 
@@ -2716,7 +2719,8 @@ int get_parameter_value(char *value_raw, char *suffix, int type)
   }
   else if (strEqual(suffix, ".class"))
   {
-    result = get_hash_from_key(value);
+    result = (strEqual(value, ARG_UNDEFINED) ? ARG_UNDEFINED_VALUE :
+             get_hash_from_key(value));
   }
   else if (strEqual(suffix, ".style"))
   {