rnd-20070310-2-src
authorHolger Schemel <info@artsoft.org>
Sat, 10 Mar 2007 17:19:07 +0000 (18:19 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:54:46 +0000 (10:54 +0200)
src/conf_gfx.c
src/conftime.h
src/files.c
src/game.c
src/libgame/misc.c
src/libgame/misc.h
src/libgame/system.h
src/main.c
src/main.h
src/screens.c

index 7f9e89fb15c83c207ef11f1b11faa06c0855f488..20a24667b4a92e121ea83719e761d159843bef07 100644 (file)
@@ -4957,6 +4957,7 @@ struct ConfigInfo image_config[] =
   { "titlemessage_initial_1.chars",            "-1"                    },
   { "titlemessage_initial_1.lines",            "-1"                    },
   { "titlemessage_initial_1.align",            "center"                },
+  { "titlemessage_initial_1.font",             "font.text_1"           },
   { "titlemessage_initial_1.autowrap",         "false"                 },
   { "titlemessage_initial_1.centered",         "false"                 },
   { "titlemessage_initial_1.skip_comments",    "false"                 },
@@ -4968,6 +4969,7 @@ struct ConfigInfo image_config[] =
   { "titlemessage_initial_2.chars",            "-1"                    },
   { "titlemessage_initial_2.lines",            "-1"                    },
   { "titlemessage_initial_2.align",            "center"                },
+  { "titlemessage_initial_2.font",             "font.text_1"           },
   { "titlemessage_initial_2.autowrap",         "false"                 },
   { "titlemessage_initial_2.centered",         "false"                 },
   { "titlemessage_initial_2.skip_comments",    "false"                 },
@@ -4979,6 +4981,7 @@ struct ConfigInfo image_config[] =
   { "titlemessage_initial_3.chars",            "-1"                    },
   { "titlemessage_initial_3.lines",            "-1"                    },
   { "titlemessage_initial_3.align",            "center"                },
+  { "titlemessage_initial_3.font",             "font.text_1"           },
   { "titlemessage_initial_3.autowrap",         "false"                 },
   { "titlemessage_initial_3.centered",         "false"                 },
   { "titlemessage_initial_3.skip_comments",    "false"                 },
@@ -4990,6 +4993,7 @@ struct ConfigInfo image_config[] =
   { "titlemessage_initial_4.chars",            "-1"                    },
   { "titlemessage_initial_4.lines",            "-1"                    },
   { "titlemessage_initial_4.align",            "center"                },
+  { "titlemessage_initial_4.font",             "font.text_1"           },
   { "titlemessage_initial_4.autowrap",         "false"                 },
   { "titlemessage_initial_4.centered",         "false"                 },
   { "titlemessage_initial_4.skip_comments",    "false"                 },
@@ -5001,6 +5005,7 @@ struct ConfigInfo image_config[] =
   { "titlemessage_initial_5.chars",            "-1"                    },
   { "titlemessage_initial_5.lines",            "-1"                    },
   { "titlemessage_initial_5.align",            "center"                },
+  { "titlemessage_initial_5.font",             "font.text_1"           },
   { "titlemessage_initial_5.autowrap",         "false"                 },
   { "titlemessage_initial_5.centered",         "false"                 },
   { "titlemessage_initial_5.skip_comments",    "false"                 },
@@ -5012,6 +5017,7 @@ struct ConfigInfo image_config[] =
   { "titlemessage_1.chars",                    "-1"                    },
   { "titlemessage_1.lines",                    "-1"                    },
   { "titlemessage_1.align",                    "center"                },
+  { "titlemessage_1.font",                     "font.text_1"           },
   { "titlemessage_1.autowrap",                 "false"                 },
   { "titlemessage_1.centered",                 "false"                 },
   { "titlemessage_1.skip_comments",            "false"                 },
@@ -5023,6 +5029,7 @@ struct ConfigInfo image_config[] =
   { "titlemessage_2.chars",                    "-1"                    },
   { "titlemessage_2.lines",                    "-1"                    },
   { "titlemessage_2.align",                    "center"                },
+  { "titlemessage_2.font",                     "font.text_1"           },
   { "titlemessage_2.autowrap",                 "false"                 },
   { "titlemessage_2.centered",                 "false"                 },
   { "titlemessage_2.skip_comments",            "false"                 },
@@ -5034,6 +5041,7 @@ struct ConfigInfo image_config[] =
   { "titlemessage_3.chars",                    "-1"                    },
   { "titlemessage_3.lines",                    "-1"                    },
   { "titlemessage_3.align",                    "center"                },
+  { "titlemessage_3.font",                     "font.text_1"           },
   { "titlemessage_3.autowrap",                 "false"                 },
   { "titlemessage_3.centered",                 "false"                 },
   { "titlemessage_3.skip_comments",            "false"                 },
@@ -5045,6 +5053,7 @@ struct ConfigInfo image_config[] =
   { "titlemessage_4.chars",                    "-1"                    },
   { "titlemessage_4.lines",                    "-1"                    },
   { "titlemessage_4.align",                    "center"                },
+  { "titlemessage_4.font",                     "font.text_1"           },
   { "titlemessage_4.autowrap",                 "false"                 },
   { "titlemessage_4.centered",                 "false"                 },
   { "titlemessage_4.skip_comments",            "false"                 },
@@ -5056,6 +5065,7 @@ struct ConfigInfo image_config[] =
   { "titlemessage_5.chars",                    "-1"                    },
   { "titlemessage_5.lines",                    "-1"                    },
   { "titlemessage_5.align",                    "center"                },
+  { "titlemessage_5.font",                     "font.text_1"           },
   { "titlemessage_5.autowrap",                 "false"                 },
   { "titlemessage_5.centered",                 "false"                 },
   { "titlemessage_5.skip_comments",            "false"                 },
@@ -5068,6 +5078,7 @@ struct ConfigInfo image_config[] =
   { "readme.chars",                            "-1"                    },
   { "readme.lines",                            "-1"                    },
   { "readme.align",                            "center"                },
+  { "readme.font",                             "font.info.levelset"    },
   { "readme.autowrap",                         "true"                  },
   { "readme.centered",                         "false"                 },
   { "readme.skip_comments",                    "true"                  },
@@ -5154,96 +5165,120 @@ struct ConfigInfo image_config[] =
   { "main.text.name.width",                    "-1"                    },
   { "main.text.name.height",                   "-1"                    },
   { "main.text.name.align",                    "left"                  },
+  { "main.text.name.font",                     "font.menu_1"           },
   { "main.text.levels.x",                      "-1"                    },
   { "main.text.levels.y",                      "-1"                    },
   { "main.text.levels.width",                  "-1"                    },
   { "main.text.levels.height",                 "-1"                    },
   { "main.text.levels.align",                  "left"                  },
+  { "main.text.levels.font",                   "font.menu_1"           },
   { "main.text.scores.x",                      "-1"                    },
   { "main.text.scores.y",                      "-1"                    },
   { "main.text.scores.width",                  "-1"                    },
   { "main.text.scores.height",                 "-1"                    },
   { "main.text.scores.align",                  "left"                  },
+  { "main.text.scores.font",                   "font.menu_1"           },
   { "main.text.editor.x",                      "-1"                    },
   { "main.text.editor.y",                      "-1"                    },
   { "main.text.editor.width",                  "-1"                    },
   { "main.text.editor.height",                 "-1"                    },
   { "main.text.editor.align",                  "left"                  },
+  { "main.text.editor.font",                   "font.menu_1"           },
   { "main.text.info.x",                                "-1"                    },
   { "main.text.info.y",                                "-1"                    },
   { "main.text.info.width",                    "-1"                    },
   { "main.text.info.height",                   "-1"                    },
   { "main.text.info.align",                    "left"                  },
+  { "main.text.info.font",                     "font.menu_1"           },
   { "main.text.game.x",                                "-1"                    },
   { "main.text.game.y",                                "-1"                    },
   { "main.text.game.width",                    "-1"                    },
   { "main.text.game.height",                   "-1"                    },
   { "main.text.game.align",                    "left"                  },
+  { "main.text.game.font",                     "font.menu_1"           },
   { "main.text.setup.x",                       "-1"                    },
   { "main.text.setup.y",                       "-1"                    },
   { "main.text.setup.width",                   "-1"                    },
   { "main.text.setup.height",                  "-1"                    },
   { "main.text.setup.align",                   "left"                  },
+  { "main.text.setup.font",                    "font.menu_1"           },
   { "main.text.quit.x",                                "-1"                    },
   { "main.text.quit.y",                                "-1"                    },
   { "main.text.quit.width",                    "-1"                    },
   { "main.text.quit.height",                   "-1"                    },
   { "main.text.quit.align",                    "left"                  },
+  { "main.text.quit.font",                     "font.menu_1"           },
 
   { "main.text.current_level.x",               "352"                   },
   { "main.text.current_level.y",               "96"                    },
   { "main.text.current_level.align",           "left"                  },
+  { "main.text.current_level.font",            "font.value_1"          },
   { "main.text.first_level.x",                 "488"                   },
   { "main.text.first_level.y",                 "98"                    },
   { "main.text.first_level.align",             "left"                  },
+  { "main.text.first_level.font",              "font.text_3"           },
   { "main.text.last_level.x",                  "488"                   },
   { "main.text.last_level.y",                  "112"                   },
   { "main.text.last_level.align",              "left"                  },
+  { "main.text.last_level.font",               "font.text_3"           },
   { "main.text.level_info_1.x",                        "272"                   },
   { "main.text.level_info_1.y",                        "352"                   },
   { "main.text.level_info_1.align",            "center"                },
   { "main.text.level_info_1.chars",            "-1"                    },
+  { "main.text.level_info_1.font",             "font.text_1"           },
   { "main.text.level_info_2.x",                        "272"                   },
   { "main.text.level_info_2.y",                        "523"                   },
   { "main.text.level_info_2.align",            "center"                },
   { "main.text.level_info_2.chars",            "-1"                    },
+  { "main.text.level_info_2.font",             "font.text_2"           },
+  { "main.text.level_info_2.font_header",      "font.text_3"           },
   { "main.text.level_name.x",                  "-1"                    },
   { "main.text.level_name.y",                  "-1"                    },
   { "main.text.level_name.align",              "left"                  },
   { "main.text.level_name.chars",              "-1"                    },
+  { "main.text.level_name.font",               "font.text_2"           },
   { "main.text.level_author.x",                        "-1"                    },
   { "main.text.level_author.y",                        "-1"                    },
   { "main.text.level_author.align",            "left"                  },
   { "main.text.level_author.chars",            "-1"                    },
+  { "main.text.level_author.font",             "font.text_2"           },
   { "main.text.level_year.x",                  "-1"                    },
   { "main.text.level_year.y",                  "-1"                    },
   { "main.text.level_year.align",              "left"                  },
   { "main.text.level_year.chars",              "-1"                    },
+  { "main.text.level_year.font",               "font.text_2"           },
   { "main.text.level_imported_from.x",         "-1"                    },
   { "main.text.level_imported_from.y",         "-1"                    },
   { "main.text.level_imported_from.align",     "left"                  },
   { "main.text.level_imported_from.chars",     "-1"                    },
+  { "main.text.level_imported_from.font",      "font.text_2"           },
   { "main.text.level_imported_by.x",           "-1"                    },
   { "main.text.level_imported_by.y",           "-1"                    },
   { "main.text.level_imported_by.align",       "left"                  },
   { "main.text.level_imported_by.chars",       "-1"                    },
+  { "main.text.level_imported_by.font",                "font.text_2"           },
   { "main.text.level_tested_by.x",             "-1"                    },
   { "main.text.level_tested_by.y",             "-1"                    },
   { "main.text.level_tested_by.align",         "left"                  },
   { "main.text.level_tested_by.chars",         "-1"                    },
+  { "main.text.level_tested_by.font",          "font.text_2"           },
   { "main.text.title_1.x",                     "272"                   },
   { "main.text.title_1.y",                     "8"                     },
   { "main.text.title_1.align",                 "center"                },
+  { "main.text.title_1.font",                  "font.title_1"          },
   { "main.text.title_2.x",                     "272"                   },
   { "main.text.title_2.y",                     "46"                    },
   { "main.text.title_2.align",                 "center"                },
+  { "main.text.title_2.font",                  "font.title_2"          },
   { "main.text.title_3.x",                     "272"                   },
   { "main.text.title_3.y",                     "326"                   },
   { "main.text.title_3.align",                 "center"                },
+  { "main.text.title_3.font",                  "font.title_2"          },
 
   { "main.input.name.x",                       "-1"                    },
   { "main.input.name.y",                       "-1"                    },
   { "main.input.name.align",                   "left"                  },
+  { "main.input.name.font",                    "font.input_1"          },
 
   { "preview.x",                               "272"                   },
   { "preview.y",                               "380"                   },
@@ -5272,26 +5307,33 @@ struct ConfigInfo image_config[] =
   { "game.panel.level.x",                      "51"                    },
   { "game.panel.level.y",                      "20"                    },
   { "game.panel.level.align",                  "center"                },
-  { "game.panel.level.digits",                 "-1"                    },
+  { "game.panel.level.chars",                  "-1"                    },
+  { "game.panel.level.font",                   "font.text_2"           },
+  { "game.panel.level.font_narrow",            "font.text_1"           },
   { "game.panel.gems.x",                       "50"                    },
   { "game.panel.gems.y",                       "54"                    },
   { "game.panel.gems.align",                   "center"                },
-  { "game.panel.gems.digits",                  "3"                     },
+  { "game.panel.gems.chars",                   "3"                     },
+  { "game.panel.gems.font",                    "font.text_2"           },
   { "game.panel.inventory.x",                  "50"                    },
   { "game.panel.inventory.y",                  "89"                    },
   { "game.panel.inventory.align",              "center"                },
-  { "game.panel.inventory.digits",             "3"                     },
+  { "game.panel.inventory.chars",              "3"                     },
+  { "game.panel.inventory.font",               "font.text_2"           },
   { "game.panel.keys.x",                       "50"                    },
   { "game.panel.keys.y",                       "123"                   },
   { "game.panel.keys.align",                   "center"                },
   { "game.panel.score.x",                      "50"                    },
   { "game.panel.score.y",                      "159"                   },
   { "game.panel.score.align",                  "center"                },
-  { "game.panel.score.digits",                 "5"                     },
+  { "game.panel.score.chars",                  "5"                     },
+  { "game.panel.score.font",                   "font.text_2"           },
   { "game.panel.time.x",                       "50"                    },
   { "game.panel.time.y",                       "194"                   },
   { "game.panel.time.align",                   "center"                },
-  { "game.panel.time.digits",                  "-1"                    },
+  { "game.panel.time.chars",                   "-1"                    },
+  { "game.panel.time.font",                    "font.text_2"           },
+  { "game.panel.time.font_narrow",             "font.text_1"           },
 
 #if 0
   /* --- not yet available (start) --- */
@@ -5299,15 +5341,18 @@ struct ConfigInfo image_config[] =
   { "game.panel.time_hh.x",                    "-1"                    },
   { "game.panel.time_hh.y",                    "-1"                    },
   { "game.panel.time_hh.align",                        "left"                  },
-  { "game.panel.time_hh.digits",               "-1"                    },
+  { "game.panel.time_hh.chars",                        "-1"                    },
+  { "game.panel.time_hh.font",                 "font.text_2"           },
   { "game.panel.time_mm.x",                    "-1"                    },
   { "game.panel.time_mm.y",                    "-1"                    },
   { "game.panel.time_mm.align",                        "left"                  },
-  { "game.panel.time_mm.digits",               "-1"                    },
+  { "game.panel.time_mm.chars",                        "-1"                    },
+  { "game.panel.time_mm.font",                 "font.text_2"           },
   { "game.panel.time_ss.x",                    "-1"                    },
   { "game.panel.time_ss.y",                    "-1"                    },
   { "game.panel.time_ss.align",                        "left"                  },
-  { "game.panel.time_ss.digits",               "-1"                    },
+  { "game.panel.time_ss.chars",                        "-1"                    },
+  { "game.panel.time_ss.font",                 "font.text_2"           },
 
   { "game.panel.drop_next_1.x",                        "-1"                    },
   { "game.panel.drop_next_1.y",                        "-1"                    },
@@ -5346,20 +5391,23 @@ struct ConfigInfo image_config[] =
   { "game.panel.white_keys.x",                 "-1"                    },
   { "game.panel.white_keys.y",                 "-1"                    },
   { "game.panel.white_keys.align",             "left"                  },
-  { "game.panel.white_keys.digits",            "-1"                    },
+  { "game.panel.white_keys.chars",             "-1"                    },
+  { "game.panel.white_keys.font",              "font.text_2"           },
 
   { "game.panel.shield_normal.x",              "-1"                    },
   { "game.panel.shield_normal.y",              "-1"                    },
   { "game.panel.shield_normal_time.x",         "-1"                    },
   { "game.panel.shield_normal_time.y",         "-1"                    },
   { "game.panel.shield_normal_time.align",     "left"                  },
-  { "game.panel.shield_normal_time.digits",    "-1"                    },
+  { "game.panel.shield_normal_time.chars",     "-1"                    },
+  { "game.panel.shield_normal_time.font",      "font.text_2"           },
   { "game.panel.shield_deadly.x",              "-1"                    },
   { "game.panel.shield_deadly.y",              "-1"                    },
   { "game.panel.shield_deadly_time.x",         "-1"                    },
   { "game.panel.shield_deadly_time.y",         "-1"                    },
   { "game.panel.shield_deadly_time.align",     "left"                  },
-  { "game.panel.shield_deadly_time.digits",    "-1"                    },
+  { "game.panel.shield_deadly_time.chars",     "-1"                    },
+  { "game.panel.shield_deadly_time.font",      "font.text_2"           },
 
   { "game.panel.exit.x",                       "-1"                    },
   { "game.panel.exit.y",                       "-1"                    },
@@ -5377,21 +5425,24 @@ struct ConfigInfo image_config[] =
   { "game.panel.emc_magic_ball_time.x",                "-1"                    },
   { "game.panel.emc_magic_ball_time.y",                "-1"                    },
   { "game.panel.emc_magic_ball_time.align",    "left"                  },
-  { "game.panel.emc_magic_ball_time.digits",   "-1"                    },
+  { "game.panel.emc_magic_ball_time.chars",    "-1"                    },
+  { "game.panel.emc_magic_ball_time.font",     "font.text_2"           },
 
   { "game.panel.light_switch.x",               "-1"                    },
   { "game.panel.light_switch.y",               "-1"                    },
   { "game.panel.light_switch_time.x",          "-1"                    },
   { "game.panel.light_switch_time.y",          "-1"                    },
   { "game.panel.light_switch_time.align",      "left"                  },
-  { "game.panel.light_switch_time.digits",     "-1"                    },
+  { "game.panel.light_switch_time.chars",      "-1"                    },
+  { "game.panel.light_switch_time.font",       "font.text_2"           },
 
   { "game.panel.timegate_switch.x",            "-1"                    },
   { "game.panel.timegate_switch.y",            "-1"                    },
   { "game.panel.timegate_switch_time.x",       "-1"                    },
   { "game.panel.timegate_switch_time.y",       "-1"                    },
   { "game.panel.timegate_switch_time.align",   "left"                  },
-  { "game.panel.timegate_switch_time.digits",  "-1"                    },
+  { "game.panel.timegate_switch_time.chars",   "-1"                    },
+  { "game.panel.timegate_switch_time.font",    "font.text_2"           },
 
   { "game.panel.switchgate_switch.x",          "-1"                    },
   { "game.panel.switchgate_switch.y",          "-1"                    },
@@ -5401,14 +5452,16 @@ struct ConfigInfo image_config[] =
   { "game.panel.emc_lenses_time.x",            "-1"                    },
   { "game.panel.emc_lenses_time.y",            "-1"                    },
   { "game.panel.emc_lenses_time.align",                "left"                  },
-  { "game.panel.emc_lenses_time.digits",       "-1"                    },
+  { "game.panel.emc_lenses_time.chars",                "-1"                    },
+  { "game.panel.emc_lenses_time.font",         "font.text_2"           },
 
   { "game.panel.emc_magnifier.x",              "-1"                    },
   { "game.panel.emc_magnifier.y",              "-1"                    },
   { "game.panel.emc_magnifier_time.x",         "-1"                    },
   { "game.panel.emc_magnifier_time.y",         "-1"                    },
   { "game.panel.emc_magnifier_time.align",     "left"                  },
-  { "game.panel.emc_magnifier_time.digits",    "-1"                    },
+  { "game.panel.emc_magnifier_time.chars",     "-1"                    },
+  { "game.panel.emc_magnifier_time.font",      "font.text_2"           },
 
   { "game.panel.balloon_switch.x",             "-1"                    },
   { "game.panel.balloon_switch.y",             "-1"                    },
@@ -5416,27 +5469,32 @@ struct ConfigInfo image_config[] =
   { "game.panel.dynabomb_number.x",            "-1"                    },
   { "game.panel.dynabomb_number.y",            "-1"                    },
   { "game.panel.dynabomb_number.align",                "left"                  },
-  { "game.panel.dynabomb_number.digits",       "-1"                    },
+  { "game.panel.dynabomb_number.chars",                "-1"                    },
+  { "game.panel.dynabomb_number.font",         "font.text_2"           },
   { "game.panel.dynabomb_size.x",              "-1"                    },
   { "game.panel.dynabomb_size.y",              "-1"                    },
   { "game.panel.dynabomb_size.align",          "left"                  },
-  { "game.panel.dynabomb_size.digits",         "-1"                    },
+  { "game.panel.dynabomb_size.chars",          "-1"                    },
+  { "game.panel.dynabomb_size.font",           "font.text_2"           },
   { "game.panel.dynabomb_power.x",             "-1"                    },
   { "game.panel.dynabomb_power.y",             "-1"                    },
 
   { "game.panel.penguins.x",                   "-1"                    },
   { "game.panel.penguins.y",                   "-1"                    },
   { "game.panel.penguins.align",               "left"                  },
-  { "game.panel.penguins.digits",              "-1"                    },
+  { "game.panel.penguins.chars",               "-1"                    },
+  { "game.panel.penguins.font",                        "font.text_2"           },
 
   { "game.panel.sokoban_objects.x",            "-1"                    },
   { "game.panel.sokoban_objects.y",            "-1"                    },
   { "game.panel.sokoban_objects.align",                "left"                  },
-  { "game.panel.sokoban_objects.digits",       "-1"                    },
+  { "game.panel.sokoban_objects.chars",                "-1"                    },
+  { "game.panel.sokoban_objects.font",         "font.text_2"           },
   { "game.panel.sokoban_fields.x",             "-1"                    },
   { "game.panel.sokoban_fields.y",             "-1"                    },
   { "game.panel.sokoban_fields.align",         "left"                  },
-  { "game.panel.sokoban_fields.digits",                "-1"                    },
+  { "game.panel.sokoban_fields.chars",         "-1"                    },
+  { "game.panel.sokoban_fields.font",          "font.text_2"           },
 
   { "game.panel.robot_wheel.x",                        "-1"                    },
   { "game.panel.robot_wheel.y",                        "-1"                    },
@@ -5463,7 +5521,8 @@ struct ConfigInfo image_config[] =
   { "game.panel.magic_wall_time.x",            "-1"                    },
   { "game.panel.magic_wall_time.y",            "-1"                    },
   { "game.panel.magic_wall_time.align",                "left"                  },
-  { "game.panel.magic_wall_time.digits",       "-1"                    },
+  { "game.panel.magic_wall_time.chars",                "-1"                    },
+  { "game.panel.magic_wall_time.font",         "font.text_2"           },
   { "game.panel.bd_magic_wall.x",              "-1"                    },
   { "game.panel.bd_magic_wall.y",              "-1"                    },
   { "game.panel.dc_magic_wall.x",              "-1"                    },
@@ -5473,15 +5532,18 @@ struct ConfigInfo image_config[] =
   { "game.panel.player_name.y",                        "-1"                    },
   { "game.panel.player_name.align",            "left"                  },
   { "game.panel.player_name.chars",            "-1"                    },
+  { "game.panel.player_name.font",             "font.text_2"           },
 
   { "game.panel.level_name.x",                 "-1"                    },
   { "game.panel.level_name.y",                 "-1"                    },
   { "game.panel.level_name.align",             "left"                  },
   { "game.panel.level_name.chars",             "-1"                    },
+  { "game.panel.level_name.font",              "font.text_2"           },
   { "game.panel.level_author.x",               "-1"                    },
   { "game.panel.level_author.y",               "-1"                    },
   { "game.panel.level_author.align",           "left"                  },
   { "game.panel.level_author.chars",           "-1"                    },
+  { "game.panel.level_author.font",            "font.text_2"           },
 
   { "game.panel.stop.x",                       "-1"                    },
   { "game.panel.stop.y",                       "-1"                    },
index 6aa984177b9ab4368f0bb69e3e6dbc41ece32a59..810acf7a42a1e47e0df8e03078ec0ac9b7660c98 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "2007-03-10 01:04"
+#define COMPILE_DATE_STRING "2007-03-10 17:42"
index d1a6eec4d9bf64be3f22eb90b796e87b7147385a..979bd4f63620fb537568585205cda1fb597920ac 100644 (file)
@@ -8321,6 +8321,33 @@ void LoadCustomElementDescriptions()
   freeSetupFileHash(setup_file_hash);
 }
 
