From: Holger Schemel Date: Tue, 4 Mar 2003 02:01:33 +0000 (+0100) Subject: rnd-20030304-1-src X-Git-Tag: 3.0.0^2~131 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=5a5342a6ab48037839b783adc4f3304331834a8c;p=rocksndiamonds.git rnd-20030304-1-src --- diff --git a/src/conf_fnt.c b/src/conf_fnt.c index 2ec5e1be..63f5b690 100644 --- a/src/conf_fnt.c +++ b/src/conf_fnt.c @@ -44,64 +44,132 @@ font_to_graphic[] = IMG_FONT_INITIAL_4 }, { - FONT_BIG_1, -1, - IMG_FONT_BIG_1 + FONT_TITLE_1, -1, + IMG_FONT_TITLE_1 }, { - FONT_BIG_2, -1, - IMG_FONT_BIG_2 + FONT_TITLE_1, GFX_SPECIAL_ARG_LEVELS, + IMG_FONT_TITLE_1_LEVELS }, { - FONT_BIG_3, -1, - IMG_FONT_BIG_3 + FONT_TITLE_2, -1, + IMG_FONT_TITLE_2 }, { - FONT_BIG_4, -1, - IMG_FONT_BIG_4 + FONT_MENU_1, -1, + IMG_FONT_MENU_1 }, { - FONT_MEDIUM_1, -1, - IMG_FONT_MEDIUM_1 + FONT_MENU_2, -1, + IMG_FONT_MENU_2 }, { - FONT_MEDIUM_2, -1, - IMG_FONT_MEDIUM_2 + FONT_TEXT_1, -1, + IMG_FONT_TEXT_1 }, { - FONT_MEDIUM_3, -1, - IMG_FONT_MEDIUM_3 + FONT_TEXT_1, GFX_SPECIAL_ARG_LEVELS, + IMG_FONT_TEXT_1_LEVELS }, { - FONT_MEDIUM_4, -1, - IMG_FONT_MEDIUM_4 + FONT_TEXT_1, GFX_SPECIAL_ARG_SCORES, + IMG_FONT_TEXT_1_SCORES }, { - FONT_SMALL_1, -1, - IMG_FONT_SMALL_1 + FONT_TEXT_1, GFX_SPECIAL_ARG_PREVIEW, + IMG_FONT_TEXT_1_PREVIEW }, { - FONT_SMALL_2, -1, - IMG_FONT_SMALL_2 + FONT_TEXT_2, -1, + IMG_FONT_TEXT_2 }, { - FONT_SMALL_3, -1, - IMG_FONT_SMALL_3 + FONT_TEXT_2, GFX_SPECIAL_ARG_LEVELS, + IMG_FONT_TEXT_2_LEVELS }, { - FONT_SMALL_4, -1, - IMG_FONT_SMALL_4 + FONT_TEXT_2, GFX_SPECIAL_ARG_SCORES, + IMG_FONT_TEXT_2_SCORES }, { - FONT_TAPE, -1, - IMG_FONT_TAPE + FONT_TEXT_2, GFX_SPECIAL_ARG_PREVIEW, + IMG_FONT_TEXT_2_PREVIEW }, { - FONT_GAME, -1, - IMG_FONT_GAME + FONT_TEXT_3, -1, + IMG_FONT_TEXT_3 }, { - FONT_NARROW, -1, - IMG_FONT_NARROW + FONT_TEXT_3, GFX_SPECIAL_ARG_LEVELS, + IMG_FONT_TEXT_3_LEVELS + }, + { + FONT_TEXT_3, GFX_SPECIAL_ARG_SCORES, + IMG_FONT_TEXT_3_SCORES + }, + { + FONT_TEXT_3, GFX_SPECIAL_ARG_PREVIEW, + IMG_FONT_TEXT_3_PREVIEW + }, + { + FONT_TEXT_4, -1, + IMG_FONT_TEXT_4 + }, + { + FONT_TEXT_4, GFX_SPECIAL_ARG_LEVELS, + IMG_FONT_TEXT_4_LEVELS + }, + { + FONT_TEXT_4, GFX_SPECIAL_ARG_SCORES, + IMG_FONT_TEXT_4_SCORES + }, + { + FONT_INPUT, -1, + IMG_FONT_INPUT + }, + { + FONT_INPUT, GFX_SPECIAL_ARG_MAIN, + IMG_FONT_INPUT_MAIN + }, + { + FONT_INPUT_ACTIVE, -1, + IMG_FONT_INPUT_ACTIVE + }, + { + FONT_INPUT_ACTIVE, GFX_SPECIAL_ARG_MAIN, + IMG_FONT_INPUT_ACTIVE_MAIN + }, + { + FONT_INPUT_ACTIVE, GFX_SPECIAL_ARG_SETUP, + IMG_FONT_INPUT_ACTIVE_SETUP + }, + { + FONT_OPTION_OFF, -1, + IMG_FONT_OPTION_OFF + }, + { + FONT_OPTION_ON, -1, + IMG_FONT_OPTION_ON + }, + { + FONT_VALUE_1, -1, + IMG_FONT_VALUE_1 + }, + { + FONT_VALUE_2, -1, + IMG_FONT_VALUE_2 + }, + { + FONT_VALUE_OLD, -1, + IMG_FONT_VALUE_OLD + }, + { + FONT_LEVEL_NUMBER, -1, + IMG_FONT_LEVEL_NUMBER + }, + { + FONT_TAPE_RECORDER, -1, + IMG_FONT_TAPE_RECORDER }, { -1, -1, diff --git a/src/conf_gfx.c b/src/conf_gfx.c index 75914329..b20c7784 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -2921,98 +2921,185 @@ struct ConfigInfo image_config[] = { "font.initial_4.width", "14" }, { "font.initial_4.height", "14" }, - { "font.big_1", "RocksFontBig.pcx" }, - { "font.big_1.x", "0" }, - { "font.big_1.y", "0" }, - { "font.big_1.width", "32" }, - { "font.big_1.height", "32" }, - { "font.big_2", "RocksFontBig.pcx" }, - { "font.big_2.x", "0" }, - { "font.big_2.y", "128" }, - { "font.big_2.width", "32" }, - { "font.big_2.height", "32" }, - { "font.big_3", "RocksFontBig.pcx" }, - { "font.big_3.x", "0" }, - { "font.big_3.y", "256" }, - { "font.big_3.width", "32" }, - { "font.big_3.height", "32" }, - { "font.big_4", "RocksFontBig.pcx" }, - { "font.big_4.x", "0" }, - { "font.big_4.y", "384" }, - { "font.big_4.width", "32" }, - { "font.big_4.height", "32" }, - - { "font.medium_1", "RocksFontMedium.pcx" }, - { "font.medium_1.x", "0" }, - { "font.medium_1.y", "0" }, - { "font.medium_1.width", "16" }, - { "font.medium_1.height", "32" }, - { "font.medium_2", "RocksFontMedium.pcx" }, - { "font.medium_2.x", "0" }, - { "font.medium_2.y", "128" }, - { "font.medium_2.width", "16" }, - { "font.medium_2.height", "32" }, - { "font.medium_3", "RocksFontMedium.pcx" }, - { "font.medium_3.x", "0" }, - { "font.medium_3.y", "256" }, - { "font.medium_3.width", "16" }, - { "font.medium_3.height", "32" }, - { "font.medium_4", "RocksFontMedium.pcx" }, - { "font.medium_4.x", "0" }, - { "font.medium_4.y", "384" }, - { "font.medium_4.width", "16" }, - { "font.medium_4.height", "32" }, - - { "font.small_1", "RocksFontSmall.pcx" }, - { "font.small_1.x", "0" }, - { "font.small_1.y", "0" }, - { "font.small_1.width", "14" }, - { "font.small_1.height", "14" }, - { "font.small_2", "RocksFontSmall.pcx" }, - { "font.small_2.x", "0" }, - { "font.small_2.y", "56" }, - { "font.small_2.width", "14" }, - { "font.small_2.height", "14" }, - { "font.small_3", "RocksFontSmall.pcx" }, - { "font.small_3.x", "0" }, - { "font.small_3.y", "112" }, - { "font.small_3.width", "14" }, - { "font.small_3.height", "14" }, - { "font.small_4", "RocksFontSmall.pcx" }, - { "font.small_4.x", "0" }, - { "font.small_4.y", "168" }, - { "font.small_4.width", "14" }, - { "font.small_4.height", "14" }, - - { "font.tape", "RocksFontSmall.pcx" }, - { "font.tape.x", "0" }, - { "font.tape.y", "224" }, - { "font.tape.width", "11" }, - { "font.tape.height", "14" }, - - { "font.game", "RocksFontEM.pcx" }, - { "font.game.x", "0" }, - { "font.game.y", "160" }, - { "font.game.width", "16" }, - { "font.game.height", "16" }, - - { "font.narrow", "RocksFontSmall.pcx" }, - { "font.narrow.x", "0" }, - { "font.narrow.y", "280" }, - { "font.narrow.width", "10" }, - { "font.narrow.height", "14" }, + { "font.title_1", "RocksFontBig.pcx" }, + { "font.title_1.x", "0" }, + { "font.title_1.y", "384" }, + { "font.title_1.width", "32" }, + { "font.title_1.height", "32" }, + { "font.title_1.LEVELS", "RocksFontBig.pcx" }, + { "font.title_1.LEVELS.x", "0" }, + { "font.title_1.LEVELS.y", "256" }, + { "font.title_1.LEVELS.width", "32" }, + { "font.title_1.LEVELS.height", "32" }, + { "font.title_2", "RocksFontSmall.pcx" }, + { "font.title_2.x", "0" }, + { "font.title_2.y", "0" }, + { "font.title_2.width", "14" }, + { "font.title_2.height", "14" }, + + { "font.menu_1", "RocksFontBig.pcx" }, + { "font.menu_1.x", "0" }, + { "font.menu_1.y", "256" }, + { "font.menu_1.width", "32" }, + { "font.menu_1.height", "32" }, + { "font.menu_2", "RocksFontMedium.pcx" }, + { "font.menu_2.x", "0" }, + { "font.menu_2.y", "256" }, + { "font.menu_2.width", "16" }, + { "font.menu_2.height", "32" }, + + { "font.text_1", "RocksFontSmall.pcx" }, + { "font.text_1.x", "0" }, + { "font.text_1.y", "112" }, + { "font.text_1.width", "14" }, + { "font.text_1.height", "14" }, + { "font.text_1.LEVELS", "RocksFontMedium.pcx" }, + { "font.text_1.LEVELS.x", "0" }, + { "font.text_1.LEVELS.y", "0" }, + { "font.text_1.LEVELS.width", "16" }, + { "font.text_1.LEVELS.height", "32" }, + { "font.text_1.SCORES", "RocksFontBig.pcx" }, + { "font.text_1.SCORES.x", "0" }, + { "font.text_1.SCORES.y", "256" }, + { "font.text_1.SCORES.width", "32" }, + { "font.text_1.SCORES.height", "32" }, + { "font.text_1.PREVIEW", "RocksFontEM.pcx" }, + { "font.text_1.PREVIEW.x", "0" }, + { "font.text_1.PREVIEW.y", "160" }, + { "font.text_1.PREVIEW.width", "16" }, + { "font.text_1.PREVIEW.height", "16" }, + { "font.text_2", "RocksFontSmall.pcx" }, + { "font.text_2.x", "0" }, + { "font.text_2.y", "168" }, + { "font.text_2.width", "14" }, + { "font.text_2.height", "14" }, + { "font.text_2.LEVELS", "RocksFontMedium.pcx" }, + { "font.text_2.LEVELS.x", "0" }, + { "font.text_2.LEVELS.y", "128" }, + { "font.text_2.LEVELS.width", "16" }, + { "font.text_2.LEVELS.height", "32" }, + { "font.text_2.SCORES", "RocksFontMedium.pcx" }, + { "font.text_2.SCORES.x", "0" }, + { "font.text_2.SCORES.y", "384" }, + { "font.text_2.SCORES.width", "16" }, + { "font.text_2.SCORES.height", "32" }, + { "font.text_2.PREVIEW", "RocksFontEM.pcx" }, + { "font.text_2.PREVIEW.x", "0" }, + { "font.text_2.PREVIEW.y", "160" }, + { "font.text_2.PREVIEW.width", "16" }, + { "font.text_2.PREVIEW.height", "16" }, + { "font.text_3", "RocksFontSmall.pcx" }, + { "font.text_3.x", "0" }, + { "font.text_3.y", "0" }, + { "font.text_3.width", "14" }, + { "font.text_3.height", "14" }, + { "font.text_3.LEVELS", "RocksFontMedium.pcx" }, + { "font.text_3.LEVELS.x", "0" }, + { "font.text_3.LEVELS.y", "256" }, + { "font.text_3.LEVELS.width", "16" }, + { "font.text_3.LEVELS.height", "32" }, + { "font.text_3.SCORES", "RocksFontBig.pcx" }, + { "font.text_3.SCORES.x", "0" }, + { "font.text_3.SCORES.y", "0" }, + { "font.text_3.SCORES.width", "32" }, + { "font.text_3.SCORES.height", "32" }, + { "font.text_3.PREVIEW", "RocksFontEM.pcx" }, + { "font.text_3.PREVIEW.x", "0" }, + { "font.text_3.PREVIEW.y", "160" }, + { "font.text_3.PREVIEW.width", "16" }, + { "font.text_3.PREVIEW.height", "16" }, + { "font.text_4", "RocksFontSmall.pcx" }, + { "font.text_4.x", "0" }, + { "font.text_4.y", "56" }, + { "font.text_4.width", "14" }, + { "font.text_4.height", "14" }, + { "font.text_4.LEVELS", "RocksFontMedium.pcx" }, + { "font.text_4.LEVELS.x", "0" }, + { "font.text_4.LEVELS.y", "384" }, + { "font.text_4.LEVELS.width", "16" }, + { "font.text_4.LEVELS.height", "32" }, + { "font.text_4.SCORES", "RocksFontMedium.pcx" }, + { "font.text_4.SCORES.x", "0" }, + { "font.text_4.SCORES.y", "0" }, + { "font.text_4.SCORES.width", "16" }, + { "font.text_4.SCORES.height", "32" }, + + { "font.input", "RocksFontSmall.pcx" }, + { "font.input.x", "0" }, + { "font.input.y", "168" }, + { "font.input.width", "14" }, + { "font.input.height", "14" }, + { "font.input.MAIN", "RocksFontBig.pcx" }, + { "font.input.MAIN.x", "0" }, + { "font.input.MAIN.y", "0" }, + { "font.input.MAIN.width", "32" }, + { "font.input.MAIN.height", "32" }, + { "font.input.active", "RocksFontSmall.pcx" }, + { "font.input.active.x", "0" }, + { "font.input.active.y", "0" }, + { "font.input.active.width", "14" }, + { "font.input.active.height", "14" }, + { "font.input.active.MAIN", "RocksFontBig.pcx" }, + { "font.input.active.MAIN.x", "0" }, + { "font.input.active.MAIN.y", "384" }, + { "font.input.active.MAIN.width", "32" }, + { "font.input.active.MAIN.height", "32" }, + { "font.input.active.SETUP", "RocksFontBig.pcx" }, + { "font.input.active.SETUP.x", "0" }, + { "font.input.active.SETUP.y", "0" }, + { "font.input.active.SETUP.width", "32" }, + { "font.input.active.SETUP.height", "32" }, + + { "font.option_off", "RocksFontBig.pcx" }, + { "font.option_off.x", "0" }, + { "font.option_off.y", "128" }, + { "font.option_off.width", "32" }, + { "font.option_off.height", "32" }, + { "font.option_on", "RocksFontBig.pcx" }, + { "font.option_on.x", "0" }, + { "font.option_on.y", "384" }, + { "font.option_on.width", "32" }, + { "font.option_on.height", "32" }, + + { "font.value_1", "RocksFontBig.pcx" }, + { "font.value_1.x", "0" }, + { "font.value_1.y", "384" }, + { "font.value_1.width", "32" }, + { "font.value_1.height", "32" }, + { "font.value_2", "RocksFontMedium.pcx" }, + { "font.value_2.x", "0" }, + { "font.value_2.y", "384" }, + { "font.value_2.width", "16" }, + { "font.value_2.height", "32" }, + { "font.value_old", "RocksFontBig.pcx" }, + { "font.value_old.x", "0" }, + { "font.value_old.y", "128" }, + { "font.value_old.width", "32" }, + { "font.value_old.height", "32" }, + + { "font.level_number", "RocksFontSmall.pcx" }, + { "font.level_number.x", "0" }, + { "font.level_number.y", "280" }, + { "font.level_number.width", "10" }, + { "font.level_number.height", "14" }, + + { "font.tape_recorder", "RocksFontSmall.pcx" }, + { "font.tape_recorder.x", "0" }, + { "font.tape_recorder.y", "224" }, + { "font.tape_recorder.width", "11" }, + { "font.tape_recorder.height", "14" }, { "global.border", "RocksScreen.pcx" }, { "global.door", "RocksDoor.pcx" }, { "background", UNDEFINED_FILENAME }, - { "background.main", UNDEFINED_FILENAME }, - { "background.levels", UNDEFINED_FILENAME }, - { "background.scores", UNDEFINED_FILENAME }, - { "background.editor", UNDEFINED_FILENAME }, - { "background.info", UNDEFINED_FILENAME }, - { "background.setup", UNDEFINED_FILENAME }, - { "background.door", UNDEFINED_FILENAME }, + { "background.MAIN", UNDEFINED_FILENAME }, + { "background.LEVELS", UNDEFINED_FILENAME }, + { "background.SCORES", UNDEFINED_FILENAME }, + { "background.EDITOR", UNDEFINED_FILENAME }, + { "background.INFO", UNDEFINED_FILENAME }, + { "background.SETUP", UNDEFINED_FILENAME }, + { "background.DOOR", UNDEFINED_FILENAME }, { "info.font_em_1", "RocksFontEM.pcx" }, { "info.font_em_1.xpos", "0" }, diff --git a/src/conf_gfx.h b/src/conf_gfx.h index 707b3200..c8a12e1f 100644 --- a/src/conf_gfx.h +++ b/src/conf_gfx.h @@ -809,37 +809,54 @@ #define IMG_FONT_INITIAL_2 788 #define IMG_FONT_INITIAL_3 789 #define IMG_FONT_INITIAL_4 790 -#define IMG_FONT_BIG_1 791 -#define IMG_FONT_BIG_2 792 -#define IMG_FONT_BIG_3 793 -#define IMG_FONT_BIG_4 794 -#define IMG_FONT_MEDIUM_1 795 -#define IMG_FONT_MEDIUM_2 796 -#define IMG_FONT_MEDIUM_3 797 -#define IMG_FONT_MEDIUM_4 798 -#define IMG_FONT_SMALL_1 799 -#define IMG_FONT_SMALL_2 800 -#define IMG_FONT_SMALL_3 801 -#define IMG_FONT_SMALL_4 802 -#define IMG_FONT_TAPE 803 -#define IMG_FONT_GAME 804 -#define IMG_FONT_NARROW 805 -#define IMG_GLOBAL_BORDER 806 -#define IMG_GLOBAL_DOOR 807 -#define IMG_BACKGROUND 808 -#define IMG_BACKGROUND_MAIN 809 -#define IMG_BACKGROUND_LEVELS 810 -#define IMG_BACKGROUND_SCORES 811 -#define IMG_BACKGROUND_EDITOR 812 -#define IMG_BACKGROUND_INFO 813 -#define IMG_BACKGROUND_SETUP 814 -#define IMG_BACKGROUND_DOOR 815 -#define IMG_INFO_FONT_EM_1 816 -#define IMG_INFO_FONT_EM_2 817 -#define IMG_INFO_FONT_EM_3 818 -#define IMG_INFO_FONT_EM_4 819 -#define IMG_INFO_FONT_EM_5 820 +#define IMG_FONT_TITLE_1 791 +#define IMG_FONT_TITLE_1_LEVELS 792 +#define IMG_FONT_TITLE_2 793 +#define IMG_FONT_MENU_1 794 +#define IMG_FONT_MENU_2 795 +#define IMG_FONT_TEXT_1 796 +#define IMG_FONT_TEXT_1_LEVELS 797 +#define IMG_FONT_TEXT_1_SCORES 798 +#define IMG_FONT_TEXT_1_PREVIEW 799 +#define IMG_FONT_TEXT_2 800 +#define IMG_FONT_TEXT_2_LEVELS 801 +#define IMG_FONT_TEXT_2_SCORES 802 +#define IMG_FONT_TEXT_2_PREVIEW 803 +#define IMG_FONT_TEXT_3 804 +#define IMG_FONT_TEXT_3_LEVELS 805 +#define IMG_FONT_TEXT_3_SCORES 806 +#define IMG_FONT_TEXT_3_PREVIEW 807 +#define IMG_FONT_TEXT_4 808 +#define IMG_FONT_TEXT_4_LEVELS 809 +#define IMG_FONT_TEXT_4_SCORES 810 +#define IMG_FONT_INPUT 811 +#define IMG_FONT_INPUT_MAIN 812 +#define IMG_FONT_INPUT_ACTIVE 813 +#define IMG_FONT_INPUT_ACTIVE_MAIN 814 +#define IMG_FONT_INPUT_ACTIVE_SETUP 815 +#define IMG_FONT_OPTION_OFF 816 +#define IMG_FONT_OPTION_ON 817 +#define IMG_FONT_VALUE_1 818 +#define IMG_FONT_VALUE_2 819 +#define IMG_FONT_VALUE_OLD 820 +#define IMG_FONT_LEVEL_NUMBER 821 +#define IMG_FONT_TAPE_RECORDER 822 +#define IMG_GLOBAL_BORDER 823 +#define IMG_GLOBAL_DOOR 824 +#define IMG_BACKGROUND 825 +#define IMG_BACKGROUND_MAIN 826 +#define IMG_BACKGROUND_LEVELS 827 +#define IMG_BACKGROUND_SCORES 828 +#define IMG_BACKGROUND_EDITOR 829 +#define IMG_BACKGROUND_INFO 830 +#define IMG_BACKGROUND_SETUP 831 +#define IMG_BACKGROUND_DOOR 832 +#define IMG_INFO_FONT_EM_1 833 +#define IMG_INFO_FONT_EM_2 834 +#define IMG_INFO_FONT_EM_3 835 +#define IMG_INFO_FONT_EM_4 836 +#define IMG_INFO_FONT_EM_5 837 -#define NUM_IMAGE_FILES 821 +#define NUM_IMAGE_FILES 838 #endif /* CONF_GFX_H */ diff --git a/src/conftime.h b/src/conftime.h index 9f5244fd..fab0507b 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2003-02-28 22:35]" +#define COMPILE_DATE_STRING "[2003-03-04 02:56]" diff --git a/src/editor.c b/src/editor.c index 2be95775..42926f06 100644 --- a/src/editor.c +++ b/src/editor.c @@ -1611,12 +1611,12 @@ static void ReinitializeElementListButtons() static int getCounterGadgetWidth() { - return (DXSIZE + getFontWidth(FONT_DEFAULT_SMALL) - 2 * ED_GADGET_DISTANCE); + return (DXSIZE + getFontWidth(FONT_INPUT) - 2 * ED_GADGET_DISTANCE); } static int getMaxInfoTextLength() { - return (SXSIZE / getFontWidth(FONT_DEFAULT_SMALL)); + return (SXSIZE / getFontWidth(FONT_TEXT_2)); } static char *getElementInfoText(int element) @@ -1963,7 +1963,7 @@ static void CreateCounterButtons() if (j == 0) { - int font_type = FONT_DEFAULT_SMALL; + int font_type = FONT_INPUT; int gd_width = ED_WIN_COUNT_XSIZE; id = counterbutton_info[i].gadget_id_text; @@ -1971,7 +1971,7 @@ static void CreateCounterButtons() if (i == ED_COUNTER_ID_SELECT_LEVEL) { - font_type = FONT_SPECIAL_NARROW; + font_type = FONT_LEVEL_NUMBER; xpos += 2 * ED_GADGET_DISTANCE; ypos -= ED_GADGET_DISTANCE; @@ -2141,7 +2141,7 @@ static void CreateTextInputGadgets() GDI_TYPE, GD_TYPE_TEXTINPUT_ALPHANUMERIC, GDI_TEXT_VALUE, textinput_info[i].value, GDI_TEXT_SIZE, textinput_info[i].size, - GDI_TEXT_FONT, FONT_DEFAULT_SMALL, + GDI_TEXT_FONT, FONT_INPUT, GDI_DESIGN_UNPRESSED, gd_bitmap, gd_x, gd_y, GDI_DESIGN_PRESSED, gd_bitmap, gd_x, gd_y, GDI_BORDER_SIZE, ED_BORDER_SIZE, @@ -2834,7 +2834,6 @@ static void DrawLevelInfoWindow() int yoffset_right = ED_BORDER_SIZE; int xoffset_right2 = ED_CHECKBUTTON_XSIZE + 2 * ED_GADGET_DISTANCE; int yoffset_right2 = ED_BORDER_SIZE; - int font_color = FONT(FS_SMALL, FC_GREEN); int i, x, y; SetMainBackgroundImage(IMG_BACKGROUND_EDITOR); @@ -2842,9 +2841,9 @@ static void DrawLevelInfoWindow() UnmapLevelEditorWindowGadgets(); DrawText(SX + ED_SETTINGS2_XPOS, SY + ED_SETTINGS_YPOS, - "Level Settings", FONT_DEFAULT_BIG); + "Level Settings", FONT_TITLE_1); DrawText(SX + ED_SETTINGS2_XPOS, SY + ED_SETTINGS2_YPOS, - "Editor Settings", FONT_DEFAULT_BIG); + "Editor Settings", FONT_TITLE_1); /* draw counter gadgets */ for (i=ED_COUNTER_ID_LEVEL_FIRST; i<=ED_COUNTER_ID_LEVEL_LAST; i++) @@ -2856,7 +2855,7 @@ static void DrawLevelInfoWindow() sprintf(infotext, "%s:", counterbutton_info[i].infotext_above); infotext[max_infotext_len] = '\0'; - DrawTextF(x, y, font_color, infotext); + DrawTextF(x, y, FONT_TEXT_1, infotext); } if (counterbutton_info[i].infotext_right) @@ -2866,7 +2865,7 @@ static void DrawLevelInfoWindow() sprintf(infotext, "%s", counterbutton_info[i].infotext_right); infotext[max_infotext_len] = '\0'; - DrawTextF(x, y, font_color, infotext); + DrawTextF(x, y, FONT_TEXT_1, infotext); } ModifyEditorCounter(i, *counterbutton_info[i].value); @@ -2882,7 +2881,7 @@ static void DrawLevelInfoWindow() sprintf(infotext, "%s:", textinput_info[i].infotext); infotext[max_infotext_len] = '\0'; - DrawTextF(x, y, font_color, infotext); + DrawTextF(x, y, FONT_TEXT_1, infotext); ModifyEditorTextInput(i, textinput_info[i].value); MapTextInputGadget(i); } @@ -2896,7 +2895,7 @@ static void DrawLevelInfoWindow() x = radiobutton_info[i].x + xoffset_right2; y = radiobutton_info[i].y + yoffset_right2; - DrawTextF(x, y, font_color, radiobutton_info[i].text); + DrawTextF(x, y, FONT_TEXT_1, radiobutton_info[i].text); ModifyGadget(level_editor_gadget[radiobutton_info[i].gadget_id], GDI_CHECKED, checked, GDI_END); MapRadiobuttonGadget(i); @@ -2908,7 +2907,7 @@ static void DrawLevelInfoWindow() x = checkbutton_info[i].x + xoffset_right2; y = checkbutton_info[i].y + yoffset_right2; - DrawTextF(x, y, font_color, checkbutton_info[i].text); + DrawTextF(x, y, FONT_TEXT_1, checkbutton_info[i].text); ModifyGadget(level_editor_gadget[checkbutton_info[i].gadget_id], GDI_CHECKED, *checkbutton_info[i].value, GDI_END); MapCheckbuttonGadget(i); @@ -2924,14 +2923,13 @@ static void DrawAmoebaContentArea() int area_y = ED_AREA_ELEM_CONTENT_YPOS / MINI_TILEY; int area_sx = SX + ED_AREA_ELEM_CONTENT_XPOS; int area_sy = SY + ED_AREA_ELEM_CONTENT_YPOS; - int font_color = FONT(FS_SMALL, FC_GREEN); ElementContent[0][0][0] = level.amoeba_content; DrawElementBorder(area_sx, area_sy, MINI_TILEX, MINI_TILEY); DrawMiniElement(area_x, area_y, ElementContent[0][0][0]); - DrawText(area_sx + TILEX, area_sy + 1, "Content of amoeba", font_color); + DrawText(area_sx + TILEX, area_sy + 1, "Content of amoeba", FONT_TEXT_1); MapDrawingArea(GADGET_ID_AMOEBA_CONTENT); } @@ -2945,7 +2943,6 @@ static void DrawElementContentAreas() int area_sy = SY + ED_AREA_ELEM_CONTENT_YPOS; int xoffset_right = getCounterGadgetWidth(); int yoffset_right = ED_BORDER_SIZE; - int font_color = FONT(FS_SMALL, FC_GREEN); int i, x, y; for (i=0; igems_still_needed, 3), FONT_DEFAULT_SMALL); + int2str(local_player->gems_still_needed, 3), FONT_TEXT_2); DrawText(DX + XX_DYNAMITE, DY + YY_DYNAMITE, - int2str(local_player->dynamite, 3), FONT_DEFAULT_SMALL); + int2str(local_player->dynamite, 3), FONT_TEXT_2); DrawText(DX + XX_SCORE, DY + YY_SCORE, - int2str(local_player->score, 5), FONT_DEFAULT_SMALL); + int2str(local_player->score, 5), FONT_TEXT_2); DrawText(DX + XX_TIME, DY + YY_TIME, - int2str(TimeLeft, 3), FONT_DEFAULT_SMALL); + int2str(TimeLeft, 3), FONT_TEXT_2); } @@ -909,16 +909,15 @@ void InitGame() DOOR_GFX_PAGEX5, DOOR_GFX_PAGEY1, DXSIZE, DYSIZE, DX, DY); if (level_nr < 100) - DrawText(DX + XX_LEVEL, DY + YY_LEVEL, - int2str(level_nr, 2), FONT_DEFAULT_SMALL); + DrawText(DX + XX_LEVEL, DY + YY_LEVEL, int2str(level_nr, 2), FONT_TEXT_2); else { DrawTextExt(drawto, DX + XX_EMERALDS, DY + YY_EMERALDS, - int2str(level_nr, 3), FONT_SPECIAL_NARROW, FONT_OPAQUE); + int2str(level_nr, 3), FONT_LEVEL_NUMBER, FONT_OPAQUE); BlitBitmap(drawto, drawto, DX + XX_EMERALDS, DY + YY_EMERALDS + 1, - getFontWidth(FONT_SPECIAL_NARROW) * 3, - getFontHeight(FONT_SPECIAL_NARROW) - 1, + getFontWidth(FONT_LEVEL_NUMBER) * 3, + getFontHeight(FONT_LEVEL_NUMBER) - 1, DX + XX_LEVEL - 1, DY + YY_LEVEL + 1); } @@ -1112,7 +1111,7 @@ void GameWon() TimeLeft -= 10; else TimeLeft--; - DrawText(DX_TIME, DY_TIME, int2str(TimeLeft, 3), FONT_DEFAULT_SMALL); + DrawText(DX_TIME, DY_TIME, int2str(TimeLeft, 3), FONT_TEXT_2); BackToFront(); if (!tape.playing) @@ -1138,7 +1137,7 @@ void GameWon() TimePlayed += 10; else TimePlayed++; - DrawText(DX_TIME, DY_TIME, int2str(TimePlayed, 3), FONT_DEFAULT_SMALL); + DrawText(DX_TIME, DY_TIME, int2str(TimePlayed, 3), FONT_TEXT_2); BackToFront(); if (!tape.playing) @@ -4842,14 +4841,14 @@ void GameActions() if (TimeLeft <= 10 && setup.time_limit) PlaySoundStereo(SND_GAME_RUNNING_OUT_OF_TIME, SOUND_MAX_RIGHT); - DrawText(DX_TIME, DY_TIME, int2str(TimeLeft, 3), FONT_DEFAULT_SMALL); + DrawText(DX_TIME, DY_TIME, int2str(TimeLeft, 3), FONT_TEXT_2); if (!TimeLeft && setup.time_limit) for (i=0; igems_still_needed = 0; RaiseScoreElement(element); DrawText(DX_EMERALDS, DY_EMERALDS, - int2str(local_player->gems_still_needed, 3), - FONT_DEFAULT_SMALL); + int2str(local_player->gems_still_needed, 3), FONT_TEXT_2); PlaySoundLevelElementAction(x, y, element, ACTION_COLLECTING); break; @@ -5694,7 +5692,7 @@ int DigField(struct PlayerInfo *player, if (level.time > 0) { TimeLeft += 10; - DrawText(DX_TIME, DY_TIME, int2str(TimeLeft, 3), FONT_DEFAULT_SMALL); + DrawText(DX_TIME, DY_TIME, int2str(TimeLeft, 3), FONT_TEXT_2); } PlaySoundStereo(SND_EXTRA_TIME_COLLECTING, SOUND_MAX_RIGHT); break; @@ -5718,8 +5716,8 @@ int DigField(struct PlayerInfo *player, player->dynamite++; player->use_disk_red_graphic = (element == EL_SP_DISK_RED); RaiseScoreElement(EL_DYNAMITE); - DrawText(DX_DYNAMITE, DY_DYNAMITE, - int2str(local_player->dynamite, 3), FONT_DEFAULT_SMALL); + DrawText(DX_DYNAMITE, DY_DYNAMITE, int2str(local_player->dynamite, 3), + FONT_TEXT_2); PlaySoundLevelElementAction(x, y, element, ACTION_COLLECTING); break; @@ -6124,7 +6122,7 @@ int DigField(struct PlayerInfo *player, case EL_TIME_ORB_FULL: Feld[x][y] = EL_TIME_ORB_EMPTY; TimeLeft += 10; - DrawText(DX_TIME, DY_TIME, int2str(TimeLeft, 3), FONT_DEFAULT_SMALL); + DrawText(DX_TIME, DY_TIME, int2str(TimeLeft, 3), FONT_TEXT_2); DrawLevelField(x, y); PlaySoundStereo(SND_TIME_ORB_FULL_COLLECTING, SOUND_MAX_RIGHT); return MF_ACTION; @@ -6351,7 +6349,7 @@ boolean PlaceBomb(struct PlayerInfo *player) player->dynamite--; DrawText(DX_DYNAMITE, DY_DYNAMITE, int2str(local_player->dynamite, 3), - FONT_DEFAULT_SMALL); + FONT_TEXT_2); if (IN_SCR_FIELD(SCREENX(jx), SCREENY(jy))) { #if 1 @@ -6473,8 +6471,7 @@ static void PlaySoundLevelElementAction(int x, int y, int element, void RaiseScore(int value) { local_player->score += value; - DrawText(DX_SCORE, DY_SCORE, int2str(local_player->score, 5), - FONT_DEFAULT_SMALL); + DrawText(DX_SCORE, DY_SCORE, int2str(local_player->score, 5), FONT_TEXT_2); } void RaiseScoreElement(int element) diff --git a/src/init.c b/src/init.c index 97f41efa..b24944ee 100644 --- a/src/init.c +++ b/src/init.c @@ -118,6 +118,8 @@ void OpenAll() return; } + game_status = MAINMENU; + DrawMainMenu(); InitNetworkServer(); @@ -737,8 +739,27 @@ void InitElementSmallImages() static int getFontBitmapID(int font_nr) { - if (game_status == LEVELED) - return font_info[font_nr].special_bitmap_id[GFX_SPECIAL_ARG_EDITOR]; + int special = -1; + + if (game_status == MAINMENU || game_status == TYPENAME) + special = GFX_SPECIAL_ARG_MAIN; + else if (game_status == CHOOSELEVEL) + special = GFX_SPECIAL_ARG_LEVELS; + else if (game_status == HALLOFFAME) + special = GFX_SPECIAL_ARG_SCORES; + else if (game_status == LEVELED) + special = GFX_SPECIAL_ARG_EDITOR; + else if (game_status == HELPSCREEN) + special = GFX_SPECIAL_ARG_INFO; + else if (game_status == SETUP) + special = GFX_SPECIAL_ARG_SETUP; + else if (game_status == PSEUDO_PREVIEW) + special = GFX_SPECIAL_ARG_PREVIEW; + else if (game_status == PLAYING || game_status == PSEUDO_DOOR) + special = GFX_SPECIAL_ARG_DOOR; + + if (special != -1) + return font_info[font_nr].special_bitmap_id[special]; else return font_nr; } diff --git a/src/libgame/misc.c b/src/libgame/misc.c index 0b1382fa..b6ec4fda 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -1568,7 +1568,7 @@ int get_parameter_value(char *token, char *value_raw, int type) string_has_parameter(value, "pingpong") ? ANIM_PINGPONG : string_has_parameter(value, "pingpong2") ? ANIM_PINGPONG2 : string_has_parameter(value, "random") ? ANIM_RANDOM : - ANIM_NONE); + ANIM_LOOP); if (string_has_parameter(value, "reverse")) result |= ANIM_REVERSE; diff --git a/src/libgame/text.c b/src/libgame/text.c index d0015164..890d1886 100644 --- a/src/libgame/text.c +++ b/src/libgame/text.c @@ -123,12 +123,16 @@ void InitFontInfo(struct FontBitmapInfo *font_bitmap_info, int num_fonts, int getFontWidth(int font_nr) { - return gfx.font_bitmap_info[font_nr].width; + int font_bitmap_id = gfx.select_font_function(font_nr); + + return gfx.font_bitmap_info[font_bitmap_id].width; } int getFontHeight(int font_nr) { - return gfx.font_bitmap_info[font_nr].height; + int font_bitmap_id = gfx.select_font_function(font_nr); + + return gfx.font_bitmap_info[font_bitmap_id].height; } void DrawInitText(char *text, int ypos, int font_nr) diff --git a/src/libgame/text.h b/src/libgame/text.h index 5f8fb21d..d5a12ecd 100644 --- a/src/libgame/text.h +++ b/src/libgame/text.h @@ -17,39 +17,17 @@ #include "system.h" -/* font types */ -#define FS_INITIAL 0 -#define FS_BIG 1 -#define FS_MEDIUM 2 -#define FS_SMALL 3 +/* default fonts */ +#define FONT_INITIAL_1 0 +#define FONT_INITIAL_2 1 +#define FONT_INITIAL_3 2 +#define FONT_INITIAL_4 3 /* font colors */ -#define FC_RED 0 -#define FC_BLUE 1 -#define FC_GREEN 2 -#define FC_YELLOW 3 - -/* special fonts */ -#define FC_SPECIAL_TAPE 4 -#define FC_SPECIAL_GAME 5 -#define FC_SPECIAL_NARROW 6 - -#define FONT(fs, fc) (( (fs) == FS_INITIAL ? \ - IMG_FONT_INITIAL_1 + (fc) : \ - (fs) == FS_BIG ? \ - IMG_FONT_BIG_1 + (fc) : \ - (fs) == FS_MEDIUM ? \ - IMG_FONT_MEDIUM_1 + (fc) : \ - (fs) == FS_SMALL ? \ - IMG_FONT_SMALL_1 + (fc) : \ - IMG_FONT_SMALL_1 \ - ) - FIRST_IMG_FONT) - -#define FONT_DEFAULT_BIG FONT(FS_BIG, FC_YELLOW) -#define FONT_DEFAULT_SMALL FONT(FS_SMALL, FC_YELLOW) -#define FONT_SPECIAL_TAPE FONT(FS_SMALL, FC_SPECIAL_TAPE) -#define FONT_SPECIAL_GAME FONT(FS_SMALL, FC_SPECIAL_GAME) -#define FONT_SPECIAL_NARROW FONT(FS_SMALL, FC_SPECIAL_NARROW) +#define FC_RED FONT_INITIAL_1 +#define FC_BLUE FONT_INITIAL_2 +#define FC_GREEN FONT_INITIAL_3 +#define FC_YELLOW FONT_INITIAL_4 #define FONT_CHARS_PER_LINE 16 #define FONT_LINES_PER_FONT 4 diff --git a/src/main.c b/src/main.c index 23901e16..e4206751 100644 --- a/src/main.c +++ b/src/main.c @@ -29,7 +29,7 @@ Pixmap tile_clipmask[NUM_TILES]; DrawBuffer *fieldbuffer; DrawBuffer *drawto_field; -int game_status = MAINMENU; +int game_status = -1; boolean level_editor_test_game = FALSE; boolean network_playing = FALSE; @@ -2977,7 +2977,13 @@ struct ElementDirectionInfo element_direction_info[NUM_DIRECTIONS + 1] = struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1] = { + { ".MAIN", 0, }, + { ".LEVELS", 0, }, + { ".SCORES", 0, }, { ".EDITOR", 0, }, + { ".INFO", 0, }, + { ".SETUP", 0, }, + { ".DOOR", 0, }, { ".PREVIEW", 0, }, { NULL, 0, } @@ -2989,25 +2995,27 @@ struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1] = struct FontInfo font_info[NUM_FONTS + 1] = { - { "font.initial_1" }, - { "font.initial_2" }, - { "font.initial_3" }, - { "font.initial_4" }, - { "font.big_1" }, - { "font.big_2" }, - { "font.big_3" }, - { "font.big_4" }, - { "font.medium_1" }, - { "font.medium_2" }, - { "font.medium_3" }, - { "font.medium_4" }, - { "font.small_1" }, - { "font.small_2" }, - { "font.small_3" }, - { "font.small_4" }, - { "font.tape" }, - { "font.game" }, - { "font.narrow" }, + { "font.initial_1" }, + { "font.initial_2" }, + { "font.initial_3" }, + { "font.initial_4" }, + { "font.title_1" }, + { "font.title_2" }, + { "font.menu_1" }, + { "font.menu_2" }, + { "font.text_1" }, + { "font.text_2" }, + { "font.text_3" }, + { "font.text_4" }, + { "font.input" }, + { "font.input.active" }, + { "font.option_off" }, + { "font.option_on" }, + { "font.value_1" }, + { "font.value_2" }, + { "font.value_old" }, + { "font.tape_recorder" }, + { "font.level_number" }, }; diff --git a/src/main.h b/src/main.h index d435c403..772176a8 100644 --- a/src/main.h +++ b/src/main.h @@ -752,10 +752,16 @@ #define NUM_ACTIONS 21 /* values for special image configuration suffixes */ -#define GFX_SPECIAL_ARG_EDITOR 0 -#define GFX_SPECIAL_ARG_PREVIEW 1 +#define GFX_SPECIAL_ARG_MAIN 0 +#define GFX_SPECIAL_ARG_LEVELS 1 +#define GFX_SPECIAL_ARG_SCORES 2 +#define GFX_SPECIAL_ARG_EDITOR 3 +#define GFX_SPECIAL_ARG_INFO 4 +#define GFX_SPECIAL_ARG_SETUP 5 +#define GFX_SPECIAL_ARG_DOOR 6 +#define GFX_SPECIAL_ARG_PREVIEW 7 -#define NUM_SPECIAL_GFX_ARGS 2 +#define NUM_SPECIAL_GFX_ARGS 8 /* values for image configuration suffixes */ @@ -799,31 +805,27 @@ #define FONT_INITIAL_2 1 #define FONT_INITIAL_3 2 #define FONT_INITIAL_4 3 -#define FONT_BIG_1 4 -#define FONT_BIG_2 5 -#define FONT_BIG_3 6 -#define FONT_BIG_4 7 -#define FONT_MEDIUM_1 8 -#define FONT_MEDIUM_2 9 -#define FONT_MEDIUM_3 10 -#define FONT_MEDIUM_4 11 -#define FONT_SMALL_1 12 -#define FONT_SMALL_2 13 -#define FONT_SMALL_3 14 -#define FONT_SMALL_4 15 -#define FONT_TAPE 16 -#define FONT_GAME 17 -#define FONT_NARROW 18 - -#define NUM_FONTS 19 +#define FONT_TITLE_1 4 +#define FONT_TITLE_2 5 +#define FONT_MENU_1 6 +#define FONT_MENU_2 7 +#define FONT_TEXT_1 8 +#define FONT_TEXT_2 9 +#define FONT_TEXT_3 10 +#define FONT_TEXT_4 11 +#define FONT_INPUT 12 +#define FONT_INPUT_ACTIVE 13 +#define FONT_OPTION_OFF 14 +#define FONT_OPTION_ON 15 +#define FONT_VALUE_1 16 +#define FONT_VALUE_2 17 +#define FONT_VALUE_OLD 18 +#define FONT_TAPE_RECORDER 19 +#define FONT_LEVEL_NUMBER 20 + +#define NUM_FONTS 21 #define NUM_INITIAL_FONTS 4 -#define FIRST_IMG_FONT IMG_FONT_INITIAL_1 -#define LAST_IMG_FONT IMG_FONT_NARROW - -#define NUM_IMG_FONTS (LAST_IMG_FONT - \ - FIRST_IMG_FONT + 1) - /* values for game_status */ #define EXITGAME 0 @@ -835,6 +837,8 @@ #define TYPENAME 6 #define HALLOFFAME 7 #define SETUP 8 +#define PSEUDO_PREVIEW 9 +#define PSEUDO_DOOR 10 #define PROGRAM_VERSION_MAJOR 2 #define PROGRAM_VERSION_MINOR 2 diff --git a/src/screens.c b/src/screens.c index 4c17a8b5..cc5ecf0b 100644 --- a/src/screens.c +++ b/src/screens.c @@ -139,13 +139,13 @@ void DrawTextStatic(int x, int y, char *text, int font_nr) void DrawHeadline() { - int font1_xsize = getFontWidth(FONT(FS_BIG, FC_YELLOW)); - int font2_xsize = getFontWidth(FONT(FS_SMALL, FC_RED)); + int font1_xsize = getFontWidth(FONT_TITLE_1); + int font2_xsize = getFontWidth(FONT_TITLE_2); int x1 = SX + (SXSIZE - strlen(PROGRAM_TITLE_STRING) * font1_xsize) / 2; int x2 = SX + (SXSIZE - strlen(WINDOW_SUBTITLE_STRING) * font2_xsize) / 2; - DrawTextStatic(x1, SY + 8, PROGRAM_TITLE_STRING, FONT(FS_BIG, FC_YELLOW)); - DrawTextStatic(x2, SY + 46, WINDOW_SUBTITLE_STRING, FONT(FS_SMALL, FC_RED)); + DrawTextStatic(x1, SY + 8, PROGRAM_TITLE_STRING, FONT_TITLE_1); + DrawTextStatic(x2, SY + 46, WINDOW_SUBTITLE_STRING, FONT_TITLE_2); } static void ToggleFullscreenIfNeeded() @@ -176,7 +176,7 @@ void DrawMainMenu() { static LevelDirTree *leveldir_last_valid = NULL; char *name_text = (!options.network && setup.team_mode ? "Team:" : "Name:"); - int name_width = getFontWidth(FONT(FS_BIG, FC_GREEN)) * strlen("Name:"); + int name_width = getFontWidth(FONT_MENU_1) * strlen("Name:"); int i; UnmapAllGadgets(); @@ -233,29 +233,27 @@ void DrawMainMenu() DrawHeadline(); - DrawTextStatic(SX + 32, SY + 2*32, name_text, FONT(FS_BIG, FC_GREEN)); - DrawText(SX + 32 + name_width, SY + 2*32, setup.player_name, - FONT(FS_BIG, FC_RED)); - DrawTextStatic(SX + 32, SY + 3*32, "Level:", FONT(FS_BIG, FC_GREEN)); - DrawText(SX + 11 * 32, SY + 3*32, int2str(level_nr,3), FONT(FS_BIG, - (leveldir_current->readonly ? FC_RED : FC_YELLOW))); - DrawTextStatic(SX + 32, SY + 4*32, "Hall Of Fame", FONT(FS_BIG,FC_GREEN)); - DrawTextStatic(SX + 32, SY + 5*32, "Level Creator",FONT(FS_BIG,FC_GREEN)); - DrawTextStatic(SY + 32, SY + 6*32, "Info Screen", FONT(FS_BIG, FC_GREEN)); - DrawTextStatic(SX + 32, SY + 7*32, "Start Game", FONT(FS_BIG, FC_GREEN)); - DrawTextStatic(SX + 32, SY + 8*32, "Setup", FONT(FS_BIG, FC_GREEN)); - DrawTextStatic(SX + 32, SY + 9*32, "Quit", FONT(FS_BIG, FC_GREEN)); + DrawTextStatic(SX + 32, SY + 2*32, name_text, FONT_MENU_1); + DrawText(SX + 32 + name_width, SY + 2*32, setup.player_name, FONT_INPUT); + DrawTextStatic(SX + 32, SY + 3*32, "Level:", FONT_MENU_1); + DrawText(SX + 11 * 32, SY + 3*32, int2str(level_nr,3), FONT_VALUE_1); + DrawTextStatic(SX + 32, SY + 4*32, "Hall Of Fame", FONT_MENU_1); + DrawTextStatic(SX + 32, SY + 5*32, "Level Creator", FONT_MENU_1); + DrawTextStatic(SY + 32, SY + 6*32, "Info Screen", FONT_MENU_1); + DrawTextStatic(SX + 32, SY + 7*32, "Start Game", FONT_MENU_1); + DrawTextStatic(SX + 32, SY + 8*32, "Setup", FONT_MENU_1); + DrawTextStatic(SX + 32, SY + 9*32, "Quit", FONT_MENU_1); DrawMicroLevel(MICROLEV_XPOS, MICROLEV_YPOS, TRUE); - DrawTextF(7*32 + 6, 3*32 + 9, FONT(FS_SMALL, FC_RED), "%d-%d", + DrawTextF(7*32 + 6, 3*32 + 9, FONT_TEXT_3, "%d-%d", leveldir_current->first_level, leveldir_current->last_level); if (leveldir_current->readonly) { - DrawTextF(15*32 + 6, 3*32 + 9 - 7, FONT(FS_SMALL, FC_RED), "READ"); - DrawTextF(15*32 + 6, 3*32 + 9 + 7, FONT(FS_SMALL, FC_RED), "ONLY"); + DrawTextF(15*32 + 6, 3*32 + 9 - 7, FONT_TEXT_3, "READ"); + DrawTextF(15*32 + 6, 3*32 + 9 + 7, FONT_TEXT_3, "ONLY"); } for(i=0; i<8; i++) @@ -270,16 +268,7 @@ void DrawMainMenu() #endif DrawTextStatic(SX + 56, SY + 326, "A Game by Artsoft Entertainment", - FONT(FS_SMALL, FC_RED)); - - if (leveldir_current->name) - { - int len = strlen(leveldir_current->name); - int lxpos = SX + (SXSIZE - len * getFontWidth(FONT_SPECIAL_GAME)) / 2; - int lypos = SY + 352; - - DrawText(lxpos, lypos, leveldir_current->name, FONT_SPECIAL_GAME); - } + FONT_TEXT_3); FadeToFront(); InitAnimation(); @@ -358,7 +347,6 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button) static unsigned long level_delay = 0; int step = (button == 1 ? 1 : button == 2 ? 5 : 10); int new_level_nr, old_level_nr = level_nr; - int font_color = (leveldir_current->readonly ? FC_RED : FC_YELLOW); new_level_nr = level_nr + (x == 10 ? -step : +step); if (new_level_nr < leveldir_current->first_level) @@ -375,8 +363,7 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button) level_nr = new_level_nr; - DrawText(SX + 11 * 32, SY + 3 * 32, int2str(level_nr, 3), - FONT(FS_BIG, font_color)); + DrawText(SX + 11 * 32, SY + 3 * 32, int2str(level_nr, 3), FONT_VALUE_1); LoadLevel(level_nr); DrawMicroLevel(MICROLEV_XPOS, MICROLEV_YPOS, TRUE); @@ -1040,18 +1027,18 @@ void DrawHelpScreenElText(int start) ClearWindow(); DrawHeadline(); - DrawTextFCentered(100, FONT(FS_SMALL, FC_GREEN), "The game elements:"); + DrawTextFCentered(100, FONT_TEXT_1, "The game elements:"); for(i=start; i < start + MAX_HELPSCREEN_ELS && i < num_helpscreen_els; i++) { DrawText(xstart, ystart + (i - start) * ystep + (*helpscreen_eltext[i][1] ? 0 : 8), - helpscreen_eltext[i][0], FONT_DEFAULT_SMALL); + helpscreen_eltext[i][0], FONT_TEXT_2); DrawText(xstart, ystart + (i - start) * ystep + 16, - helpscreen_eltext[i][1], FONT_DEFAULT_SMALL); + helpscreen_eltext[i][1], FONT_TEXT_2); } - DrawTextFCentered(ybottom, FONT(FS_SMALL, FC_BLUE), + DrawTextFCentered(ybottom, FONT_TEXT_4, "Press any key or button for next page"); } @@ -1064,23 +1051,19 @@ void DrawHelpScreenMusicText(int num) ClearWindow(); DrawHeadline(); - DrawTextFCentered(100, FONT(FS_SMALL, FC_GREEN), - "The game background music loops:"); + DrawTextFCentered(100, FONT_TEXT_1, "The game background music loops:"); - DrawTextFCentered(ystart + 0 * ystep, FONT(FS_SMALL, FC_YELLOW), - "Excerpt from"); - DrawTextFCentered(ystart + 1 * ystep, FONT(FS_SMALL, FC_RED), + DrawTextFCentered(ystart + 0 * ystep, FONT_TEXT_2, "Excerpt from"); + DrawTextFCentered(ystart + 1 * ystep, FONT_TEXT_3, "\"%s\"", helpscreen_music[num][0]); - DrawTextFCentered(ystart + 2 * ystep, FONT(FS_SMALL, FC_YELLOW), - "by"); - DrawTextFCentered(ystart + 3 * ystep, FONT(FS_SMALL, FC_RED), + DrawTextFCentered(ystart + 2 * ystep, FONT_TEXT_2, "by"); + DrawTextFCentered(ystart + 3 * ystep, FONT_TEXT_3, "%s", helpscreen_music[num][1]); - DrawTextFCentered(ystart + 4 * ystep, FONT(FS_SMALL, FC_YELLOW), - "from the album"); - DrawTextFCentered(ystart + 5 * ystep, FONT(FS_SMALL, FC_RED), + DrawTextFCentered(ystart + 4 * ystep, FONT_TEXT_2, "from the album"); + DrawTextFCentered(ystart + 5 * ystep, FONT_TEXT_3, "\"%s\"", helpscreen_music[num][2]); - DrawTextFCentered(ybottom, FONT(FS_SMALL, FC_BLUE), + DrawTextFCentered(ybottom, FONT_TEXT_4, "Press any key or button for next page"); #if 0 @@ -1097,22 +1080,16 @@ void DrawHelpScreenCreditsText() ClearWindow(); DrawHeadline(); - DrawTextFCentered(100, FONT(FS_SMALL, FC_GREEN), - "Credits:"); - DrawTextFCentered(ystart + 0 * ystep, FONT(FS_SMALL, FC_YELLOW), - "DOS port of the game:"); - DrawTextFCentered(ystart + 1 * ystep, FONT(FS_SMALL, FC_RED), - "Guido Schulz"); - DrawTextFCentered(ystart + 2 * ystep, FONT(FS_SMALL, FC_YELLOW), - "Additional toons:"); - DrawTextFCentered(ystart + 3 * ystep, FONT(FS_SMALL, FC_RED), - "Karl Hörnell"); - DrawTextFCentered(ystart + 5 * ystep, FONT(FS_SMALL, FC_YELLOW), + DrawTextFCentered(100, FONT_TEXT_1, "Credits:"); + DrawTextFCentered(ystart + 0 * ystep, FONT_TEXT_2, "DOS port of the game:"); + DrawTextFCentered(ystart + 1 * ystep, FONT_TEXT_3, "Guido Schulz"); + DrawTextFCentered(ystart + 2 * ystep, FONT_TEXT_2, "Additional toons:"); + DrawTextFCentered(ystart + 3 * ystep, FONT_TEXT_3, "Karl Hörnell"); + DrawTextFCentered(ystart + 5 * ystep, FONT_TEXT_2, "...and many thanks to all contributors"); - DrawTextFCentered(ystart + 6 * ystep, FONT(FS_SMALL, FC_YELLOW), - "of new levels!"); + DrawTextFCentered(ystart + 6 * ystep, FONT_TEXT_2, "of new levels!"); - DrawTextFCentered(ybottom, FONT(FS_SMALL, FC_BLUE), + DrawTextFCentered(ybottom, FONT_TEXT_4, "Press any key or button for next page"); } @@ -1124,33 +1101,33 @@ void DrawHelpScreenContactText() ClearWindow(); DrawHeadline(); - DrawTextFCentered(100, FONT(FS_SMALL, FC_GREEN), "Program information:"); + DrawTextFCentered(100, FONT_TEXT_1, "Program information:"); - DrawTextFCentered(ystart + 0 * ystep, FONT(FS_SMALL, FC_YELLOW), + DrawTextFCentered(ystart + 0 * ystep, FONT_TEXT_2, "This game is Freeware!"); - DrawTextFCentered(ystart + 1 * ystep, FONT(FS_SMALL, FC_YELLOW), + DrawTextFCentered(ystart + 1 * ystep, FONT_TEXT_2, "If you like it, send e-mail to:"); - DrawTextFCentered(ystart + 2 * ystep, FONT(FS_SMALL, FC_RED), + DrawTextFCentered(ystart + 2 * ystep, FONT_TEXT_3, "info@artsoft.org"); - DrawTextFCentered(ystart + 3 * ystep, FONT(FS_SMALL, FC_YELLOW), + DrawTextFCentered(ystart + 3 * ystep, FONT_TEXT_2, "or SnailMail to:"); - DrawTextFCentered(ystart + 4 * ystep + 0, FONT(FS_SMALL, FC_RED), + DrawTextFCentered(ystart + 4 * ystep + 0, FONT_TEXT_3, "Holger Schemel"); - DrawTextFCentered(ystart + 4 * ystep + 20, FONT(FS_SMALL, FC_RED), + DrawTextFCentered(ystart + 4 * ystep + 20, FONT_TEXT_3, "Detmolder Strasse 189"); - DrawTextFCentered(ystart + 4 * ystep + 40, FONT(FS_SMALL, FC_RED), + DrawTextFCentered(ystart + 4 * ystep + 40, FONT_TEXT_3, "33604 Bielefeld"); - DrawTextFCentered(ystart + 4 * ystep + 60, FONT(FS_SMALL, FC_RED), + DrawTextFCentered(ystart + 4 * ystep + 60, FONT_TEXT_3, "Germany"); - DrawTextFCentered(ystart + 7 * ystep, FONT(FS_SMALL, FC_YELLOW), + DrawTextFCentered(ystart + 7 * ystep, FONT_TEXT_2, "If you have created new levels,"); - DrawTextFCentered(ystart + 8 * ystep, FONT(FS_SMALL, FC_YELLOW), + DrawTextFCentered(ystart + 8 * ystep, FONT_TEXT_2, "send them to me to include them!"); - DrawTextFCentered(ystart + 9 * ystep, FONT(FS_SMALL, FC_YELLOW), + DrawTextFCentered(ystart + 9 * ystep, FONT_TEXT_2, ":-)"); - DrawTextFCentered(ybottom, FONT(FS_SMALL, FC_BLUE), + DrawTextFCentered(ybottom, FONT_TEXT_4, "Press any key or button for main menu"); } @@ -1250,8 +1227,8 @@ void HandleHelpScreen(int button) void HandleTypeName(int newxpos, Key key) { static int xpos = 0, ypos = 2; - int font_width = getFontWidth(FONT_DEFAULT_BIG); - int name_width = getFontWidth(FONT(FS_BIG, FC_GREEN)) * strlen("Name:"); + int font_width = getFontWidth(FONT_INPUT_ACTIVE); + int name_width = getFontWidth(FONT_MENU_1) * strlen("Name:"); int startx = SX + 32 + name_width; int starty = SY + ypos * 32; @@ -1259,8 +1236,8 @@ void HandleTypeName(int newxpos, Key key) { xpos = newxpos; - DrawText(startx, starty, setup.player_name, FONT_DEFAULT_BIG); - DrawText(startx + xpos * font_width, starty, "_", FONT_DEFAULT_BIG); + DrawText(startx, starty, setup.player_name, FONT_INPUT_ACTIVE); + DrawText(startx + xpos * font_width, starty, "_", FONT_INPUT_ACTIVE); return; } @@ -1280,20 +1257,20 @@ void HandleTypeName(int newxpos, Key key) setup.player_name[xpos + 1] = 0; xpos++; - DrawText(startx, starty, setup.player_name, FONT_DEFAULT_BIG); - DrawText(startx + xpos * font_width, starty, "_", FONT_DEFAULT_BIG); + DrawText(startx, starty, setup.player_name, FONT_INPUT_ACTIVE); + DrawText(startx + xpos * font_width, starty, "_", FONT_INPUT_ACTIVE); } else if ((key == KSYM_Delete || key == KSYM_BackSpace) && xpos > 0) { xpos--; setup.player_name[xpos] = 0; - DrawText(startx + xpos * font_width, starty, "_ ", FONT_DEFAULT_BIG); + DrawText(startx + xpos * font_width, starty, "_ ", FONT_INPUT_ACTIVE); } else if (key == KSYM_Return && xpos > 0) { - DrawText(startx, starty, setup.player_name, FONT(FS_BIG, FC_RED)); - DrawText(startx + xpos * font_width, starty, " ", FONT_DEFAULT_BIG); + DrawText(startx, starty, setup.player_name, FONT_INPUT); + DrawText(startx + xpos * font_width, starty, " ", FONT_INPUT_ACTIVE); SaveSetup(); game_status = MAINMENU; @@ -1341,6 +1318,7 @@ static void drawChooseTreeList(int first_entry, int num_page_entries, int num_entries = numTreeInfoInGroup(ti); char *title_string = NULL; int offset = (ti->type == TREE_TYPE_LEVEL_DIR ? 0 : 16); + int last_game_status = game_status; /* save current game status */ DrawBackground(SX, SY, SXSIZE - 32, SYSIZE); redraw_mask |= REDRAW_FIELD; @@ -1351,8 +1329,9 @@ static void drawChooseTreeList(int first_entry, int num_page_entries, ti->type == TREE_TYPE_SOUNDS_DIR ? "Custom Sounds" : ti->type == TREE_TYPE_MUSIC_DIR ? "Custom Music" : ""); - DrawText(SX + offset, SY + offset, title_string, FONT(FS_BIG, - (ti->type == TREE_TYPE_LEVEL_DIR ? FC_GREEN : FC_YELLOW))); + DrawText(SX + offset, SY + offset, title_string, FONT_TITLE_1); + + game_status = CHOOSELEVEL; /* force LEVELS font on artwork setup screen */ for(i=0; iname , max_buffer_len); buffer[max_buffer_len] = '\0'; - DrawText(SX + 32, SY + ypos * 32, buffer, FONT(FS_MEDIUM, node->color)); + DrawText(SX + 32, SY + ypos * 32, buffer, FONT_TEXT_1 + node->color); if (node->parent_link) initCursor(i, IMG_MENU_BUTTON_LEFT); @@ -1391,6 +1370,8 @@ static void drawChooseTreeList(int first_entry, int num_page_entries, DrawBackground(SX, SY + ypos * 32, TILEX, TILEY); DrawGraphicThruMask(0, ypos, IMG_MENU_BUTTON_DOWN, 0); } + + game_status = last_game_status; /* restore current game status */ } static void drawChooseTreeInfo(int entry_pos, TreeInfo *ti) @@ -1407,13 +1388,13 @@ static void drawChooseTreeInfo(int entry_pos, TreeInfo *ti) DrawBackground(SX + 32, SY + 32, SXSIZE - 64, 32); if (node->parent_link) - DrawTextFCentered(40, FONT(FS_SMALL, FC_RED), "leave group \"%s\"", + DrawTextFCentered(40, FONT_TITLE_2, "leave group \"%s\"", node->class_desc); else if (node->level_group) - DrawTextFCentered(40, FONT(FS_SMALL, FC_RED), "enter group \"%s\"", + DrawTextFCentered(40, FONT_TITLE_2, "enter group \"%s\"", node->class_desc); else if (ti->type == TREE_TYPE_LEVEL_DIR) - DrawTextFCentered(40, FONT(FS_SMALL, FC_RED), "%3d levels (%s)", + DrawTextFCentered(40, FONT_TITLE_2, "%3d levels (%s)", node->levels, node->class_desc); /* let BackToFront() redraw only what is needed */ @@ -1663,31 +1644,22 @@ static void drawHallOfFameList(int first_entry, int highlight_position) SetMainBackgroundImage(IMG_BACKGROUND_SCORES); ClearWindow(); - DrawText(SX + 80, SY + 8, "Hall Of Fame", FONT_DEFAULT_BIG); - DrawTextFCentered(46, FONT(FS_SMALL, FC_RED), "HighScores of Level %d", - level_nr); + DrawText(SX + 80, SY + 8, "Hall Of Fame", FONT_TITLE_1); + DrawTextFCentered(46, FONT_TITLE_2, "HighScores of Level %d", level_nr); for(i=0; i max_value_len) value_string[max_value_len] = '\0'; } else if (setup_info[pos].type & TYPE_BOOLEAN_STYLE && !*(boolean *)(setup_info[pos].value)) - font_color = FC_BLUE; + font_nr = FONT_OPTION_OFF; DrawText(SX + xpos * 32, SY + ypos * 32, - (xpos == 3 ? " " : " "), FONT_DEFAULT_BIG); - DrawText(SX + xpos * 32, SY + ypos * 32, value_string, - FONT(font_size, font_color)); + (xpos == 3 ? " " : " "), font_nr); + DrawText(SX + xpos * 32, SY + ypos * 32, value_string, font_nr); } static void changeSetupValue(int pos) @@ -2115,14 +2085,14 @@ static void DrawSetupScreen_Generic() title_string = "Setup Shortcuts"; } - DrawText(SX + 16, SY + 16, title_string, FONT_DEFAULT_BIG); + DrawText(SX + 16, SY + 16, title_string, FONT_TITLE_1); num_setup_info = 0; for(i=0; setup_info[i].type != 0 && i < MAX_MENU_ENTRIES_ON_SCREEN; i++) { void *value_ptr = setup_info[i].value; int ypos = MENU_SCREEN_START_YPOS + i; - int font_size = FS_BIG; + int font_nr = FONT_MENU_1; /* set some entries to "unchangeable" according to other variables */ if ((value_ptr == &setup.sound && !audio.sound_available) || @@ -2132,10 +2102,9 @@ static void DrawSetupScreen_Generic() setup_info[i].type |= TYPE_GHOSTED; if (setup_info[i].type & TYPE_STRING) - font_size = FS_MEDIUM; + font_nr = FONT_MENU_2; - DrawText(SX + 32, SY + ypos * 32, setup_info[i].text, - FONT(font_size, FC_GREEN)); + DrawText(SX + 32, SY + ypos * 32, setup_info[i].text, font_nr); if (setup_info[i].type & TYPE_ENTER_MENU) initCursor(i, IMG_MENU_BUTTON_RIGHT); @@ -2255,7 +2224,7 @@ void DrawSetupScreen_Input() { ClearWindow(); - DrawText(SX+16, SY+16, "Setup Input", FONT_DEFAULT_BIG); + DrawText(SX+16, SY+16, "Setup Input", FONT_TITLE_1); initCursor(0, IMG_MENU_BUTTON); initCursor(1, IMG_MENU_BUTTON); @@ -2265,13 +2234,13 @@ void DrawSetupScreen_Input() drawCursorXY(10, 0, IMG_MENU_BUTTON_LEFT); drawCursorXY(12, 0, IMG_MENU_BUTTON_RIGHT); - DrawText(SX+32, SY+2*32, "Player:", FONT(FS_BIG, FC_GREEN)); - DrawText(SX+32, SY+3*32, "Device:", FONT(FS_BIG, FC_GREEN)); - DrawText(SX+32, SY+15*32, "Back", FONT(FS_BIG, FC_GREEN)); + DrawText(SX+32, SY+2*32, "Player:", FONT_MENU_1); + DrawText(SX+32, SY+3*32, "Device:", FONT_MENU_1); + DrawText(SX+32, SY+15*32, "Back", FONT_MENU_1); #if 0 DeactivateJoystickForCalibration(); - DrawTextFCentered(SYSIZE - 20, FONT(FS_SMALL, FC_BLUE), + DrawTextFCentered(SYSIZE - 20, FONT_TEXT_4, "Joysticks deactivated on this screen"); #endif @@ -2328,7 +2297,7 @@ static void drawPlayerSetupInputInfo(int player_nr) custom_key = setup.input[player_nr].key; - DrawText(SX+11*32, SY+2*32, int2str(player_nr + 1, 1), FONT(FS_BIG, FC_RED)); + DrawText(SX+11*32, SY+2*32, int2str(player_nr + 1, 1), FONT_INPUT_ACTIVE); DrawGraphicThruMask(8, 2, PLAYER_NR_GFX(IMG_PLAYER1, player_nr), 0); if (setup.input[player_nr].use_joystick) @@ -2337,37 +2306,37 @@ static void drawPlayerSetupInputInfo(int player_nr) DrawText(SX+8*32, SY+3*32, joystick_name[getJoystickNrFromDeviceName(device_name)], - FONT_DEFAULT_BIG); - DrawText(SX+32, SY+4*32, "Calibrate", FONT(FS_BIG, FC_GREEN)); + FONT_VALUE_1); + DrawText(SX+32, SY+4*32, "Calibrate", FONT_MENU_1); } else { - DrawText(SX+8*32, SY+3*32, "Keyboard ", FONT(FS_BIG, FC_YELLOW)); - DrawText(SX+32, SY+4*32, "Customize", FONT(FS_BIG, FC_GREEN)); + DrawText(SX+8*32, SY+3*32, "Keyboard ", FONT_VALUE_1); + DrawText(SX+32, SY+4*32, "Customize", FONT_MENU_1); } - DrawText(SX+32, SY+5*32, "Actual Settings:", FONT(FS_BIG, FC_GREEN)); + DrawText(SX+32, SY+5*32, "Actual Settings:", FONT_MENU_1); drawCursorXY(1, 4, IMG_MENU_BUTTON_LEFT); drawCursorXY(1, 5, IMG_MENU_BUTTON_RIGHT); drawCursorXY(1, 6, IMG_MENU_BUTTON_UP); drawCursorXY(1, 7, IMG_MENU_BUTTON_DOWN); - DrawText(SX+2*32, SY+6*32, ":", FONT(FS_BIG, FC_BLUE)); - DrawText(SX+2*32, SY+7*32, ":", FONT(FS_BIG, FC_BLUE)); - DrawText(SX+2*32, SY+8*32, ":", FONT(FS_BIG, FC_BLUE)); - DrawText(SX+2*32, SY+9*32, ":", FONT(FS_BIG, FC_BLUE)); - DrawText(SX+32, SY+10*32, "Snap Field:", FONT(FS_BIG, FC_BLUE)); - DrawText(SX+32, SY+12*32, "Place Bomb:", FONT(FS_BIG, FC_BLUE)); + DrawText(SX+2*32, SY+6*32, ":", FONT_VALUE_OLD); + DrawText(SX+2*32, SY+7*32, ":", FONT_VALUE_OLD); + DrawText(SX+2*32, SY+8*32, ":", FONT_VALUE_OLD); + DrawText(SX+2*32, SY+9*32, ":", FONT_VALUE_OLD); + DrawText(SX+32, SY+10*32, "Snap Field:", FONT_VALUE_OLD); + DrawText(SX+32, SY+12*32, "Place Bomb:", FONT_VALUE_OLD); for (i=0; i<6; i++) { int ypos = 6 + i + (i > 3 ? i-3 : 0); DrawText(SX + 3*32, SY + ypos*32, - " ", FONT_DEFAULT_BIG); + " ", FONT_VALUE_1); DrawText(SX + 3*32, SY + ypos*32, (setup.input[player_nr].use_joystick ? custom[i].text : - getKeyNameFromKey(*custom[i].key)), FONT_DEFAULT_BIG); + getKeyNameFromKey(*custom[i].key)), FONT_VALUE_1); } } @@ -2516,20 +2485,18 @@ void CustomizeKeyboard(int player_nr) custom_key = setup.input[player_nr].key; ClearWindow(); - DrawText(SX + 16, SY + 16, "Keyboard Input", FONT_DEFAULT_BIG); + DrawText(SX + 16, SY + 16, "Keyboard Input", FONT_TITLE_1); BackToFront(); InitAnimation(); step_nr = 0; DrawText(SX, SY + (2+2*step_nr)*32, - customize_step[step_nr].text, - FONT(FS_BIG, FC_RED)); + customize_step[step_nr].text, FONT_INPUT_ACTIVE); DrawText(SX, SY + (2+2*step_nr+1)*32, - "Key:", FONT(FS_BIG, FC_RED)); + "Key:", FONT_INPUT_ACTIVE); DrawText(SX + 4*32, SY + (2+2*step_nr+1)*32, - getKeyNameFromKey(*customize_step[step_nr].key), - FONT(FS_BIG, FC_BLUE)); + getKeyNameFromKey(*customize_step[step_nr].key), FONT_VALUE_OLD); while(!finished) { @@ -2569,33 +2536,33 @@ void CustomizeKeyboard(int player_nr) /* got new key binding */ *customize_step[step_nr].key = key; DrawText(SX + 4*32, SY + (2+2*step_nr+1)*32, - " ", FONT_DEFAULT_BIG); + " ", FONT_VALUE_1); DrawText(SX + 4*32, SY + (2+2*step_nr+1)*32, - getKeyNameFromKey(key), FONT_DEFAULT_BIG); + getKeyNameFromKey(key), FONT_VALUE_1); step_nr++; /* un-highlight last query */ DrawText(SX, SY+(2+2*(step_nr-1))*32, - customize_step[step_nr-1].text, FONT(FS_BIG, FC_GREEN)); + customize_step[step_nr-1].text, FONT_MENU_1); DrawText(SX, SY+(2+2*(step_nr-1)+1)*32, - "Key:", FONT(FS_BIG, FC_GREEN)); + "Key:", FONT_MENU_1); /* press 'Enter' to leave */ if (step_nr == 6) { DrawText(SX + 16, SY + 15*32+16, - "Press Enter", FONT_DEFAULT_BIG); + "Press Enter", FONT_TITLE_1); break; } /* query next key binding */ DrawText(SX, SY+(2+2*step_nr)*32, - customize_step[step_nr].text, FONT(FS_BIG, FC_RED)); + customize_step[step_nr].text, FONT_INPUT_ACTIVE); DrawText(SX, SY+(2+2*step_nr+1)*32, - "Key:", FONT(FS_BIG, FC_RED)); + "Key:", FONT_INPUT_ACTIVE); DrawText(SX + 4*32, SY+(2+2*step_nr+1)*32, getKeyNameFromKey(*customize_step[step_nr].key), - FONT(FS_BIG, FC_BLUE)); + FONT_VALUE_OLD); } break; @@ -2656,13 +2623,13 @@ static boolean CalibrateJoystickMain(int player_nr) } } - DrawText(SX, SY + 6 * 32, " ROTATE JOYSTICK ", FONT(FS_BIG,FC_YELLOW)); - DrawText(SX, SY + 7 * 32, "IN ALL DIRECTIONS", FONT(FS_BIG,FC_YELLOW)); - DrawText(SX + 16, SY + 9 * 32, " IF ALL BALLS ", FONT(FS_BIG,FC_YELLOW)); - DrawText(SX, SY + 10 * 32, " ARE YELLOW, ", FONT(FS_BIG,FC_YELLOW)); - DrawText(SX, SY + 11 * 32, " CENTER JOYSTICK ", FONT(FS_BIG,FC_YELLOW)); - DrawText(SX, SY + 12 * 32, " AND ", FONT(FS_BIG,FC_YELLOW)); - DrawText(SX, SY + 13 * 32, "PRESS ANY BUTTON!", FONT(FS_BIG,FC_YELLOW)); + DrawText(SX, SY + 6 * 32, " ROTATE JOYSTICK ", FONT_TITLE_1); + DrawText(SX, SY + 7 * 32, "IN ALL DIRECTIONS", FONT_TITLE_1); + DrawText(SX + 16, SY + 9 * 32, " IF ALL BALLS ", FONT_TITLE_1); + DrawText(SX, SY + 10 * 32, " ARE YELLOW, ", FONT_TITLE_1); + DrawText(SX, SY + 11 * 32, " CENTER JOYSTICK ", FONT_TITLE_1); + DrawText(SX, SY + 12 * 32, " AND ", FONT_TITLE_1); + DrawText(SX, SY + 13 * 32, "PRESS ANY BUTTON!", FONT_TITLE_1); joy_value = Joystick(player_nr); last_x = (joy_value & JOY_LEFT ? -1 : joy_value & JOY_RIGHT ? +1 : 0); @@ -2813,8 +2780,8 @@ void CalibrateJoystick(int player_nr) { ClearWindow(); - DrawText(SX + 16, SY + 6*32, " JOYSTICK NOT ", FONT(FS_BIG,FC_YELLOW)); - DrawText(SX, SY + 7*32, " AVAILABLE ", FONT(FS_BIG,FC_YELLOW)); + DrawText(SX + 16, SY + 6*32, " JOYSTICK NOT ", FONT_TITLE_1); + DrawText(SX, SY + 7*32, " AVAILABLE ", FONT_TITLE_1); BackToFront(); Delay(2000); /* show error message for two seconds */ } @@ -2925,7 +2892,7 @@ static struct #if defined(TARGET_X11_NATIVE_PERFORMANCE_WORKAROUND) &scrollbar_bitmap[0], &scrollbar_bitmap[1], #else - IMG_MENU_SCROLLBAR, IMG_SCROLLBAR_RED, + IMG_MENU_SCROLLBAR, IMG_MENU_SCROLLBAR_ACTIVE, #endif SX + SC_SCROLL_VERTICAL_XPOS, SY + SC_SCROLL_VERTICAL_YPOS, SC_SCROLL_VERTICAL_XSIZE, SC_SCROLL_VERTICAL_YSIZE, diff --git a/src/tape.c b/src/tape.c index 60d49c8a..d9002605 100644 --- a/src/tape.c +++ b/src/tape.c @@ -240,11 +240,11 @@ void DrawVideoDisplay(unsigned long state, unsigned long value) int jahr = (value/10000); DrawText(VX + VIDEO_DATE_XPOS, VY + VIDEO_DATE_YPOS, - int2str(tag, 2), FONT_SPECIAL_TAPE); + int2str(tag, 2), FONT_TAPE_RECORDER); DrawText(VX + VIDEO_DATE_XPOS + 27, VY + VIDEO_DATE_YPOS, - monatsname[monat], FONT_SPECIAL_TAPE); + monatsname[monat], FONT_TAPE_RECORDER); DrawText(VX + VIDEO_DATE_XPOS + 64, VY + VIDEO_DATE_YPOS, - int2str(jahr, 2), FONT_SPECIAL_TAPE); + int2str(jahr, 2), FONT_TAPE_RECORDER); } if (state & VIDEO_STATE_TIME_ON) @@ -253,9 +253,9 @@ void DrawVideoDisplay(unsigned long state, unsigned long value) int sec = value % 60; DrawText(VX + VIDEO_TIME_XPOS, VY + VIDEO_TIME_YPOS, - int2str(min, 2), FONT_SPECIAL_TAPE); + int2str(min, 2), FONT_TAPE_RECORDER); DrawText(VX + VIDEO_TIME_XPOS + 27, VY + VIDEO_TIME_YPOS, - int2str(sec, 2), FONT_SPECIAL_TAPE); + int2str(sec, 2), FONT_TAPE_RECORDER); } if (state & VIDEO_STATE_DATE) diff --git a/src/tools.c b/src/tools.c index dd14ec5b..2e0cd128 100644 --- a/src/tools.c +++ b/src/tools.c @@ -243,19 +243,18 @@ void BackToFront() VX+VIDEO_CONTROL_XPOS,VY+VIDEO_CONTROL_YPOS); } } + if (redraw_mask & REDRAW_DOOR_3) BlitBitmap(backbuffer, window, EX, EY, EXSIZE, EYSIZE, EX, EY); + redraw_mask &= ~REDRAW_DOORS; } if (redraw_mask & REDRAW_MICROLEVEL) { - BlitBitmap(backbuffer, window, - MICROLEV_XPOS, MICROLEV_YPOS, MICROLEV_XSIZE, MICROLEV_YSIZE, - MICROLEV_XPOS, MICROLEV_YPOS); - BlitBitmap(backbuffer, window, - SX, MICROLABEL_YPOS, SXSIZE, getFontHeight(FONT_SPECIAL_GAME), - SX, MICROLABEL_YPOS); + BlitBitmap(backbuffer, window, SX, SY + 10 * TILEY, SXSIZE, 7 * TILEY, + SX, SY + 10 * TILEY); + redraw_mask &= ~REDRAW_MICROLEVEL; } @@ -279,7 +278,7 @@ void BackToFront() info1[0] = '\0'; sprintf(text, "%.1f fps%s", global.frames_per_second, info1); - DrawTextExt(window, SX, SY, text, FONT_DEFAULT_SMALL, FONT_OPAQUE); + DrawTextExt(window, SX, SY, text, FONT_TEXT_2, FONT_OPAQUE); } FlushDisplay(); @@ -1531,9 +1530,15 @@ static void DrawMicroLevelExt(int xpos, int ypos, int from_x, int from_y) static void DrawMicroLevelLabelExt(int mode) { char label_text[MAX_OUTPUT_LINESIZE + 1]; - int max_len_label_text = SXSIZE / getFontWidth(FONT_SPECIAL_GAME); + int max_len_label_text; + int font_nr = FONT_TEXT_2; + + if (mode == MICROLABEL_CREATED_BY || mode == MICROLABEL_IMPORTED_FROM) + font_nr = FONT_TEXT_3; - DrawBackground(SX, MICROLABEL_YPOS, SXSIZE,getFontHeight(FONT_SPECIAL_GAME)); + max_len_label_text = SXSIZE / getFontWidth(font_nr); + + DrawBackground(SX, MICROLABEL_YPOS, SXSIZE, getFontHeight(font_nr)); strncpy(label_text, (mode == MICROLABEL_LEVEL_NAME ? level.name : mode == MICROLABEL_CREATED_BY ? "created by" : @@ -1546,11 +1551,11 @@ static void DrawMicroLevelLabelExt(int mode) if (strlen(label_text) > 0) { - int text_width = strlen(label_text) * getFontWidth(FONT_SPECIAL_GAME); + int text_width = strlen(label_text) * getFontWidth(font_nr); int lxpos = SX + (SXSIZE - text_width) / 2; int lypos = MICROLABEL_YPOS; - DrawText(lxpos, lypos, label_text, FONT_SPECIAL_GAME); + DrawText(lxpos, lypos, label_text, font_nr); } redraw_mask |= REDRAW_MICROLEVEL; @@ -1562,6 +1567,9 @@ void DrawMicroLevel(int xpos, int ypos, boolean restart) static unsigned long label_delay = 0; static int from_x, from_y, scroll_direction; static int label_state, label_counter; + int last_game_status = game_status; /* save current game status */ + + game_status = PSEUDO_PREVIEW; /* force PREVIEW font on preview level */ if (restart) { @@ -1577,6 +1585,17 @@ void DrawMicroLevel(int xpos, int ypos, boolean restart) DelayReached(&scroll_delay, 0); DelayReached(&label_delay, 0); + if (leveldir_current->name) + { + int len = strlen(leveldir_current->name); + int lxpos = SX + (SXSIZE - len * getFontWidth(FONT_TEXT_1)) / 2; + int lypos = SY + 352; + + DrawText(lxpos, lypos, leveldir_current->name, FONT_TEXT_1); + } + + game_status = last_game_status; /* restore current game status */ + return; } @@ -1645,6 +1664,8 @@ void DrawMicroLevel(int xpos, int ypos, boolean restart) MICROLABEL_LEVEL_IMPORT_INFO : MICROLABEL_EMPTY); DrawMicroLevelLabelExt(label_state); } + + game_status = last_game_status; /* restore current game status */ } int REQ_in_range(int x, int y) @@ -1666,6 +1687,7 @@ boolean Request(char *text, unsigned int req_state) { int mx, my, ty, result = -1; unsigned int old_door_state; + int last_game_status = game_status; /* save current game status */ #if defined(PLATFORM_UNIX) /* pause network game while waiting for request to answer */ @@ -1691,6 +1713,8 @@ boolean Request(char *text, unsigned int req_state) /* clear door drawing field */ DrawBackground(DX, DY, DXSIZE, DYSIZE); + game_status = PSEUDO_DOOR; /* force DOOR font on preview level */ + /* write text for request */ for(ty=0; ty < MAX_REQUEST_LINES; ty++) { @@ -1717,12 +1741,15 @@ boolean Request(char *text, unsigned int req_state) strncpy(text_line, text, tl); text_line[tl] = 0; - DrawText(DX + 50 - (tl * 14)/2, DY + 8 + ty * 16, - text_line, FONT_DEFAULT_SMALL); + DrawText(DX + (DXSIZE - tl * getFontWidth(FONT_TEXT_2)) / 2, + DY + 8 + ty * (getFontHeight(FONT_TEXT_2) + 2), + text_line, FONT_TEXT_2); text += tl + (tc == ' ' ? 1 : 0); } + game_status = last_game_status; /* restore current game status */ + if (req_state & REQ_ASK) { MapGadget(tool_gadget[TOOL_CTRL_ID_YES]);