#define ENABLE_UNUSED_CODE FALSE /* for currently unused functions */
+#define DEBUG_NO_CONFIG_FILE FALSE /* for extra-verbose debug output */
#define NUM_LEVELCLASS_DESC 8
if (!(file = openFile(filename, MODE_READ)))
{
+#if DEBUG_NO_CONFIG_FILE
Error(ERR_DEBUG, "cannot open configuration file '%s'", filename);
+#endif
return FALSE;
}
*(char **)setup_value = getStringCopy(token_value);
break;
+ case TYPE_PLAYER:
+ *(int *)setup_value = get_player_nr_from_string(token_value);
+ break;
+
default:
break;
}
if (setup_file_hash == NULL)
{
+#if DEBUG_NO_CONFIG_FILE
Error(ERR_WARN, "ignoring level directory '%s'", directory_path);
+#endif
free(directory_path);
free(filename);
if (!valid_file_found)
{
+#if DEBUG_NO_CONFIG_FILE
if (!strEqual(directory_name, "."))
Error(ERR_WARN, "ignoring artwork directory '%s'", directory_path);
+#endif
free(directory_path);
free(filename);
strcpy(value_string, *(char **)value);
break;
+ case TYPE_PLAYER:
+ sprintf(value_string, "player_%d", *(int *)value + 1);
+ break;
+
default:
value_string[0] = '\0';
break;