+static int get_token_parameter_value(char *token, char *value_raw)
+{
+  char *suffix;
+
+  if (token == NULL || value_raw == NULL)
+    return ARG_UNDEFINED_VALUE;
+
+  suffix = strrchr(token, '.');
+  if (suffix == NULL)
+    suffix = token;
+
+  if (strncmp(suffix, ".font", 5) == 0)
+  {
+    int i;
+
+    /* !!! OPTIMIZE THIS BY USING HASH !!! */
+    for (i = 0; i < NUM_FONTS; i++)
+      if (strEqual(value_raw, font_info[i].token_name))
+       return i;
+
+    /* if font not found, use reliable default value */
+    return FONT_INITIAL_1;
+  }
+
+  return get_parameter_value(value_raw, suffix, TYPE_INTEGER);
+}
+
 static void LoadSpecialMenuDesignSettingsFromFilename(char *filename)
 {
   SetupFileHash *setup_file_hash;
@@ -8367,7 +8394,7 @@ static void LoadSpecialMenuDesignSettingsFromFilename(char *filename)
 
     if (value != NULL)
       *image_config_vars[i].value =
-       get_auto_parameter_value(image_config_vars[i].token, value);
+       get_token_parameter_value(image_config_vars[i].token, value);
   }
 
   freeSetupFileHash(setup_file_hash);
