X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Finit.c;h=14acc191bb0038c66c6e4784421cfe51d764b399;hb=ff2510f5098b545a03965c6b95296eec6885a4fb;hp=2c04d701df202a8d07d7a6230573271de540f17f;hpb=56c6c0e7a97a0831480dd9fdac411923b046ba38;p=rocksndiamonds.git diff --git a/src/init.c b/src/init.c index 2c04d701..14acc191 100644 --- a/src/init.c +++ b/src/init.c @@ -74,6 +74,7 @@ static void InitGfxBackground(); static void InitGadgets(); static void InitElementImages(); static void InitElementGraphicInfo(); +static void InitElementEditorGraphicInfo(); static void InitElementSoundInfo(); static void InitElementProperties(); static void InitGraphicInfo(); @@ -189,12 +190,10 @@ static void InitArtworkConfig() static char *sound_class_prefix[MAX_NUM_ELEMENTS + 1]; static char *action_suffix[NUM_ACTIONS + 1]; static char *direction_suffix[NUM_DIRECTIONS + 1]; + static char *special_suffix[NUM_SPECIAL_GFX_ARGS + 1]; static char *dummy[1] = { NULL }; int i; - for (i=0; i game graphic mapping */ + InitElementEditorGraphicInfo(); /* element => editor graphic mapping */ + InitGraphicInfo(); /* graphic => properties mapping */ InitFontInfo(bitmap_font_initial, graphic_info[IMG_FONT_BIG].bitmap, @@ -293,10 +295,10 @@ static void ReinitializeGraphics() static void ReinitializeSounds() { - InitElementSoundInfo(); /* initialize element/sound config info */ - InitSoundInfo(); /* initialize sounds info from config file */ + InitElementSoundInfo(); /* element => game sound mapping */ + InitSoundInfo(); /* sound => properties mapping */ - InitPlaySoundLevel(); /* initialize internal game sound values */ + InitPlaySoundLevel(); /* internal game sound settings */ } static void ReinitializeMusic() @@ -801,8 +803,12 @@ void InitElementGraphicInfo() int element = property_mapping[i].base_index; int action = property_mapping[i].ext1_index; int direction = property_mapping[i].ext2_index; + int special = property_mapping[i].ext3_index; int graphic = property_mapping[i].artwork_index; + if (special != -1) + continue; + if (action < 0) action = ACTION_DEFAULT; @@ -852,6 +858,45 @@ void InitElementGraphicInfo() } } +void InitElementEditorGraphicInfo() +{ + struct PropertyMapping *property_mapping = getImageListPropertyMapping(); + int num_property_mappings = getImageListPropertyMappingSize(); + int i; + + /* always start with reliable default values */ + for (i=0; i