element was calculated by using log_2() from trigger player bits with
the value PLAYER_BITS_ANY) -- this is now fixed by also storing the
triggering player bit mask and handling all players in "move player"
+ * fixed bug when defined artwork cannot be found for artwork that has
+ default artwork cloned from other artwork (without default filename)
2007-08-26
* fixed broken editor copy and paste for custom elements between levels
file_list[i].redefined = FALSE;
file_list[i].fallback_to_default = FALSE;
+ file_list[i].default_is_cloned = FALSE;
}
}
printf("::: '%s' => '%s'\n", config_list[i].token, config_list[i].value);
#endif
}
+
+ if (strSuffix(config_list[i].token, ".clone_from"))
+ file_list[list_pos].default_is_cloned = TRUE;
}
num_file_list_entries_found = list_pos + 1;
new_list_entry->redefined = FALSE;
new_list_entry->fallback_to_default = FALSE;
+ new_list_entry->default_is_cloned = FALSE;
read_token_parameters(extra_file_hash, suffix_list, new_list_entry);
}
basename = file_list_entry->default_filename;
+ /* fail for cloned default artwork that has no default filename defined */
+ if (file_list_entry->default_is_cloned &&
+ strEqual(basename, UNDEFINED_FILENAME))
+ {
+ int error_mode = ERR_WARN;
+
+ /* we can get away without sounds and music, but not without graphics */
+ if (*listnode == NULL && artwork_info->type == ARTWORK_TYPE_GRAPHICS)
+ error_mode = ERR_EXIT;
+
+ Error(error_mode, "token '%s' was cloned and has no default filename",
+ file_list_entry->token);
+
+ return;
+ }
+
/* dynamic artwork has no default filename / skip empty default artwork */
if (basename == NULL || strEqual(basename, UNDEFINED_FILENAME))
return;
error_mode = ERR_EXIT;
Error(error_mode, "cannot load artwork file '%s'", basename);
+
return;
}
}