@@ -8383,8 +8410,8 @@ void LoadSpecialMenuDesignSettings()
     for (j = 0; image_config[j].token != NULL; j++)
       if (strEqual(image_config_vars[i].token, image_config[j].token))
        *image_config_vars[i].value =
-         get_auto_parameter_value(image_config_vars[i].token,
-                                  image_config[j].value);
+         get_token_parameter_value(image_config_vars[i].token,
+                                   image_config[j].value);
 
   if (!SETUP_OVERRIDE_ARTWORK(setup, ARTWORK_TYPE_GRAPHICS))
   {
index 104b6e4dbc164dc11b213b1feae0ef2b2821c91b..207be5f457a86e581b913aa095390bc803cc2381 100644 (file)
@@ -1290,14 +1290,14 @@ void DrawGameValue_Emeralds(int value)
   struct TextPosInfo *pos = &game.panel.gems;
   int font_nr = FONT_TEXT_2;
   int font_width = getFontWidth(font_nr);
-  int digits = pos->chars;
+  int chars = pos->chars;
 
   if (PANEL_DEACTIVATED(pos))
     return;
 
-  pos->width = digits * font_width;
+  pos->width = chars * font_width;
 
-  DrawText(PANEL_XPOS(pos), PANEL_YPOS(pos), int2str(value, digits), font_nr);
+  DrawText(PANEL_XPOS(pos), PANEL_YPOS(pos), int2str(value, chars), font_nr);
 }
 
 void DrawGameValue_Dynamite(int value)
