rnd-20030628-3-src
authorHolger Schemel <info@artsoft.org>
Sat, 28 Jun 2003 17:39:00 +0000 (19:39 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:42:24 +0000 (10:42 +0200)
src/conf_e2s.c
src/conf_snd.c
src/conf_snd.h
src/conftime.h
src/game.c
src/init.c
src/main.c
src/main.h

index fc2ad2a5330bbdcd0f357d28a9d98a957f9c0375..6e229df276c147bd90caf18ae9ba2ef334bdb66e 100644 (file)
@@ -48,6 +48,10 @@ element_to_sound[] =
     EL_DEFAULT, TRUE,                          ACTION_IMPACT,
     SND_CLASS_DEFAULT_IMPACT
   },
+  {
+    EL_DEFAULT, TRUE,                          ACTION_WALKING,
+    SND_CLASS_DEFAULT_WALKING
+  },
   {
     EL_DEFAULT, TRUE,                          ACTION_PASSING,
     SND_CLASS_DEFAULT_PASSING
@@ -581,8 +585,8 @@ element_to_sound[] =
     SND_TRAP_ACTIVATING
   },
   {
-    EL_TUBE_ANY, TRUE,                         ACTION_PASSING,
-    SND_CLASS_TUBE_PASSING
+    EL_TUBE_ANY, TRUE,                         ACTION_WALKING,
+    SND_CLASS_TUBE_WALKING
   },
   {
     EL_SPEED_PILL, FALSE,                      ACTION_COLLECTING,
index 799ab6ca89e8e5164dae89fae7ebeca4552ce271..8a90bea9ed1ea548aef2594ebdd7654e18f0cbb8 100644 (file)
@@ -34,6 +34,7 @@ struct ConfigInfo sound_config[] =
   { "[default].snapping",              "pong.wav"              },
   { "[default].pushing",               "pusch.wav"             },
   { "[default].impact",                        "klopf.wav"             },
+  { "[default].walking",               "empty.wav"             },
   { "[default].passing",               "gate.wav"              },
   { "[default].dying",                 "autsch.wav"            },
   { "[default].exploding",             "roaaar.wav"            },
@@ -173,7 +174,7 @@ struct ConfigInfo sound_config[] =
   { "dx_supabomb.pushing",             "pusch.wav"             },
   { "trap.digging",                    "schlurf.wav"           },
   { "trap.activating",                 UNDEFINED_FILENAME      },
-  { "[tube].passing",                  UNDEFINED_FILENAME      },
+  { "[tube].walking",                  UNDEFINED_FILENAME      },
 
   /* sounds for Rocks'n'Diamonds style elements and actions */
   { "amoeba.turning_to_gem",           "pling.wav"             },
index e34b2968132c43c2ee42fc3070859a71db02f618..94366024764911dc3940936b0885a65d842fefaa 100644 (file)
 #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_DYING                                        6
-#define SND_CLASS_DEFAULT_EXPLODING                            7
-#define SND_CLASS_SP_DEFAULT_EXPLODING                         8
-#define SND_BD_DIAMOND_COLLECTING                              9
-#define SND_BD_DIAMOND_IMPACT                          10
-#define SND_BD_ROCK_PUSHING                                    11
-#define SND_BD_ROCK_IMPACT                                     12
-#define SND_BD_MAGIC_WALL_ACTIVATING                   13
-#define SND_BD_MAGIC_WALL_ACTIVE                               14
-#define SND_BD_MAGIC_WALL_FILLING                              15
-#define SND_BD_AMOEBA_WAITING                          16
-#define SND_BD_AMOEBA_GROWING                          17
-#define SND_BD_AMOEBA_TURNING_TO_GEM                   18
-#define SND_BD_AMOEBA_TURNING_TO_ROCK                  19
-#define SND_BD_BUTTERFLY_MOVING                                20
-#define SND_BD_BUTTERFLY_WAITING                               21
-#define SND_BD_FIREFLY_MOVING                          22
-#define SND_BD_FIREFLY_WAITING                         23
-#define SND_SP_BASE_DIGGING                                    24
-#define SND_SP_BUGGY_BASE_DIGGING                              25
-#define SND_SP_BUGGY_BASE_ACTIVE                               26
-#define SND_SP_INFOTRON_COLLECTING                             27
-#define SND_SP_INFOTRON_IMPACT                         28
-#define SND_SP_ZONK_PUSHING                                    29
-#define SND_SP_ZONK_IMPACT                                     30
-#define SND_SP_DISK_RED_COLLECTING                             31
-#define SND_SP_DISK_ORANGE_PUSHING                             32
-#define SND_SP_DISK_YELLOW_PUSHING                             33
-#define SND_CLASS_SP_PORT_PASSING                              34
-#define SND_CLASS_SP_EXIT_PASSING                              35
-#define SND_CLASS_SP_EXIT_OPENING                              36
-#define SND_SP_SNIKSNAK_MOVING                         37
-#define SND_SP_SNIKSNAK_WAITING                                38
-#define SND_SP_ELECTRON_MOVING                         39
-#define SND_SP_ELECTRON_WAITING                                40
-#define SND_SP_TERMINAL_ACTIVATING                             41
-#define SND_SP_TERMINAL_ACTIVE                         42
-#define SND_CLASS_SOKOBAN_PUSHING                              43
-#define SND_CLASS_SOKOBAN_FILLING                              44
-#define SND_CLASS_SOKOBAN_EMPTYING                             45
-#define SND_CLASS_PLAYER_MOVING                                        46
-#define SND_SAND_DIGGING                                       47
-#define SND_EMERALD_COLLECTING                         48
-#define SND_EMERALD_IMPACT                                     49
-#define SND_DIAMOND_COLLECTING                         50
-#define SND_DIAMOND_IMPACT                                     51
-#define SND_DIAMOND_BREAKING                           52
-#define SND_ROCK_PUSHING                                       53
-#define SND_ROCK_IMPACT                                        54
-#define SND_BOMB_PUSHING                                       55
-#define SND_NUT_PUSHING                                        56
-#define SND_NUT_BREAKING                                       57
-#define SND_NUT_IMPACT                                 58
-#define SND_CLASS_DYNAMITE_COLLECTING                          59
-#define SND_CLASS_DYNAMITE_DROPPING                            60
-#define SND_CLASS_DYNAMITE_ACTIVE                              61
-#define SND_CLASS_KEY_COLLECTING                               62
-#define SND_CLASS_GATE_PASSING                                 63
-#define SND_BUG_MOVING                                 64
-#define SND_BUG_WAITING                                        65
-#define SND_SPACESHIP_MOVING                           66
-#define SND_SPACESHIP_WAITING                          67
-#define SND_YAMYAM_MOVING                                      68
-#define SND_YAMYAM_WAITING                                     69
-#define SND_YAMYAM_DIGGING                                     70
-#define SND_ROBOT_MOVING                                       71
-#define SND_ROBOT_WAITING                                      72
-#define SND_ROBOT_WHEEL_ACTIVATING                             73
-#define SND_ROBOT_WHEEL_ACTIVE                         74
-#define SND_MAGIC_WALL_ACTIVATING                              75
-#define SND_MAGIC_WALL_ACTIVE                          76
-#define SND_MAGIC_WALL_FILLING                         77
-#define SND_CLASS_AMOEBA_WAITING                               78
-#define SND_CLASS_AMOEBA_GROWING                               79
-#define SND_CLASS_AMOEBA_DROPPING                              80
-#define SND_ACID_SPLASHING                                     81
-#define SND_CLASS_QUICKSAND_FILLING                            82
-#define SND_CLASS_QUICKSAND_EMPTYING                           83
-#define SND_CLASS_EXIT_OPENING                                 84
-#define SND_CLASS_EXIT_PASSING                                 85
-#define SND_PENGUIN_PASSING                                    86
-#define SND_BALLOON_MOVING                                     87
-#define SND_BALLOON_WAITING                                    88
-#define SND_BALLOON_PUSHING                                    89
-#define SND_CLASS_BALLOON_SWITCH_ACTIVATING                    90
-#define SND_SPRING_MOVING                                      91
-#define SND_SPRING_PUSHING                                     92
-#define SND_SPRING_IMPACT                                      93
-#define SND_CLASS_WALL_GROWING                                 94
-#define SND_PEARL_COLLECTING                           95
-#define SND_PEARL_BREAKING                                     96
-#define SND_PEARL_IMPACT                                       97
-#define SND_CRYSTAL_COLLECTING                         98
-#define SND_CRYSTAL_IMPACT                                     99
-#define SND_ENVELOPE_COLLECTING                                100
-#define SND_INVISIBLE_SAND_DIGGING                             101
-#define SND_SHIELD_NORMAL_COLLECTING                   102
-#define SND_SHIELD_NORMAL_ACTIVE                               103
-#define SND_SHIELD_DEADLY_COLLECTING                   104
-#define SND_SHIELD_DEADLY_ACTIVE                               105
-#define SND_EXTRA_TIME_COLLECTING                              106
-#define SND_MOLE_MOVING                                        107
-#define SND_MOLE_WAITING                                       108
-#define SND_MOLE_DIGGING                                       109
-#define SND_CLASS_SWITCHGATE_SWITCH_ACTIVATING                 110
-#define SND_CLASS_SWITCHGATE_OPENING                           111
-#define SND_CLASS_SWITCHGATE_CLOSING                           112
-#define SND_CLASS_SWITCHGATE_PASSING                           113
-#define SND_TIMEGATE_SWITCH_ACTIVATING                 114
-#define SND_TIMEGATE_SWITCH_ACTIVE                             115
-#define SND_TIMEGATE_SWITCH_DEACTIVATING                       116
-#define SND_TIMEGATE_OPENING                           117
-#define SND_CLASS_TIMEGATE_CLOSING                             118
-#define SND_CLASS_TIMEGATE_PASSING                             119
-#define SND_CLASS_CONVEYOR_BELT_SWITCH_ACTIVATING              120
-#define SND_CLASS_CONVEYOR_BELT_ACTIVE                         121
-#define SND_CLASS_CONVEYOR_BELT_SWITCH_DEACTIVATING            122
-#define SND_LIGHT_SWITCH_ACTIVATING                            123
-#define SND_LIGHT_SWITCH_DEACTIVATING                  124
-#define SND_DX_SUPABOMB_PUSHING                                125
-#define SND_TRAP_DIGGING                                       126
-#define SND_TRAP_ACTIVATING                                    127
-#define SND_CLASS_TUBE_PASSING                                 128
-#define SND_AMOEBA_TURNING_TO_GEM                              129
-#define SND_AMOEBA_TURNING_TO_ROCK                             130
-#define SND_SPEED_PILL_COLLECTING                              131
-#define SND_DYNABOMB_INCREASE_NUMBER_COLLECTING                132
-#define SND_DYNABOMB_INCREASE_SIZE_COLLECTING          133
-#define SND_DYNABOMB_INCREASE_POWER_COLLECTING         134
-#define SND_CLASS_DYNABOMB_DROPPING                            135
-#define SND_CLASS_DYNABOMB_ACTIVE                              136
-#define SND_SATELLITE_MOVING                           137
-#define SND_SATELLITE_WAITING                          138
-#define SND_SATELLITE_PUSHING                          139
-#define SND_LAMP_ACTIVATING                                    140
-#define SND_LAMP_DEACTIVATING                          141
-#define SND_TIME_ORB_FULL_COLLECTING                   142
-#define SND_TIME_ORB_FULL_IMPACT                               143
-#define SND_TIME_ORB_EMPTY_PUSHING                             144
-#define SND_TIME_ORB_EMPTY_IMPACT                              145
-#define SND_GAME_OF_LIFE_WAITING                               146
-#define SND_GAME_OF_LIFE_GROWING                               147
-#define SND_BIOMAZE_WAITING                                    148
-#define SND_BIOMAZE_GROWING                                    149
-#define SND_PACMAN_MOVING                                      150
-#define SND_PACMAN_WAITING                                     151
-#define SND_PACMAN_DIGGING                                     152
-#define SND_DARK_YAMYAM_MOVING                         153
-#define SND_DARK_YAMYAM_WAITING                                154
-#define SND_DARK_YAMYAM_DIGGING                                155
-#define SND_PENGUIN_MOVING                                     156
-#define SND_PENGUIN_WAITING                                    157
-#define SND_PIG_MOVING                                 158
-#define SND_PIG_WAITING                                        159
-#define SND_PIG_DIGGING                                        160
-#define SND_DRAGON_MOVING                                      161
-#define SND_DRAGON_WAITING                                     162
-#define SND_DRAGON_ATTACKING                           163
-#define SND_GAME_STARTING                                      164
-#define SND_GAME_RUNNING_OUT_OF_TIME                   165
-#define SND_GAME_LEVELTIME_BONUS                               166
-#define SND_GAME_LOSING                                        167
-#define SND_GAME_WINNING                                       168
-#define SND_GAME_SOKOBAN_SOLVING                               169
-#define SND_DOOR_OPENING                                       170
-#define SND_DOOR_CLOSING                                       171
-#define SND_BACKGROUND_SCORES                          172
-#define SND_BACKGROUND_INFO                                    173
+#define SND_CLASS_DEFAULT_WALKING                              5
+#define SND_CLASS_DEFAULT_PASSING                              6
+#define SND_CLASS_DEFAULT_DYING                                        7
+#define SND_CLASS_DEFAULT_EXPLODING                            8
+#define SND_CLASS_SP_DEFAULT_EXPLODING                         9
+#define SND_BD_DIAMOND_COLLECTING                              10
+#define SND_BD_DIAMOND_IMPACT                          11
+#define SND_BD_ROCK_PUSHING                                    12
+#define SND_BD_ROCK_IMPACT                                     13
+#define SND_BD_MAGIC_WALL_ACTIVATING                   14
+#define SND_BD_MAGIC_WALL_ACTIVE                               15
+#define SND_BD_MAGIC_WALL_FILLING                              16
+#define SND_BD_AMOEBA_WAITING                          17
+#define SND_BD_AMOEBA_GROWING                          18
+#define SND_BD_AMOEBA_TURNING_TO_GEM                   19
+#define SND_BD_AMOEBA_TURNING_TO_ROCK                  20
+#define SND_BD_BUTTERFLY_MOVING                                21
+#define SND_BD_BUTTERFLY_WAITING                               22
+#define SND_BD_FIREFLY_MOVING                          23
+#define SND_BD_FIREFLY_WAITING                         24
+#define SND_SP_BASE_DIGGING                                    25
+#define SND_SP_BUGGY_BASE_DIGGING                              26
+#define SND_SP_BUGGY_BASE_ACTIVE                               27
+#define SND_SP_INFOTRON_COLLECTING                             28
+#define SND_SP_INFOTRON_IMPACT                         29
+#define SND_SP_ZONK_PUSHING                                    30
+#define SND_SP_ZONK_IMPACT                                     31
+#define SND_SP_DISK_RED_COLLECTING                             32
+#define SND_SP_DISK_ORANGE_PUSHING                             33
+#define SND_SP_DISK_YELLOW_PUSHING                             34
+#define SND_CLASS_SP_PORT_PASSING                              35
+#define SND_CLASS_SP_EXIT_PASSING                              36
+#define SND_CLASS_SP_EXIT_OPENING                              37
+#define SND_SP_SNIKSNAK_MOVING                         38
+#define SND_SP_SNIKSNAK_WAITING                                39
+#define SND_SP_ELECTRON_MOVING                         40
+#define SND_SP_ELECTRON_WAITING                                41
+#define SND_SP_TERMINAL_ACTIVATING                             42
+#define SND_SP_TERMINAL_ACTIVE                         43
+#define SND_CLASS_SOKOBAN_PUSHING                              44
+#define SND_CLASS_SOKOBAN_FILLING                              45
+#define SND_CLASS_SOKOBAN_EMPTYING                             46
+#define SND_CLASS_PLAYER_MOVING                                        47
+#define SND_SAND_DIGGING                                       48
+#define SND_EMERALD_COLLECTING                         49
+#define SND_EMERALD_IMPACT                                     50
+#define SND_DIAMOND_COLLECTING                         51
+#define SND_DIAMOND_IMPACT                                     52
+#define SND_DIAMOND_BREAKING                           53
+#define SND_ROCK_PUSHING                                       54
+#define SND_ROCK_IMPACT                                        55
+#define SND_BOMB_PUSHING                                       56
+#define SND_NUT_PUSHING                                        57
+#define SND_NUT_BREAKING                                       58
+#define SND_NUT_IMPACT                                 59
+#define SND_CLASS_DYNAMITE_COLLECTING                          60
+#define SND_CLASS_DYNAMITE_DROPPING                            61
+#define SND_CLASS_DYNAMITE_ACTIVE                              62
+#define SND_CLASS_KEY_COLLECTING                               63
+#define SND_CLASS_GATE_PASSING                                 64
+#define SND_BUG_MOVING                                 65
+#define SND_BUG_WAITING                                        66
+#define SND_SPACESHIP_MOVING                           67
+#define SND_SPACESHIP_WAITING                          68
+#define SND_YAMYAM_MOVING                                      69
+#define SND_YAMYAM_WAITING                                     70
+#define SND_YAMYAM_DIGGING                                     71
+#define SND_ROBOT_MOVING                                       72
+#define SND_ROBOT_WAITING                                      73
+#define SND_ROBOT_WHEEL_ACTIVATING                             74
+#define SND_ROBOT_WHEEL_ACTIVE                         75
+#define SND_MAGIC_WALL_ACTIVATING                              76
+#define SND_MAGIC_WALL_ACTIVE                          77
+#define SND_MAGIC_WALL_FILLING                         78
+#define SND_CLASS_AMOEBA_WAITING                               79
+#define SND_CLASS_AMOEBA_GROWING                               80
+#define SND_CLASS_AMOEBA_DROPPING                              81
+#define SND_ACID_SPLASHING                                     82
+#define SND_CLASS_QUICKSAND_FILLING                            83
+#define SND_CLASS_QUICKSAND_EMPTYING                           84
+#define SND_CLASS_EXIT_OPENING                                 85
+#define SND_CLASS_EXIT_PASSING                                 86
+#define SND_PENGUIN_PASSING                                    87
+#define SND_BALLOON_MOVING                                     88
+#define SND_BALLOON_WAITING                                    89
+#define SND_BALLOON_PUSHING                                    90
+#define SND_CLASS_BALLOON_SWITCH_ACTIVATING                    91
+#define SND_SPRING_MOVING                                      92
+#define SND_SPRING_PUSHING                                     93
+#define SND_SPRING_IMPACT                                      94
+#define SND_CLASS_WALL_GROWING                                 95
+#define SND_PEARL_COLLECTING                           96
+#define SND_PEARL_BREAKING                                     97
+#define SND_PEARL_IMPACT                                       98
+#define SND_CRYSTAL_COLLECTING                         99
+#define SND_CRYSTAL_IMPACT                                     100
+#define SND_ENVELOPE_COLLECTING                                101
+#define SND_INVISIBLE_SAND_DIGGING                             102
+#define SND_SHIELD_NORMAL_COLLECTING                   103
+#define SND_SHIELD_NORMAL_ACTIVE                               104
+#define SND_SHIELD_DEADLY_COLLECTING                   105
+#define SND_SHIELD_DEADLY_ACTIVE                               106
+#define SND_EXTRA_TIME_COLLECTING                              107
+#define SND_MOLE_MOVING                                        108
+#define SND_MOLE_WAITING                                       109
+#define SND_MOLE_DIGGING                                       110
+#define SND_CLASS_SWITCHGATE_SWITCH_ACTIVATING                 111
+#define SND_CLASS_SWITCHGATE_OPENING                           112
+#define SND_CLASS_SWITCHGATE_CLOSING                           113
+#define SND_CLASS_SWITCHGATE_PASSING                           114
+#define SND_TIMEGATE_SWITCH_ACTIVATING                 115
+#define SND_TIMEGATE_SWITCH_ACTIVE                             116
+#define SND_TIMEGATE_SWITCH_DEACTIVATING                       117
+#define SND_TIMEGATE_OPENING                           118
+#define SND_CLASS_TIMEGATE_CLOSING                             119
+#define SND_CLASS_TIMEGATE_PASSING                             120
+#define SND_CLASS_CONVEYOR_BELT_SWITCH_ACTIVATING              121
+#define SND_CLASS_CONVEYOR_BELT_ACTIVE                         122
+#define SND_CLASS_CONVEYOR_BELT_SWITCH_DEACTIVATING            123
+#define SND_LIGHT_SWITCH_ACTIVATING                            124
+#define SND_LIGHT_SWITCH_DEACTIVATING                  125
+#define SND_DX_SUPABOMB_PUSHING                                126
+#define SND_TRAP_DIGGING                                       127
+#define SND_TRAP_ACTIVATING                                    128
+#define SND_CLASS_TUBE_WALKING                                 129
+#define SND_AMOEBA_TURNING_TO_GEM                              130
+#define SND_AMOEBA_TURNING_TO_ROCK                             131
+#define SND_SPEED_PILL_COLLECTING                              132
+#define SND_DYNABOMB_INCREASE_NUMBER_COLLECTING                133
+#define SND_DYNABOMB_INCREASE_SIZE_COLLECTING          134
+#define SND_DYNABOMB_INCREASE_POWER_COLLECTING         135
+#define SND_CLASS_DYNABOMB_DROPPING                            136
+#define SND_CLASS_DYNABOMB_ACTIVE                              137
+#define SND_SATELLITE_MOVING                           138
+#define SND_SATELLITE_WAITING                          139
+#define SND_SATELLITE_PUSHING                          140
+#define SND_LAMP_ACTIVATING                                    141
+#define SND_LAMP_DEACTIVATING                          142
+#define SND_TIME_ORB_FULL_COLLECTING                   143
+#define SND_TIME_ORB_FULL_IMPACT                               144
+#define SND_TIME_ORB_EMPTY_PUSHING                             145
+#define SND_TIME_ORB_EMPTY_IMPACT                              146
+#define SND_GAME_OF_LIFE_WAITING                               147
+#define SND_GAME_OF_LIFE_GROWING                               148
+#define SND_BIOMAZE_WAITING                                    149
+#define SND_BIOMAZE_GROWING                                    150
+#define SND_PACMAN_MOVING                                      151
+#define SND_PACMAN_WAITING                                     152
+#define SND_PACMAN_DIGGING                                     153
+#define SND_DARK_YAMYAM_MOVING                         154
+#define SND_DARK_YAMYAM_WAITING                                155
+#define SND_DARK_YAMYAM_DIGGING                                156
+#define SND_PENGUIN_MOVING                                     157
+#define SND_PENGUIN_WAITING                                    158
+#define SND_PIG_MOVING                                 159
+#define SND_PIG_WAITING                                        160
+#define SND_PIG_DIGGING                                        161
+#define SND_DRAGON_MOVING                                      162
+#define SND_DRAGON_WAITING                                     163
+#define SND_DRAGON_ATTACKING                           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                                174
+#define NUM_SOUND_FILES                                175
 
 #endif /* CONF_SND_H */
index 6a13fdbba62c72ec74df0ac563ea30e17ec205c8..9a01fc1c83af973b6e9611e9dde5e95de3db7e6e 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2003-06-28 12:35]"
+#define COMPILE_DATE_STRING "[2003-06-28 19:28]"
index 30af0fcbbd7a50affb604b234f7da58d87e9e1bd..c321c01297597ea07e7e7a588717c5d616d361f7 100644 (file)
@@ -352,8 +352,47 @@ static struct ChangingElementInfo changing_element_list[] =
   }
 };
 
