From: Holger Schemel Date: Sun, 23 Feb 2003 17:23:25 +0000 (+0100) Subject: rnd-20030223-1-src X-Git-Tag: 3.0.0^2~136 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=81d6b6bda96a976884b3945b15a8aba126e0a157;p=rocksndiamonds.git rnd-20030223-1-src --- diff --git a/src/Makefile b/src/Makefile index c994eaa9..eb74406a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -161,7 +161,8 @@ CNFS = conf_gfx.h \ conf_cus.c \ conf_cus.h \ conf_e2g.c \ - conf_esg.c + conf_esg.c \ + conf_fnt.c CNFS_CMD = ../Scripts/create_element_defs.pl diff --git a/src/conf_fnt.c b/src/conf_fnt.c new file mode 100644 index 00000000..d94f047d --- /dev/null +++ b/src/conf_fnt.c @@ -0,0 +1,116 @@ +/*********************************************************** +* Rocks'n'Diamonds -- McDuffin Strikes Back! * +*----------------------------------------------------------* +* (c) 1995-2002 Artsoft Entertainment * +* Holger Schemel * +* Detmolder Strasse 189 * +* 33604 Bielefeld * +* Germany * +* e-mail: info@artsoft.org * +*----------------------------------------------------------* +* conf_fnt.c * +***********************************************************/ + +/* ----- this file was automatically generated -- do not edit by hand ----- */ + +#ifndef CONF_FNT_C +#define CONF_FNT_C + +/* values for font/graphics mapping configuration */ + +static struct +{ + int font_nr; + int special; + + int graphic; +} +font_to_graphic[] = +{ + { + FONT_INITIAL_1, -1, + IMG_FONT_INITIAL_1 + }, + { + FONT_INITIAL_2, -1, + IMG_FONT_INITIAL_2 + }, + { + FONT_INITIAL_3, -1, + IMG_FONT_INITIAL_3 + }, + { + FONT_INITIAL_4, -1, + IMG_FONT_INITIAL_4 + }, + { + FONT_BIG_1, -1, + IMG_FONT_BIG_1 + }, + { + FONT_BIG_2, -1, + IMG_FONT_BIG_2 + }, + { + FONT_BIG_3, -1, + IMG_FONT_BIG_3 + }, + { + FONT_BIG_4, -1, + IMG_FONT_BIG_4 + }, + { + FONT_MEDIUM_1, -1, + IMG_FONT_MEDIUM_1 + }, + { + FONT_MEDIUM_2, -1, + IMG_FONT_MEDIUM_2 + }, + { + FONT_MEDIUM_3, -1, + IMG_FONT_MEDIUM_3 + }, + { + FONT_MEDIUM_4, -1, + IMG_FONT_MEDIUM_4 + }, + { + FONT_SMALL_1, -1, + IMG_FONT_SMALL_1 + }, + { + FONT_SMALL_2, -1, + IMG_FONT_SMALL_2 + }, + { + FONT_SMALL_3, -1, + IMG_FONT_SMALL_3 + }, + { + FONT_SMALL_4, -1, + IMG_FONT_SMALL_4 + }, + { + FONT_SMALL_3, GFX_SPECIAL_ARG_EDITOR, + IMG_FONT_SMALL_3 + }, + { + FONT_TAPE, -1, + IMG_FONT_TAPE + }, + { + FONT_GAME, -1, + IMG_FONT_GAME + }, + { + FONT_NARROW, -1, + IMG_FONT_NARROW + }, + { + -1, -1, + -1 + }, +}; + +#endif /* CONF_FNT_C */ diff --git a/src/conf_gfx.c b/src/conf_gfx.c index d73f922a..58cd51b6 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -2984,6 +2984,12 @@ struct ConfigInfo image_config[] = { "font.small_4.width", "14" }, { "font.small_4.height", "14" }, + { "font.small_3.EDITOR", "RocksFontSmall.pcx" }, + { "font.small_3.EDITOR.x", "0" }, + { "font.small_3.EDITOR.y", "0" }, + { "font.small_3.EDITOR.width", "14" }, + { "font.small_3.EDITOR.height", "14" }, + { "font.tape", "RocksFontSmall.pcx" }, { "font.tape.x", "0" }, { "font.tape.y", "224" }, diff --git a/src/conf_gfx.h b/src/conf_gfx.h index 73418226..de87a85d 100644 --- a/src/conf_gfx.h +++ b/src/conf_gfx.h @@ -820,25 +820,26 @@ #define IMG_FONT_SMALL_2 799 #define IMG_FONT_SMALL_3 800 #define IMG_FONT_SMALL_4 801 -#define IMG_FONT_TAPE 802 -#define IMG_FONT_GAME 803 -#define IMG_FONT_NARROW 804 -#define IMG_GLOBAL_BORDER 805 -#define IMG_GLOBAL_DOOR 806 -#define IMG_BACKGROUND 807 -#define IMG_BACKGROUND_MAIN 808 -#define IMG_BACKGROUND_LEVELS 809 -#define IMG_BACKGROUND_SCORES 810 -#define IMG_BACKGROUND_EDITOR 811 -#define IMG_BACKGROUND_INFO 812 -#define IMG_BACKGROUND_SETUP 813 -#define IMG_BACKGROUND_DOOR 814 -#define IMG_INFO_FONT_EM_1 815 -#define IMG_INFO_FONT_EM_2 816 -#define IMG_INFO_FONT_EM_3 817 -#define IMG_INFO_FONT_EM_4 818 -#define IMG_INFO_FONT_EM_5 819 +#define IMG_FONT_SMALL_3_EDITOR 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 NUM_IMAGE_FILES 820 +#define NUM_IMAGE_FILES 821 #endif /* CONF_GFX_H */ diff --git a/src/conftime.h b/src/conftime.h index 7cbb3018..b4341798 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2003-02-22 18:44]" +#define COMPILE_DATE_STRING "[2003-02-23 18:14]" diff --git a/src/init.c b/src/init.c index b6eaa561..73f9274f 100644 --- a/src/init.c +++ b/src/init.c @@ -880,14 +880,13 @@ void InitElementSpecialGraphicInfo() { struct PropertyMapping *property_mapping = getImageListPropertyMapping(); int num_property_mappings = getImageListPropertyMappingSize(); - int i; + int i, j; /* always start with reliable default values */ - for (i=0; i -1; i++) @@ -901,10 +900,7 @@ void InitElementSpecialGraphicInfo() if (base_redefined && !special_redefined) continue; - if (special == GFX_SPECIAL_ARG_EDITOR) - element_info[element].editor_graphic = graphic; - else if (special == GFX_SPECIAL_ARG_PREVIEW) - element_info[element].preview_graphic = graphic; + element_info[element].special_graphic[special] = graphic; } /* initialize special element/graphic mapping from dynamic configuration */ @@ -914,10 +910,8 @@ void InitElementSpecialGraphicInfo() int special = property_mapping[i].ext3_index; int graphic = property_mapping[i].artwork_index; - if (special == GFX_SPECIAL_ARG_EDITOR) - element_info[element].editor_graphic = graphic; - else if (special == GFX_SPECIAL_ARG_PREVIEW) - element_info[element].preview_graphic = graphic; + if (special >= 0 && special < NUM_SPECIAL_GFX_ARGS) + element_info[element].special_graphic[special] = graphic; } } diff --git a/src/main.h b/src/main.h index b81abcb1..a82e054f 100644 --- a/src/main.h +++ b/src/main.h @@ -797,12 +797,34 @@ /* values for font configuration */ +#define FONT_INITIAL_1 0 +#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 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) -#define NUM_INITIAL_FONTS 4 /* values for game_status */ @@ -1033,9 +1055,13 @@ struct ElementInfo char *custom_description; /* custom description for level editor */ int graphic[NUM_ACTIONS]; /* default graphics for several actions */ + /* special graphics for left/right/up/down */ int direction_graphic[NUM_ACTIONS][NUM_DIRECTIONS]; + /* special graphics for certain screens */ + int special_graphic[NUM_SPECIAL_GFX_ARGS]; + int editor_graphic; /* graphic displayed in level editor */ int preview_graphic; /* graphic displayed in level preview */ diff --git a/src/tools.c b/src/tools.c index 4f9d50fb..fd263d1e 100644 --- a/src/tools.c +++ b/src/tools.c @@ -2376,10 +2376,10 @@ int el2img(int element) int el2edimg(int element) { - return element_info[element].editor_graphic; + return element_info[element].special_graphic[GFX_SPECIAL_ARG_EDITOR]; } int el2preimg(int element) { - return element_info[element].preview_graphic; + return element_info[element].special_graphic[GFX_SPECIAL_ARG_PREVIEW]; }