@@ -1305,14 +1305,14 @@ void DrawGameValue_Dynamite(int value)
   struct TextPosInfo *pos = &game.panel.inventory;
   int font_nr = FONT_TEXT_2;
   int font_width = getFontWidth(font_nr);
-  int digits = pos->chars;
+  int chars = pos->chars;
 
   if (PANEL_DEACTIVATED(pos))
     return;
 
-  pos->width = digits * font_width;
+  pos->width = chars * font_width;
 
-  DrawText(PANEL_XPOS(pos), PANEL_YPOS(pos), int2str(value, digits), font_nr);
+  DrawText(PANEL_XPOS(pos), PANEL_YPOS(pos), int2str(value, chars), font_nr);
 }
 
 void DrawGameValue_Score(int value)
@@ -1320,42 +1320,42 @@ void DrawGameValue_Score(int value)
   struct TextPosInfo *pos = &game.panel.score;
   int font_nr = FONT_TEXT_2;
   int font_width = getFontWidth(font_nr);
-  int digits = pos->chars;
+  int chars = pos->chars;
 
   if (PANEL_DEACTIVATED(pos))
     return;
 
-  pos->width = digits * font_width;
+  pos->width = chars * font_width;
 
-  DrawText(PANEL_XPOS(pos), PANEL_YPOS(pos), int2str(value, digits), font_nr);
+  DrawText(PANEL_XPOS(pos), PANEL_YPOS(pos), int2str(value, chars), font_nr);
 }
 
 void DrawGameValue_Time(int value)
 {
   struct TextPosInfo *pos = &game.panel.time;
   static int last_value = -1;
-  int digits1 = 3;
-  int digits2 = 4;
-  int digits = pos->chars;
+  int chars1 = 3;
+  int chars2 = 4;
+  int chars = pos->chars;
   int font1_nr = FONT_TEXT_2;
   int font2_nr = FONT_TEXT_1;
   int font_nr = font1_nr;
-  boolean use_dynamic_digits = (digits == -1 ? TRUE : FALSE);
+  boolean use_dynamic_chars = (chars == -1 ? TRUE : FALSE);
 
   if (PANEL_DEACTIVATED(pos))
     return;
 
-  if (use_dynamic_digits)              /* use dynamic number of digits */
+  if (use_dynamic_chars)               /* use dynamic number of chars */
   {
-    digits  = (value < 1000 ? digits1  : digits2);
+    chars   = (value < 1000 ? chars1   : chars2);
     font_nr = (value < 1000 ? font1_nr : font2_nr);
   }
 
-  /* clear background if value just changed its size (dynamic digits only) */
-  if (use_dynamic_digits && (last_value < 1000) != (value < 1000))
+  /* clear background if value just changed its size (dynamic chars only) */
+  if (use_dynamic_chars && (last_value < 1000) != (value < 1000))
   {
-    int width1 = digits1 * getFontWidth(font1_nr);
-    int width2 = digits2 * getFontWidth(font2_nr);
+    int width1 = chars1 * getFontWidth(font1_nr);
+    int width2 = chars2 * getFontWidth(font2_nr);
     int max_width = MAX(width1, width2);
     int max_height = MAX(getFontHeight(font1_nr), getFontHeight(font2_nr));
 
@@ -1365,9 +1365,9 @@ void DrawGameValue_Time(int value)
                               max_width, max_height);
   }
 