+struct
+{
+  int element;
+  int push_delay_fixed, push_delay_random;
+}
+push_delay_list[] =
+{
+  { EL_SPRING,                 0, 0 },
+  { EL_BALLOON,                        0, 0 },
+
+  { EL_SOKOBAN_OBJECT,         2, 0 },
+  { EL_SOKOBAN_FIELD_FULL,     2, 0 },
+  { EL_SATELLITE,              2, 0 },
+  { EL_SP_DISK_YELLOW,         2, 0 },
+
+  { EL_UNDEFINED,              0, 0 },
+};
+
+struct
+{
+  int element;
+  int gem_count;
+}
+gem_count_list[] =
+{
+  { EL_EMERALD,                1 },
+  { EL_BD_DIAMOND,     1 },
+  { EL_EMERALD_YELLOW, 1 },
+  { EL_EMERALD_RED,    1 },
+  { EL_EMERALD_PURPLE, 1 },
+  { EL_DIAMOND,                3 },
+  { EL_SP_INFOTRON,    1 },
+  { EL_PEARL,          5 },
+  { EL_CRYSTAL,                8 },
+
+  { EL_UNDEFINED,      0 },
+};
+
 static struct ChangingElementInfo changing_element[MAX_NUM_ELEMENTS];
 static unsigned long trigger_events[MAX_NUM_ELEMENTS];
