static unsigned int seed;
static int score;
-static void Lboom_bug(int x, int y)
+static void Lboom_generic(int x, int y, int element, int element_middle)
+{
+ Boom[x-1][y-1] = element;
+ Boom[x][y-1] = element;
+ Boom[x+1][y-1] = element;
+ Boom[x-1][y] = element;
+ Boom[x][y] = element_middle;
+ Boom[x+1][y] = element;
+ Boom[x-1][y+1] = element;
+ Boom[x][y+1] = element;
+ Boom[x+1][y+1] = element;
+}
+
+static void Lboom_bug(int x, int y, int by_element)
+{
+ Next[x][y] = Znormal;
+
+ Lboom_generic(x, y, Xemerald, Xdiamond);
+
+#if PLAY_ELEMENT_SOUND
+ play_element_sound(x, y, SOUND_boom, by_element);
+#endif
+}
+
+static void Lboom_tank(int x, int y, int by_element)
{
Next[x][y] = Znormal;
- Boom[x-1][y-1] = Xemerald;
- Boom[x][y-1] = Xemerald;
- Boom[x+1][y-1] = Xemerald;
- Boom[x-1][y] = Xemerald;
- Boom[x][y] = Xdiamond;
- Boom[x+1][y] = Xemerald;
- Boom[x-1][y+1] = Xemerald;
- Boom[x][y+1] = Xemerald;
- Boom[x+1][y+1] = Xemerald;
+
+ Lboom_generic(x, y, Xblank, Xblank);
#if PLAY_ELEMENT_SOUND
- play_element_sound(x, y, SOUND_boom, element);
+ play_element_sound(x, y, SOUND_boom, by_element);
#endif
}
-static void Lboom_tank(int x, int y)
+static void Lboom_eater(int x, int y, int by_element)
{
Next[x][y] = Znormal;
- Boom[x-1][y-1] = Xblank;
- Boom[x][y-1] = Xblank;
- Boom[x+1][y-1] = Xblank;
- Boom[x-1][y] = Xblank;
- Boom[x][y] = Xblank;
- Boom[x+1][y] = Xblank;
- Boom[x-1][y+1] = Xblank;
- Boom[x][y+1] = Xblank;
- Boom[x+1][y+1] = Xblank;
+
+ Boom[x-1][y-1] = lev.eater_array[lev.eater_pos][0];
+ Boom[x][y-1] = lev.eater_array[lev.eater_pos][1];
+ Boom[x+1][y-1] = lev.eater_array[lev.eater_pos][2];
+ Boom[x-1][y] = lev.eater_array[lev.eater_pos][3];
+ Boom[x][y] = lev.eater_array[lev.eater_pos][4];
+ Boom[x+1][y] = lev.eater_array[lev.eater_pos][5];
+ Boom[x-1][y+1] = lev.eater_array[lev.eater_pos][6];
+ Boom[x][y+1] = lev.eater_array[lev.eater_pos][7];
+ Boom[x+1][y+1] = lev.eater_array[lev.eater_pos][8];
+
+ lev.eater_pos = (lev.eater_pos + 1) & 7;
+
#if PLAY_ELEMENT_SOUND
- play_element_sound(x, y, SOUND_boom, element);
+ play_element_sound(x, y, SOUND_boom, by_element);
#endif
}
switch(Cave[x+dx][y])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ Cave[x+dx][y] = dx > 0 ? Ystone_e : Ystone_w;
+ Next[x+dx][y] = Xstone_pause;
+ goto stone_walk;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
if (Cave[x+dx-1][y-1] == Xblank)
Cave[x+dx-1][y-1] = Xacid_splash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
- goto stone_walk;
-
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- Cave[x+dx][y] = dx > 0 ? Ystone_e : Ystone_w;
- Next[x+dx][y] = Xstone_pause;
stone_walk:
Next[x][y] = Zplayer;
play_element_sound(x, y, SOUND_roll, Xstone);
ply->x = x;
+ break;
}
ply->anim = PLY_push_n + anim;
switch(Cave[x+dx][y])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ Cave[x+dx][y] = dx > 0 ? Ybomb_e : Ybomb_w;
+ Next[x+dx][y] = Xbomb_pause;
+ goto bomb_walk;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
if (Cave[x+dx-1][y-1] == Xblank)
Cave[x+dx-1][y-1] = Xacid_splash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
- goto bomb_walk;
-
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- Cave[x+dx][y] = dx > 0 ? Ybomb_e : Ybomb_w;
- Next[x+dx][y] = Xbomb_pause;
bomb_walk:
Next[x][y] = Zplayer;
play_element_sound(x, y, SOUND_roll, Xbomb);
ply->x = x;
+ break;
}
ply->anim = PLY_push_n + anim;
switch(Cave[x+dx][y])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ Cave[x+dx][y] = dx > 0 ? Ynut_e : Ynut_w;
+ Next[x+dx][y] = Xnut_pause;
+ goto nut_walk;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
if (Cave[x+dx-1][y-1] == Xblank)
Cave[x+dx-1][y-1] = Xacid_splash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
- goto nut_walk;
-
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- Cave[x+dx][y] = dx > 0 ? Ynut_e : Ynut_w;
- Next[x+dx][y] = Xnut_pause;
nut_walk:
Next[x][y] = Zplayer;
play_element_sound(x, y, SOUND_roll, Xnut);
ply->x = x;
+ break;
}
ply->anim = PLY_push_n + anim;
switch(Cave[x+dx][y])
{
- case Xalien:
- case Xalien_pause:
- Cave[x][y] = dx > 0 ? Yspring_alien_eB : Yspring_alien_wB;
- Cave[x+dx][y] = dx > 0 ? Yspring_alien_e : Yspring_alien_w;
- Next[x][y] = Zplayer;
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ Cave[x+dx][y] = dx > 0 ? Yspring_e : Yspring_w;
Next[x+dx][y] = dx > 0 ? Xspring_e : Xspring_w;
- play_element_sound(x, y, SOUND_slurp, Xalien);
- lev.score += lev.slurp_score;
- ply->x = x;
- break;
+ goto spring_walk;
case Xacid_1:
case Xacid_2:
if (Cave[x+dx-1][y-1] == Xblank)
Cave[x+dx-1][y-1] = Xacid_splash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
- goto spring_walk;
-
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- Cave[x+dx][y] = dx > 0 ? Yspring_e : Yspring_w;
- Next[x+dx][y] = dx > 0 ? Xspring_e : Xspring_w;
spring_walk:
+
Cave[x][y] = dx > 0 ? Yspring_eB : Yspring_wB;
Next[x][y] = Zplayer;
play_element_sound(x, y, SOUND_roll, Xspring);
ply->x = x;
+ break;
+
+ case Xalien:
+ case Xalien_pause:
+ Cave[x][y] = dx > 0 ? Yspring_alien_eB : Yspring_alien_wB;
+ Cave[x+dx][y] = dx > 0 ? Yspring_alien_e : Yspring_alien_w;
+ Next[x][y] = Zplayer;
+ Next[x+dx][y] = dx > 0 ? Xspring_e : Xspring_w;
+ play_element_sound(x, y, SOUND_slurp, Xalien);
+ lev.score += lev.slurp_score;
+ ply->x = x;
+ break;
}
ply->anim = PLY_push_n + anim;
case Xballoon:
switch(Cave[x+dx][y+dy])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ Cave[x+dx][y+dy] = (dy ? (dy < 0 ? Yballoon_n : Yballoon_s) :
+ (dx > 0 ? Yballoon_e : Yballoon_w));
+ Next[x+dx][y+dy] = Xballoon;
+ goto balloon_walk;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
if (Cave[x+dx-1][y+dy-1] == Xblank)
Cave[x+dx-1][y+dy-1] = Xacid_splash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
- goto balloon_walk;
-
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- Cave[x+dx][y+dy] = (dy ? (dy < 0 ? Yballoon_n : Yballoon_s) :
- (dx > 0 ? Yballoon_e : Yballoon_w));
- Next[x+dx][y+dy] = Xballoon;
balloon_walk:
+
Cave[x][y] = (dy ? (dy < 0 ? Yballoon_nB : Yballoon_sB) :
(dx > 0 ? Yballoon_eB : Yballoon_wB));
Next[x][y] = Zplayer;
play_element_sound(x, y, SOUND_push, Xballoon);
ply->x = x;
ply->y = y;
+ break;
}
ply->anim = PLY_push_n + anim;
case Xandroid_2_w:
switch(Cave[x+dx][y+dy])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ Cave[x+dx][y+dy] = (dy ? (dy < 0 ? Yandroid_n : Yandroid_s) :
+ (dx > 0 ? Yandroid_e : Yandroid_w));
+ Next[x+dx][y+dy] = (dy ? (dy < 0 ? Xandroid_2_n : Xandroid_2_s) :
+ (dx > 0 ? Xandroid_2_e : Xandroid_2_w));
+ goto android_walk;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
if (Cave[x+dx-1][y+dy-1] == Xblank)
Cave[x+dx-1][y+dy-1] = Xacid_splash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
- goto android_walk;
-
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- Cave[x+dx][y+dy] = (dy ? (dy < 0 ? Yandroid_n : Yandroid_s) :
- (dx > 0 ? Yandroid_e : Yandroid_w));
- Next[x+dx][y+dy] = (dy ? (dy < 0 ? Xandroid_2_n : Xandroid_2_s) :
- (dx > 0 ? Xandroid_2_e : Xandroid_2_w));
android_walk:
+
Cave[x][y] = (dy ? (dy < 0 ? Yandroid_nB : Yandroid_sB) :
(dx > 0 ? Yandroid_eB : Yandroid_wB));
Next[x][y] = Zplayer;
play_element_sound(x, y, SOUND_push, Xandroid);
ply->x = x;
ply->y = y;
+ break;
}
ply->anim = PLY_push_n + anim;
break;
door_walk:
+
if (!tab_blank[Cave[x+dx][y+dy]])
break;
goto wind_walk;
wind_walk:
+
play_element_sound(x, y, SOUND_press, element);
lev.wind_cnt = lev.wind_time;
break;
goto key_shoot;
key_shoot:
+
Next[x][y] = Xblank;
play_element_sound(x, y, SOUND_collect, element);
lev.score += lev.key_score;
{
switch (Cave[x][y-1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ Cave[x][y] = Yandroid_nB;
+ Cave[x][y-1] = Yandroid_n;
+ Next[x][y] = Xblank;
+ Next[x][y-1] = Xandroid;
+ play_element_sound(x, y, SOUND_android_move, Xandroid_1_n);
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- Cave[x][y] = Yandroid_nB;
- Cave[x][y-1] = Yandroid_n;
- Next[x][y] = Xblank;
- Next[x][y-1] = Xandroid;
- play_element_sound(x, y, SOUND_android_move, Xandroid_1_n);
- return;
-
default:
Landroid(x, y);
return;
{
switch (Cave[x][y-1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ Cave[x][y] = Yandroid_nB;
+ Cave[x][y-1] = Yandroid_n;
+ Next[x][y] = Xblank;
+ Next[x][y-1] = Xandroid_1_n;
+ play_element_sound(x, y, SOUND_android_move, Xandroid_2_n);
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- Cave[x][y] = Yandroid_nB;
- Cave[x][y-1] = Yandroid_n;
- Next[x][y] = Xblank;
- Next[x][y-1] = Xandroid_1_n;
- play_element_sound(x, y, SOUND_android_move, Xandroid_2_n);
- return;
-
default:
Landroid(x, y);
return;
{
switch (Cave[x+1][y])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ Cave[x][y] = Yandroid_eB;
+ Cave[x+1][y] = Yandroid_e;
+ Next[x][y] = Xblank;
+ Next[x+1][y] = Xandroid;
+ play_element_sound(x, y, SOUND_android_move, Xandroid_1_e);
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- Cave[x][y] = Yandroid_eB;
- Cave[x+1][y] = Yandroid_e;
- Next[x][y] = Xblank;
- Next[x+1][y] = Xandroid;
- play_element_sound(x, y, SOUND_android_move, Xandroid_1_e);
- return;
-
default:
Landroid(x, y);
return;
{
switch (Cave[x+1][y])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ Cave[x][y] = Yandroid_eB;
+ Cave[x+1][y] = Yandroid_e;
+ Next[x][y] = Xblank;
+ Next[x+1][y] = Xandroid_1_e;
+ play_element_sound(x, y, SOUND_android_move, Xandroid_2_e);
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- Cave[x][y] = Yandroid_eB;
- Cave[x+1][y] = Yandroid_e;
- Next[x][y] = Xblank;
- Next[x+1][y] = Xandroid_1_e;
- play_element_sound(x, y, SOUND_android_move, Xandroid_2_e);
- return;
-
default:
Landroid(x, y);
return;
{
switch (Cave[x][y+1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ Cave[x][y] = Yandroid_sB;
+ Cave[x][y+1] = Yandroid_s;
+ Next[x][y] = Xblank;
+ Next[x][y+1] = Xandroid;
+ play_element_sound(x, y, SOUND_android_move, Xandroid_1_s);
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- Cave[x][y] = Yandroid_sB;
- Cave[x][y+1] = Yandroid_s;
- Next[x][y] = Xblank;
- Next[x][y+1] = Xandroid;
- play_element_sound(x, y, SOUND_android_move, Xandroid_1_s);
- return;
-
default:
Landroid(x, y);
return;
{
switch (Cave[x][y+1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ Cave[x][y] = Yandroid_sB;
+ Cave[x][y+1] = Yandroid_s;
+ Next[x][y] = Xblank;
+ Next[x][y+1] = Xandroid_1_s;
+ play_element_sound(x, y, SOUND_android_move, Xandroid_2_s);
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- Cave[x][y] = Yandroid_sB;
- Cave[x][y+1] = Yandroid_s;
- Next[x][y] = Xblank;
- Next[x][y+1] = Xandroid_1_s;
- play_element_sound(x, y, SOUND_android_move, Xandroid_2_s);
- return;
-
default:
Landroid(x, y);
return;
{
switch (Cave[x-1][y])
{
- case Xacid_1:
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ Cave[x][y] = Yandroid_wB;
+ Cave[x-1][y] = Yandroid_w;
+ Next[x][y] = Xblank;
+ Next[x-1][y] = Xandroid;
+ play_element_sound(x, y, SOUND_android_move, Xandroid_1_w);
+ return;
+
+ case Xacid_1:
case Xacid_2:
case Xacid_3:
case Xacid_4:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- Cave[x][y] = Yandroid_wB;
- Cave[x-1][y] = Yandroid_w;
- Next[x][y] = Xblank;
- Next[x-1][y] = Xandroid;
- play_element_sound(x, y, SOUND_android_move, Xandroid_1_w);
- return;
-
default:
Landroid(x, y);
return;
{
switch (Cave[x-1][y])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ Cave[x][y] = Yandroid_wB;
+ Cave[x-1][y] = Yandroid_w;
+ Next[x][y] = Xblank;
+ Next[x-1][y] = Xandroid_1_w;
+ play_element_sound(x, y, SOUND_android_move, Xandroid_1_w);
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- Cave[x][y] = Yandroid_wB;
- Cave[x-1][y] = Yandroid_w;
- Next[x][y] = Xblank;
- Next[x-1][y] = Xandroid_1_w;
- play_element_sound(x, y, SOUND_android_move, Xandroid_1_w);
- return;
-
default:
Landroid(x, y);
return;
switch (Cave[x][y-1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ case Xplant:
+ case Yplant:
+ case Zplayer:
+ Cave[x][y] = Yeater_nB;
+ Cave[x][y-1] = Yeater_n;
+ Next[x][y] = Xblank;
+ Next[x][y-1] = Xeater_n;
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- case Xplant:
- case Yplant:
- case Zplayer:
- Cave[x][y] = Yeater_nB;
- Cave[x][y-1] = Yeater_n;
- Next[x][y] = Xblank;
- Next[x][y-1] = Xeater_n;
- return;
-
default:
Next[x][y] = RANDOM(2) ? Xeater_e : Xeater_w;
play_element_sound(x, y, SOUND_eater, Xeater_n);
switch (Cave[x+1][y])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ case Xplant:
+ case Yplant:
+ case Zplayer:
+ Cave[x][y] = Yeater_eB;
+ Cave[x+1][y] = Yeater_e;
+ Next[x][y] = Xblank;
+ Next[x+1][y] = Xeater_e;
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- case Xplant:
- case Yplant:
- case Zplayer:
- Cave[x][y] = Yeater_eB;
- Cave[x+1][y] = Yeater_e;
- Next[x][y] = Xblank;
- Next[x+1][y] = Xeater_e;
- return;
-
default:
Next[x][y] = RANDOM(2) ? Xeater_n : Xeater_s;
play_element_sound(x, y, SOUND_eater, Xeater_e);
switch (Cave[x][y+1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ case Xplant:
+ case Yplant:
+ case Zplayer:
+ Cave[x][y] = Yeater_sB;
+ Cave[x][y+1] = Yeater_s;
+ Next[x][y] = Xblank;
+ Next[x][y+1] = Xeater_s;
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- case Xplant:
- case Yplant:
- case Zplayer:
- Cave[x][y] = Yeater_sB;
- Cave[x][y+1] = Yeater_s;
- Next[x][y] = Xblank;
- Next[x][y+1] = Xeater_s;
- return;
-
default:
Next[x][y] = RANDOM(2) ? Xeater_e : Xeater_w;
play_element_sound(x, y, SOUND_eater, Xeater_s);
switch (Cave[x-1][y])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ case Xplant:
+ case Yplant:
+ case Zplayer:
+ Cave[x][y] = Yeater_wB;
+ Cave[x-1][y] = Yeater_w;
+ Next[x][y] = Xblank;
+ Next[x-1][y] = Xeater_w;
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- case Xplant:
- case Yplant:
- case Zplayer:
- Cave[x][y] = Yeater_wB;
- Cave[x-1][y] = Yeater_w;
- Next[x][y] = Xblank;
- Next[x-1][y] = Xeater_w;
- return;
-
default:
Next[x][y] = RANDOM(2) ? Xeater_n : Xeater_s;
play_element_sound(x, y, SOUND_eater, Xeater_w);
{
switch (Cave[x][y-1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ case Xplant:
+ case Yplant:
+ case Zplayer:
+ Cave[x][y] = Yalien_nB;
+ Cave[x][y-1] = Yalien_n;
+ Next[x][y] = Xblank;
+ Next[x][y-1] = Xalien_pause;
+ play_element_sound(x, y, SOUND_alien, Xalien);
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
Next[x][y] = Xblank;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
-
+ }
+ }
+ else if (y < dy)
+ {
+ switch (Cave[x][y+1])
+ {
case Xblank:
case Xacid_splash_e:
case Xacid_splash_w:
case Xplant:
case Yplant:
case Zplayer:
- Cave[x][y] = Yalien_nB;
- Cave[x][y-1] = Yalien_n;
+ Cave[x][y] = Yalien_sB;
+ Cave[x][y+1] = Yalien_s;
Next[x][y] = Xblank;
- Next[x][y-1] = Xalien_pause;
+ Next[x][y+1] = Xalien_pause;
play_element_sound(x, y, SOUND_alien, Xalien);
return;
- }
- }
- else if (y < dy)
- {
- switch (Cave[x][y+1])
- {
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
Cave[x-1][y] = Xacid_splash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
-
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- case Xplant:
- case Yplant:
- case Zplayer:
- Cave[x][y] = Yalien_sB;
- Cave[x][y+1] = Yalien_s;
- Next[x][y] = Xblank;
- Next[x][y+1] = Xalien_pause;
- play_element_sound(x, y, SOUND_alien, Xalien);
- return;
}
}
}
{
switch (Cave[x+1][y])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ case Xplant:
+ case Yplant:
+ case Zplayer:
+ Cave[x][y] = Yalien_eB;
+ Cave[x+1][y] = Yalien_e;
+ Next[x][y] = Xblank;
+ Next[x+1][y] = Xalien_pause;
+ play_element_sound(x, y, SOUND_alien, Xalien);
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
Next[x][y] = Xblank;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
-
+ }
+ }
+ else if (x > dx)
+ {
+ switch (Cave[x-1][y])
+ {
case Xblank:
case Xacid_splash_e:
case Xacid_splash_w:
case Xplant:
case Yplant:
case Zplayer:
- Cave[x][y] = Yalien_eB;
- Cave[x+1][y] = Yalien_e;
+ Cave[x][y] = Yalien_wB;
+ Cave[x-1][y] = Yalien_w;
Next[x][y] = Xblank;
- Next[x+1][y] = Xalien_pause;
+ Next[x-1][y] = Xalien_pause;
play_element_sound(x, y, SOUND_alien, Xalien);
return;
- }
- }
- else if (x > dx)
- {
- switch (Cave[x-1][y])
- {
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
Next[x][y] = Xblank;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
-
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- case Xplant:
- case Yplant:
- case Zplayer:
- Cave[x][y] = Yalien_wB;
- Cave[x-1][y] = Yalien_w;
- Next[x][y] = Xblank;
- Next[x-1][y] = Xalien_pause;
- play_element_sound(x, y, SOUND_alien, Xalien);
- return;
}
}
}
{
switch (Cave[x][y-1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ case Xplant:
+ case Yplant:
+ case Zplayer:
+ Cave[x][y] = Ybug_nB;
+ Cave[x][y-1] = Ybug_n;
+ Next[x][y] = Xblank;
+ Next[x][y-1] = Xbug_1_n;
+ play_element_sound(x, y, SOUND_bug, Xbug_1_n);
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- case Xplant:
- case Yplant:
- case Zplayer:
- Cave[x][y] = Ybug_nB;
- Cave[x][y-1] = Ybug_n;
- Next[x][y] = Xblank;
- Next[x][y-1] = Xbug_1_n;
- play_element_sound(x, y, SOUND_bug, Xbug_1_n);
- return;
-
default:
Cave[x][y] = Ybug_n_w;
Next[x][y] = Xbug_2_w;
tab_amoeba[Cave[x][y+1]] ||
tab_amoeba[Cave[x-1][y]])
{
- Lboom_bug(x, y);
+ Lboom_bug(x, y, Xbug_1_n);
return;
}
tab_amoeba[Cave[x][y+1]] ||
tab_amoeba[Cave[x-1][y]])
{
- Lboom_bug(x, y);
+ Lboom_bug(x, y, Xbug_2_n);
return;
}
{
switch (Cave[x+1][y])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ case Xplant:
+ case Yplant:
+ case Zplayer:
+ Cave[x][y] = Ybug_eB;
+ Cave[x+1][y] = Ybug_e;
+ Next[x][y] = Xblank;
+ Next[x+1][y] = Xbug_1_e;
+ play_element_sound(x, y, SOUND_bug, Xbug_1_e);
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- case Xplant:
- case Yplant:
- case Zplayer:
- Cave[x][y] = Ybug_eB;
- Cave[x+1][y] = Ybug_e;
- Next[x][y] = Xblank;
- Next[x+1][y] = Xbug_1_e;
- play_element_sound(x, y, SOUND_bug, Xbug_1_e);
- return;
-
default:
Cave[x][y] = Ybug_e_n;
Next[x][y] = Xbug_2_n;
tab_amoeba[Cave[x][y+1]] ||
tab_amoeba[Cave[x-1][y]])
{
- Lboom_bug(x, y);
+ Lboom_bug(x, y, Xbug_1_e);
return;
}
tab_amoeba[Cave[x][y+1]] ||
tab_amoeba[Cave[x-1][y]])
{
- Lboom_bug(x, y);
+ Lboom_bug(x, y, Xbug_2_e);
return;
}
Lbug_e(x, y);
}
-static void Lbug_s(int x, int y)
-{
- switch (Cave[x][y+1])
- {
+static void Lbug_s(int x, int y)
+{
+ switch (Cave[x][y+1])
+ {
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ case Xplant:
+ case Yplant:
+ case Zplayer:
+ Cave[x][y] = Ybug_sB;
+ Cave[x][y+1] = Ybug_s;
+ Next[x][y] = Xblank;
+ Next[x][y+1] = Xbug_1_s;
+ play_element_sound(x, y, SOUND_bug, Xbug_1_s);
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- case Xplant:
- case Yplant:
- case Zplayer:
- Cave[x][y] = Ybug_sB;
- Cave[x][y+1] = Ybug_s;
- Next[x][y] = Xblank;
- Next[x][y+1] = Xbug_1_s;
- play_element_sound(x, y, SOUND_bug, Xbug_1_s);
- return;
-
default:
Cave[x][y] = Ybug_s_e;
Next[x][y] = Xbug_2_e;
tab_amoeba[Cave[x][y+1]] ||
tab_amoeba[Cave[x-1][y]])
{
- Lboom_bug(x, y);
+ Lboom_bug(x, y, Xbug_1_s);
return;
}
tab_amoeba[Cave[x][y+1]] ||
tab_amoeba[Cave[x-1][y]])
{
- Lboom_bug(x, y);
+ Lboom_bug(x, y, Xbug_2_s);
return;
}
{
switch (Cave[x-1][y])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ case Xplant:
+ case Yplant:
+ case Zplayer:
+ Cave[x][y] = Ybug_wB;
+ Cave[x-1][y] = Ybug_w;
+ Next[x][y] = Xblank;
+ Next[x-1][y] = Xbug_1_w;
+ play_element_sound(x, y, SOUND_bug, Xbug_1_w);
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- case Xplant:
- case Yplant:
- case Zplayer:
- Cave[x][y] = Ybug_wB;
- Cave[x-1][y] = Ybug_w;
- Next[x][y] = Xblank;
- Next[x-1][y] = Xbug_1_w;
- play_element_sound(x, y, SOUND_bug, Xbug_1_w);
- return;
-
default:
Cave[x][y] = Ybug_w_s;
Next[x][y] = Xbug_2_s;
tab_amoeba[Cave[x][y+1]] ||
tab_amoeba[Cave[x-1][y]])
{
- Lboom_bug(x, y);
+ Lboom_bug(x, y, Xbug_1_w);
return;
}
tab_amoeba[Cave[x][y+1]] ||
tab_amoeba[Cave[x-1][y]])
{
- Lboom_bug(x, y);
+ Lboom_bug(x, y, Xbug_2_w);
return;
}
{
switch (Cave[x][y-1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ case Xplant:
+ case Yplant:
+ case Zplayer:
+ Cave[x][y] = Ytank_nB;
+ Cave[x][y-1] = Ytank_n;
+ Next[x][y] = Xblank;
+ Next[x][y-1] = Xtank_1_n;
+ play_element_sound(x, y, SOUND_tank, Xtank_1_n);
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- case Xplant:
- case Yplant:
- case Zplayer:
- Cave[x][y] = Ytank_nB;
- Cave[x][y-1] = Ytank_n;
- Next[x][y] = Xblank;
- Next[x][y-1] = Xtank_1_n;
- play_element_sound(x, y, SOUND_tank, Xtank_1_n);
- return;
-
default:
Cave[x][y] = Ytank_n_e;
Next[x][y] = Xtank_2_e;
tab_amoeba[Cave[x][y+1]] ||
tab_amoeba[Cave[x-1][y]])
{
- Lboom_tank(x, y);
+ Lboom_tank(x, y, Xtank_1_n);
return;
}
tab_amoeba[Cave[x][y+1]] ||
tab_amoeba[Cave[x-1][y]])
{
- Lboom_tank(x, y);
+ Lboom_tank(x, y, Xtank_2_n);
return;
}
{
switch (Cave[x+1][y])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ case Xplant:
+ case Yplant:
+ case Zplayer:
+ Cave[x][y] = Ytank_eB;
+ Cave[x+1][y] = Ytank_e;
+ Next[x][y] = Xblank;
+ Next[x+1][y] = Xtank_1_e;
+ play_element_sound(x, y, SOUND_tank, Xtank_1_e);
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- case Xplant:
- case Yplant:
- case Zplayer:
- Cave[x][y] = Ytank_eB;
- Cave[x+1][y] = Ytank_e;
- Next[x][y] = Xblank;
- Next[x+1][y] = Xtank_1_e;
- play_element_sound(x, y, SOUND_tank, Xtank_1_e);
- return;
-
default:
Cave[x][y] = Ytank_e_s;
Next[x][y] = Xtank_2_s;
tab_amoeba[Cave[x][y+1]] ||
tab_amoeba[Cave[x-1][y]])
{
- Lboom_tank(x, y);
+ Lboom_tank(x, y, Xtank_1_e);
return;
}
tab_amoeba[Cave[x][y+1]] ||
tab_amoeba[Cave[x-1][y]])
{
- Lboom_tank(x, y);
+ Lboom_tank(x, y, Xtank_2_e);
return;
}
{
switch (Cave[x][y+1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ case Xplant:
+ case Yplant:
+ case Zplayer:
+ Cave[x][y] = Ytank_sB;
+ Cave[x][y+1] = Ytank_s;
+ Next[x][y] = Xblank;
+ Next[x][y+1] = Xtank_1_s;
+ play_element_sound(x, y, SOUND_tank, Xtank_1_s);
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- case Xplant:
- case Yplant:
- case Zplayer:
- Cave[x][y] = Ytank_sB;
- Cave[x][y+1] = Ytank_s;
- Next[x][y] = Xblank;
- Next[x][y+1] = Xtank_1_s;
- play_element_sound(x, y, SOUND_tank, Xtank_1_s);
- return;
-
default:
Cave[x][y] = Ytank_s_w;
Next[x][y] = Xtank_2_w;
tab_amoeba[Cave[x][y+1]] ||
tab_amoeba[Cave[x-1][y]])
{
- Lboom_tank(x, y);
+ Lboom_tank(x, y, Xtank_1_s);
return;
}
tab_amoeba[Cave[x][y+1]] ||
tab_amoeba[Cave[x-1][y]])
{
- Lboom_tank(x, y);
+ Lboom_tank(x, y, Xtank_2_s);
return;
}
{
switch (Cave[x-1][y])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ case Xplant:
+ case Yplant:
+ case Zplayer:
+ Cave[x][y] = Ytank_wB;
+ Cave[x-1][y] = Ytank_w;
+ Next[x][y] = Xblank;
+ Next[x-1][y] = Xtank_1_w;
+ play_element_sound(x, y, SOUND_tank, Xtank_1_w);
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- case Xplant:
- case Yplant:
- case Zplayer:
- Cave[x][y] = Ytank_wB;
- Cave[x-1][y] = Ytank_w;
- Next[x][y] = Xblank;
- Next[x-1][y] = Xtank_1_w;
- play_element_sound(x, y, SOUND_tank, Xtank_1_w);
- return;
-
default:
Cave[x][y] = Ytank_w_n;
Next[x][y] = Xtank_2_n;
tab_amoeba[Cave[x][y+1]] ||
tab_amoeba[Cave[x-1][y]])
{
- Lboom_tank(x, y);
+ Lboom_tank(x, y, Xtank_1_w);
return;
}
tab_amoeba[Cave[x][y+1]] ||
tab_amoeba[Cave[x-1][y]])
{
- Lboom_tank(x, y);
+ Lboom_tank(x, y, Xtank_2_w);
return;
}
{
switch (Cave[x][y+1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ Cave[x][y] = Yemerald_sB;
+ Cave[x][y+1] = Yemerald_s;
+ Next[x][y] = Xblank;
+ Next[x][y+1] = Xemerald_fall;
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- Cave[x][y] = Yemerald_sB;
- Cave[x][y+1] = Yemerald_s;
- Next[x][y] = Xblank;
- Next[x][y+1] = Xemerald_fall;
- return;
-
case Xspring:
case Xspring_pause:
case Xspring_e:
{
switch (Cave[x][y+1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ Cave[x][y] = Yemerald_sB;
+ Cave[x][y+1] = Yemerald_s;
+ Next[x][y] = Xblank;
+ Next[x][y+1] = Xemerald_fall;
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- Cave[x][y] = Yemerald_sB;
- Cave[x][y+1] = Yemerald_s;
- Next[x][y] = Xblank;
- Next[x][y+1] = Xemerald_fall;
- return;
-
default:
Cave[x][y] = Xemerald;
Next[x][y] = Xemerald;
{
switch (Cave[x][y+1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ case Zplayer:
+ Cave[x][y] = Yemerald_sB;
+ Cave[x][y+1] = Yemerald_s;
+ Next[x][y] = Xblank;
+ Next[x][y+1] = Xemerald_fall;
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- case Zplayer:
- Cave[x][y] = Yemerald_sB;
- Cave[x][y+1] = Yemerald_s;
- Next[x][y] = Xblank;
- Next[x][y+1] = Xemerald_fall;
- return;
-
case Xwonderwall:
if (lev.wonderwall_time)
{
{
switch (Cave[x][y+1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ Cave[x][y] = Ydiamond_sB;
+ Cave[x][y+1] = Ydiamond_s;
+ Next[x][y] = Xblank;
+ Next[x][y+1] = Xdiamond_fall;
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- Cave[x][y] = Ydiamond_sB;
- Cave[x][y+1] = Ydiamond_s;
- Next[x][y] = Xblank;
- Next[x][y+1] = Xdiamond_fall;
- return;
-
case Xspring:
case Xspring_pause:
case Xspring_e:
{
switch (Cave[x][y+1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ Cave[x][y] = Ydiamond_sB;
+ Cave[x][y+1] = Ydiamond_s;
+ Next[x][y] = Xblank;
+ Next[x][y+1] = Xdiamond_fall;
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
+ default:
+ Cave[x][y] = Xdiamond;
+ Next[x][y] = Xdiamond;
+ return;
+ }
+}
+
+static void Ldiamond_fall(int x, int y)
+{
+ switch (Cave[x][y+1])
+ {
case Xblank:
case Xacid_splash_e:
case Xacid_splash_w:
+ case Zplayer:
Cave[x][y] = Ydiamond_sB;
Cave[x][y+1] = Ydiamond_s;
Next[x][y] = Xblank;
Next[x][y+1] = Xdiamond_fall;
return;
- default:
- Cave[x][y] = Xdiamond;
- Next[x][y] = Xdiamond;
- return;
- }
-}
-
-static void Ldiamond_fall(int x, int y)
-{
- switch (Cave[x][y+1])
- {
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- case Zplayer:
- Cave[x][y] = Ydiamond_sB;
- Cave[x][y+1] = Ydiamond_s;
- Next[x][y] = Xblank;
- Next[x][y+1] = Xdiamond_fall;
- return;
-
case Xwonderwall:
if (lev.wonderwall_time)
{
{
switch (Cave[x][y+1])
{
- case Xacid_1:
- case Xacid_2:
- case Xacid_3:
- case Xacid_4:
- case Xacid_5:
- case Xacid_6:
- case Xacid_7:
- case Xacid_8:
- Cave[x][y] = Ystone_sB;
- if (Cave[x+1][y] == Xblank)
- Cave[x+1][y] = Xacid_splash_e;
- if (Cave[x-1][y] == Xblank)
- Cave[x-1][y] = Xacid_splash_w;
- Next[x][y] = Xblank;
- play_element_sound(x, y, SOUND_acid, Xacid_1);
- return;
-
case Xblank:
case Xacid_splash_e:
case Xacid_splash_w:
Next[x][y+1] = Xstone_fall;
return;
+ case Xacid_1:
+ case Xacid_2:
+ case Xacid_3:
+ case Xacid_4:
+ case Xacid_5:
+ case Xacid_6:
+ case Xacid_7:
+ case Xacid_8:
+ Cave[x][y] = Ystone_sB;
+ if (Cave[x+1][y] == Xblank)
+ Cave[x+1][y] = Xacid_splash_e;
+ if (Cave[x-1][y] == Xblank)
+ Cave[x-1][y] = Xacid_splash_w;
+ Next[x][y] = Xblank;
+ play_element_sound(x, y, SOUND_acid, Xacid_1);
+ return;
+
case Xsand:
Cave[x][y] = Xsand_stonein_1;
Cave[x][y+1] = Xsand_sandstone_1;
{
switch (Cave[x][y+1])
{
- case Xacid_1:
- case Xacid_2:
- case Xacid_3:
- case Xacid_4:
- case Xacid_5:
- case Xacid_6:
- case Xacid_7:
- case Xacid_8:
- Cave[x][y] = Ystone_sB;
- if (Cave[x+1][y] == Xblank)
- Cave[x+1][y] = Xacid_splash_e;
- if (Cave[x-1][y] == Xblank)
- Cave[x-1][y] = Xacid_splash_w;
- Next[x][y] = Xblank;
- play_element_sound(x, y, SOUND_acid, Xacid_1);
- return;
-
case Xblank:
case Xacid_splash_e:
case Xacid_splash_w:
Next[x][y+1] = Xstone_fall;
return;
- default:
- Cave[x][y] = Xstone;
- Next[x][y] = Xstone;
- return;
- }
-}
-
-static void Lstone_fall(int x, int y)
-{
- switch (Cave[x][y+1])
- {
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
+ default:
+ Cave[x][y] = Xstone;
+ Next[x][y] = Xstone;
+ return;
+ }
+}
+
+static void Lstone_fall(int x, int y)
+{
+ switch (Cave[x][y+1])
+ {
case Xblank:
case Xacid_splash_e:
case Xacid_splash_w:
Next[x][y+1] = Xstone_fall;
return;
+ case Xacid_1:
+ case Xacid_2:
+ case Xacid_3:
+ case Xacid_4:
+ case Xacid_5:
+ case Xacid_6:
+ case Xacid_7:
+ case Xacid_8:
+ Cave[x][y] = Ystone_sB;
+ if (Cave[x+1][y] == Xblank)
+ Cave[x+1][y] = Xacid_splash_e;
+ if (Cave[x-1][y] == Xblank)
+ Cave[x-1][y] = Xacid_splash_w;
+ Next[x][y] = Xblank;
+ play_element_sound(x, y, SOUND_acid, Xacid_1);
+ return;
+
case Xnut:
case Xnut_pause:
Cave[x][y+1] = Ynut_stone;
case Xbug_2_w:
Cave[x][y] = Ystone_sB;
Cave[x][y+1] = Ybug_stone;
- Next[x][y+1] = Znormal;
- Boom[x-1][y] = Xemerald;
- Boom[x][y] = Xemerald;
- Boom[x+1][y] = Xemerald;
- Boom[x-1][y+1] = Xemerald;
- Boom[x][y+1] = Xdiamond;
- Boom[x+1][y+1] = Xemerald;
- Boom[x-1][y+2] = Xemerald;
- Boom[x][y+2] = Xemerald;
- Boom[x+1][y+2] = Xemerald;
-#if PLAY_ELEMENT_SOUND
- play_element_sound(x, y, SOUND_boom, Xstone_fall);
-#endif
+ Lboom_bug(x, y+1, Xstone_fall);
score += lev.bug_score;
return;
case Xtank_2_w:
Cave[x][y] = Ystone_sB;
Cave[x][y+1] = Ytank_stone;
- Next[x][y+1] = Znormal;
- Boom[x-1][y] = Xblank;
- Boom[x][y] = Xblank;
- Boom[x+1][y] = Xblank;
- Boom[x-1][y+1] = Xblank;
- Boom[x][y+1] = Xblank;
- Boom[x+1][y+1] = Xblank;
- Boom[x-1][y+2] = Xblank;
- Boom[x][y+2] = Xblank;
- Boom[x+1][y+2] = Xblank;
-#if PLAY_ELEMENT_SOUND
- play_element_sound(x, y, SOUND_boom, Xstone_fall);
-#endif
+ Lboom_tank(x, y+1, Xstone_fall);
score += lev.tank_score;
return;
case Xeater_w:
Cave[x][y] = Ystone_sB;
Cave[x][y+1] = Yeater_stone;
- Next[x][y+1] = Znormal;
- Boom[x-1][y] = lev.eater_array[lev.eater_pos][0];
- Boom[x][y] = lev.eater_array[lev.eater_pos][1];
- Boom[x+1][y] = lev.eater_array[lev.eater_pos][2];
- Boom[x-1][y+1] = lev.eater_array[lev.eater_pos][3];
- Boom[x][y+1] = lev.eater_array[lev.eater_pos][4];
- Boom[x+1][y+1] = lev.eater_array[lev.eater_pos][5];
- Boom[x-1][y+2] = lev.eater_array[lev.eater_pos][6];
- Boom[x][y+2] = lev.eater_array[lev.eater_pos][7];
- Boom[x+1][y+2] = lev.eater_array[lev.eater_pos][8];
-#if PLAY_ELEMENT_SOUND
- play_element_sound(x, y, SOUND_boom, Xstone_fall);
-#endif
- lev.eater_pos = (lev.eater_pos + 1) & 7;
+ Lboom_eater(x, y+1, Xstone_fall);
score += lev.eater_score;
return;
case Xalien_pause:
Cave[x][y] = Ystone_sB;
Cave[x][y+1] = Yalien_stone;
- Next[x][y+1] = Znormal;
- Boom[x-1][y] = Xblank;
- Boom[x][y] = Xblank;
- Boom[x+1][y] = Xblank;
- Boom[x-1][y+1] = Xblank;
- Boom[x][y+1] = Xblank;
- Boom[x+1][y+1] = Xblank;
- Boom[x-1][y+2] = Xblank;
- Boom[x][y+2] = Xblank;
- Boom[x+1][y+2] = Xblank;
-#if PLAY_ELEMENT_SOUND
- play_element_sound(x, y, SOUND_boom, Xstone_fall);
-#endif
+ Lboom_tank(x, y+1, Xstone_fall);
score += lev.alien_score;
return;
case Xbomb:
case Xbomb_pause:
Cave[x][y+1] = Ybomb_blank;
- Next[x][y+1] = Znormal;
- Boom[x-1][y] = Xblank;
- Boom[x][y] = Xblank;
- Boom[x+1][y] = Xblank;
- Boom[x-1][y+1] = Xblank;
- Boom[x][y+1] = Xblank;
- Boom[x+1][y+1] = Xblank;
- Boom[x-1][y+2] = Xblank;
- Boom[x][y+2] = Xblank;
- Boom[x+1][y+2] = Xblank;
-#if PLAY_ELEMENT_SOUND
- play_element_sound(x, y, SOUND_boom, Xstone_fall);
-#endif
+ Lboom_tank(x, y+1, Xstone_fall);
return;
case Xwonderwall:
{
switch (Cave[x][y+1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ Cave[x][y] = Ybomb_sB;
+ Cave[x][y+1] = Ybomb_s;
+ Next[x][y] = Xblank;
+ Next[x][y+1] = Xbomb_fall;
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- Cave[x][y] = Ybomb_sB;
- Cave[x][y+1] = Ybomb_s;
- Next[x][y] = Xblank;
- Next[x][y+1] = Xbomb_fall;
- return;
-
case Xspring:
case Xspring_pause:
case Xspring_e:
{
switch (Cave[x][y+1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ Cave[x][y] = Ybomb_sB;
+ Cave[x][y+1] = Ybomb_s;
+ Next[x][y] = Xblank;
+ Next[x][y+1] = Xbomb_fall;
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- Cave[x][y] = Ybomb_sB;
- Cave[x][y+1] = Ybomb_s;
- Next[x][y] = Xblank;
- Next[x][y+1] = Xbomb_fall;
- return;
-
default:
Cave[x][y] = Xbomb;
Next[x][y] = Xbomb;
{
switch (Cave[x][y+1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ Cave[x][y] = Ybomb_sB;
+ Cave[x][y+1] = Ybomb_s;
+ Next[x][y] = Xblank;
+ Next[x][y+1] = Xbomb_fall;
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- Cave[x][y] = Ybomb_sB;
- Cave[x][y+1] = Ybomb_s;
- Next[x][y] = Xblank;
- Next[x][y+1] = Xbomb_fall;
- return;
-
default:
Cave[x][y] = Ybomb_blank;
- Next[x][y] = Znormal;
- Boom[x-1][y-1] = Xblank;
- Boom[x][y-1] = Xblank;
- Boom[x+1][y-1] = Xblank;
- Boom[x-1][y] = Xblank;
- Boom[x][y] = Xblank;
- Boom[x+1][y] = Xblank;
- Boom[x-1][y+1] = Xblank;
- Boom[x][y+1] = Xblank;
- Boom[x+1][y+1] = Xblank;
-#if PLAY_ELEMENT_SOUND
- play_element_sound(x, y, SOUND_boom, Xbomb_fall);
-#endif
+ Lboom_tank(x, y, Xbomb_fall);
return;
}
}
{
switch (Cave[x][y+1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ Cave[x][y] = Ynut_sB;
+ Cave[x][y+1] = Ynut_s;
+ Next[x][y] = Xblank;
+ Next[x][y+1] = Xnut_fall;
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- Cave[x][y] = Ynut_sB;
- Cave[x][y+1] = Ynut_s;
- Next[x][y] = Xblank;
- Next[x][y+1] = Xnut_fall;
- return;
-
case Xspring:
case Xspring_pause:
case Xspring_e:
{
switch (Cave[x][y+1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ Cave[x][y] = Ynut_sB;
+ Cave[x][y+1] = Ynut_s;
+ Next[x][y] = Xblank;
+ Next[x][y+1] = Xnut_fall;
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- Cave[x][y] = Ynut_sB;
- Cave[x][y+1] = Ynut_s;
- Next[x][y] = Xblank;
- Next[x][y+1] = Xnut_fall;
- return;
-
default:
Cave[x][y] = Xnut;
Next[x][y] = Xnut;
{
switch (Cave[x][y+1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ case Zplayer:
+ Cave[x][y] = Ynut_sB;
+ Cave[x][y+1] = Ynut_s;
+ Next[x][y] = Xblank;
+ Next[x][y+1] = Xnut_fall;
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- case Zplayer:
- Cave[x][y] = Ynut_sB;
- Cave[x][y+1] = Ynut_s;
- Next[x][y] = Xblank;
- Next[x][y+1] = Xnut_fall;
- return;
-
default:
Cave[x][y] = Xnut;
Next[x][y] = Xnut;
{
switch (Cave[x][y+1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ case Xplant:
+ case Yplant:
+ Cave[x][y] = Yspring_sB;
+ Cave[x][y+1] = Yspring_s;
+ Next[x][y] = Xblank;
+ Next[x][y+1] = Xspring_fall;
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
case Xacid_7:
case Xacid_8:
Cave[x][y] = Yspring_sB;
- if (Cave[x+1][y] == Xblank)
- Cave[x+1][y] = Xacid_splash_e;
- if (Cave[x-1][y] == Xblank)
- Cave[x-1][y] = Xacid_splash_w;
- Next[x][y] = Xblank;
- play_element_sound(x, y, SOUND_acid, Xacid_1);
- return;
-
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- case Xplant:
- case Yplant:
- Cave[x][y] = Yspring_sB;
- Cave[x][y+1] = Yspring_s;
+ if (Cave[x+1][y] == Xblank)
+ Cave[x+1][y] = Xacid_splash_e;
+ if (Cave[x-1][y] == Xblank)
+ Cave[x-1][y] = Xacid_splash_w;
Next[x][y] = Xblank;
- Next[x][y+1] = Xspring_fall;
+ play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
case Xspring:
{
switch (Cave[x][y+1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ Cave[x][y] = Yspring_sB;
+ Cave[x][y+1] = Yspring_s;
+ Next[x][y] = Xblank;
+ Next[x][y+1] = Xspring_fall;
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- Cave[x][y] = Yspring_sB;
- Cave[x][y+1] = Yspring_s;
- Next[x][y] = Xblank;
- Next[x][y+1] = Xspring_fall;
- return;
-
default:
Cave[x][y] = Xspring;
Next[x][y] = Xspring;
{
switch (Cave[x][y+1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ Cave[x][y] = Yspring_sB;
+ Cave[x][y+1] = Yspring_s;
+ Next[x][y] = Xblank;
+ Next[x][y+1] = Xspring_fall;
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- Cave[x][y] = Yspring_sB;
- Cave[x][y+1] = Yspring_s;
- Next[x][y] = Xblank;
- Next[x][y+1] = Xspring_fall;
- return;
-
case Xbumper:
Cave[x][y+1] = XbumperB;
}
switch (Cave[x+1][y])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ case Yalien_nB:
+ case Yalien_eB:
+ case Yalien_sB:
+ case Yalien_wB:
+ Cave[x][y] = Yspring_eB;
+ Cave[x+1][y] = Yspring_e;
+ Next[x][y] = Xblank;
+ Next[x+1][y] = Xspring_e;
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- case Yalien_nB:
- case Yalien_eB:
- case Yalien_sB:
- case Yalien_wB:
- Cave[x][y] = Yspring_eB;
- Cave[x+1][y] = Yspring_e;
- Next[x][y] = Xblank;
- Next[x+1][y] = Xspring_e;
- return;
-
case Xalien:
case Xalien_pause:
case Yalien_n:
{
switch (Cave[x][y+1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ Cave[x][y] = Yspring_sB;
+ Cave[x][y+1] = Yspring_s;
+ Next[x][y] = Xblank;
+ Next[x][y+1] = Xspring_fall;
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- Cave[x][y] = Yspring_sB;
- Cave[x][y+1] = Yspring_s;
- Next[x][y] = Xblank;
- Next[x][y+1] = Xspring_fall;
- return;
-
case Xbumper:
Cave[x][y+1] = XbumperB;
}
switch (Cave[x-1][y])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ case Yalien_nB:
+ case Yalien_eB:
+ case Yalien_sB:
+ case Yalien_wB:
+ Cave[x][y] = Yspring_wB;
+ Cave[x-1][y] = Yspring_w;
+ Next[x][y] = Xblank;
+ Next[x-1][y] = Xspring_w;
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- case Yalien_nB:
- case Yalien_eB:
- case Yalien_sB:
- case Yalien_wB:
- Cave[x][y] = Yspring_wB;
- Cave[x-1][y] = Yspring_w;
- Next[x][y] = Xblank;
- Next[x-1][y] = Xspring_w;
- return;
-
case Xalien:
case Xalien_pause:
case Yalien_n:
{
switch (Cave[x][y+1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ case Zplayer:
+ Cave[x][y] = Yspring_sB;
+ Cave[x][y+1] = Yspring_s;
+ Next[x][y] = Xblank;
+ Next[x][y+1] = Xspring_fall;
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- case Zplayer:
- Cave[x][y] = Yspring_sB;
- Cave[x][y+1] = Yspring_s;
- Next[x][y] = Xblank;
- Next[x][y+1] = Xspring_fall;
- return;
-
case Xbomb:
case Xbomb_pause:
Cave[x][y+1] = Ybomb_blank;
- Next[x][y+1] = Znormal;
- Boom[x-1][y] = Xblank;
- Boom[x][y] = Xblank;
- Boom[x+1][y] = Xblank;
- Boom[x-1][y+1] = Xblank;
- Boom[x][y+1] = Xblank;
- Boom[x+1][y+1] = Xblank;
- Boom[x-1][y+2] = Xblank;
- Boom[x][y+2] = Xblank;
- Boom[x+1][y+2] = Xblank;
-#if PLAY_ELEMENT_SOUND
- play_element_sound(x, y, SOUND_boom, Xspring_fall);
-#endif
+ Lboom_tank(x, y+1, Xspring_fall);
return;
case Xbug_1_n:
case Xbug_2_w:
Cave[x][y] = Yspring_sB;
Cave[x][y+1] = Ybug_spring;
- Next[x][y+1] = Znormal;
- Boom[x-1][y] = Xemerald;
- Boom[x][y] = Xemerald;
- Boom[x+1][y] = Xemerald;
- Boom[x-1][y+1] = Xemerald;
- Boom[x][y+1] = Xdiamond;
- Boom[x+1][y+1] = Xemerald;
- Boom[x-1][y+2] = Xemerald;
- Boom[x][y+2] = Xemerald;
- Boom[x+1][y+2] = Xemerald;
-#if PLAY_ELEMENT_SOUND
- play_element_sound(x, y, SOUND_boom, Xspring_fall);
-#endif
+ Lboom_bug(x, y+1, Xspring_fall);
score += lev.bug_score;
return;
case Xtank_2_w:
Cave[x][y] = Yspring_sB;
Cave[x][y+1] = Ytank_spring;
- Next[x][y+1] = Znormal;
- Boom[x-1][y] = Xblank;
- Boom[x][y] = Xblank;
- Boom[x+1][y] = Xblank;
- Boom[x-1][y+1] = Xblank;
- Boom[x][y+1] = Xblank;
- Boom[x+1][y+1] = Xblank;
- Boom[x-1][y+2] = Xblank;
- Boom[x][y+2] = Xblank;
- Boom[x+1][y+2] = Xblank;
-#if PLAY_ELEMENT_SOUND
- play_element_sound(x, y, SOUND_boom, Xspring_fall);
-#endif
+ Lboom_tank(x, y+1, Xspring_fall);
score += lev.tank_score;
return;
case Xeater_w:
Cave[x][y] = Yspring_sB;
Cave[x][y+1] = Yeater_spring;
- Next[x][y+1] = Znormal;
- Boom[x-1][y] = lev.eater_array[lev.eater_pos][0];
- Boom[x][y] = lev.eater_array[lev.eater_pos][1];
- Boom[x+1][y] = lev.eater_array[lev.eater_pos][2];
- Boom[x-1][y+1] = lev.eater_array[lev.eater_pos][3];
- Boom[x][y+1] = lev.eater_array[lev.eater_pos][4];
- Boom[x+1][y+1] = lev.eater_array[lev.eater_pos][5];
- Boom[x-1][y+2] = lev.eater_array[lev.eater_pos][6];
- Boom[x][y+2] = lev.eater_array[lev.eater_pos][7];
- Boom[x+1][y+2] = lev.eater_array[lev.eater_pos][8];
-#if PLAY_ELEMENT_SOUND
- play_element_sound(x, y, SOUND_boom, Xspring_fall);
-#endif
- lev.eater_pos = (lev.eater_pos + 1) & 7;
+ Lboom_eater(x, y+1, Xspring_fall);
score += lev.eater_score;
return;
case Xalien_pause:
Cave[x][y] = Yspring_sB;
Cave[x][y+1] = Yalien_spring;
- Next[x][y+1] = Znormal;
- Boom[x-1][y] = Xblank;
- Boom[x][y] = Xblank;
- Boom[x+1][y] = Xblank;
- Boom[x-1][y+1] = Xblank;
- Boom[x][y+1] = Xblank;
- Boom[x+1][y+1] = Xblank;
- Boom[x-1][y+2] = Xblank;
- Boom[x][y+2] = Xblank;
- Boom[x+1][y+2] = Xblank;
-#if PLAY_ELEMENT_SOUND
- play_element_sound(x, y, SOUND_boom, Xspring_fall);
-#endif
+ Lboom_tank(x, y+1, Xspring_fall);
score += lev.alien_score;
return;
{
play_element_sound(x, y, SOUND_tick, Xdynamite_4);
Next[x][y] = Zdynamite;
- Boom[x-1][y-1] = Xblank;
- Boom[x][y-1] = Xblank;
- Boom[x+1][y-1] = Xblank;
- Boom[x-1][y] = Xblank;
- Boom[x][y] = Xblank;
- Boom[x+1][y] = Xblank;
- Boom[x-1][y+1] = Xblank;
- Boom[x][y+1] = Xblank;
- Boom[x+1][y+1] = Xblank;
+
+ Lboom_generic(x, y, Xblank, Xblank);
}
static void Lfake_door_1(int x, int y)
case 0: /* north */
switch (Cave[x][y-1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ Cave[x][y] = Yballoon_nB;
+ Cave[x][y-1] = Yballoon_n;
+ Next[x][y] = Xblank;
+ Next[x][y-1] = Xballoon;
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
Next[x][y] = Xblank;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
+ }
+ break;
+ case 1: /* east */
+ switch (Cave[x+1][y])
+ {
case Xblank:
case Xacid_splash_e:
case Xacid_splash_w:
- Cave[x][y] = Yballoon_nB;
- Cave[x][y-1] = Yballoon_n;
+ Cave[x][y] = Yballoon_eB;
+ Cave[x+1][y] = Yballoon_e;
Next[x][y] = Xblank;
- Next[x][y-1] = Xballoon;
+ Next[x+1][y] = Xballoon;
return;
- }
- break;
- case 1: /* east */
- switch (Cave[x+1][y])
- {
case Xacid_1:
case Xacid_2:
case Xacid_3:
Next[x][y] = Xblank;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
+ }
+ break;
+ case 2: /* south */
+ switch (Cave[x][y+1])
+ {
case Xblank:
case Xacid_splash_e:
case Xacid_splash_w:
- Cave[x][y] = Yballoon_eB;
- Cave[x+1][y] = Yballoon_e;
+ Cave[x][y] = Yballoon_sB;
+ Cave[x][y+1] = Yballoon_s;
Next[x][y] = Xblank;
- Next[x+1][y] = Xballoon;
+ Next[x][y+1] = Xballoon;
return;
- }
- break;
- case 2: /* south */
- switch (Cave[x][y+1])
- {
case Xacid_1:
case Xacid_2:
case Xacid_3:
Next[x][y] = Xblank;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
+ }
+ break;
+ case 3: /* west */
+ switch (Cave[x-1][y])
+ {
case Xblank:
case Xacid_splash_e:
case Xacid_splash_w:
- Cave[x][y] = Yballoon_sB;
- Cave[x][y+1] = Yballoon_s;
+ Cave[x][y] = Yballoon_wB;
+ Cave[x-1][y] = Yballoon_w;
Next[x][y] = Xblank;
- Next[x][y+1] = Xballoon;
+ Next[x-1][y] = Xballoon;
return;
- }
- break;
- case 3: /* west */
- switch (Cave[x-1][y])
- {
case Xacid_1:
case Xacid_2:
case Xacid_3:
Next[x][y] = Xblank;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
-
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- Cave[x][y] = Yballoon_wB;
- Cave[x-1][y] = Yballoon_w;
- Next[x][y] = Xblank;
- Next[x-1][y] = Xballoon;
- return;
}
break;
}
switch (Cave[x][y+1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ case Xplant:
+ case Yplant:
+ case Zplayer:
+ Cave[x][y] = Ydrip_1_sB;
+ Cave[x][y+1] = Ydrip_1_s;
+ Next[x][y] = Xdrip_stretchB;
+ Next[x][y+1] = Xdrip_stretch;
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- case Xplant:
- case Yplant:
- case Zplayer:
- Cave[x][y] = Ydrip_1_sB;
- Cave[x][y+1] = Ydrip_1_s;
- Next[x][y] = Xdrip_stretchB;
- Next[x][y+1] = Xdrip_stretch;
- return;
-
default:
switch (RANDOM(8))
{
{
switch (Cave[x][y+1])
{
+ case Xblank:
+ case Xacid_splash_e:
+ case Xacid_splash_w:
+ Cave[x][y] = Xsand_stonesand_quickout_1;
+ Cave[x][y+1] = Xsand_stoneout_1;
+ Next[x][y] = Xsand_stonesand_quickout_2;
+ Next[x][y+1] = Xsand_stoneout_2;
+ return;
+
case Xacid_1:
case Xacid_2:
case Xacid_3:
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
- case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- Cave[x][y] = Xsand_stonesand_quickout_1;
- Cave[x][y+1] = Xsand_stoneout_1;
- Next[x][y] = Xsand_stonesand_quickout_2;
- Next[x][y+1] = Xsand_stoneout_2;
- return;
-
case Xsand:
Cave[x][y] = Xsand_stonesand_1;
Cave[x][y+1] = Xsand_sandstone_1;
switch (Cave[x][y])
{
case Znormal:
- Cave[x][y] = Xboom_1;
- Cave[x][y-1] = tab_explode_normal[Cave[x][y-1]];
- Cave[x-1][y] = tab_explode_normal[Cave[x-1][y]];
- Cave[x+1][y] = tab_explode_normal[Cave[x+1][y]];
- Cave[x][y+1] = tab_explode_normal[Cave[x][y+1]];
+ Cave[x][y] = Xboom_1;
+ Cave[x][y-1] = tab_explode_normal[Cave[x][y-1]];
+ Cave[x-1][y] = tab_explode_normal[Cave[x-1][y]];
+ Cave[x+1][y] = tab_explode_normal[Cave[x+1][y]];
+ Cave[x][y+1] = tab_explode_normal[Cave[x][y+1]];
Cave[x-1][y-1] = tab_explode_normal[Cave[x-1][y-1]];
Cave[x+1][y-1] = tab_explode_normal[Cave[x+1][y-1]];
Cave[x-1][y+1] = tab_explode_normal[Cave[x-1][y+1]];
break;
case Zdynamite:
- Cave[x][y] = Xboom_1;
- Cave[x][y-1] = tab_explode_dynamite[Cave[x][y-1]];
- Cave[x-1][y] = tab_explode_dynamite[Cave[x-1][y]];
- Cave[x+1][y] = tab_explode_dynamite[Cave[x+1][y]];
- Cave[x][y+1] = tab_explode_dynamite[Cave[x][y+1]];
+ Cave[x][y] = Xboom_1;
+ Cave[x][y-1] = tab_explode_dynamite[Cave[x][y-1]];
+ Cave[x-1][y] = tab_explode_dynamite[Cave[x-1][y]];
+ Cave[x+1][y] = tab_explode_dynamite[Cave[x+1][y]];
+ Cave[x][y+1] = tab_explode_dynamite[Cave[x][y+1]];
Cave[x-1][y-1] = tab_explode_dynamite[Cave[x-1][y-1]];
Cave[x+1][y-1] = tab_explode_dynamite[Cave[x+1][y-1]];
Cave[x-1][y+1] = tab_explode_dynamite[Cave[x-1][y+1]];
case Xpause: Lpause(x, y); break;
- case Xboom_bug: Lboom_bug(x, y); break;
- case Xboom_bomb: Lboom_tank(x, y); break;
+ case Xboom_bug: Lboom_bug(x, y, Xboom_bug); break;
+ case Xboom_bomb: Lboom_tank(x, y, Xboom_bomb); break;
case Xboom_android: Lboom_android(x, y); break;
case Xboom_1: Lboom_1(x, y); break;
case Xboom_2: Lboom_2(x, y); break;