-  pos->width = digits * getFontWidth(font_nr);
+  pos->width = chars * getFontWidth(font_nr);
 
-  DrawText(PANEL_XPOS(pos), PANEL_YPOS(pos), int2str(value, digits), font_nr);
+  DrawText(PANEL_XPOS(pos), PANEL_YPOS(pos), int2str(value, chars), font_nr);
 
   last_value = value;
 }
@@ -1375,26 +1375,26 @@ void DrawGameValue_Time(int value)
 void DrawGameValue_Level(int value)
 {
   struct TextPosInfo *pos = &game.panel.level;
-  int digits1 = 2;
-  int digits2 = 3;
-  int digits = pos->chars;
+  int chars1 = 2;
+  int chars2 = 3;
+  int chars = pos->chars;
   int font1_nr = FONT_TEXT_2;
   int font2_nr = FONT_TEXT_1;
   int font_nr = font1_nr;
-  boolean use_dynamic_digits = (digits == -1 ? TRUE : FALSE);
+  boolean use_dynamic_chars = (chars == -1 ? TRUE : FALSE);
 
   if (PANEL_DEACTIVATED(pos))
     return;
 
-  if (use_dynamic_digits)              /* use dynamic number of digits */
+  if (use_dynamic_chars)               /* use dynamic number of chars */
   {
-    digits  = (level_nr < 100 ? digits1  : digits2);
+    chars   = (level_nr < 100 ? chars1   : chars2);
     font_nr = (level_nr < 100 ? font1_nr : font2_nr);
   }
 
-  pos->width = digits * getFontWidth(font_nr);
+  pos->width = chars * getFontWidth(font_nr);
 
-  DrawText(PANEL_XPOS(pos), PANEL_YPOS(pos), int2str(value, digits), font_nr);
+  DrawText(PANEL_XPOS(pos), PANEL_YPOS(pos), int2str(value, chars), font_nr);
 }
 
 void DrawGameValue_Keys(int key[MAX_NUM_KEYS])
index 0f5a2c0f95d253d8d3567a203f546ee917bd5cff..e08a45c98effdee83c18765b1a54ae62e94a4381 100644 (file)
@@ -1824,20 +1824,6 @@ int get_parameter_value(char *value_raw, char *suffix, int type)
   return result;
 }
 
-int get_auto_parameter_value(char *token, char *value_raw)
-{
-  char *suffix;
-
-  if (token == NULL || value_raw == NULL)
-    return ARG_UNDEFINED_VALUE;
-
-  suffix = strrchr(token, '.');
-  if (suffix == NULL)
-    suffix = token;
-
-  return get_parameter_value(value_raw, suffix, TYPE_INTEGER);
-}
-
 struct ScreenModeInfo *get_screen_mode_from_string(char *screen_mode_string)
 {
   static struct ScreenModeInfo screen_mode;
index ab47b2b35bba0bfee71377faf2fd18c628063187..de94e2ec69ed07b861cb1963a6f3d4b386bd71ac 100644 (file)
@@ -178,7 +178,6 @@ boolean FileIsArtworkType(char *, int);
 char *get_mapped_token(char *);
 
 int get_parameter_value(char *, char *, int);
-int get_auto_parameter_value(char *, char *);
 
 struct ScreenModeInfo *get_screen_mode_from_string(char *);
 void get_aspect_ratio_from_screen_mode(struct ScreenModeInfo *, int *x, int *y);
index 55caac9ae1a5b5ba86886986c874ca9e3230dac1..5825fc53d9ed022be42e05e4483429c740e4c5a8 100644 (file)
@@ -1028,6 +1028,7 @@ struct TextPosInfo
   int width, height;
   int align;
   int chars;
+  int font, font_alt;
 };
 
 
index 873a344d0ec2dcb3d7eae35f5e5494521014e8a8..4f7a0f420aad01545ca1d00aafabc4609428464f 100644 (file)
@@ -5411,6 +5411,10 @@ struct TokenIntPtrInfo image_config_vars[] =
     "titlemessage_initial_1.align",
     &titlemessage_initial[0].align
   },
+  {
+    "titlemessage_initial_1.font",
+    &titlemessage_initial[0].font
+  },
   {
     "titlemessage_initial_1.autowrap",
     &titlemessage_initial[0].autowrap
@@ -5455,6 +5459,10 @@ struct TokenIntPtrInfo image_config_vars[] =
     "titlemessage_initial_2.align",
     &titlemessage_initial[1].align
   },
+  {
+    "titlemessage_initial_2.font",
+    &titlemessage_initial[1].font
+  },
   {
     "titlemessage_initial_2.autowrap",
     &titlemessage_initial[1].autowrap
@@ -5499,6 +5507,10 @@ struct TokenIntPtrInfo image_config_vars[] =
     "titlemessage_initial_3.align",
     &titlemessage_initial[2].align
   },
+  {
+    "titlemessage_initial_3.font",
+    &titlemessage_initial[2].font
+  },
   {
     "titlemessage_initial_3.autowrap",
     &titlemessage_initial[2].autowrap
@@ -5543,6 +5555,10 @@ struct TokenIntPtrInfo image_config_vars[] =
     "titlemessage_initial_4.align",
     &titlemessage_initial[3].align
   },
+  {
+    "titlemessage_initial_4.font",
+    &titlemessage_initial[3].font
+  },
   {
     "titlemessage_initial_4.autowrap",
     &titlemessage_initial[3].autowrap
@@ -5587,6 +5603,10 @@ struct TokenIntPtrInfo image_config_vars[] =
     "titlemessage_initial_5.align",
     &titlemessage_initial[4].align
   },
+  {
+    "titlemessage_initial_5.font",
+    &titlemessage_initial[4].font
+  },
   {
     "titlemessage_initial_5.autowrap",
     &titlemessage_initial[4].autowrap
@@ -5631,6 +5651,10 @@ struct TokenIntPtrInfo image_config_vars[] =
     "titlemessage_1.align",
     &titlemessage[0].align
   },
+  {
+    "titlemessage_1.font",
+    &titlemessage[0].font
+  },
   {
     "titlemessage_1.autowrap",
     &titlemessage[0].autowrap
@@ -5675,6 +5699,10 @@ struct TokenIntPtrInfo image_config_vars[] =
     "titlemessage_2.align",
     &titlemessage[1].align
   },
+  {
+    "titlemessage_2.font",
+    &titlemessage[1].font
+  },
   {
     "titlemessage_2.autowrap",
     &titlemessage[1].autowrap
@@ -5719,6 +5747,10 @@ struct TokenIntPtrInfo image_config_vars[] =
     "titlemessage_3.align",
     &titlemessage[2].align
   },