+static int gem_count[MAX_NUM_ELEMENTS];
 
 #define IS_AUTO_CHANGING(e)  (changing_element[e].base_element != EL_UNDEFINED)
 #define IS_JUST_CHANGING(x, y) (ChangeDelay[x][y] != 0)
@@ -688,6 +727,8 @@ static void InitGameEngine()
     printf("       => game.engine_version == %06d\n", game.engine_version);
 #endif
 
+  /* ---------- initialize player's initial move delay --------------------- */
+
   /* dynamically adjust player properties according to game engine version */
   game.initial_move_delay =
     (game.engine_version <= VERSION_IDENT(2,0,1) ? INITIAL_MOVE_DELAY_ON :
@@ -697,6 +738,8 @@ static void InitGameEngine()
   game.initial_move_delay_value =
     (level.double_speed ? MOVE_DELAY_HIGH_SPEED : MOVE_DELAY_NORMAL_SPEED);
 
+  /* ---------- initialize changing elements ------------------------------- */
+
   /* initialize changing elements information */
   for (i=0; i<MAX_NUM_ELEMENTS; i++)
   {
@@ -709,8 +752,7 @@ static void InitGameEngine()
   }
 
   /* add changing elements from pre-defined list */
-  i = 0;
-  while (changing_element_list[i].base_element != EL_UNDEFINED)
+  for (i=0; changing_element_list[i].base_element != EL_UNDEFINED; i++)
   {
     struct ChangingElementInfo *ce = &changing_element_list[i];
     int element = ce->base_element;
@@ -721,8 +763,6 @@ static void InitGameEngine()
     changing_element[element].pre_change_function  = ce->pre_change_function;
     changing_element[element].change_function      = ce->change_function;
     changing_element[element].post_change_function = ce->post_change_function;
-
-    i++;
   }
 
   /* add changing elements from custom element configuration */
@@ -741,6 +781,8 @@ static void InitGameEngine()
                                              change->delay_frames);
   }
 
