added support for opening URLs for global animation event actions
[rocksndiamonds.git] / src / files.c
index 1e185c2396e22093f82ec3a18f80bb0421fb9911..d113c6ad0f9b9733b9f9d5303e9f1336c7bdc4e4 100644 (file)
@@ -11487,6 +11487,18 @@ static int get_anim_action_parameter_value(char *token)
       result = -(int)key;
   }
 
+  if (result == -1)
+  {
+    if (isURL(token))
+    {
+      result = get_hash_from_key(token);       // unsigned int => int
+      result = ABS(result);                    // may be negative now
+      result += (result < MAX_IMAGE_FILES ? MAX_IMAGE_FILES : 0);
+
+      setHashEntry(anim_url_hash, int2str(result, 0), token);
+    }
+  }
+
   if (result == -1)
     result = ANIM_EVENT_ACTION_NONE;