+  {
+    "titlemessage_3.font",
+    &titlemessage[2].font
+  },
   {
     "titlemessage_3.autowrap",
     &titlemessage[2].autowrap
@@ -5763,6 +5795,10 @@ struct TokenIntPtrInfo image_config_vars[] =
     "titlemessage_4.align",
     &titlemessage[3].align
   },
+  {
+    "titlemessage_4.font",
+    &titlemessage[3].font
+  },
   {
     "titlemessage_4.autowrap",
     &titlemessage[3].autowrap
@@ -5807,6 +5843,10 @@ struct TokenIntPtrInfo image_config_vars[] =
     "titlemessage_5.align",
     &titlemessage[4].align
   },
+  {
+    "titlemessage_5.font",
+    &titlemessage[4].font
+  },
   {
     "titlemessage_5.autowrap",
     &titlemessage[4].autowrap
@@ -5852,6 +5892,10 @@ struct TokenIntPtrInfo image_config_vars[] =
     "readme.align",
     &readme.align
   },
+  {
+    "readme.font",
+    &readme.font
+  },
   {
     "readme.autowrap",
     &readme.autowrap
@@ -6091,100 +6135,126 @@ struct TokenIntPtrInfo image_config_vars[] =
   { "main.text.name.width",            &menu.main.text.name.width            },
   { "main.text.name.height",           &menu.main.text.name.height           },
   { "main.text.name.align",            &menu.main.text.name.align            },
+  { "main.text.name.font",             &menu.main.text.name.font             },
   { "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.levels.align",          &menu.main.text.levels.align          },
+  { "main.text.levels.font",           &menu.main.text.levels.font           },
   { "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.scores.align",          &menu.main.text.scores.align          },
+  { "main.text.scores.font",           &menu.main.text.scores.font           },
   { "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.editor.align",          &menu.main.text.editor.align          },
+  { "main.text.editor.font",           &menu.main.text.editor.font           },
   { "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.info.align",            &menu.main.text.info.align            },
+  { "main.text.info.font",             &menu.main.text.info.font             },
   { "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.game.align",            &menu.main.text.game.align            },
+  { "main.text.game.font",             &menu.main.text.game.font             },
   { "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.setup.align",           &menu.main.text.setup.align           },
+  { "main.text.setup.font",            &menu.main.text.setup.font            },
   { "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.quit.align",            &menu.main.text.quit.align            },
+  { "main.text.quit.font",             &menu.main.text.quit.font             },
 
   { "main.text.current_level.x",       &menu.main.text.current_level.x       },
   { "main.text.current_level.y",       &menu.main.text.current_level.y       },
   { "main.text.current_level.align",   &menu.main.text.current_level.align   },
+  { "main.text.current_level.font",    &menu.main.text.current_level.font    },
   { "main.text.first_level.x",         &menu.main.text.first_level.x         },
   { "main.text.first_level.y",         &menu.main.text.first_level.y         },
   { "main.text.first_level.align",     &menu.main.text.first_level.align     },
+  { "main.text.first_level.font",      &menu.main.text.first_level.font      },
   { "main.text.last_level.x",          &menu.main.text.last_level.x          },
   { "main.text.last_level.y",          &menu.main.text.last_level.y          },
   { "main.text.last_level.align",      &menu.main.text.last_level.align      },
+  { "main.text.last_level.font",       &menu.main.text.last_level.font       },
   { "main.text.level_info_1.x",                &menu.main.text.level_info_1.x        },
   { "main.text.level_info_1.y",                &menu.main.text.level_info_1.y        },
   { "main.text.level_info_1.align",    &menu.main.text.level_info_1.align    },
   { "main.text.level_info_1.chars",    &menu.main.text.level_info_1.chars    },
+  { "main.text.level_info_1.font",     &menu.main.text.level_info_1.font     },
   { "main.text.level_info_2.x",                &menu.main.text.level_info_2.x        },
   { "main.text.level_info_2.y",                &menu.main.text.level_info_2.y        },
   { "main.text.level_info_2.align",    &menu.main.text.level_info_2.align    },
   { "main.text.level_info_2.chars",    &menu.main.text.level_info_2.chars    },
+  { "main.text.level_info_2.font",     &menu.main.text.level_info_2.font     },
+  { "main.text.level_info_2.font_header",&menu.main.text.level_info_2.font_alt},
   { "main.text.level_name.x",          &menu.main.text.level_name.x          },
   { "main.text.level_name.y",          &menu.main.text.level_name.y          },
   { "main.text.level_name.align",      &menu.main.text.level_name.align      },
   { "main.text.level_name.chars",      &menu.main.text.level_name.chars      },
+  { "main.text.level_name.font",       &menu.main.text.level_name.font       },
   { "main.text.level_author.x",                &menu.main.text.level_author.x        },
   { "main.text.level_author.y",                &menu.main.text.level_author.y        },
   { "main.text.level_author.align",    &menu.main.text.level_author.align    },
   { "main.text.level_author.chars",    &menu.main.text.level_author.chars    },
+  { "main.text.level_author.font",     &menu.main.text.level_author.font     },
   { "main.text.level_year.x",          &menu.main.text.level_year.x          },
   { "main.text.level_year.y",          &menu.main.text.level_year.y          },
   { "main.text.level_year.align",      &menu.main.text.level_year.align      },
   { "main.text.level_year.chars",      &menu.main.text.level_year.chars      },
+  { "main.text.level_year.font",       &menu.main.text.level_year.font       },
   { "main.text.level_imported_from.x", &menu.main.text.level_imported_from.x },
   { "main.text.level_imported_from.y", &menu.main.text.level_imported_from.y },
   { "main.text.level_imported_from.align",
     &menu.main.text.level_imported_from.align                                },
   { "main.text.level_imported_from.chars",
     &menu.main.text.level_imported_from.chars                                },
+  { "main.text.level_imported_from.font",
+    &menu.main.text.level_imported_from.font                                 },
   { "main.text.level_imported_by.x",   &menu.main.text.level_imported_by.x   },
   { "main.text.level_imported_by.y",   &menu.main.text.level_imported_by.y   },
   { "main.text.level_imported_by.align",
     &menu.main.text.level_imported_by.align                                  },
   { "main.text.level_imported_by.chars",
     &menu.main.text.level_imported_by.chars                                  },
+  { "main.text.level_imported_by.font",
+    &menu.main.text.level_imported_by.font                                   },
   { "main.text.level_tested_by.x",     &menu.main.text.level_tested_by.x     },
   { "main.text.level_tested_by.y",     &menu.main.text.level_tested_by.y     },
   { "main.text.level_tested_by.align", &menu.main.text.level_tested_by.align },
   { "main.text.level_tested_by.chars", &menu.main.text.level_tested_by.chars },
+  { "main.text.level_tested_by.font",  &menu.main.text.level_tested_by.font  },
   { "main.text.title_1.x",             &menu.main.text.title_1.x             },
   { "main.text.title_1.y",             &menu.main.text.title_1.y             },
   { "main.text.title_1.align",         &menu.main.text.title_1.align         },
+  { "main.text.title_1.font",          &menu.main.text.title_1.font          },
   { "main.text.title_2.x",             &menu.main.text.title_2.x             },
   { "main.text.title_2.y",             &menu.main.text.title_2.y             },
   { "main.text.title_2.align",         &menu.main.text.title_2.align         },
+  { "main.text.title_2.font",          &menu.main.text.title_2.font          },
   { "main.text.title_3.x",             &menu.main.text.title_3.x             },
   { "main.text.title_3.y",             &menu.main.text.title_3.y             },
   { "main.text.title_3.align",         &menu.main.text.title_3.align         },
+  { "main.text.title_3.font",          &menu.main.text.title_3.font          },
 
   { "main.input.name.x",               &menu.main.input.name.x               },
   { "main.input.name.y",               &menu.main.input.name.y               },
   { "main.input.name.align",           &menu.main.input.name.align           },
+  { "main.input.name.font",            &menu.main.input.name.font            },
 
   { "preview.x",                       &preview.x                            },
   { "preview.y",                       &preview.y                            },
@@ -6212,26 +6282,33 @@ struct TokenIntPtrInfo image_config_vars[] =
   { "game.panel.level.x",              &game.panel.level.x                   },
   { "game.panel.level.y",              &game.panel.level.y                   },
   { "game.panel.level.align",          &game.panel.level.align               },
-  { "game.panel.level.digits",         &game.panel.level.chars               },
+  { "game.panel.level.chars",          &game.panel.level.chars               },
+  { "game.panel.level.font",           &game.panel.level.font                },
+  { "game.panel.level.font_narrow",    &game.panel.level.font_alt            },
   { "game.panel.gems.x",               &game.panel.gems.x                    },
   { "game.panel.gems.y",               &game.panel.gems.y                    },
   { "game.panel.gems.align",           &game.panel.gems.align                },
-  { "game.panel.gems.digits",          &game.panel.gems.chars                },
+  { "game.panel.gems.chars",           &game.panel.gems.chars                },
+  { "game.panel.gems.font",            &game.panel.gems.font                 },
   { "game.panel.inventory.x",          &game.panel.inventory.x               },
   { "game.panel.inventory.y",          &game.panel.inventory.y               },
   { "game.panel.inventory.align",      &game.panel.inventory.align           },
-  { "game.panel.inventory.digits",     &game.panel.inventory.chars           },
+  { "game.panel.inventory.chars",      &game.panel.inventory.chars           },
+  { "game.panel.inventory.font",       &game.panel.inventory.font            },
   { "game.panel.keys.x",               &game.panel.keys.x                    },
   { "game.panel.keys.y",               &game.panel.keys.y                    },
   { "game.panel.keys.align",           &game.panel.keys.align                },
   { "game.panel.score.x",              &game.panel.score.x                   },
   { "game.panel.score.y",              &game.panel.score.y                   },
   { "game.panel.score.align",          &game.panel.score.align               },
-  { "game.panel.score.digits",         &game.panel.score.chars               },
+  { "game.panel.score.chars",          &game.panel.score.chars               },
+  { "game.panel.score.font",           &game.panel.score.font                },
   { "game.panel.time.x",               &game.panel.time.x                    },
   { "game.panel.time.y",               &game.panel.time.y                    },
   { "game.panel.time.align",           &game.panel.time.align                },
-  { "game.panel.time.digits",          &game.panel.time.chars                },
+  { "game.panel.time.chars",           &game.panel.time.chars                },
+  { "game.panel.time.font",            &game.panel.time.font                 },
+  { "game.panel.time.font_narrow",     &game.panel.time.font_alt             },
 
   { "[player].boring_delay_fixed",     &game.player_boring_delay_fixed       },
   { "[player].boring_delay_random",    &game.player_boring_delay_random      },
index ade881e0e392d1e4921efcb24c6b632b5189a1b1..40a2ab775ddb2cc0cef281678b4f1fbfd663b5dd 100644 (file)
@@ -2073,6 +2073,7 @@ struct TitleMessageInfo
   int chars;
   int lines;
   int align;
+  int font;
   boolean autowrap;
   boolean centered;
   boolean skip_comments;
index 61f34507ee8d11ad6077020fd7ec1d5c54251b99..978033fd8f1160c778a90eecae3805bd0ea10e4d 100644 (file)
@@ -320,11 +320,9 @@ struct MainControlInfo
 
   struct TextPosInfo *pos_text;
   char **text;
-  int font_text;
 
   struct TextPosInfo *pos_input;
   char **input;
-  int font_input;
 };
 
 static struct MainControlInfo main_controls[] =