+  /* ---------- initialize trigger events ---------------------------------- */
+
   /* initialize trigger events information */
   for (i=0; i<MAX_NUM_ELEMENTS; i++)
     trigger_events[i] = EP_BITMASK_DEFAULT;
@@ -751,32 +793,36 @@ static void InitGameEngine()
       trigger_events[element_info[i].change.trigger] |=
        element_info[i].change.events;
 
-  /* set push delay value for all non-custom elements */
+  /* ---------- initialize push delay -------------------------------------- */
+
+  /* initialize push delay values to default */
   for (i=0; i<MAX_NUM_ELEMENTS; i++)
   {
     if (!IS_CUSTOM_ELEMENT(i))
     {
-      if (i == EL_SPRING ||
-         i == EL_BALLOON)
-      {
-       element_info[i].push_delay_fixed = 0;
-       element_info[i].push_delay_random = 0;
-      }
-      else if (i == EL_SOKOBAN_OBJECT ||
-              i == EL_SOKOBAN_FIELD_FULL ||
-              i == EL_SATELLITE ||
-              i == EL_SP_DISK_YELLOW)
-      {
-       element_info[i].push_delay_fixed = 2;
-       element_info[i].push_delay_random = 0;
-      }
-      else
-      {
-       element_info[i].push_delay_fixed = 2;
-       element_info[i].push_delay_random = 8;
-      }
+      element_info[i].push_delay_fixed = 2;
+      element_info[i].push_delay_random = 8;
     }
   }
