From: Holger Schemel Date: Sun, 15 Jun 2003 01:28:44 +0000 (+0200) Subject: rnd-20030615-1-src X-Git-Tag: 3.0.0^2~49 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=c145af8280c5ad22978e42621bbe5c0f3a8ada3c;p=rocksndiamonds.git rnd-20030615-1-src --- diff --git a/src/conf_e2s.c b/src/conf_e2s.c index 0fef9ca3..76b0dab5 100644 --- a/src/conf_e2s.c +++ b/src/conf_e2s.c @@ -28,6 +28,34 @@ static struct } element_to_sound[] = { + { + EL_INTERNAL_DEFAULT_ELEMENT, TRUE, ACTION_DIGGING, + SND_CLASS_DEFAULT_DIGGING + }, + { + EL_INTERNAL_DEFAULT_ELEMENT, TRUE, ACTION_COLLECTING, + SND_CLASS_DEFAULT_COLLECTING + }, + { + EL_INTERNAL_DEFAULT_ELEMENT, TRUE, ACTION_SNAPPING, + SND_CLASS_DEFAULT_SNAPPING + }, + { + EL_INTERNAL_DEFAULT_ELEMENT, TRUE, ACTION_PUSHING, + SND_CLASS_DEFAULT_PUSHING + }, + { + EL_INTERNAL_DEFAULT_ELEMENT, TRUE, ACTION_IMPACT, + SND_CLASS_DEFAULT_IMPACT + }, + { + EL_INTERNAL_DEFAULT_ELEMENT, TRUE, ACTION_PASSING, + SND_CLASS_DEFAULT_PASSING + }, + { + EL_INTERNAL_DEFAULT_ELEMENT, TRUE, ACTION_EXPLODING, + SND_CLASS_DEFAULT_EXPLODING + }, { EL_BD_DIAMOND, FALSE, ACTION_COLLECTING, SND_BD_DIAMOND_COLLECTING @@ -208,6 +236,10 @@ element_to_sound[] = EL_DIAMOND, FALSE, ACTION_IMPACT, SND_DIAMOND_IMPACT }, + { + EL_DIAMOND_BREAKING, FALSE, -1, + SND_DIAMOND_BREAKING + }, { EL_DIAMOND, FALSE, ACTION_BREAKING, SND_DIAMOND_BREAKING diff --git a/src/conf_gfx.c b/src/conf_gfx.c index 13e23793..9fa20b78 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -3445,6 +3445,8 @@ struct ConfigInfo image_config[] = { "menu.draw_xoffset.SETUP", "0" }, { "menu.draw_yoffset.SETUP", "0" }, + { "menu.list_size", "-1" }, + { "door.step_offset", "2" }, { "door.step_delay", "10" }, diff --git a/src/conf_snd.c b/src/conf_snd.c index 7c61a715..2471514f 100644 --- a/src/conf_snd.c +++ b/src/conf_snd.c @@ -28,6 +28,15 @@ struct ConfigInfo sound_config_suffix[] = struct ConfigInfo sound_config[] = { + /* some default sounds */ + { "[DEFAULT].digging", "schlurf.wav" }, + { "[DEFAULT].collecting", "pong.wav" }, + { "[DEFAULT].snapping", "pong.wav" }, + { "[DEFAULT].pushing", "pusch.wav" }, + { "[DEFAULT].impact", "klopf.wav" }, + { "[DEFAULT].passing", "gate.wav" }, + { "[DEFAULT].exploding", "roaaar.wav" }, + /* sounds for Boulder Dash style elements and actions */ { "bd_diamond.collecting", "pong.wav" }, { "bd_diamond.impact", "pling.wav" }, diff --git a/src/conf_snd.h b/src/conf_snd.h index 91438f12..b6d426c0 100644 --- a/src/conf_snd.h +++ b/src/conf_snd.h @@ -18,175 +18,182 @@ /* values for sounds configuration */ -#define SND_BD_DIAMOND_COLLECTING 0 -#define SND_BD_DIAMOND_IMPACT 1 -#define SND_BD_ROCK_PUSHING 2 -#define SND_BD_ROCK_IMPACT 3 -#define SND_BD_MAGIC_WALL_ACTIVATING 4 -#define SND_BD_MAGIC_WALL_ACTIVE 5 -#define SND_BD_MAGIC_WALL_FILLING 6 -#define SND_BD_AMOEBA_WAITING 7 -#define SND_BD_AMOEBA_GROWING 8 -#define SND_BD_AMOEBA_TURNING_TO_GEM 9 -#define SND_BD_AMOEBA_TURNING_TO_ROCK 10 -#define SND_BD_BUTTERFLY_MOVING 11 -#define SND_BD_BUTTERFLY_WAITING 12 -#define SND_BD_FIREFLY_MOVING 13 -#define SND_BD_FIREFLY_WAITING 14 -#define SND_SP_BASE_DIGGING 15 -#define SND_SP_BUGGY_BASE_DIGGING 16 -#define SND_SP_BUGGY_BASE_ACTIVE 17 -#define SND_SP_INFOTRON_COLLECTING 18 -#define SND_SP_INFOTRON_IMPACT 19 -#define SND_SP_ZONK_PUSHING 20 -#define SND_SP_ZONK_IMPACT 21 -#define SND_SP_DISK_RED_COLLECTING 22 -#define SND_SP_DISK_ORANGE_PUSHING 23 -#define SND_SP_DISK_YELLOW_PUSHING 24 -#define SND_CLASS_SP_PORT_PASSING 25 -#define SND_CLASS_SP_EXIT_PASSING 26 -#define SND_CLASS_SP_EXIT_OPENING 27 -#define SND_SP_SNIKSNAK_MOVING 28 -#define SND_SP_SNIKSNAK_WAITING 29 -#define SND_SP_ELECTRON_MOVING 30 -#define SND_SP_ELECTRON_WAITING 31 -#define SND_SP_TERMINAL_ACTIVATING 32 -#define SND_SP_TERMINAL_ACTIVE 33 -#define SND_CLASS_SOKOBAN_PUSHING 34 -#define SND_CLASS_SOKOBAN_FILLING 35 -#define SND_CLASS_SOKOBAN_EMPTYING 36 -#define SND_EMPTY_SPACE_DIGGING 37 -#define SND_SAND_DIGGING 38 -#define SND_EMERALD_COLLECTING 39 -#define SND_EMERALD_IMPACT 40 -#define SND_DIAMOND_COLLECTING 41 -#define SND_DIAMOND_IMPACT 42 -#define SND_DIAMOND_BREAKING 43 -#define SND_ROCK_PUSHING 44 -#define SND_ROCK_IMPACT 45 -#define SND_BOMB_PUSHING 46 -#define SND_NUT_PUSHING 47 -#define SND_NUT_BREAKING 48 -#define SND_NUT_IMPACT 49 -#define SND_CLASS_DYNAMITE_COLLECTING 50 -#define SND_CLASS_DYNAMITE_DROPPING 51 -#define SND_CLASS_DYNAMITE_ACTIVE 52 -#define SND_CLASS_KEY_COLLECTING 53 -#define SND_CLASS_GATE_PASSING 54 -#define SND_BUG_MOVING 55 -#define SND_BUG_WAITING 56 -#define SND_SPACESHIP_MOVING 57 -#define SND_SPACESHIP_WAITING 58 -#define SND_YAMYAM_MOVING 59 -#define SND_YAMYAM_WAITING 60 -#define SND_YAMYAM_DIGGING 61 -#define SND_ROBOT_MOVING 62 -#define SND_ROBOT_WAITING 63 -#define SND_ROBOT_WHEEL_ACTIVATING 64 -#define SND_ROBOT_WHEEL_ACTIVE 65 -#define SND_MAGIC_WALL_ACTIVATING 66 -#define SND_MAGIC_WALL_ACTIVE 67 -#define SND_MAGIC_WALL_FILLING 68 -#define SND_CLASS_AMOEBA_WAITING 69 -#define SND_CLASS_AMOEBA_GROWING 70 -#define SND_CLASS_AMOEBA_DROPPING 71 -#define SND_ACID_SPLASHING 72 -#define SND_CLASS_QUICKSAND_FILLING 73 -#define SND_CLASS_QUICKSAND_EMPTYING 74 -#define SND_CLASS_EXIT_OPENING 75 -#define SND_CLASS_EXIT_PASSING 76 -#define SND_PENGUIN_PASSING 77 -#define SND_BALLOON_MOVING 78 -#define SND_BALLOON_WAITING 79 -#define SND_BALLOON_PUSHING 80 -#define SND_CLASS_BALLOON_SWITCH_ACTIVATING 81 -#define SND_SPRING_MOVING 82 -#define SND_SPRING_PUSHING 83 -#define SND_SPRING_IMPACT 84 -#define SND_CLASS_WALL_GROWING 85 -#define SND_PEARL_COLLECTING 86 -#define SND_PEARL_BREAKING 87 -#define SND_PEARL_IMPACT 88 -#define SND_CRYSTAL_COLLECTING 89 -#define SND_CRYSTAL_IMPACT 90 -#define SND_ENVELOPE_COLLECTING 91 -#define SND_INVISIBLE_SAND_DIGGING 92 -#define SND_SHIELD_NORMAL_COLLECTING 93 -#define SND_SHIELD_NORMAL_ACTIVE 94 -#define SND_SHIELD_DEADLY_COLLECTING 95 -#define SND_SHIELD_DEADLY_ACTIVE 96 -#define SND_EXTRA_TIME_COLLECTING 97 -#define SND_MOLE_MOVING 98 -#define SND_MOLE_WAITING 99 -#define SND_MOLE_DIGGING 100 -#define SND_CLASS_SWITCHGATE_SWITCH_ACTIVATING 101 -#define SND_CLASS_SWITCHGATE_OPENING 102 -#define SND_CLASS_SWITCHGATE_CLOSING 103 -#define SND_CLASS_SWITCHGATE_PASSING 104 -#define SND_TIMEGATE_SWITCH_ACTIVATING 105 -#define SND_TIMEGATE_SWITCH_ACTIVE 106 -#define SND_TIMEGATE_SWITCH_DEACTIVATING 107 -#define SND_TIMEGATE_OPENING 108 -#define SND_CLASS_TIMEGATE_CLOSING 109 -#define SND_CLASS_TIMEGATE_PASSING 110 -#define SND_CLASS_CONVEYOR_BELT_SWITCH_ACTIVATING 111 -#define SND_CLASS_CONVEYOR_BELT_ACTIVE 112 -#define SND_CLASS_CONVEYOR_BELT_SWITCH_DEACTIVATING 113 -#define SND_LIGHT_SWITCH_ACTIVATING 114 -#define SND_LIGHT_SWITCH_DEACTIVATING 115 -#define SND_DX_SUPABOMB_PUSHING 116 -#define SND_TRAP_DIGGING 117 -#define SND_TRAP_ACTIVATING 118 -#define SND_CLASS_TUBE_PASSING 119 -#define SND_AMOEBA_TURNING_TO_GEM 120 -#define SND_AMOEBA_TURNING_TO_ROCK 121 -#define SND_SPEED_PILL_COLLECTING 122 -#define SND_DYNABOMB_INCREASE_NUMBER_COLLECTING 123 -#define SND_DYNABOMB_INCREASE_SIZE_COLLECTING 124 -#define SND_DYNABOMB_INCREASE_POWER_COLLECTING 125 -#define SND_CLASS_DYNABOMB_DROPPING 126 -#define SND_CLASS_DYNABOMB_ACTIVE 127 -#define SND_SATELLITE_MOVING 128 -#define SND_SATELLITE_WAITING 129 -#define SND_SATELLITE_PUSHING 130 -#define SND_LAMP_ACTIVATING 131 -#define SND_LAMP_DEACTIVATING 132 -#define SND_TIME_ORB_FULL_COLLECTING 133 -#define SND_TIME_ORB_FULL_IMPACT 134 -#define SND_TIME_ORB_EMPTY_PUSHING 135 -#define SND_TIME_ORB_EMPTY_IMPACT 136 -#define SND_GAME_OF_LIFE_WAITING 137 -#define SND_GAME_OF_LIFE_GROWING 138 -#define SND_BIOMAZE_WAITING 139 -#define SND_BIOMAZE_GROWING 140 -#define SND_PACMAN_MOVING 141 -#define SND_PACMAN_WAITING 142 -#define SND_PACMAN_DIGGING 143 -#define SND_DARK_YAMYAM_MOVING 144 -#define SND_DARK_YAMYAM_WAITING 145 -#define SND_DARK_YAMYAM_DIGGING 146 -#define SND_PENGUIN_MOVING 147 -#define SND_PENGUIN_WAITING 148 -#define SND_PIG_MOVING 149 -#define SND_PIG_WAITING 150 -#define SND_PIG_DIGGING 151 -#define SND_DRAGON_MOVING 152 -#define SND_DRAGON_WAITING 153 -#define SND_DRAGON_ATTACKING 154 -#define SND_CLASS_PLAYER_DYING 155 -#define SND_ELEMENT_EXPLODING 156 -#define SND_SP_ELEMENT_EXPLODING 157 -#define SND_GAME_STARTING 158 -#define SND_GAME_RUNNING_OUT_OF_TIME 159 -#define SND_GAME_LEVELTIME_BONUS 160 -#define SND_GAME_LOSING 161 -#define SND_GAME_WINNING 162 -#define SND_GAME_SOKOBAN_SOLVING 163 -#define SND_DOOR_OPENING 164 -#define SND_DOOR_CLOSING 165 -#define SND_BACKGROUND_SCORES 166 -#define SND_BACKGROUND_INFO 167 +#define SND_CLASS_DEFAULT_DIGGING 0 +#define SND_CLASS_DEFAULT_COLLECTING 1 +#define SND_CLASS_DEFAULT_SNAPPING 2 +#define SND_CLASS_DEFAULT_PUSHING 3 +#define SND_CLASS_DEFAULT_IMPACT 4 +#define SND_CLASS_DEFAULT_PASSING 5 +#define SND_CLASS_DEFAULT_EXPLODING 6 +#define SND_BD_DIAMOND_COLLECTING 7 +#define SND_BD_DIAMOND_IMPACT 8 +#define SND_BD_ROCK_PUSHING 9 +#define SND_BD_ROCK_IMPACT 10 +#define SND_BD_MAGIC_WALL_ACTIVATING 11 +#define SND_BD_MAGIC_WALL_ACTIVE 12 +#define SND_BD_MAGIC_WALL_FILLING 13 +#define SND_BD_AMOEBA_WAITING 14 +#define SND_BD_AMOEBA_GROWING 15 +#define SND_BD_AMOEBA_TURNING_TO_GEM 16 +#define SND_BD_AMOEBA_TURNING_TO_ROCK 17 +#define SND_BD_BUTTERFLY_MOVING 18 +#define SND_BD_BUTTERFLY_WAITING 19 +#define SND_BD_FIREFLY_MOVING 20 +#define SND_BD_FIREFLY_WAITING 21 +#define SND_SP_BASE_DIGGING 22 +#define SND_SP_BUGGY_BASE_DIGGING 23 +#define SND_SP_BUGGY_BASE_ACTIVE 24 +#define SND_SP_INFOTRON_COLLECTING 25 +#define SND_SP_INFOTRON_IMPACT 26 +#define SND_SP_ZONK_PUSHING 27 +#define SND_SP_ZONK_IMPACT 28 +#define SND_SP_DISK_RED_COLLECTING 29 +#define SND_SP_DISK_ORANGE_PUSHING 30 +#define SND_SP_DISK_YELLOW_PUSHING 31 +#define SND_CLASS_SP_PORT_PASSING 32 +#define SND_CLASS_SP_EXIT_PASSING 33 +#define SND_CLASS_SP_EXIT_OPENING 34 +#define SND_SP_SNIKSNAK_MOVING 35 +#define SND_SP_SNIKSNAK_WAITING 36 +#define SND_SP_ELECTRON_MOVING 37 +#define SND_SP_ELECTRON_WAITING 38 +#define SND_SP_TERMINAL_ACTIVATING 39 +#define SND_SP_TERMINAL_ACTIVE 40 +#define SND_CLASS_SOKOBAN_PUSHING 41 +#define SND_CLASS_SOKOBAN_FILLING 42 +#define SND_CLASS_SOKOBAN_EMPTYING 43 +#define SND_EMPTY_SPACE_DIGGING 44 +#define SND_SAND_DIGGING 45 +#define SND_EMERALD_COLLECTING 46 +#define SND_EMERALD_IMPACT 47 +#define SND_DIAMOND_COLLECTING 48 +#define SND_DIAMOND_IMPACT 49 +#define SND_DIAMOND_BREAKING 50 +#define SND_ROCK_PUSHING 51 +#define SND_ROCK_IMPACT 52 +#define SND_BOMB_PUSHING 53 +#define SND_NUT_PUSHING 54 +#define SND_NUT_BREAKING 55 +#define SND_NUT_IMPACT 56 +#define SND_CLASS_DYNAMITE_COLLECTING 57 +#define SND_CLASS_DYNAMITE_DROPPING 58 +#define SND_CLASS_DYNAMITE_ACTIVE 59 +#define SND_CLASS_KEY_COLLECTING 60 +#define SND_CLASS_GATE_PASSING 61 +#define SND_BUG_MOVING 62 +#define SND_BUG_WAITING 63 +#define SND_SPACESHIP_MOVING 64 +#define SND_SPACESHIP_WAITING 65 +#define SND_YAMYAM_MOVING 66 +#define SND_YAMYAM_WAITING 67 +#define SND_YAMYAM_DIGGING 68 +#define SND_ROBOT_MOVING 69 +#define SND_ROBOT_WAITING 70 +#define SND_ROBOT_WHEEL_ACTIVATING 71 +#define SND_ROBOT_WHEEL_ACTIVE 72 +#define SND_MAGIC_WALL_ACTIVATING 73 +#define SND_MAGIC_WALL_ACTIVE 74 +#define SND_MAGIC_WALL_FILLING 75 +#define SND_CLASS_AMOEBA_WAITING 76 +#define SND_CLASS_AMOEBA_GROWING 77 +#define SND_CLASS_AMOEBA_DROPPING 78 +#define SND_ACID_SPLASHING 79 +#define SND_CLASS_QUICKSAND_FILLING 80 +#define SND_CLASS_QUICKSAND_EMPTYING 81 +#define SND_CLASS_EXIT_OPENING 82 +#define SND_CLASS_EXIT_PASSING 83 +#define SND_PENGUIN_PASSING 84 +#define SND_BALLOON_MOVING 85 +#define SND_BALLOON_WAITING 86 +#define SND_BALLOON_PUSHING 87 +#define SND_CLASS_BALLOON_SWITCH_ACTIVATING 88 +#define SND_SPRING_MOVING 89 +#define SND_SPRING_PUSHING 90 +#define SND_SPRING_IMPACT 91 +#define SND_CLASS_WALL_GROWING 92 +#define SND_PEARL_COLLECTING 93 +#define SND_PEARL_BREAKING 94 +#define SND_PEARL_IMPACT 95 +#define SND_CRYSTAL_COLLECTING 96 +#define SND_CRYSTAL_IMPACT 97 +#define SND_ENVELOPE_COLLECTING 98 +#define SND_INVISIBLE_SAND_DIGGING 99 +#define SND_SHIELD_NORMAL_COLLECTING 100 +#define SND_SHIELD_NORMAL_ACTIVE 101 +#define SND_SHIELD_DEADLY_COLLECTING 102 +#define SND_SHIELD_DEADLY_ACTIVE 103 +#define SND_EXTRA_TIME_COLLECTING 104 +#define SND_MOLE_MOVING 105 +#define SND_MOLE_WAITING 106 +#define SND_MOLE_DIGGING 107 +#define SND_CLASS_SWITCHGATE_SWITCH_ACTIVATING 108 +#define SND_CLASS_SWITCHGATE_OPENING 109 +#define SND_CLASS_SWITCHGATE_CLOSING 110 +#define SND_CLASS_SWITCHGATE_PASSING 111 +#define SND_TIMEGATE_SWITCH_ACTIVATING 112 +#define SND_TIMEGATE_SWITCH_ACTIVE 113 +#define SND_TIMEGATE_SWITCH_DEACTIVATING 114 +#define SND_TIMEGATE_OPENING 115 +#define SND_CLASS_TIMEGATE_CLOSING 116 +#define SND_CLASS_TIMEGATE_PASSING 117 +#define SND_CLASS_CONVEYOR_BELT_SWITCH_ACTIVATING 118 +#define SND_CLASS_CONVEYOR_BELT_ACTIVE 119 +#define SND_CLASS_CONVEYOR_BELT_SWITCH_DEACTIVATING 120 +#define SND_LIGHT_SWITCH_ACTIVATING 121 +#define SND_LIGHT_SWITCH_DEACTIVATING 122 +#define SND_DX_SUPABOMB_PUSHING 123 +#define SND_TRAP_DIGGING 124 +#define SND_TRAP_ACTIVATING 125 +#define SND_CLASS_TUBE_PASSING 126 +#define SND_AMOEBA_TURNING_TO_GEM 127 +#define SND_AMOEBA_TURNING_TO_ROCK 128 +#define SND_SPEED_PILL_COLLECTING 129 +#define SND_DYNABOMB_INCREASE_NUMBER_COLLECTING 130 +#define SND_DYNABOMB_INCREASE_SIZE_COLLECTING 131 +#define SND_DYNABOMB_INCREASE_POWER_COLLECTING 132 +#define SND_CLASS_DYNABOMB_DROPPING 133 +#define SND_CLASS_DYNABOMB_ACTIVE 134 +#define SND_SATELLITE_MOVING 135 +#define SND_SATELLITE_WAITING 136 +#define SND_SATELLITE_PUSHING 137 +#define SND_LAMP_ACTIVATING 138 +#define SND_LAMP_DEACTIVATING 139 +#define SND_TIME_ORB_FULL_COLLECTING 140 +#define SND_TIME_ORB_FULL_IMPACT 141 +#define SND_TIME_ORB_EMPTY_PUSHING 142 +#define SND_TIME_ORB_EMPTY_IMPACT 143 +#define SND_GAME_OF_LIFE_WAITING 144 +#define SND_GAME_OF_LIFE_GROWING 145 +#define SND_BIOMAZE_WAITING 146 +#define SND_BIOMAZE_GROWING 147 +#define SND_PACMAN_MOVING 148 +#define SND_PACMAN_WAITING 149 +#define SND_PACMAN_DIGGING 150 +#define SND_DARK_YAMYAM_MOVING 151 +#define SND_DARK_YAMYAM_WAITING 152 +#define SND_DARK_YAMYAM_DIGGING 153 +#define SND_PENGUIN_MOVING 154 +#define SND_PENGUIN_WAITING 155 +#define SND_PIG_MOVING 156 +#define SND_PIG_WAITING 157 +#define SND_PIG_DIGGING 158 +#define SND_DRAGON_MOVING 159 +#define SND_DRAGON_WAITING 160 +#define SND_DRAGON_ATTACKING 161 +#define SND_CLASS_PLAYER_DYING 162 +#define SND_ELEMENT_EXPLODING 163 +#define SND_SP_ELEMENT_EXPLODING 164 +#define SND_GAME_STARTING 165 +#define SND_GAME_RUNNING_OUT_OF_TIME 166 +#define SND_GAME_LEVELTIME_BONUS 167 +#define SND_GAME_LOSING 168 +#define SND_GAME_WINNING 169 +#define SND_GAME_SOKOBAN_SOLVING 170 +#define SND_DOOR_OPENING 171 +#define SND_DOOR_CLOSING 172 +#define SND_BACKGROUND_SCORES 173 +#define SND_BACKGROUND_INFO 174 -#define NUM_SOUND_FILES 168 +#define NUM_SOUND_FILES 175 #endif /* CONF_SND_H */ diff --git a/src/conftime.h b/src/conftime.h index bc437b85..b80e0109 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2003-06-14 14:45]" +#define COMPILE_DATE_STRING "[2003-06-15 03:27]" diff --git a/src/editor.c b/src/editor.c index b9e1bd0a..e56fa695 100644 --- a/src/editor.c +++ b/src/editor.c @@ -122,7 +122,7 @@ #define ED_AREA_ELEM_CONTENT4_YPOS (ED_SETTINGS_YPOS(2) + \ ED_GADGET_DISTANCE - MINI_TILEY) /* custom change trigger element */ -#define ED_AREA_ELEM_CONTENT5_XPOS (29 * MINI_TILEX) +#define ED_AREA_ELEM_CONTENT5_XPOS (30 * MINI_TILEX + MINI_TILEX / 2) #define ED_AREA_ELEM_CONTENT5_YPOS (ED_SETTINGS_YPOS(7) + \ ED_GADGET_DISTANCE) @@ -936,6 +936,7 @@ static struct ValueTextInfo options_change_other_action[] = { CE_OTHER_COLLECTING, "collecting" }, { CE_OTHER_PUSHING, "pushing" }, { CE_OTHER_CHANGING, "change of" }, + { CE_OTHER_EXPLODING, "explosion of" }, { -1, NULL } }; static int value_change_other_action = 0; @@ -3534,7 +3535,8 @@ static void CopyCustomElementPropertiesToEditor(int element) /* set change by other element action selectbox help value */ value_change_other_action = - (HAS_CHANGE_EVENT(element, CE_OTHER_CHANGING) ? CE_OTHER_CHANGING : + (HAS_CHANGE_EVENT(element, CE_OTHER_EXPLODING) ? CE_OTHER_EXPLODING : + HAS_CHANGE_EVENT(element, CE_OTHER_CHANGING) ? CE_OTHER_CHANGING : HAS_CHANGE_EVENT(element, CE_OTHER_PUSHING) ? CE_OTHER_PUSHING : HAS_CHANGE_EVENT(element, CE_OTHER_COLLECTING) ? CE_OTHER_COLLECTING : CE_OTHER_COLLECTING); @@ -3597,6 +3599,7 @@ static void CopyCustomElementPropertiesToGame(int element) custom_element_change_events[CE_OTHER_COLLECTING] = FALSE; custom_element_change_events[CE_OTHER_PUSHING] = FALSE; custom_element_change_events[CE_OTHER_CHANGING] = FALSE; + custom_element_change_events[CE_OTHER_EXPLODING] = FALSE; custom_element_change_events[value_change_other_action] = custom_element_change_events[CE_BY_OTHER]; diff --git a/src/files.c b/src/files.c index d6611204..83e7b0bb 100644 --- a/src/files.c +++ b/src/files.c @@ -1929,16 +1929,19 @@ void LoadSpecialMenuDesignSettings() if ((setup_file_hash = loadSetupFileHash(filename)) == NULL) return; - /* special case: initialize with default values that may be overwrittem */ + /* special case: initialize with default values that may be overwritten */ for (i=0; i < NUM_SPECIAL_GFX_ARGS; i++) { char *value_x = getHashEntry(setup_file_hash, "menu.draw_xoffset"); char *value_y = getHashEntry(setup_file_hash, "menu.draw_yoffset"); + char *list_size = getHashEntry(setup_file_hash, "menu.list_size"); if (value_x != NULL) menu.draw_xoffset[i] = get_integer_from_string(value_x); if (value_y != NULL) menu.draw_yoffset[i] = get_integer_from_string(value_y); + if (list_size != NULL) + menu.list_size[i] = get_integer_from_string(list_size); } /* read (and overwrite with) values that may be specified in config file */ diff --git a/src/init.c b/src/init.c index 77cf39a0..57b1bd11 100644 --- a/src/init.c +++ b/src/init.c @@ -872,51 +872,52 @@ static void InitElementSoundInfo() element_info[j].sound[action] = sound; } - /* initialize element/sound mapping from dynamic configuration */ + /* initialize element class/sound mapping from dynamic configuration */ for (i=0; i < num_property_mappings; i++) { - int element = property_mapping[i].base_index; - int action = property_mapping[i].ext1_index; - int sound = property_mapping[i].artwork_index; + int element_class = property_mapping[i].base_index - MAX_NUM_ELEMENTS; + int action = property_mapping[i].ext1_index; + int sound = property_mapping[i].artwork_index; - if (element >= MAX_NUM_ELEMENTS) + if (element_class < 0 || element_class >= MAX_NUM_ELEMENTS) continue; if (action < 0) action = ACTION_DEFAULT; - element_info[element].sound[action] = sound; + for (j=0; j < MAX_NUM_ELEMENTS; j++) + if (strcmp(element_info[j].class_name, + element_info[element_class].class_name) == 0) + element_info[j].sound[action] = sound; } - /* initialize element class/sound mapping from dynamic configuration */ + /* initialize element/sound mapping from dynamic configuration */ for (i=0; i < num_property_mappings; i++) { - int element_class = property_mapping[i].base_index - MAX_NUM_ELEMENTS; - int action = property_mapping[i].ext1_index; - int sound = property_mapping[i].artwork_index; + int element = property_mapping[i].base_index; + int action = property_mapping[i].ext1_index; + int sound = property_mapping[i].artwork_index; - if (element_class < 0 || element_class >= MAX_NUM_ELEMENTS) + if (element >= MAX_NUM_ELEMENTS) continue; if (action < 0) action = ACTION_DEFAULT; - for (j=0; j < MAX_NUM_ELEMENTS; j++) - if (strcmp(element_info[j].class_name, - element_info[element_class].class_name) == 0) - element_info[j].sound[action] = sound; + element_info[element].sound[action] = sound; } /* now set all '-1' values to element specific default values */ for (i=0; i 2 ? \ + menu.list_size[game_status] : \ + MAX_MENU_ENTRIES_ON_SCREEN) + #if defined(TARGET_X11_NATIVE_PERFORMANCE_WORKAROUND) #define NUM_SCROLLBAR_BITMAPS 2 static Bitmap *scrollbar_bitmap[NUM_SCROLLBAR_BITMAPS]; @@ -298,10 +302,10 @@ static void gotoTopLevelDir() int num_page_entries; int cl_first, cl_cursor; - if (num_leveldirs <= MAX_MENU_ENTRIES_ON_SCREEN) + if (num_leveldirs <= NUM_MENU_ENTRIES_ON_SCREEN) num_page_entries = num_leveldirs; else - num_page_entries = MAX_MENU_ENTRIES_ON_SCREEN; + num_page_entries = NUM_MENU_ENTRIES_ON_SCREEN; cl_first = MAX(0, leveldir_pos - num_page_entries + 1); cl_cursor = leveldir_pos - cl_first; @@ -1194,7 +1198,7 @@ static void AdjustChooseTreeScrollbar(int id, int first_entry, TreeInfo *ti) int items_max, items_visible, item_position; items_max = numTreeInfoInGroup(ti); - items_visible = MAX_MENU_ENTRIES_ON_SCREEN; + items_visible = NUM_MENU_ENTRIES_ON_SCREEN; item_position = first_entry; if (item_position > items_max - items_visible) @@ -1295,10 +1299,10 @@ static void HandleChooseTree(int mx, int my, int dx, int dy, int button, int num_entries = numTreeInfoInGroup(ti); int num_page_entries; - if (num_entries <= MAX_MENU_ENTRIES_ON_SCREEN) + if (num_entries <= NUM_MENU_ENTRIES_ON_SCREEN) num_page_entries = num_entries; else - num_page_entries = MAX_MENU_ENTRIES_ON_SCREEN; + num_page_entries = NUM_MENU_ENTRIES_ON_SCREEN; if (button == MB_MENU_INITIALIZE) { @@ -1532,7 +1536,7 @@ static void drawHallOfFameList(int first_entry, int highlight_position) DrawText(mSX + 80, mSY + 8, "Hall Of Fame", FONT_TITLE_1); DrawTextFCentered(46, FONT_TITLE_2, "HighScores of Level %d", level_nr); - for(i=0; i 0) { - if (first_entry + MAX_MENU_ENTRIES_ON_SCREEN < MAX_SCORE_ENTRIES) + if (first_entry + NUM_MENU_ENTRIES_ON_SCREEN < MAX_SCORE_ENTRIES) { first_entry += step; - if (first_entry + MAX_MENU_ENTRIES_ON_SCREEN > MAX_SCORE_ENTRIES) - first_entry = MAX(0, MAX_SCORE_ENTRIES - MAX_MENU_ENTRIES_ON_SCREEN); + if (first_entry + NUM_MENU_ENTRIES_ON_SCREEN > MAX_SCORE_ENTRIES) + first_entry = MAX(0, MAX_SCORE_ENTRIES - NUM_MENU_ENTRIES_ON_SCREEN); drawHallOfFameList(first_entry, highlight_position); return; @@ -1981,7 +1985,7 @@ static void DrawSetupScreen_Generic() DrawText(mSX + 16, mSY + 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++) + for(i=0; setup_info[i].type != 0 && i < NUM_MENU_ENTRIES_ON_SCREEN; i++) { void *value_ptr = setup_info[i].value; int ypos = MENU_SCREEN_START_YPOS + i; @@ -2877,7 +2881,7 @@ static void CreateScreenScrollbars() struct GadgetInfo *gi; int items_max, items_visible, item_position; unsigned long event_mask; - int num_page_entries = MAX_MENU_ENTRIES_ON_SCREEN; + int num_page_entries = NUM_MENU_ENTRIES_ON_SCREEN; int id = scrollbar_info[i].gadget_id; items_max = num_page_entries; @@ -2981,7 +2985,7 @@ void MapChooseTreeGadgets(TreeInfo *ti) int num_entries = numTreeInfoInGroup(ti); int i; - if (num_entries <= MAX_MENU_ENTRIES_ON_SCREEN) + if (num_entries <= NUM_MENU_ENTRIES_ON_SCREEN) return; for (i=0; i