@@ -332,158 +330,156 @@ static struct MainControlInfo main_controls[] =
   {
     MAIN_CONTROL_NAME,
     &menu.main.button.name,            IMG_MENU_BUTTON,
-    &menu.main.text.name,              &main_text_name,        FONT_MENU_1,
-    &menu.main.input.name,             &setup.player_name,     FONT_INPUT_1,
+    &menu.main.text.name,              &main_text_name,
+    &menu.main.input.name,             &setup.player_name,
   },
   {
     MAIN_CONTROL_LEVELS,
     &menu.main.button.levels,          IMG_MENU_BUTTON_ENTER_MENU,
-    &menu.main.text.levels,            &main_text_levels,      FONT_MENU_1,
-    NULL,                              NULL,                   -1,
+    &menu.main.text.levels,            &main_text_levels,
+    NULL,                              NULL,
   },
   {
     MAIN_CONTROL_SCORES,
     &menu.main.button.scores,          IMG_MENU_BUTTON,
-    &menu.main.text.scores,            &main_text_scores,      FONT_MENU_1,
-    NULL,                              NULL,                   -1,
+    &menu.main.text.scores,            &main_text_scores,
+    NULL,                              NULL,
   },
   {
     MAIN_CONTROL_EDITOR,
     &menu.main.button.editor,          IMG_MENU_BUTTON,
-    &menu.main.text.editor,            &main_text_editor,      FONT_MENU_1,    
-    NULL,                              NULL,                   -1,
+    &menu.main.text.editor,            &main_text_editor,
+    NULL,                              NULL,
   },
   {
     MAIN_CONTROL_INFO,
     &menu.main.button.info,            IMG_MENU_BUTTON_ENTER_MENU,
-    &menu.main.text.info,              &main_text_info,        FONT_MENU_1,
-    NULL,                              NULL,                   -1,
+    &menu.main.text.info,              &main_text_info,
+    NULL,                              NULL,
   },
   {
     MAIN_CONTROL_GAME,
     &menu.main.button.game,            IMG_MENU_BUTTON,
-    &menu.main.text.game,              &main_text_game,        FONT_MENU_1,
-    NULL,                              NULL,                   -1,
+    &menu.main.text.game,              &main_text_game,
+    NULL,                              NULL,
   },
   {
     MAIN_CONTROL_SETUP,
     &menu.main.button.setup,           IMG_MENU_BUTTON_ENTER_MENU,
-    &menu.main.text.setup,             &main_text_setup,       FONT_MENU_1,
-    NULL,                              NULL,                   -1,
+    &menu.main.text.setup,             &main_text_setup,
+    NULL,                              NULL,
   },
   {
     MAIN_CONTROL_QUIT,
     &menu.main.button.quit,            IMG_MENU_BUTTON,
-    &menu.main.text.quit,              &main_text_quit,        FONT_MENU_1,
-    NULL,                              NULL,                   -1,
+    &menu.main.text.quit,              &main_text_quit,
+    NULL,                              NULL,
   },
 #if 0
   /* (these two buttons are real gadgets) */
   {
     MAIN_CONTROL_PREV_LEVEL,
     &menu.main.button.prev_level,      IMG_MENU_BUTTON_PREV_LEVEL,
-    NULL,                              NULL,                   -1,
-    NULL,                              NULL,                   -1,
+    NULL,                              NULL,
+    NULL,                              NULL,
   },
   {
     MAIN_CONTROL_NEXT_LEVEL,
     &menu.main.button.next_level,      IMG_MENU_BUTTON_NEXT_LEVEL,
-    NULL,                              NULL,                   -1,
-    NULL,                              NULL,                   -1,
+    NULL,                              NULL,
+    NULL,                              NULL,
   },
 #endif
   {
     MAIN_CONTROL_CURRENT_LEVEL,
     NULL,                              -1,
-    &menu.main.text.current_level,     &main_text_current_level, FONT_VALUE_1,
-    NULL,                              NULL,                   -1,
+    &menu.main.text.current_level,     &main_text_current_level,
+    NULL,                              NULL,
   },
   {
     MAIN_CONTROL_FIRST_LEVEL,
     NULL,                              -1,
-    &menu.main.text.first_level,       &main_text_first_level, FONT_TEXT_3,
-    NULL,                              NULL,                   -1,
+    &menu.main.text.first_level,       &main_text_first_level,
+    NULL,                              NULL,
   },
   {
     MAIN_CONTROL_LAST_LEVEL,
     NULL,                              -1,
-    &menu.main.text.last_level,                &main_text_last_level,  FONT_TEXT_3,
-    NULL,                              NULL,                   -1,
+    &menu.main.text.last_level,                &main_text_last_level,
+    NULL,                              NULL,
   },
   {
     MAIN_CONTROL_LEVEL_INFO_1,
     NULL,                              -1,
-    &menu.main.text.level_info_1,      NULL,                   -1,
-    NULL,                              NULL,                   -1,
+    &menu.main.text.level_info_1,      NULL,
+    NULL,                              NULL,
   },
   {
     MAIN_CONTROL_LEVEL_INFO_2,
     NULL,                              -1,
-    &menu.main.text.level_info_2,      NULL,                   -1,
-    NULL,                              NULL,                   -1,
+    &menu.main.text.level_info_2,      NULL,
+    NULL,                              NULL,
   },
   {
     MAIN_CONTROL_LEVEL_NAME,
     NULL,                              -1,
-    &menu.main.text.level_name,                &main_text_level_name,  FONT_TEXT_2,
-    NULL,                              NULL,                   -1,
+    &menu.main.text.level_name,                &main_text_level_name,
+    NULL,                              NULL,
   },
   {
     MAIN_CONTROL_LEVEL_AUTHOR,
     NULL,                              -1,
-    &menu.main.text.level_author,      &main_text_level_author,FONT_TEXT_2,
-    NULL,                              NULL,                   -1,
+    &menu.main.text.level_author,      &main_text_level_author,
+    NULL,                              NULL,
   },
   {
     MAIN_CONTROL_LEVEL_YEAR,
     NULL,                              -1,
-    &menu.main.text.level_year,                &main_text_level_year,  FONT_TEXT_2,
-    NULL,                              NULL,                   -1,
+    &menu.main.text.level_year,                &main_text_level_year,
+    NULL,                              NULL,
   },
   {
     MAIN_CONTROL_LEVEL_IMPORTED_FROM,
     NULL,                              -1,
     &menu.main.text.level_imported_from, &main_text_level_imported_from,
-    FONT_TEXT_2,
-    NULL,                              NULL,                   -1,
+    NULL,                              NULL,
   },
   {
     MAIN_CONTROL_LEVEL_IMPORTED_BY,
     NULL,                              -1,
     &menu.main.text.level_imported_by, &main_text_level_imported_by,
-    FONT_TEXT_2,
-    NULL,                              NULL,                   -1,
+    NULL,                              NULL,
   },
   {
     MAIN_CONTROL_LEVEL_TESTED_BY,
     NULL,                              -1,
-    &menu.main.text.level_tested_by,   &main_text_level_tested_by, FONT_TEXT_2,
-    NULL,                              NULL,                   -1,
+    &menu.main.text.level_tested_by,   &main_text_level_tested_by,
+    NULL,                              NULL,
   },
   {
     MAIN_CONTROL_TITLE_1,
     NULL,                              -1,
-    &menu.main.text.title_1,           &main_text_title_1,     FONT_TITLE_1,
-    NULL,                              NULL,                   -1,
+    &menu.main.text.title_1,           &main_text_title_1,
+    NULL,                              NULL,
   },
   {
     MAIN_CONTROL_TITLE_2,
     NULL,                              -1,
-    &menu.main.text.title_2,           &main_text_title_2,     FONT_TITLE_2,
-    NULL,                              NULL,                   -1,
+    &menu.main.text.title_2,           &main_text_title_2,
+    NULL,                              NULL,
   },
   {
     MAIN_CONTROL_TITLE_3,
     NULL,                              -1,
-    &menu.main.text.title_3,           &main_text_title_3,     FONT_TITLE_2,
-    NULL,                              NULL,                   -1,
+    &menu.main.text.title_3,           &main_text_title_3,
+    NULL,                              NULL,
   },
 
   {
     -1,
     NULL,                              -1,
-    NULL,                              NULL,                   -1,
-    NULL,                              NULL,                   -1,
+    NULL,                              NULL,
+    NULL,                              NULL,
   }
 };
 