+
+  /* set push delay value for certain elements from pre-defined list */
+  for (i=0; push_delay_list[i].element != EL_UNDEFINED; i++)
+  {
+    int e = push_delay_list[i].element;
+
+    element_info[e].push_delay_fixed  = push_delay_list[i].push_delay_fixed;
+    element_info[e].push_delay_random = push_delay_list[i].push_delay_random;
+  }
+
+  /* ---------- initialize gem count --------------------------------------- */
+
+  /* initialize gem count values for each element */
+  for (i=0; i<MAX_NUM_ELEMENTS; i++)
+    gem_count[i] = 0;
+
+  /* add gem count values for all elements from pre-defined list */
+  for (i=0; gem_count_list[i].element != EL_UNDEFINED; i++)
+    gem_count[gem_count_list[i].element] = gem_count_list[i].gem_count;
 }
 
 
@@ -3838,12 +3884,16 @@ void ContinueMoving(int x, int y)
   int horiz_move = (dx != 0);
   int newx = x + dx, newy = y + dy;
   int step = (horiz_move ? dx : dy) * TILEX / MOVE_DELAY_NORMAL_SPEED;
+#if 1
+  boolean pushed = Pushed[x][y];
+#else
   struct PlayerInfo *player = (IS_PLAYER(x, y) ? PLAYERINFO(x, y) : NULL);
 #if 0
   boolean pushing = (player != NULL && player->Pushing && player->MovPos != 0);
 #else
   boolean pushing = (player != NULL && player->Pushing && player->is_moving);
 #endif
