+
+struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1 + 1] =
+{
+ { ".[DEFAULT]", GFX_SPECIAL_ARG_DEFAULT, },
+ { ".TITLE", GFX_SPECIAL_ARG_TITLE, },
+ { ".MAIN", GFX_SPECIAL_ARG_MAIN, },
+ { ".LEVELS", GFX_SPECIAL_ARG_LEVELS },
+ { ".SCORES", GFX_SPECIAL_ARG_SCORES, },
+ { ".EDITOR", GFX_SPECIAL_ARG_EDITOR, },
+ { ".INFO", GFX_SPECIAL_ARG_INFO, },
+ { ".SETUP", GFX_SPECIAL_ARG_SETUP, },
+ { ".PLAYING", GFX_SPECIAL_ARG_PLAYING, },
+ { ".DOOR", GFX_SPECIAL_ARG_DOOR, },
+ { ".PREVIEW", GFX_SPECIAL_ARG_PREVIEW, },
+ { ".CRUMBLED", GFX_SPECIAL_ARG_CRUMBLED, },
+
+ /* empty suffix always matches -- check as last entry in InitMusicInfo() */
+ { "", GFX_SPECIAL_ARG_DEFAULT, },
+
+ { NULL, 0, }
+};
+
+struct TokenIntPtrInfo image_config_vars[] =
+{
+ { "global.num_toons", &global.num_toons },
+
+ { "border.draw_masked.TITLE", &border.draw_masked[GFX_SPECIAL_ARG_TITLE] },
+ { "border.draw_masked.MAIN", &border.draw_masked[GFX_SPECIAL_ARG_MAIN] },
+ { "border.draw_masked.LEVELS", &border.draw_masked[GFX_SPECIAL_ARG_LEVELS] },
+ { "border.draw_masked.SCORES", &border.draw_masked[GFX_SPECIAL_ARG_SCORES] },
+ { "border.draw_masked.EDITOR", &border.draw_masked[GFX_SPECIAL_ARG_EDITOR] },
+ { "border.draw_masked.INFO", &border.draw_masked[GFX_SPECIAL_ARG_INFO] },
+ { "border.draw_masked.SETUP", &border.draw_masked[GFX_SPECIAL_ARG_SETUP] },
+ { "border.draw_masked.PLAYING",&border.draw_masked[GFX_SPECIAL_ARG_PLAYING] },
+ { "border.draw_masked.DOOR", &border.draw_masked[GFX_SPECIAL_ARG_DOOR] },
+
+ { "menu.draw_xoffset", &menu.draw_xoffset[GFX_SPECIAL_ARG_DEFAULT] },
+ { "menu.draw_yoffset", &menu.draw_yoffset[GFX_SPECIAL_ARG_DEFAULT] },
+ { "menu.draw_xoffset.MAIN", &menu.draw_xoffset[GFX_SPECIAL_ARG_MAIN] },
+ { "menu.draw_yoffset.MAIN", &menu.draw_yoffset[GFX_SPECIAL_ARG_MAIN] },
+ { "menu.draw_xoffset.LEVELS", &menu.draw_xoffset[GFX_SPECIAL_ARG_LEVELS] },
+ { "menu.draw_yoffset.LEVELS", &menu.draw_yoffset[GFX_SPECIAL_ARG_LEVELS] },
+ { "menu.draw_xoffset.SCORES", &menu.draw_xoffset[GFX_SPECIAL_ARG_SCORES] },
+ { "menu.draw_yoffset.SCORES", &menu.draw_yoffset[GFX_SPECIAL_ARG_SCORES] },
+ { "menu.draw_xoffset.EDITOR", &menu.draw_xoffset[GFX_SPECIAL_ARG_EDITOR] },
+ { "menu.draw_yoffset.EDITOR", &menu.draw_yoffset[GFX_SPECIAL_ARG_EDITOR] },
+ { "menu.draw_xoffset.INFO", &menu.draw_xoffset[GFX_SPECIAL_ARG_INFO] },
+ { "menu.draw_yoffset.INFO", &menu.draw_yoffset[GFX_SPECIAL_ARG_INFO] },
+ { "menu.draw_xoffset.INFO[ELEMENTS]",
+ &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_ELEMENTS] },
+ { "menu.draw_yoffset.INFO[ELEMENTS]",
+ &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_ELEMENTS] },
+ { "menu.draw_xoffset.INFO[MUSIC]",
+ &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_MUSIC] },
+ { "menu.draw_yoffset.INFO[MUSIC]",
+ &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_MUSIC] },
+ { "menu.draw_xoffset.INFO[CREDITS]",
+ &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_CREDITS] },
+ { "menu.draw_yoffset.INFO[CREDITS]",
+ &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_CREDITS] },
+ { "menu.draw_xoffset.INFO[PROGRAM]",
+ &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_PROGRAM] },
+ { "menu.draw_yoffset.INFO[PROGRAM]",
+ &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_PROGRAM] },
+ { "menu.draw_xoffset.INFO[LEVELSET]",
+ &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_LEVELSET] },
+ { "menu.draw_yoffset.INFO[LEVELSET]",
+ &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_LEVELSET] },
+ { "menu.draw_xoffset.SETUP", &menu.draw_xoffset[GFX_SPECIAL_ARG_SETUP] },
+ { "menu.draw_yoffset.SETUP", &menu.draw_yoffset[GFX_SPECIAL_ARG_SETUP] },
+
+ { "menu.scrollbar_xoffset", &menu.scrollbar_xoffset },
+
+ { "menu.list_size", &menu.list_size[GFX_SPECIAL_ARG_DEFAULT] },
+ { "menu.list_size.LEVELS", &menu.list_size[GFX_SPECIAL_ARG_LEVELS] },
+ { "menu.list_size.SCORES", &menu.list_size[GFX_SPECIAL_ARG_SCORES] },
+ { "menu.list_size.INFO", &menu.list_size[GFX_SPECIAL_ARG_INFO] },
+
+ { "menu.fade_delay", &menu.fade_delay },
+ { "menu.post_delay", &menu.post_delay },
+
+ { "main.button.name.x", &menu.main.button.name.x },
+ { "main.button.name.y", &menu.main.button.name.y },
+ { "main.button.levels.x", &menu.main.button.levels.x },
+ { "main.button.levels.y", &menu.main.button.levels.y },
+ { "main.button.scores.x", &menu.main.button.scores.x },
+ { "main.button.scores.y", &menu.main.button.scores.y },
+ { "main.button.editor.x", &menu.main.button.editor.x },
+ { "main.button.editor.y", &menu.main.button.editor.y },
+ { "main.button.info.x", &menu.main.button.info.x },
+ { "main.button.info.y", &menu.main.button.info.y },
+ { "main.button.game.x", &menu.main.button.game.x },
+ { "main.button.game.y", &menu.main.button.game.y },
+ { "main.button.setup.x", &menu.main.button.setup.x },
+ { "main.button.setup.y", &menu.main.button.setup.y },
+ { "main.button.quit.x", &menu.main.button.quit.x },
+ { "main.button.quit.y", &menu.main.button.quit.y },
+ { "main.button.prev_level.x", &menu.main.button.prev_level.x },
+ { "main.button.prev_level.y", &menu.main.button.prev_level.y },
+ { "main.button.next_level.x", &menu.main.button.next_level.x },
+ { "main.button.next_level.y", &menu.main.button.next_level.y },
+
+ { "main.text.name.x", &menu.main.text.name.x },
+ { "main.text.name.y", &menu.main.text.name.y },
+ { "main.text.name.width", &menu.main.text.name.width },
+ { "main.text.name.height", &menu.main.text.name.height },
+ { "main.text.levels.x", &menu.main.text.levels.x },
+ { "main.text.levels.y", &menu.main.text.levels.y },
+ { "main.text.levels.width", &menu.main.text.levels.width },
+ { "main.text.levels.height", &menu.main.text.levels.height },
+ { "main.text.scores.x", &menu.main.text.scores.x },
+ { "main.text.scores.y", &menu.main.text.scores.y },
+ { "main.text.scores.width", &menu.main.text.scores.width },
+ { "main.text.scores.height", &menu.main.text.scores.height },
+ { "main.text.editor.x", &menu.main.text.editor.x },
+ { "main.text.editor.y", &menu.main.text.editor.y },
+ { "main.text.editor.width", &menu.main.text.editor.width },
+ { "main.text.editor.height", &menu.main.text.editor.height },
+ { "main.text.info.x", &menu.main.text.info.x },
+ { "main.text.info.y", &menu.main.text.info.y },
+ { "main.text.info.width", &menu.main.text.info.width },
+ { "main.text.info.height", &menu.main.text.info.height },
+ { "main.text.game.x", &menu.main.text.game.x },
+ { "main.text.game.y", &menu.main.text.game.y },
+ { "main.text.game.width", &menu.main.text.game.width },
+ { "main.text.game.height", &menu.main.text.game.height },
+ { "main.text.setup.x", &menu.main.text.setup.x },
+ { "main.text.setup.y", &menu.main.text.setup.y },
+ { "main.text.setup.width", &menu.main.text.setup.width },
+ { "main.text.setup.height", &menu.main.text.setup.height },
+ { "main.text.quit.x", &menu.main.text.quit.x },
+ { "main.text.quit.y", &menu.main.text.quit.y },
+ { "main.text.quit.width", &menu.main.text.quit.width },
+ { "main.text.quit.height", &menu.main.text.quit.height },
+
+ { "main.text.current_level.x",&menu.main.text.current_level.x },
+ { "main.text.current_level.y",&menu.main.text.current_level.y },
+ { "main.text.first_level.x", &menu.main.text.first_level.x },
+ { "main.text.first_level.y", &menu.main.text.first_level.y },
+ { "main.text.last_level.x", &menu.main.text.last_level.x },
+ { "main.text.last_level.y", &menu.main.text.last_level.y },
+ { "main.text.levelset_info.x",&menu.main.text.levelset_info.x },
+ { "main.text.levelset_info.y",&menu.main.text.levelset_info.y },
+ { "main.text.level_info.x", &menu.main.text.level_info.x },
+ { "main.text.level_info.y", &menu.main.text.level_info.y },
+
+ { "main.input.name.x", &menu.main.input.name.x },
+ { "main.input.name.y", &menu.main.input.name.y },
+
+ { "preview.x", &preview.x },
+ { "preview.y", &preview.y },
+ { "preview.xsize", &preview.xsize },
+ { "preview.ysize", &preview.ysize },
+ { "preview.xoffset", &preview.xoffset },
+ { "preview.yoffset", &preview.yoffset },
+ { "preview.tile_size", &preview.tile_size },
+ { "preview.step_offset", &preview.step_offset },
+ { "preview.step_delay", &preview.step_delay },
+
+ { "door_1.width", &door_1.width },
+ { "door_1.height", &door_1.height },
+ { "door_1.step_offset", &door_1.step_offset },
+ { "door_1.step_delay", &door_1.step_delay },
+ { "door_1.anim_mode", &door_1.anim_mode },
+ { "door_2.width", &door_2.width },
+ { "door_2.height", &door_2.height },
+ { "door_2.step_offset", &door_2.step_offset },
+ { "door_2.step_delay", &door_2.step_delay },
+ { "door_2.anim_mode", &door_2.anim_mode },
+
+ { "game.panel.level.x", &game.panel.level.x },
+ { "game.panel.level.y", &game.panel.level.y },
+ { "game.panel.gems.x", &game.panel.gems.x },
+ { "game.panel.gems.y", &game.panel.gems.y },
+ { "game.panel.inventory.x", &game.panel.inventory.x },
+ { "game.panel.inventory.y", &game.panel.inventory.y },
+ { "game.panel.keys.x", &game.panel.keys.x },
+ { "game.panel.keys.y", &game.panel.keys.y },
+ { "game.panel.score.x", &game.panel.score.x },
+ { "game.panel.score.y", &game.panel.score.y },
+ { "game.panel.time.x", &game.panel.time.x },
+ { "game.panel.time.y", &game.panel.time.y },
+
+ { "[player].boring_delay_fixed", &game.player_boring_delay_fixed },
+ { "[player].boring_delay_random", &game.player_boring_delay_random },
+ { "[player].sleeping_delay_fixed", &game.player_sleeping_delay_fixed },
+ { "[player].sleeping_delay_random", &game.player_sleeping_delay_random },
+
+ { NULL, NULL, }
+};
+
+
+/* ------------------------------------------------------------------------- */
+/* font definitions */
+/* ------------------------------------------------------------------------- */
+
+/* Important: When one entry is a prefix of another entry, the longer entry
+ must come first, because the dynamic configuration does prefix matching!
+ (These definitions must match the corresponding definitions in "main.h"!) */
+
+struct FontInfo font_info[NUM_FONTS + 1] =
+{
+ { "font.initial_1" },
+ { "font.initial_2" },
+ { "font.initial_3" },
+ { "font.initial_4" },
+ { "font.title_1" },
+ { "font.title_2" },
+ { "font.menu_1.active" },
+ { "font.menu_2.active" },
+ { "font.menu_1" },
+ { "font.menu_2" },
+ { "font.text_1.active" },
+ { "font.text_2.active" },
+ { "font.text_3.active" },
+ { "font.text_4.active" },
+ { "font.text_1" },
+ { "font.text_2" },
+ { "font.text_3" },
+ { "font.text_4" },
+ { "font.envelope_1" },
+ { "font.envelope_2" },
+ { "font.envelope_3" },
+ { "font.envelope_4" },
+ { "font.input_1.active" },
+ { "font.input_2.active" },
+ { "font.input_1" },
+ { "font.input_2" },
+ { "font.option_off" },
+ { "font.option_on" },
+ { "font.value_1" },
+ { "font.value_2" },
+ { "font.value_old" },
+ { "font.level_number.active" },
+ { "font.level_number" },
+ { "font.tape_recorder" },
+ { "font.game_info" },
+};
+
+
+/* ------------------------------------------------------------------------- */
+/* music token prefix definitions */
+/* ------------------------------------------------------------------------- */
+
+struct MusicPrefixInfo music_prefix_info[NUM_MUSIC_PREFIXES + 1] =
+{
+ { "background", TRUE },
+
+ { NULL, 0 }
+};
+
+
+/* ========================================================================= */
+/* main() */
+/* ========================================================================= */
+
+static void print_usage()
+{
+ printf("\n"
+ "Usage: %s [OPTION]... [HOSTNAME [PORT]]\n"
+ "\n"
+ "Options:\n"
+ " -d, --display HOSTNAME[:SCREEN] specify X server display\n"
+ " -b, --basepath DIRECTORY alternative base DIRECTORY\n"
+ " -l, --level DIRECTORY alternative level DIRECTORY\n"
+ " -g, --graphics DIRECTORY alternative graphics DIRECTORY\n"
+ " -s, --sounds DIRECTORY alternative sounds DIRECTORY\n"
+ " -m, --music DIRECTORY alternative music DIRECTORY\n"
+ " -n, --network network multiplayer game\n"
+ " --serveronly only start network server\n"
+ " -v, --verbose verbose mode\n"
+ " --debug display debugging information\n"
+ " -e, --execute COMMAND execute batch COMMAND\n"
+ "\n"
+ "Valid commands for '--execute' option:\n"
+ " \"print graphicsinfo.conf\" print default graphics config\n"
+ " \"print soundsinfo.conf\" print default sounds config\n"
+ " \"print musicinfo.conf\" print default music config\n"
+ " \"print editorsetup.conf\" print default editor config\n"
+ " \"print helpanim.conf\" print default helpanim config\n"
+ " \"print helptext.conf\" print default helptext config\n"
+ " \"dump level FILE\" dump level data from FILE\n"
+ " \"dump tape FILE\" dump tape data from FILE\n"
+ " \"autoplay LEVELDIR [NR ...]\" play level tapes for LEVELDIR\n"
+ " \"convert LEVELDIR [NR]\" convert levels in LEVELDIR\n"
+ "\n",
+ program.command_basename);
+}