X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Finit.c;h=3d3a02cc286c95d245c24b7217de926c1c46fdd4;hb=29fc833ae1b5e46a429a9fa82098e8ad94f6f400;hp=31214f1da257086616a35471483ed5c682833f01;hpb=7119b5d2e756b1ab23818ea39d19aece0563bab0;p=rocksndiamonds.git diff --git a/src/init.c b/src/init.c index 31214f1d..3d3a02cc 100644 --- a/src/init.c +++ b/src/init.c @@ -30,32 +30,6 @@ #include "conf_esg.c" /* include auto-generated data structure definitions */ -static char *image_filename[NUM_PICTURES] = -{ -#if 0 - "RocksScreen.pcx", - "RocksDoor.pcx", - "RocksToons.pcx", - "RocksFontBig.pcx", - "RocksFontSmall.pcx", - "RocksFontMedium.pcx", - "RocksFontEM.pcx" -#else - "RocksScreen.pcx", - "RocksElements.pcx", - "RocksDoor.pcx", - "RocksHeroes.pcx", - "RocksToons.pcx", - "RocksSP.pcx", - "RocksDC.pcx", - "RocksMore.pcx", - "RocksFontBig.pcx", - "RocksFontSmall.pcx", - "RocksFontMedium.pcx", - "RocksFontEM.pcx" -#endif -}; - static Bitmap *bitmap_font_initial = NULL; static void InitGlobal(); @@ -193,6 +167,14 @@ static void InitArtworkConfig() static char *direction_suffix[NUM_DIRECTIONS + 1]; static char *special_suffix[NUM_SPECIAL_GFX_ARGS + 1]; static char *dummy[1] = { NULL }; + static char *ignore_image_tokens[] = + { + "name", + "sort_priority", + "menu.main.hide_static_text", + "global.num_toons", + NULL + }; int i; for (i=0; i -1; i++) @@ -837,7 +802,7 @@ void InitElementGraphicInfo() } } -#if 1 +#if 0 #if DEBUG if (options.verbose) { @@ -898,14 +863,21 @@ void InitElementSpecialGraphicInfo() static void InitElementSoundInfo() { - /* soon to come */ + /* !!! soon to come !!! */ } -static void set_graphic_parameters(int graphic, int *parameter) +static void set_graphic_parameters(int graphic, char **parameter_raw) { Bitmap *src_bitmap = getBitmapFromImageID(graphic); int num_xtiles = (src_bitmap ? src_bitmap->width : TILEX) / TILEX; int num_ytiles = (src_bitmap ? src_bitmap->height * 2 / 3 : TILEY) / TILEY; + int parameter[NUM_GFX_ARGS]; + int i; + + /* get integer values from string parameters */ + for (i=0; i < NUM_GFX_ARGS; i++) + parameter[i] = + get_parameter_value(image_config_suffix[i].type, parameter_raw[i]); graphic_info[graphic].bitmap = src_bitmap; @@ -1151,8 +1123,16 @@ static void InitGraphicInfo() clipmasks_initialized = TRUE; } -static void set_sound_parameters(int sound, int *parameter) +static void set_sound_parameters(int sound, char **parameter_raw) { + int parameter[NUM_SND_ARGS]; + int i; + + /* get integer values from string parameters */ + for (i=0; i < NUM_SND_ARGS; i++) + parameter[i] = + get_parameter_value(sound_config_suffix[i].type, parameter_raw[i]); + /* explicit loop mode setting in configuration overrides default value */ if (parameter[SND_ARG_MODE_LOOP] != ARG_UNDEFINED_VALUE) sound_info[sound].loop = parameter[SND_ARG_MODE_LOOP]; @@ -1721,14 +1701,6 @@ void InitElementProperties() EL_EMERALD_RED, EL_EMERALD_PURPLE, EL_DIAMOND, - EL_KEY1, - EL_KEY2, - EL_KEY3, - EL_KEY4, - EL_EM_KEY1, - EL_EM_KEY2, - EL_EM_KEY3, - EL_EM_KEY4, EL_BOMB, EL_NUT, EL_AMOEBA_DROP,