+#endif
 
 #if 0
   if (player && player->is_moving && player->MovPos == 0)
@@ -3877,7 +3927,7 @@ void ContinueMoving(int x, int y)
 
 #if 1
 #if 1
-  if (Pushed[x][y])    /* special case: moving object pushed by player */
+  if (pushed)          /* special case: moving object pushed by player */
 #else
   if (pushing)         /* special case: moving object pushed by player */
 #endif
@@ -4039,7 +4089,7 @@ void ContinueMoving(int x, int y)
 #endif
       Stop[newx][newy] = TRUE; /* ignore this element until the next frame */
 #if 1
-    if (!pushing)
+    if (!pushed)       /* special case: moving object pushed by player */
 #endif
       JustStopped[newx][newy] = 3;
 
@@ -6553,6 +6603,8 @@ int DigField(struct PlayerInfo *player,
       break;
 #endif
 
+#if 0
+
     case EL_EMERALD:
     case EL_BD_DIAMOND:
     case EL_EMERALD_YELLOW:
@@ -6582,6 +6634,10 @@ int DigField(struct PlayerInfo *player,
       CheckTriggeredElementChange(element, CE_OTHER_COLLECTING);
       break;
 
+#endif
+
+#if 0
+
     case EL_SPEED_PILL:
       RemoveField(x, y);
       player->move_delay_value = MOVE_DELAY_HIGH_SPEED;
@@ -6593,6 +6649,9 @@ int DigField(struct PlayerInfo *player,
       CheckTriggeredElementChange(element, CE_OTHER_COLLECTING);
       break;
 
+#endif
+
+
 #if 0
     case EL_ENVELOPE:
       Feld[x][y] = EL_EMPTY;
@@ -6605,6 +6664,8 @@ int DigField(struct PlayerInfo *player,
       break;
 #endif
 
+#if 0
+
     case EL_EXTRA_TIME:
       RemoveField(x, y);
       if (level.time > 0)
@@ -6620,6 +6681,9 @@ int DigField(struct PlayerInfo *player,
       CheckTriggeredElementChange(element, CE_OTHER_COLLECTING);
       break;
 
+#endif
+
+#if 0
     case EL_SHIELD_NORMAL:
       RemoveField(x, y);
       player->shield_normal_time_left += 10;
@@ -6642,7 +6706,9 @@ int DigField(struct PlayerInfo *player,
 #endif
       CheckTriggeredElementChange(element, CE_OTHER_COLLECTING);
       break;
+#endif
 
+#if 0
     case EL_DYNAMITE:
     case EL_SP_DISK_RED:
       RemoveField(x, y);
@@ -6654,7 +6720,9 @@ int DigField(struct PlayerInfo *player,
       PlaySoundLevelElementAction(x, y, element, ACTION_COLLECTING);
       CheckTriggeredElementChange(element, CE_OTHER_COLLECTING);
       break;
+#endif
 
+#if 0
     case EL_DYNABOMB_INCREASE_NUMBER:
       RemoveField(x, y);
       player->dynabomb_count++;
@@ -6691,7 +6759,9 @@ int DigField(struct PlayerInfo *player,
 #endif
       CheckTriggeredElementChange(element, CE_OTHER_COLLECTING);
       break;
+#endif
 
+#if 0
     case EL_KEY_1:
     case EL_KEY_2:
     case EL_KEY_3:
@@ -6739,6 +6809,7 @@ int DigField(struct PlayerInfo *player,
       CheckTriggeredElementChange(element, CE_OTHER_COLLECTING);
       break;
     }
+#endif
 
     case EL_ROBOT_WHEEL:
       Feld[x][y] = EL_ROBOT_WHEEL_ACTIVE;
@@ -6941,6 +7012,7 @@ int DigField(struct PlayerInfo *player,
 
 #endif
 
+#if 0
     case EL_GATE_1:
     case EL_GATE_2:
     case EL_GATE_3:
@@ -6992,7 +7064,9 @@ int DigField(struct PlayerInfo *player,
       PlaySoundLevel(x, y, SND_GATE_PASSING);
 #endif
       break;
+#endif
 
+#if 0
     case EL_SWITCHGATE_OPEN:
     case EL_TIMEGATE_OPEN:
       if (!IN_LEV_FIELD(x + dx, y + dy) || !IS_FREE(x + dx, y + dy))
@@ -7004,6 +7078,7 @@ int DigField(struct PlayerInfo *player,
 
       PlaySoundLevelElementAction(x, y, element, ACTION_PASSING);
       break;
+#endif
 
     case EL_SP_PORT_LEFT:
     case EL_SP_PORT_RIGHT:
@@ -7086,16 +7161,19 @@ int DigField(struct PlayerInfo *player,
        if (!(tube_enter_directions[i][1] & move_direction))
          return MF_NO_ACTION;  /* tube has no opening in this direction */
 
-       PlaySoundLevel(x, y, SND_CLASS_TUBE_PASSING);
+       PlaySoundLevel(x, y, SND_CLASS_TUBE_WALKING);
       }
       break;
 
+#if 0
     case EL_EXIT_CLOSED:
     case EL_SP_EXIT_CLOSED:
     case EL_EXIT_OPENING:
       return MF_NO_ACTION;
       break;
+#endif
 
+#if 0
     case EL_EXIT_OPEN:
     case EL_SP_EXIT_OPEN:
       if (mode == DF_SNAP)
@@ -7107,6 +7185,7 @@ int DigField(struct PlayerInfo *player,
        PlaySoundLevel(x, y, SND_CLASS_SP_EXIT_PASSING);
 
       break;
+#endif
 
     case EL_LAMP:
       Feld[x][y] = EL_LAMP_ACTIVE;
@@ -7280,16 +7359,68 @@ int DigField(struct PlayerInfo *player,
 
 #endif
 
+#if 0
     case EL_PENGUIN:
     case EL_PIG:
     case EL_DRAGON:
       break;
+#endif
 
     default:
 
       if (IS_WALKABLE(element))
       {
-       PlaySoundLevelElementAction(x, y, player->element_nr, ACTION_MOVING);
+       int sound_action = ACTION_WALKING;
+
+       if (element >= EL_GATE_1 && element <= EL_GATE_4)
+       {
+         if (!player->key[element - EL_GATE_1])
+           return MF_NO_ACTION;
+       }
+       else if (element >= EL_GATE_1_GRAY && element <= EL_GATE_4_GRAY)
+       {
+         if (!player->key[element - EL_GATE_1_GRAY])
+           return MF_NO_ACTION;
+       }
+       else if (element == EL_EXIT_OPEN || element == EL_SP_EXIT_OPEN)
+       {
+         sound_action = ACTION_PASSING;        /* player is passing exit */
+       }
+       else if (element == EL_EMPTY)
+       {
+         sound_action = ACTION_MOVING;         /* nothing to walk on */
+       }
+
+       /* play sound from background or player, whatever is available */
+       if (element_info[element].sound[sound_action] != SND_UNDEFINED)
+         PlaySoundLevelElementAction(x, y, element, sound_action);
+       else
+         PlaySoundLevelElementAction(x, y, player->element_nr, sound_action);
+
+       break;
+      }
+      else if (IS_PASSABLE(element))
+      {
+       if (!IN_LEV_FIELD(x + dx, y + dy) || !IS_FREE(x + dx, y + dy))
+         return MF_NO_ACTION;
+
+       if (element >= EL_EM_GATE_1 && element <= EL_EM_GATE_4)
+       {
+         if (!player->key[element - EL_EM_GATE_1])
+           return MF_NO_ACTION;
+       }
+       else if (element >= EL_EM_GATE_1_GRAY && element <= EL_EM_GATE_4_GRAY)
+       {
+         if (!player->key[element - EL_EM_GATE_1_GRAY])
+           return MF_NO_ACTION;
+       }
+
+       /* automatically move to the next field with double speed */
+       player->programmed_action = move_direction;
+       DOUBLE_PLAYER_SPEED(player);
+
+       PlaySoundLevelAction(x, y, ACTION_PASSING);
+
        break;
       }
       else if (IS_DIGGABLE(element))
@@ -7317,8 +7448,63 @@ int DigField(struct PlayerInfo *player,
          player->is_collecting = TRUE;
        }
 
-       RaiseScoreElement(element);
+       if (element == EL_SPEED_PILL)
+         player->move_delay_value = MOVE_DELAY_HIGH_SPEED;
+       else if (element == EL_EXTRA_TIME && level.time > 0)
+       {
+         TimeLeft += 10;
+         DrawText(DX_TIME, DY_TIME, int2str(TimeLeft, 3), FONT_TEXT_2);
+       }
+       else if (element == EL_SHIELD_NORMAL || element == EL_SHIELD_DEADLY)
+       {
+         player->shield_normal_time_left += 10;
+         if (element == EL_SHIELD_DEADLY)
+           player->shield_deadly_time_left += 10;
+       }
+       else if (element == EL_DYNAMITE || element == EL_SP_DISK_RED)
+       {
+         player->dynamite++;
+         player->use_disk_red_graphic = (element == EL_SP_DISK_RED);
+
+         DrawText(DX_DYNAMITE, DY_DYNAMITE,
+                  int2str(local_player->dynamite, 3), FONT_TEXT_2);
+       }
+       else if (element == EL_DYNABOMB_INCREASE_NUMBER)
+       {
+         player->dynabomb_count++;
+         player->dynabombs_left++;
+       }
+       else if (element == EL_DYNABOMB_INCREASE_SIZE)
+       {
+         player->dynabomb_size++;
+       }
+       else if (element == EL_DYNABOMB_INCREASE_POWER)
+       {
+         player->dynabomb_xl = TRUE;
+       }
+       else if ((element >= EL_KEY_1 && element <= EL_KEY_4) ||
+                (element >= EL_EM_KEY_1 && element <= EL_EM_KEY_4))
+       {
+         int key_nr = (element >= EL_KEY_1 && element <= EL_KEY_4 ?
+                       element - EL_KEY_1 : element - EL_EM_KEY_1);
+
+         player->key[key_nr] = TRUE;
 
+         DrawMiniGraphicExt(drawto, DX_KEYS + key_nr * MINI_TILEX, DY_KEYS,
+                            el2edimg(EL_KEY_1 + key_nr));
+         redraw_mask |= REDRAW_DOOR_1;
+       }
+       else if (gem_count[element] > 0)
+       {
+         local_player->gems_still_needed -= gem_count[element];
+         if (local_player->gems_still_needed < 0)
+           local_player->gems_still_needed = 0;
+
+         DrawText(DX_EMERALDS, DY_EMERALDS,
+                  int2str(local_player->gems_still_needed, 3), FONT_TEXT_2);
+       }
+
+       RaiseScoreElement(element);
        PlaySoundLevelElementAction(x, y, element, ACTION_COLLECTING);
 
        CheckTriggeredElementChange(element, CE_OTHER_COLLECTING);
@@ -7708,6 +7894,7 @@ void RaiseScoreElement(int element)
       RaiseScore(level.score[SC_NUT]);
       break;
     case EL_DYNAMITE:
+    case EL_SP_DISK_RED:
     case EL_DYNABOMB_INCREASE_NUMBER:
     case EL_DYNABOMB_INCREASE_SIZE:
     case EL_DYNABOMB_INCREASE_POWER:
index dfd97f5ef2df5dca82cb92c99c2de7ae27158fd4..25f6137ef2b045aff4ccf666edc2e9e7e7654851 100644 (file)
@@ -1526,6 +1526,9 @@ void InitElementPropertiesStatic()
     EL_GATE_2_GRAY,
     EL_GATE_3_GRAY,
     EL_GATE_4_GRAY,
+    EL_PENGUIN,
+    EL_PIG,
+    EL_DRAGON,
     -1
   };
 
index 48a0f60ab60a05e0649bf3f070e948b65dc12cf0..13c7245db65052c095fcea62f1775167638cd7af 100644 (file)
@@ -2984,6 +2984,7 @@ struct ElementActionInfo element_action_info[NUM_ACTIONS + 1] =
   { ".collecting",     ACTION_COLLECTING,      FALSE   },
   { ".dropping",       ACTION_DROPPING,        FALSE   },
   { ".pushing",                ACTION_PUSHING,         FALSE   },
+  { ".walking",                ACTION_WALKING,         FALSE   },
   { ".passing",                ACTION_PASSING,         FALSE   },
   { ".impact",         ACTION_IMPACT,          FALSE   },
   { ".breaking",       ACTION_BREAKING,        FALSE   },
index bff222702bd410775906be20866b5fdd563b353b..bb39c7b3725f453b1e5c4b982a18657d997087d6 100644 (file)
 #define ACTION_COLLECTING                      6
 #define ACTION_DROPPING                                7
 #define ACTION_PUSHING                         8
-#define ACTION_PASSING                         9
-#define ACTION_IMPACT                          10
-#define ACTION_BREAKING                                11
-#define ACTION_ACTIVATING                      12
-#define ACTION_DEACTIVATING                    13
-#define ACTION_OPENING                         14
-#define ACTION_CLOSING                         15
-#define ACTION_ATTACKING                       16
-#define ACTION_GROWING                         17
-#define ACTION_SHRINKING                       18
-#define ACTION_ACTIVE                          19
-#define ACTION_FILLING                         20
-#define ACTION_EMPTYING                                21
-#define ACTION_CHANGING                                22
-#define ACTION_EXPLODING                       23
-#define ACTION_DYING                           24
-#define ACTION_OTHER                           25
-
-#define NUM_ACTIONS                            26
+#define ACTION_WALKING                         9
+#define ACTION_PASSING                         10
+#define ACTION_IMPACT                          11
+#define ACTION_BREAKING                                12
+#define ACTION_ACTIVATING                      13
+#define ACTION_DEACTIVATING                    14
+#define ACTION_OPENING                         15
+#define ACTION_CLOSING                         16
+#define ACTION_ATTACKING                       17
+#define ACTION_GROWING                         18
+#define ACTION_SHRINKING                       19
+#define ACTION_ACTIVE                          20
+#define ACTION_FILLING                         21
+#define ACTION_EMPTYING                                22
+#define ACTION_CHANGING                                23
+#define ACTION_EXPLODING                       24
+#define ACTION_DYING                           25
+#define ACTION_OTHER                           26
+
+#define NUM_ACTIONS                            27
 
 /* values for special image configuration suffixes (must match game mode) */
 #define GFX_SPECIAL_ARG_MAIN                   0