@@ -602,8 +598,13 @@ static void InitializeMainControls()
     char *text                     = (mci->text  ? *mci->text  : NULL);
     char *input                    = (mci->input ? *mci->input : NULL);
     int button_graphic             = mci->button_graphic;
+#if 1
+    int font_text                  = (pos_text  ? pos_text->font  : -1);
+    int font_input                 = (pos_input ? pos_input->font : -1);
+#else
     int font_text                  = mci->font_text;
     int font_input                 = mci->font_input;
+#endif
 
     int font_text_width   = (font_text  != -1 ? getFontWidth(font_text)   : 0);
     int font_text_height  = (font_text  != -1 ? getFontHeight(font_text)  : 0);
@@ -701,8 +702,13 @@ static void DrawCursorAndText_Main_Ext(int nr, boolean active_text,
       char *text                     = (mci->text  ? *mci->text  : NULL);
       char *input                    = (mci->input ? *mci->input : NULL);
       int button_graphic             = mci->button_graphic;
+#if 1
+      int font_text                  = (pos_text  ? pos_text->font  : -1);
+      int font_input                 = (pos_input ? pos_input->font : -1);
+#else
       int font_text                  = mci->font_text;
       int font_input                 = mci->font_input;
+#endif
 
       if (active_text)
       {
@@ -731,7 +737,10 @@ static void DrawCursorAndText_Main_Ext(int nr, boolean active_text,
        int x = mSX + ALIGNED_MENU_XPOS(pos);
        int y = mSY + ALIGNED_MENU_YPOS(pos);
 
+#if 1
+       /* (check why/if this is needed) */
        DrawBackgroundForFont(x, y, pos->width, pos->height, font_text);
+#endif
        DrawText(x, y, text, font_text);
       }
 
@@ -741,7 +750,10 @@ static void DrawCursorAndText_Main_Ext(int nr, boolean active_text,
        int x = mSX + ALIGNED_MENU_XPOS(pos);
        int y = mSY + ALIGNED_MENU_YPOS(pos);
 
+#if 1
+       /* (check why/if this is needed) */
        DrawBackgroundForFont(x, y, pos->width, pos->height, font_input);
+#endif
        DrawText(x, y, input, font_input);
       }
     }
@@ -1628,7 +1640,7 @@ void HandleMainMenu_SelectLevel(int step, int direction)
 
 #if 1
     DrawText(mSX + mci->pos_text->x, mSY + mci->pos_text->y,
-            int2str(level_nr, 3), mci->font_text);
+            int2str(level_nr, 3), mci->pos_text->font);
 #else
     DrawText(mSX + 11 * 32, mSY + 3 * 32, int2str(level_nr, 3), FONT_VALUE_1);
 #endif
@@ -3227,7 +3239,7 @@ void HandleTypeName(int newxpos, Key key)
 #else
   static int xpos = 0, ypos = 2;
 #endif
-  int font_nr = mci->font_input;
+  int font_nr = pos->font;
   int font_active_nr = FONT_ACTIVE(font_nr);
   int font_width = getFontWidth(font_active_nr);
 #if 1