void AusgangstuerPruefen(int x, int y)
{
- if (!local_player->gems_still_needed &&
- !local_player->sokobanfields_still_needed &&
- !local_player->lights_still_needed)
- {
- Feld[x][y] = EL_AUSGANG_ACT;
+ if (local_player->gems_still_needed > 0 ||
+ local_player->sokobanfields_still_needed > 0 ||
+ local_player->lights_still_needed > 0)
+ return;
- PlaySoundLevel(x < LEVELX(BX1) ? LEVELX(BX1) :
- (x > LEVELX(BX2) ? LEVELX(BX2) : x),
- y < LEVELY(BY1) ? LEVELY(BY1) :
- (y > LEVELY(BY2) ? LEVELY(BY2) : y),
- SND_EXIT_OPENING);
- }
+ Feld[x][y] = EL_AUSGANG_ACT;
+
+ PlaySoundLevel(x < LEVELX(BX1) ? LEVELX(BX1) :
+ (x > LEVELX(BX2) ? LEVELX(BX2) : x),
+ y < LEVELY(BY1) ? LEVELY(BY1) :
+ (y > LEVELY(BY2) ? LEVELY(BY2) : y),
+ SND_EXIT_OPENING);
+}
+
+void AusgangstuerPruefen_SP(int x, int y)
+{
+ if (local_player->gems_still_needed > 0)
+ return;
+
+ Feld[x][y] = EL_SP_EXIT_OPEN;
+
+ PlaySoundLevel(x < LEVELX(BX1) ? LEVELX(BX1) :
+ (x > LEVELX(BX2) ? LEVELX(BX2) : x),
+ y < LEVELY(BY1) ? LEVELY(BY1) :
+ (y > LEVELY(BY2) ? LEVELY(BY2) : y),
+ SND_SP_EXIT_OPENING);
}
void AusgangstuerOeffnen(int x, int y)
BreakingPearl(x, y);
else if (element == EL_EXIT_CLOSED)
AusgangstuerPruefen(x, y);
+ else if (element == EL_SP_EXIT_CLOSED)
+ AusgangstuerPruefen_SP(x, y);
else if (element == EL_AUSGANG_ACT)
AusgangstuerOeffnen(x, y);
else if (element == EL_EXIT_OPEN)
AusgangstuerBlinken(x, y);
+ else if (element == EL_SP_EXIT_OPEN)
+ ; /* !!! ADD SOME (OPTIONAL) ANIMATIONS HERE !!! */
else if (element == EL_MAUERND)
MauerWaechst(x, y);
else if (element == EL_WALL_GROWING ||
player->last_jx = jx;
player->last_jy = jy;
- if (Feld[jx][jy] == EL_EXIT_OPEN)
+ if (Feld[jx][jy] == EL_EXIT_OPEN ||
+ Feld[jx][jy] == EL_SP_EXIT_OPEN)
{
RemoveHero(player);
- if (!local_player->friends_still_needed)
+ if (local_player->friends_still_needed == 0 ||
+ Feld[jx][jy] == EL_SP_EXIT_OPEN)
player->LevelSolved = player->GameOver = TRUE;
}
return MF_ACTION;
break;
- case EL_SP_EXIT_CLOSED:
- if (local_player->gems_still_needed > 0)
- return MF_NO_ACTION;
-
- player->LevelSolved = player->GameOver = TRUE;
- PlaySoundStereo(SND_SP_EXIT_PASSING, SOUND_MAX_RIGHT);
- break;
-
/* the following elements cannot be pushed by "snapping" */
case EL_ROCK:
case EL_BOMB:
break;
case EL_EXIT_CLOSED:
+ case EL_SP_EXIT_CLOSED:
case EL_AUSGANG_ACT:
- /* door is not (yet) open */
return MF_NO_ACTION;
break;
case EL_EXIT_OPEN:
+ case EL_SP_EXIT_OPEN:
if (mode == DF_SNAP)
return MF_NO_ACTION;
- PlaySoundLevel(x, y, SND_EXIT_PASSING);
+ if (element == EL_EXIT_OPEN)
+ PlaySoundLevel(x, y, SND_EXIT_PASSING);
+ else
+ PlaySoundLevel(x, y, SND_SP_EXIT_PASSING);
break;
{ "dynamite.xpos", "0" },
{ "dynamite.ypos", "3" },
{ "dynamite.frames", "1" },
- { "dynamite.actice", "RocksElements.pcx" },
- { "dynamite.actice.xpos", "1" },
- { "dynamite.actice.ypos", "3" },
- { "dynamite.actice.frames", "7" },
+ { "dynamite.active", "RocksElements.pcx" },
+ { "dynamite.active.xpos", "1" },
+ { "dynamite.active.ypos", "3" },
+ { "dynamite.active.frames", "7" },
{ "spaceship_right", "RocksElements.pcx" },
{ "spaceship_right.xpos", "8" },
{ "dark_yamyam.frames", "4" },
{ "dark_yamyam.pingpong", "1" },
- { "dynabomb.actice", "RocksElements.pcx" },
- { "dynabomb.actice.xpos", "12" },
- { "dynabomb.actice.ypos", "11" },
- { "dynabomb.actice.frames", "4" },
- { "dynabomb.actice.pingpong", "1" },
+ { "dynabomb.active", "RocksElements.pcx" },
+ { "dynabomb.active.xpos", "12" },
+ { "dynabomb.active.ypos", "11" },
+ { "dynabomb.active.frames", "4" },
+ { "dynabomb.active.pingpong", "1" },
{ "dynabomb_nr", "RocksElements.pcx" },
{ "dynabomb_nr.xpos", "12" },
{ "dynabomb_nr.ypos", "11" },
{ "sp_disk_yellow.pushing", "pusch.wav" },
{ "sp_port.passing", "gate.wav" },
{ "sp_exit.passing", "exit.wav" },
+ { "sp_exit.opening", SND_FILE_UNDEFINED },
{ "sp_element.exploding", "booom.wav" },
{ "sp_sniksnak.moving", SND_FILE_UNDEFINED },
{ "sp_sniksnak.waiting", SND_FILE_UNDEFINED },
{ "nut.impact", "klumpf.wav" },
{ "dynamite.collecting", "pong.wav" },
{ "dynamite.dropping", "deng.wav" },
- { "dynamite.actice", "zisch.wav" },
+ { "dynamite.active", "zisch.wav" },
{ "key.collecting", "pong.wav" },
{ "gate.passing", "gate.wav" },
{ "bug.moving", "klapper.wav" },
{ "dynabomb_sz.collecting", "pong.wav" },
{ "dynabomb_xl.collecting", "pong.wav" },
{ "dynabomb.dropping", "deng.wav" },
- { "dynabomb.actice", "zisch.wav" },
+ { "dynabomb.active", "zisch.wav" },
{ "satellite.moving", SND_FILE_UNDEFINED },
{ "satellite.waiting", SND_FILE_UNDEFINED },
{ "satellite.pushing", "pusch.wav" },
#define EL_MAGIC_WALL_EMPTYING (EL_FIRST_RUNTIME + 26)
#define EL_MAGIC_WALL_BD_EMPTYING (EL_FIRST_RUNTIME + 27)
#define EL_AMOEBA_DRIPPING (EL_FIRST_RUNTIME + 28)
+#define EL_SP_EXIT_OPEN (EL_FIRST_RUNTIME + 29)
-#define NUM_RUNTIME_ELEMENTS (EL_FIRST_RUNTIME + 29)
+#define NUM_RUNTIME_ELEMENTS (EL_FIRST_RUNTIME + 30)
/* "unreal" (and therefore not drawable) runtime elements */
#define EL_FIRST_RUNTIME_UNREAL NUM_RUNTIME_ELEMENTS
#define SND_SP_DISK_YELLOW_PUSHING 28
#define SND_SP_PORT_PASSING 29
#define SND_SP_EXIT_PASSING 30
-#define SND_SP_ELEMENT_EXPLODING 31
-#define SND_SP_SNIKSNAK_MOVING 32
-#define SND_SP_SNIKSNAK_WAITING 33
-#define SND_SP_ELECTRON_MOVING 34
-#define SND_SP_ELECTRON_WAITING 35
-#define SND_SP_TERMINAL_ACTIVATING 36
-#define SND_SP_TERMINAL_ACTIVE 37
-#define SND_SOKOBAN_OBJECT_PUSHING 38
-#define SND_SOKOBAN_FIELD_FILLING 39
-#define SND_SOKOBAN_FIELD_EMPTYING 40
-#define SND_SOKOBAN_GAME_SOLVING 41
-#define SND_EMPTY_SPACE_DIGGING 42
-#define SND_SAND_DIGGING 43
-#define SND_EMERALD_COLLECTING 44
-#define SND_EMERALD_IMPACT 45
-#define SND_DIAMOND_COLLECTING 46
-#define SND_DIAMOND_IMPACT 47
-#define SND_DIAMOND_BREAKING 48
-#define SND_ROCK_PUSHING 49
-#define SND_ROCK_IMPACT 50
-#define SND_BOMB_PUSHING 51
-#define SND_NUT_PUSHING 52
-#define SND_NUT_CRACKING 53
-#define SND_NUT_IMPACT 54
-#define SND_DYNAMITE_COLLECTING 55
-#define SND_DYNAMITE_DROPPING 56
-#define SND_DYNAMITE_ACTIVE 57
-#define SND_KEY_COLLECTING 58
-#define SND_GATE_PASSING 59
-#define SND_BUG_MOVING 60
-#define SND_BUG_WAITING 61
-#define SND_SPACESHIP_MOVING 62
-#define SND_SPACESHIP_WAITING 63
-#define SND_YAMYAM_MOVING 64
-#define SND_YAMYAM_WAITING 65
-#define SND_YAMYAM_EATING 66
-#define SND_ROBOT_STEPPING 67
-#define SND_ROBOT_WAITING 68
-#define SND_ROBOT_WHEEL_ACTIVATING 69
-#define SND_ROBOT_WHEEL_ACTIVE 70
-#define SND_MAGIC_WALL_ACTIVATING 71
-#define SND_MAGIC_WALL_ACTIVE 72
-#define SND_MAGIC_WALL_CHANGING 73
-#define SND_AMOEBA_WAITING 74
-#define SND_AMOEBA_CREATING 75
-#define SND_AMOEBA_DROP_CREATING 76
-#define SND_ACID_SPLASHING 77
-#define SND_QUICKSAND_FILLING 78
-#define SND_QUICKSAND_SLIPPING 79
-#define SND_QUICKSAND_EMPTYING 80
-#define SND_EXIT_OPENING 81
-#define SND_EXIT_PASSING 82
-#define SND_BALLOON_MOVING 83
-#define SND_BALLOON_WAITING 84
-#define SND_BALLOON_PUSHING 85
-#define SND_BALLOON_SWITCH_ACTIVATING 86
-#define SND_SPRING_MOVING 87
-#define SND_SPRING_PUSHING 88
-#define SND_SPRING_IMPACT 89
-#define SND_WALL_GROWING 90
-#define SND_PEARL_COLLECTING 91
-#define SND_PEARL_BREAKING 92
-#define SND_PEARL_IMPACT 93
-#define SND_CRYSTAL_COLLECTING 94
-#define SND_CRYSTAL_IMPACT 95
-#define SND_ENVELOPE_COLLECTING 96
-#define SND_SAND_INVISIBLE_DIGGING 97
-#define SND_SHIELD_NORMAL_COLLECTING 98
-#define SND_SHIELD_NORMAL_ACTIVE 99
-#define SND_SHIELD_DEADLY_COLLECTING 100
-#define SND_SHIELD_DEADLY_ACTIVE 101
-#define SND_EXTRA_TIME_COLLECTING 102
-#define SND_MOLE_MOVING 103
-#define SND_MOLE_WAITING 104
-#define SND_MOLE_EATING 105
-#define SND_SWITCHGATE_SWITCH_ACTIVATING 106
-#define SND_SWITCHGATE_OPENING 107
-#define SND_SWITCHGATE_CLOSING 108
-#define SND_SWITCHGATE_PASSING 109
-#define SND_TIMEGATE_WHEEL_ACTIVATING 110
-#define SND_TIMEGATE_WHEEL_ACTIVE 111
-#define SND_TIMEGATE_OPENING 112
-#define SND_TIMEGATE_CLOSING 113
-#define SND_TIMEGATE_PASSING 114
-#define SND_CONVEYOR_BELT_SWITCH_ACTIVATING 115
-#define SND_CONVEYOR_BELT_SWITCH_DEACTIVATING 116
-#define SND_CONVEYOR_BELT_ACTIVE 117
-#define SND_LIGHT_SWITCH_ACTIVATING 118
-#define SND_LIGHT_SWITCH_DEACTIVATING 119
-#define SND_DX_BOMB_PUSHING 120
-#define SND_TRAP_INACTIVE_DIGGING 121
-#define SND_TRAP_ACTIVATING 122
-#define SND_TUBE_PASSING 123
-#define SND_AMOEBA_TURNING_TO_GEM 124
-#define SND_AMOEBA_TURNING_TO_ROCK 125
-#define SND_SPEED_PILL_COLLECTING 126
-#define SND_DYNABOMB_NR_COLLECTING 127
-#define SND_DYNABOMB_SZ_COLLECTING 128
-#define SND_DYNABOMB_XL_COLLECTING 129
-#define SND_DYNABOMB_DROPPING 130
-#define SND_DYNABOMB_ACTIVE 131
-#define SND_SATELLITE_MOVING 132
-#define SND_SATELLITE_WAITING 133
-#define SND_SATELLITE_PUSHING 134
-#define SND_LAMP_ACTIVATING 135
-#define SND_LAMP_DEACTIVATING 136
-#define SND_TIME_ORB_FULL_COLLECTING 137
-#define SND_TIME_ORB_FULL_IMPACT 138
-#define SND_TIME_ORB_EMPTY_PUSHING 139
-#define SND_TIME_ORB_EMPTY_IMPACT 140
-#define SND_GAMEOFLIFE_WAITING 141
-#define SND_GAMEOFLIFE_CREATING 142
-#define SND_BIOMAZE_WAITING 143
-#define SND_BIOMAZE_CREATING 144
-#define SND_PACMAN_MOVING 145
-#define SND_PACMAN_WAITING 146
-#define SND_PACMAN_EATING 147
-#define SND_DARK_YAMYAM_MOVING 148
-#define SND_DARK_YAMYAM_WAITING 149
-#define SND_DARK_YAMYAM_EATING 150
-#define SND_PENGUIN_MOVING 151
-#define SND_PENGUIN_WAITING 152
-#define SND_PENGUIN_PASSING_EXIT 153
-#define SND_PIG_MOVING 154
-#define SND_PIG_WAITING 155
-#define SND_PIG_EATING 156
-#define SND_DRAGON_MOVING 157
-#define SND_DRAGON_WAITING 158
-#define SND_DRAGON_ATTACKING 159
-#define SND_PLAYER_DYING 160
-#define SND_ELEMENT_EXPLODING 161
-#define SND_GAME_STARTING 162
-#define SND_GAME_RUNNING_OUT_OF_TIME 163
-#define SND_GAME_LEVELTIME_BONUS 164
-#define SND_GAME_LOSING 165
-#define SND_GAME_WINNING 166
-#define SND_MENU_DOOR_OPENING 167
-#define SND_MENU_DOOR_CLOSING 168
-#define SND_MENU_HALL_OF_FAME 169
-#define SND_MENU_INFO_SCREEN 170
-
-#define NUM_SOUND_FILES 171
+#define SND_SP_EXIT_OPENING 31
+#define SND_SP_ELEMENT_EXPLODING 32
+#define SND_SP_SNIKSNAK_MOVING 33
+#define SND_SP_SNIKSNAK_WAITING 34
+#define SND_SP_ELECTRON_MOVING 35
+#define SND_SP_ELECTRON_WAITING 36
+#define SND_SP_TERMINAL_ACTIVATING 37
+#define SND_SP_TERMINAL_ACTIVE 38
+#define SND_SOKOBAN_OBJECT_PUSHING 39
+#define SND_SOKOBAN_FIELD_FILLING 40
+#define SND_SOKOBAN_FIELD_EMPTYING 41
+#define SND_SOKOBAN_GAME_SOLVING 42
+#define SND_EMPTY_SPACE_DIGGING 43
+#define SND_SAND_DIGGING 44
+#define SND_EMERALD_COLLECTING 45
+#define SND_EMERALD_IMPACT 46
+#define SND_DIAMOND_COLLECTING 47
+#define SND_DIAMOND_IMPACT 48
+#define SND_DIAMOND_BREAKING 49
+#define SND_ROCK_PUSHING 50
+#define SND_ROCK_IMPACT 51
+#define SND_BOMB_PUSHING 52
+#define SND_NUT_PUSHING 53
+#define SND_NUT_CRACKING 54
+#define SND_NUT_IMPACT 55
+#define SND_DYNAMITE_COLLECTING 56
+#define SND_DYNAMITE_DROPPING 57
+#define SND_DYNAMITE_ACTIVE 58
+#define SND_KEY_COLLECTING 59
+#define SND_GATE_PASSING 60
+#define SND_BUG_MOVING 61
+#define SND_BUG_WAITING 62
+#define SND_SPACESHIP_MOVING 63
+#define SND_SPACESHIP_WAITING 64
+#define SND_YAMYAM_MOVING 65
+#define SND_YAMYAM_WAITING 66
+#define SND_YAMYAM_EATING 67
+#define SND_ROBOT_STEPPING 68
+#define SND_ROBOT_WAITING 69
+#define SND_ROBOT_WHEEL_ACTIVATING 70
+#define SND_ROBOT_WHEEL_ACTIVE 71
+#define SND_MAGIC_WALL_ACTIVATING 72
+#define SND_MAGIC_WALL_ACTIVE 73
+#define SND_MAGIC_WALL_CHANGING 74
+#define SND_AMOEBA_WAITING 75
+#define SND_AMOEBA_CREATING 76
+#define SND_AMOEBA_DROP_CREATING 77
+#define SND_ACID_SPLASHING 78
+#define SND_QUICKSAND_FILLING 79
+#define SND_QUICKSAND_SLIPPING 80
+#define SND_QUICKSAND_EMPTYING 81
+#define SND_EXIT_OPENING 82
+#define SND_EXIT_PASSING 83
+#define SND_BALLOON_MOVING 84
+#define SND_BALLOON_WAITING 85
+#define SND_BALLOON_PUSHING 86
+#define SND_BALLOON_SWITCH_ACTIVATING 87
+#define SND_SPRING_MOVING 88
+#define SND_SPRING_PUSHING 89
+#define SND_SPRING_IMPACT 90
+#define SND_WALL_GROWING 91
+#define SND_PEARL_COLLECTING 92
+#define SND_PEARL_BREAKING 93
+#define SND_PEARL_IMPACT 94
+#define SND_CRYSTAL_COLLECTING 95
+#define SND_CRYSTAL_IMPACT 96
+#define SND_ENVELOPE_COLLECTING 97
+#define SND_SAND_INVISIBLE_DIGGING 98
+#define SND_SHIELD_NORMAL_COLLECTING 99
+#define SND_SHIELD_NORMAL_ACTIVE 100
+#define SND_SHIELD_DEADLY_COLLECTING 101
+#define SND_SHIELD_DEADLY_ACTIVE 102
+#define SND_EXTRA_TIME_COLLECTING 103
+#define SND_MOLE_MOVING 104
+#define SND_MOLE_WAITING 105
+#define SND_MOLE_EATING 106
+#define SND_SWITCHGATE_SWITCH_ACTIVATING 107
+#define SND_SWITCHGATE_OPENING 108
+#define SND_SWITCHGATE_CLOSING 109
+#define SND_SWITCHGATE_PASSING 110
+#define SND_TIMEGATE_WHEEL_ACTIVATING 111
+#define SND_TIMEGATE_WHEEL_ACTIVE 112
+#define SND_TIMEGATE_OPENING 113
+#define SND_TIMEGATE_CLOSING 114
+#define SND_TIMEGATE_PASSING 115
+#define SND_CONVEYOR_BELT_SWITCH_ACTIVATING 116
+#define SND_CONVEYOR_BELT_SWITCH_DEACTIVATING 117
+#define SND_CONVEYOR_BELT_ACTIVE 118
+#define SND_LIGHT_SWITCH_ACTIVATING 119
+#define SND_LIGHT_SWITCH_DEACTIVATING 120
+#define SND_DX_BOMB_PUSHING 121
+#define SND_TRAP_INACTIVE_DIGGING 122
+#define SND_TRAP_ACTIVATING 123
+#define SND_TUBE_PASSING 124
+#define SND_AMOEBA_TURNING_TO_GEM 125
+#define SND_AMOEBA_TURNING_TO_ROCK 126
+#define SND_SPEED_PILL_COLLECTING 127
+#define SND_DYNABOMB_NR_COLLECTING 128
+#define SND_DYNABOMB_SZ_COLLECTING 129
+#define SND_DYNABOMB_XL_COLLECTING 130
+#define SND_DYNABOMB_DROPPING 131
+#define SND_DYNABOMB_ACTIVE 132
+#define SND_SATELLITE_MOVING 133
+#define SND_SATELLITE_WAITING 134
+#define SND_SATELLITE_PUSHING 135
+#define SND_LAMP_ACTIVATING 136
+#define SND_LAMP_DEACTIVATING 137
+#define SND_TIME_ORB_FULL_COLLECTING 138
+#define SND_TIME_ORB_FULL_IMPACT 139
+#define SND_TIME_ORB_EMPTY_PUSHING 140
+#define SND_TIME_ORB_EMPTY_IMPACT 141
+#define SND_GAMEOFLIFE_WAITING 142
+#define SND_GAMEOFLIFE_CREATING 143
+#define SND_BIOMAZE_WAITING 144
+#define SND_BIOMAZE_CREATING 145
+#define SND_PACMAN_MOVING 146
+#define SND_PACMAN_WAITING 147
+#define SND_PACMAN_EATING 148
+#define SND_DARK_YAMYAM_MOVING 149
+#define SND_DARK_YAMYAM_WAITING 150
+#define SND_DARK_YAMYAM_EATING 151
+#define SND_PENGUIN_MOVING 152
+#define SND_PENGUIN_WAITING 153
+#define SND_PENGUIN_PASSING_EXIT 154
+#define SND_PIG_MOVING 155
+#define SND_PIG_WAITING 156
+#define SND_PIG_EATING 157
+#define SND_DRAGON_MOVING 158
+#define SND_DRAGON_WAITING 159
+#define SND_DRAGON_ATTACKING 160
+#define SND_PLAYER_DYING 161
+#define SND_ELEMENT_EXPLODING 162
+#define SND_GAME_STARTING 163
+#define SND_GAME_RUNNING_OUT_OF_TIME 164
+#define SND_GAME_LEVELTIME_BONUS 165
+#define SND_GAME_LOSING 166
+#define SND_GAME_WINNING 167
+#define SND_MENU_DOOR_OPENING 168
+#define SND_MENU_DOOR_CLOSING 169
+#define SND_MENU_HALL_OF_FAME 170
+#define SND_MENU_INFO_SCREEN 171
+
+#define NUM_SOUND_FILES 172
/* values for game_status */