static unsigned int seed;
static int score;
+static const byte is_blank[TILE_MAX] =
+{
+ [Xblank] = 1,
+ [Xsplash_e] = 1,
+ [Xsplash_w] = 1,
+ [Xfake_acid_1] = 1,
+ [Xfake_acid_2] = 1,
+ [Xfake_acid_3] = 1,
+ [Xfake_acid_4] = 1,
+ [Xfake_acid_5] = 1,
+ [Xfake_acid_6] = 1,
+ [Xfake_acid_7] = 1,
+ [Xfake_acid_8] = 1
+};
+
+static const byte is_blank_or_acid[TILE_MAX] =
+{
+ [Xblank] = 1,
+ [Xsplash_e] = 1,
+ [Xsplash_w] = 1,
+ [Xfake_acid_1] = 1,
+ [Xfake_acid_2] = 1,
+ [Xfake_acid_3] = 1,
+ [Xfake_acid_4] = 1,
+ [Xfake_acid_5] = 1,
+ [Xfake_acid_6] = 1,
+ [Xfake_acid_7] = 1,
+ [Xfake_acid_8] = 1,
+ [Xacid_1] = 1,
+ [Xacid_2] = 1,
+ [Xacid_3] = 1,
+ [Xacid_4] = 1,
+ [Xacid_5] = 1,
+ [Xacid_6] = 1,
+ [Xacid_7] = 1,
+ [Xacid_8] = 1
+};
+
+static const byte is_fake_acid[TILE_MAX] =
+{
+ [Xfake_acid_1] = 1,
+ [Xfake_acid_2] = 1,
+ [Xfake_acid_3] = 1,
+ [Xfake_acid_4] = 1,
+ [Xfake_acid_5] = 1,
+ [Xfake_acid_6] = 1,
+ [Xfake_acid_7] = 1,
+ [Xfake_acid_8] = 1
+};
+
+static const byte is_amoeba[TILE_MAX] =
+{
+ [Xfake_amoeba] = 1,
+ [Xfake_amoebaB] = 1,
+ [Xamoeba_1] = 1,
+ [Xamoeba_2] = 1,
+ [Xamoeba_3] = 1,
+ [Xamoeba_4] = 1,
+ [Xamoeba_5] = 1,
+ [Xamoeba_6] = 1,
+ [Xamoeba_7] = 1,
+ [Xamoeba_8] = 1
+};
+
+static const byte is_android_walkable[TILE_MAX] =
+{
+ [Xblank] = 1,
+ [Xsplash_e] = 1,
+ [Xsplash_w] = 1,
+ [Xfake_acid_1] = 1,
+ [Xfake_acid_2] = 1,
+ [Xfake_acid_3] = 1,
+ [Xfake_acid_4] = 1,
+ [Xfake_acid_5] = 1,
+ [Xfake_acid_6] = 1,
+ [Xfake_acid_7] = 1,
+ [Xfake_acid_8] = 1,
+ [Xplant] = 1
+};
+
static void Lboom_generic(int x, int y, int element, int element_middle)
{
boom[x-1][y-1] = element;
switch (cave[x][y])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- case Zplayer:
- case Xdynamite_1:
- case Xdynamite_2:
- case Xdynamite_3:
- case Xdynamite_4:
-#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS
+ case Xsplash_e:
+ case Xsplash_w:
case Xfake_acid_1:
case Xfake_acid_2:
case Xfake_acid_3:
case Xfake_acid_6:
case Xfake_acid_7:
case Xfake_acid_8:
-#endif
+ case Zplayer:
+ case Xdynamite_1:
+ case Xdynamite_2:
+ case Xdynamite_3:
+ case Xdynamite_4:
return FALSE;
}
{
/* fire is released */
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
cave[x][y] = Zplayer;
next[x][y] = Zplayer;
-#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS
case Xfake_acid_1:
case Xfake_acid_2:
case Xfake_acid_3:
case Xfake_acid_6:
case Xfake_acid_7:
case Xfake_acid_8:
-#endif
play_element_sound(x, y, SOUND_blank, Xblank);
ply->anim = PLY_walk_n + anim;
ply->x = x;
case Xacid_7:
case Xacid_8:
if (cave[x+1][y-1] == Xblank)
- cave[x+1][y-1] = Xacid_splash_e;
+ cave[x+1][y-1] = Xsplash_e;
if (cave[x-1][y-1] == Xblank)
- cave[x-1][y-1] = Xacid_splash_w;
+ cave[x-1][y-1] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
#endif
switch (cave[x+dx][y])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x+dx][y] = dx > 0 ? Ystone_e : Ystone_w;
next[x+dx][y] = Xstone_pause;
goto stone_walk;
case Xacid_7:
case Xacid_8:
if (cave[x+dx+1][y-1] == Xblank)
- cave[x+dx+1][y-1] = Xacid_splash_e;
+ cave[x+dx+1][y-1] = Xsplash_e;
if (cave[x+dx-1][y-1] == Xblank)
- cave[x+dx-1][y-1] = Xacid_splash_w;
+ cave[x+dx-1][y-1] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
stone_walk:
switch (cave[x+dx][y])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x+dx][y] = dx > 0 ? Ybomb_e : Ybomb_w;
next[x+dx][y] = Xbomb_pause;
goto bomb_walk;
case Xacid_7:
case Xacid_8:
if (cave[x+dx+1][y-1] == Xblank)
- cave[x+dx+1][y-1] = Xacid_splash_e;
+ cave[x+dx+1][y-1] = Xsplash_e;
if (cave[x+dx-1][y-1] == Xblank)
- cave[x+dx-1][y-1] = Xacid_splash_w;
+ cave[x+dx-1][y-1] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
bomb_walk:
switch (cave[x+dx][y])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x+dx][y] = dx > 0 ? Ynut_e : Ynut_w;
next[x+dx][y] = Xnut_pause;
goto nut_walk;
case Xacid_7:
case Xacid_8:
if (cave[x+dx+1][y-1] == Xblank)
- cave[x+dx+1][y-1] = Xacid_splash_e;
+ cave[x+dx+1][y-1] = Xsplash_e;
if (cave[x+dx-1][y-1] == Xblank)
- cave[x+dx-1][y-1] = Xacid_splash_w;
+ cave[x+dx-1][y-1] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
nut_walk:
switch (cave[x+dx][y])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x+dx][y] = dx > 0 ? Yspring_e : Yspring_w;
next[x+dx][y] = dx > 0 ? Xspring_e : Xspring_w;
goto spring_walk;
case Xacid_7:
case Xacid_8:
if (cave[x+dx+1][y-1] == Xblank)
- cave[x+dx+1][y-1] = Xacid_splash_e;
+ cave[x+dx+1][y-1] = Xsplash_e;
if (cave[x+dx-1][y-1] == Xblank)
- cave[x+dx-1][y-1] = Xacid_splash_w;
+ cave[x+dx-1][y-1] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
spring_walk:
switch (cave[x+dx][y+dy])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x+dx][y+dy] = (dy ? (dy < 0 ? Yballoon_n : Yballoon_s) :
(dx > 0 ? Yballoon_e : Yballoon_w));
next[x+dx][y+dy] = Xballoon;
case Xacid_7:
case Xacid_8:
if (cave[x+dx+1][y+dy-1] == Xblank)
- cave[x+dx+1][y+dy-1] = Xacid_splash_e;
+ cave[x+dx+1][y+dy-1] = Xsplash_e;
if (cave[x+dx-1][y+dy-1] == Xblank)
- cave[x+dx-1][y+dy-1] = Xacid_splash_w;
+ cave[x+dx-1][y+dy-1] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
balloon_walk:
switch (cave[x+dx][y+dy])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
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) :
case Xacid_7:
case Xacid_8:
if (cave[x+dx+1][y+dy-1] == Xblank)
- cave[x+dx+1][y+dy-1] = Xacid_splash_e;
+ cave[x+dx+1][y+dy-1] = Xsplash_e;
if (cave[x+dx-1][y+dy-1] == Xblank)
- cave[x+dx-1][y+dy-1] = Xacid_splash_w;
+ cave[x+dx-1][y+dy-1] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
android_walk:
door_walk:
- if (!tab_blank[cave[x+dx][y+dy]])
+ if (!is_blank[cave[x+dx][y+dy]])
break;
- cave[x+dx][y+dy] = Zplayer;
- next[x+dx][y+dy] = Zplayer;
+ if (!is_fake_acid[cave[x+dx][y+dy]])
+ {
+ cave[x+dx][y+dy] = Zplayer;
+ next[x+dx][y+dy] = Zplayer;
+ }
+
play_element_sound(x, y, SOUND_door, element);
ply->anim = PLY_walk_n + anim;
ply->x = x + dx;
next[x][y] = Xacid_1;
}
-#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS
static void Lfake_acid_1(int x, int y)
{
next[x][y] = Xfake_acid_2;
{
next[x][y] = Xfake_acid_1;
}
-#endif
static void Landroid(int x, int y)
{
/* attempt clockwise move first if direct path is blocked */
case 0: /* north west */
- if (tab_android_move[cave[x-1][y-1]]) goto android_nw;
- if (tab_android_move[cave[x][y-1]]) goto android_n;
- if (tab_android_move[cave[x-1][y]]) goto android_w;
+ if (is_android_walkable[cave[x-1][y-1]]) goto android_nw;
+ if (is_android_walkable[cave[x][y-1]]) goto android_n;
+ if (is_android_walkable[cave[x-1][y]]) goto android_w;
break;
case 1: /* north */
- if (tab_android_move[cave[x][y-1]]) goto android_n;
- if (tab_android_move[cave[x+1][y-1]]) goto android_ne;
- if (tab_android_move[cave[x-1][y-1]]) goto android_nw;
+ if (is_android_walkable[cave[x][y-1]]) goto android_n;
+ if (is_android_walkable[cave[x+1][y-1]]) goto android_ne;
+ if (is_android_walkable[cave[x-1][y-1]]) goto android_nw;
break;
case 2: /* north east */
- if (tab_android_move[cave[x+1][y-1]]) goto android_ne;
- if (tab_android_move[cave[x+1][y]]) goto android_e;
- if (tab_android_move[cave[x][y-1]]) goto android_n;
+ if (is_android_walkable[cave[x+1][y-1]]) goto android_ne;
+ if (is_android_walkable[cave[x+1][y]]) goto android_e;
+ if (is_android_walkable[cave[x][y-1]]) goto android_n;
break;
case 3: /* west */
- if (tab_android_move[cave[x-1][y]]) goto android_w;
- if (tab_android_move[cave[x-1][y-1]]) goto android_nw;
- if (tab_android_move[cave[x-1][y+1]]) goto android_sw;
+ if (is_android_walkable[cave[x-1][y]]) goto android_w;
+ if (is_android_walkable[cave[x-1][y-1]]) goto android_nw;
+ if (is_android_walkable[cave[x-1][y+1]]) goto android_sw;
break;
case 4: /* nowhere */
break;
case 5: /* east */
- if (tab_android_move[cave[x+1][y]]) goto android_e;
- if (tab_android_move[cave[x+1][y+1]]) goto android_se;
- if (tab_android_move[cave[x+1][y-1]]) goto android_ne;
+ if (is_android_walkable[cave[x+1][y]]) goto android_e;
+ if (is_android_walkable[cave[x+1][y+1]]) goto android_se;
+ if (is_android_walkable[cave[x+1][y-1]]) goto android_ne;
break;
case 6: /* south west */
- if (tab_android_move[cave[x-1][y+1]]) goto android_sw;
- if (tab_android_move[cave[x-1][y]]) goto android_w;
- if (tab_android_move[cave[x][y+1]]) goto android_s;
+ if (is_android_walkable[cave[x-1][y+1]]) goto android_sw;
+ if (is_android_walkable[cave[x-1][y]]) goto android_w;
+ if (is_android_walkable[cave[x][y+1]]) goto android_s;
break;
case 7: /* south */
- if (tab_android_move[cave[x][y+1]]) goto android_s;
- if (tab_android_move[cave[x-1][y+1]]) goto android_sw;
- if (tab_android_move[cave[x+1][y+1]]) goto android_se;
+ if (is_android_walkable[cave[x][y+1]]) goto android_s;
+ if (is_android_walkable[cave[x-1][y+1]]) goto android_sw;
+ if (is_android_walkable[cave[x+1][y+1]]) goto android_se;
break;
case 8: /* south east */
- if (tab_android_move[cave[x+1][y+1]]) goto android_se;
- if (tab_android_move[cave[x][y+1]]) goto android_s;
- if (tab_android_move[cave[x+1][y]]) goto android_e;
+ if (is_android_walkable[cave[x+1][y+1]]) goto android_se;
+ if (is_android_walkable[cave[x][y+1]]) goto android_s;
+ if (is_android_walkable[cave[x+1][y]]) goto android_e;
break;
}
}
/* attempt counterclockwise move first if direct path is blocked */
case 0: /* north west */
- if (tab_android_move[cave[x-1][y-1]]) goto android_nw;
- if (tab_android_move[cave[x-1][y]]) goto android_w;
- if (tab_android_move[cave[x][y-1]]) goto android_n;
+ if (is_android_walkable[cave[x-1][y-1]]) goto android_nw;
+ if (is_android_walkable[cave[x-1][y]]) goto android_w;
+ if (is_android_walkable[cave[x][y-1]]) goto android_n;
break;
case 1: /* north */
- if (tab_android_move[cave[x][y-1]]) goto android_n;
- if (tab_android_move[cave[x-1][y-1]]) goto android_nw;
- if (tab_android_move[cave[x+1][y-1]]) goto android_ne;
+ if (is_android_walkable[cave[x][y-1]]) goto android_n;
+ if (is_android_walkable[cave[x-1][y-1]]) goto android_nw;
+ if (is_android_walkable[cave[x+1][y-1]]) goto android_ne;
break;
case 2: /* north east */
- if (tab_android_move[cave[x+1][y-1]]) goto android_ne;
- if (tab_android_move[cave[x][y-1]]) goto android_n;
- if (tab_android_move[cave[x+1][y]]) goto android_e;
+ if (is_android_walkable[cave[x+1][y-1]]) goto android_ne;
+ if (is_android_walkable[cave[x][y-1]]) goto android_n;
+ if (is_android_walkable[cave[x+1][y]]) goto android_e;
break;
case 3: /* west */
- if (tab_android_move[cave[x-1][y]]) goto android_w;
- if (tab_android_move[cave[x-1][y+1]]) goto android_sw;
- if (tab_android_move[cave[x-1][y-1]]) goto android_nw;
+ if (is_android_walkable[cave[x-1][y]]) goto android_w;
+ if (is_android_walkable[cave[x-1][y+1]]) goto android_sw;
+ if (is_android_walkable[cave[x-1][y-1]]) goto android_nw;
break;
case 4: /* nowhere */
break;
case 5: /* east */
- if (tab_android_move[cave[x+1][y]]) goto android_e;
- if (tab_android_move[cave[x+1][y-1]]) goto android_ne;
- if (tab_android_move[cave[x+1][y+1]]) goto android_se;
+ if (is_android_walkable[cave[x+1][y]]) goto android_e;
+ if (is_android_walkable[cave[x+1][y-1]]) goto android_ne;
+ if (is_android_walkable[cave[x+1][y+1]]) goto android_se;
break;
case 6: /* south west */
- if (tab_android_move[cave[x-1][y+1]]) goto android_sw;
- if (tab_android_move[cave[x][y+1]]) goto android_s;
- if (tab_android_move[cave[x-1][y]]) goto android_w;
+ if (is_android_walkable[cave[x-1][y+1]]) goto android_sw;
+ if (is_android_walkable[cave[x][y+1]]) goto android_s;
+ if (is_android_walkable[cave[x-1][y]]) goto android_w;
break;
case 7: /* south */
- if (tab_android_move[cave[x][y+1]]) goto android_s;
- if (tab_android_move[cave[x+1][y+1]]) goto android_se;
- if (tab_android_move[cave[x-1][y+1]]) goto android_sw;
+ if (is_android_walkable[cave[x][y+1]]) goto android_s;
+ if (is_android_walkable[cave[x+1][y+1]]) goto android_se;
+ if (is_android_walkable[cave[x-1][y+1]]) goto android_sw;
break;
case 8: /* south east */
- if (tab_android_move[cave[x+1][y+1]]) goto android_se;
- if (tab_android_move[cave[x+1][y]]) goto android_e;
- if (tab_android_move[cave[x][y+1]]) goto android_s;
+ if (is_android_walkable[cave[x+1][y+1]]) goto android_se;
+ if (is_android_walkable[cave[x+1][y]]) goto android_e;
+ if (is_android_walkable[cave[x][y+1]]) goto android_s;
break;
}
}
switch (cave[x][y-1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x][y] = Yandroid_nB;
next[x][y] = Xblank;
cave[x][y-1] = Yandroid_n;
cave[x][y] = Yandroid_nB;
next[x][y] = Xblank;
if (cave[x+1][y-2] == Xblank)
- cave[x+1][y-2] = Xacid_splash_e;
+ cave[x+1][y-2] = Xsplash_e;
if (cave[x-1][y-2] == Xblank)
- cave[x-1][y-2] = Xacid_splash_w;
+ cave[x-1][y-2] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
switch (cave[x][y-1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x][y] = Yandroid_nB;
next[x][y] = Xblank;
cave[x][y-1] = Yandroid_n;
cave[x][y] = Yandroid_nB;
next[x][y] = Xblank;
if (cave[x+1][y-2] == Xblank)
- cave[x+1][y-2] = Xacid_splash_e;
+ cave[x+1][y-2] = Xsplash_e;
if (cave[x-1][y-2] == Xblank)
- cave[x-1][y-2] = Xacid_splash_w;
+ cave[x-1][y-2] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
switch (cave[x+1][y])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x][y] = Yandroid_eB;
next[x][y] = Xblank;
cave[x+1][y] = Yandroid_e;
cave[x][y] = Yandroid_eB;
next[x][y] = Xblank;
if (cave[x+2][y-1] == Xblank)
- cave[x+2][y-1] = Xacid_splash_e;
+ cave[x+2][y-1] = Xsplash_e;
if (cave[x][y-1] == Xblank)
- cave[x][y-1] = Xacid_splash_w;
+ cave[x][y-1] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
switch (cave[x+1][y])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x][y] = Yandroid_eB;
next[x][y] = Xblank;
cave[x+1][y] = Yandroid_e;
cave[x][y] = Yandroid_eB;
next[x][y] = Xblank;
if (cave[x+2][y-1] == Xblank)
- cave[x+2][y-1] = Xacid_splash_e;
+ cave[x+2][y-1] = Xsplash_e;
if (cave[x][y-1] == Xblank)
- cave[x][y-1] = Xacid_splash_w;
+ cave[x][y-1] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x][y] = Yandroid_sB;
next[x][y] = Xblank;
cave[x][y+1] = Yandroid_s;
cave[x][y] = Yandroid_sB;
next[x][y] = Xblank;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x][y] = Yandroid_sB;
next[x][y] = Xblank;
cave[x][y+1] = Yandroid_s;
cave[x][y] = Yandroid_sB;
next[x][y] = Xblank;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
switch (cave[x-1][y])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x][y] = Yandroid_wB;
next[x][y] = Xblank;
cave[x-1][y] = Yandroid_w;
cave[x][y] = Yandroid_wB;
next[x][y] = Xblank;
if (cave[x][y-1] == Xblank)
- cave[x][y-1] = Xacid_splash_e;
+ cave[x][y-1] = Xsplash_e;
if (cave[x-2][y-1] == Xblank)
- cave[x-2][y-1] = Xacid_splash_w;
+ cave[x-2][y-1] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
switch (cave[x-1][y])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x][y] = Yandroid_wB;
next[x][y] = Xblank;
cave[x-1][y] = Yandroid_w;
cave[x][y] = Yandroid_wB;
next[x][y] = Xblank;
if (cave[x][y-1] == Xblank)
- cave[x][y-1] = Xacid_splash_e;
+ cave[x][y-1] = Xsplash_e;
if (cave[x-2][y-1] == Xblank)
- cave[x-2][y-1] = Xacid_splash_w;
+ cave[x-2][y-1] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
switch (cave[x][y-1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xplant:
case Yplant:
case Zplayer:
cave[x][y] = Yeater_nB;
next[x][y] = Xblank;
if (cave[x+1][y-2] == Xblank)
- cave[x+1][y-2] = Xacid_splash_e;
+ cave[x+1][y-2] = Xsplash_e;
if (cave[x-1][y-2] == Xblank)
- cave[x-1][y-2] = Xacid_splash_w;
+ cave[x-1][y-2] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
switch (cave[x+1][y])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xplant:
case Yplant:
case Zplayer:
cave[x][y] = Yeater_eB;
next[x][y] = Xblank;
if (cave[x+2][y-1] == Xblank)
- cave[x+2][y-1] = Xacid_splash_e;
+ cave[x+2][y-1] = Xsplash_e;
if (cave[x][y-1] == Xblank)
- cave[x][y-1] = Xacid_splash_w;
+ cave[x][y-1] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xplant:
case Yplant:
case Zplayer:
cave[x][y] = Yeater_sB;
next[x][y] = Xblank;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
switch (cave[x-1][y])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xplant:
case Yplant:
case Zplayer:
cave[x][y] = Yeater_wB;
next[x][y] = Xblank;
if (cave[x][y-1] == Xblank)
- cave[x][y-1] = Xacid_splash_e;
+ cave[x][y-1] = Xsplash_e;
if (cave[x-2][y-1] == Xblank)
- cave[x-2][y-1] = Xacid_splash_w;
+ cave[x-2][y-1] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
switch (cave[x][y-1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xplant:
case Yplant:
case Zplayer:
cave[x][y] = Yalien_nB;
next[x][y] = Xblank;
if (cave[x+1][y-2] == Xblank)
- cave[x+1][y-2] = Xacid_splash_e;
+ cave[x+1][y-2] = Xsplash_e;
if (cave[x-1][y-2] == Xblank)
- cave[x-1][y-2] = Xacid_splash_w;
+ cave[x-1][y-2] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
}
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xplant:
case Yplant:
case Zplayer:
cave[x][y] = Yalien_sB;
next[x][y] = Xblank;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
}
switch (cave[x+1][y])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xplant:
case Yplant:
case Zplayer:
cave[x][y] = Yalien_eB;
next[x][y] = Xblank;
if (cave[x+2][y-1] == Xblank)
- cave[x+2][y-1] = Xacid_splash_e;
+ cave[x+2][y-1] = Xsplash_e;
if (cave[x][y-1] == Xblank)
- cave[x][y-1] = Xacid_splash_w;
+ cave[x][y-1] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
}
switch (cave[x-1][y])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xplant:
case Yplant:
case Zplayer:
cave[x][y] = Yalien_wB;
next[x][y] = Xblank;
if (cave[x][y-1] == Xblank)
- cave[x][y-1] = Xacid_splash_e;
+ cave[x][y-1] = Xsplash_e;
if (cave[x-2][y-1] == Xblank)
- cave[x-2][y-1] = Xacid_splash_w;
+ cave[x-2][y-1] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
}
switch (cave[x][y-1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xplant:
case Yplant:
case Zplayer:
cave[x][y] = Ybug_nB;
next[x][y] = Xblank;
if (cave[x+1][y-2] == Xblank)
- cave[x+1][y-2] = Xacid_splash_e;
+ cave[x+1][y-2] = Xsplash_e;
if (cave[x-1][y-2] == Xblank)
- cave[x-1][y-2] = Xacid_splash_w;
+ cave[x-1][y-2] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
static void Lbug_1_n(int x, int y)
{
- if (tab_amoeba[cave[x][y-1]] ||
- tab_amoeba[cave[x+1][y]] ||
- tab_amoeba[cave[x][y+1]] ||
- tab_amoeba[cave[x-1][y]])
+ if (is_amoeba[cave[x][y-1]] ||
+ is_amoeba[cave[x+1][y]] ||
+ is_amoeba[cave[x][y+1]] ||
+ is_amoeba[cave[x-1][y]])
{
Lboom_bug(x, y, Xbug_1_n);
switch (cave[x+1][y])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xplant:
case Yplant:
case Xacid_1:
static void Lbug_2_n(int x, int y)
{
- if (tab_amoeba[cave[x][y-1]] ||
- tab_amoeba[cave[x+1][y]] ||
- tab_amoeba[cave[x][y+1]] ||
- tab_amoeba[cave[x-1][y]])
+ if (is_amoeba[cave[x][y-1]] ||
+ is_amoeba[cave[x+1][y]] ||
+ is_amoeba[cave[x][y+1]] ||
+ is_amoeba[cave[x-1][y]])
{
Lboom_bug(x, y, Xbug_2_n);
switch (cave[x+1][y])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xplant:
case Yplant:
case Zplayer:
cave[x][y] = Ybug_eB;
next[x][y] = Xblank;
if (cave[x+2][y-1] == Xblank)
- cave[x+2][y-1] = Xacid_splash_e;
+ cave[x+2][y-1] = Xsplash_e;
if (cave[x][y-1] == Xblank)
- cave[x][y-1] = Xacid_splash_w;
+ cave[x][y-1] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
static void Lbug_1_e(int x, int y)
{
- if (tab_amoeba[cave[x][y-1]] ||
- tab_amoeba[cave[x+1][y]] ||
- tab_amoeba[cave[x][y+1]] ||
- tab_amoeba[cave[x-1][y]])
+ if (is_amoeba[cave[x][y-1]] ||
+ is_amoeba[cave[x+1][y]] ||
+ is_amoeba[cave[x][y+1]] ||
+ is_amoeba[cave[x-1][y]])
{
Lboom_bug(x, y, Xbug_1_e);
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xplant:
case Yplant:
case Xacid_1:
static void Lbug_2_e(int x, int y)
{
- if (tab_amoeba[cave[x][y-1]] ||
- tab_amoeba[cave[x+1][y]] ||
- tab_amoeba[cave[x][y+1]] ||
- tab_amoeba[cave[x-1][y]])
+ if (is_amoeba[cave[x][y-1]] ||
+ is_amoeba[cave[x+1][y]] ||
+ is_amoeba[cave[x][y+1]] ||
+ is_amoeba[cave[x-1][y]])
{
Lboom_bug(x, y, Xbug_2_e);
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xplant:
case Yplant:
case Zplayer:
cave[x][y] = Ybug_sB;
next[x][y] = Xblank;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
static void Lbug_1_s(int x, int y)
{
- if (tab_amoeba[cave[x][y-1]] ||
- tab_amoeba[cave[x+1][y]] ||
- tab_amoeba[cave[x][y+1]] ||
- tab_amoeba[cave[x-1][y]])
+ if (is_amoeba[cave[x][y-1]] ||
+ is_amoeba[cave[x+1][y]] ||
+ is_amoeba[cave[x][y+1]] ||
+ is_amoeba[cave[x-1][y]])
{
Lboom_bug(x, y, Xbug_1_s);
switch (cave[x-1][y])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xplant:
case Yplant:
case Xacid_1:
static void Lbug_2_s(int x, int y)
{
- if (tab_amoeba[cave[x][y-1]] ||
- tab_amoeba[cave[x+1][y]] ||
- tab_amoeba[cave[x][y+1]] ||
- tab_amoeba[cave[x-1][y]])
+ if (is_amoeba[cave[x][y-1]] ||
+ is_amoeba[cave[x+1][y]] ||
+ is_amoeba[cave[x][y+1]] ||
+ is_amoeba[cave[x-1][y]])
{
Lboom_bug(x, y, Xbug_2_s);
switch (cave[x-1][y])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xplant:
case Yplant:
case Zplayer:
cave[x][y] = Ybug_wB;
next[x][y] = Xblank;
if (cave[x][y-1] == Xblank)
- cave[x][y-1] = Xacid_splash_e;
+ cave[x][y-1] = Xsplash_e;
if (cave[x-2][y-1] == Xblank)
- cave[x-2][y-1] = Xacid_splash_w;
+ cave[x-2][y-1] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
static void Lbug_1_w(int x, int y)
{
- if (tab_amoeba[cave[x][y-1]] ||
- tab_amoeba[cave[x+1][y]] ||
- tab_amoeba[cave[x][y+1]] ||
- tab_amoeba[cave[x-1][y]])
+ if (is_amoeba[cave[x][y-1]] ||
+ is_amoeba[cave[x+1][y]] ||
+ is_amoeba[cave[x][y+1]] ||
+ is_amoeba[cave[x-1][y]])
{
Lboom_bug(x, y, Xbug_1_w);
switch (cave[x][y-1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xplant:
case Yplant:
case Xacid_1:
static void Lbug_2_w(int x, int y)
{
- if (tab_amoeba[cave[x][y-1]] ||
- tab_amoeba[cave[x+1][y]] ||
- tab_amoeba[cave[x][y+1]] ||
- tab_amoeba[cave[x-1][y]])
+ if (is_amoeba[cave[x][y-1]] ||
+ is_amoeba[cave[x+1][y]] ||
+ is_amoeba[cave[x][y+1]] ||
+ is_amoeba[cave[x-1][y]])
{
Lboom_bug(x, y, Xbug_2_w);
switch (cave[x][y-1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xplant:
case Yplant:
case Zplayer:
cave[x][y] = Ytank_nB;
next[x][y] = Xblank;
if (cave[x+1][y-2] == Xblank)
- cave[x+1][y-2] = Xacid_splash_e;
+ cave[x+1][y-2] = Xsplash_e;
if (cave[x-1][y-2] == Xblank)
- cave[x-1][y-2] = Xacid_splash_w;
+ cave[x-1][y-2] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
static void Ltank_1_n(int x, int y)
{
- if (tab_amoeba[cave[x][y-1]] ||
- tab_amoeba[cave[x+1][y]] ||
- tab_amoeba[cave[x][y+1]] ||
- tab_amoeba[cave[x-1][y]])
+ if (is_amoeba[cave[x][y-1]] ||
+ is_amoeba[cave[x+1][y]] ||
+ is_amoeba[cave[x][y+1]] ||
+ is_amoeba[cave[x-1][y]])
{
Lboom_tank(x, y, Xtank_1_n);
switch (cave[x-1][y])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xplant:
case Yplant:
case Xacid_1:
static void Ltank_2_n(int x, int y)
{
- if (tab_amoeba[cave[x][y-1]] ||
- tab_amoeba[cave[x+1][y]] ||
- tab_amoeba[cave[x][y+1]] ||
- tab_amoeba[cave[x-1][y]])
+ if (is_amoeba[cave[x][y-1]] ||
+ is_amoeba[cave[x+1][y]] ||
+ is_amoeba[cave[x][y+1]] ||
+ is_amoeba[cave[x-1][y]])
{
Lboom_tank(x, y, Xtank_2_n);
switch (cave[x+1][y])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xplant:
case Yplant:
case Zplayer:
cave[x][y] = Ytank_eB;
next[x][y] = Xblank;
if (cave[x+2][y-1] == Xblank)
- cave[x+2][y-1] = Xacid_splash_e;
+ cave[x+2][y-1] = Xsplash_e;
if (cave[x][y-1] == Xblank)
- cave[x][y-1] = Xacid_splash_w;
+ cave[x][y-1] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
static void Ltank_1_e(int x, int y)
{
- if (tab_amoeba[cave[x][y-1]] ||
- tab_amoeba[cave[x+1][y]] ||
- tab_amoeba[cave[x][y+1]] ||
- tab_amoeba[cave[x-1][y]])
+ if (is_amoeba[cave[x][y-1]] ||
+ is_amoeba[cave[x+1][y]] ||
+ is_amoeba[cave[x][y+1]] ||
+ is_amoeba[cave[x-1][y]])
{
Lboom_tank(x, y, Xtank_1_e);
switch (cave[x][y-1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xplant:
case Yplant:
case Xacid_1:
static void Ltank_2_e(int x, int y)
{
- if (tab_amoeba[cave[x][y-1]] ||
- tab_amoeba[cave[x+1][y]] ||
- tab_amoeba[cave[x][y+1]] ||
- tab_amoeba[cave[x-1][y]])
+ if (is_amoeba[cave[x][y-1]] ||
+ is_amoeba[cave[x+1][y]] ||
+ is_amoeba[cave[x][y+1]] ||
+ is_amoeba[cave[x-1][y]])
{
Lboom_tank(x, y, Xtank_2_e);
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xplant:
case Yplant:
case Zplayer:
cave[x][y] = Ytank_sB;
next[x][y] = Xblank;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
static void Ltank_1_s(int x, int y)
{
- if (tab_amoeba[cave[x][y-1]] ||
- tab_amoeba[cave[x+1][y]] ||
- tab_amoeba[cave[x][y+1]] ||
- tab_amoeba[cave[x-1][y]])
+ if (is_amoeba[cave[x][y-1]] ||
+ is_amoeba[cave[x+1][y]] ||
+ is_amoeba[cave[x][y+1]] ||
+ is_amoeba[cave[x-1][y]])
{
Lboom_tank(x, y, Xtank_1_s);
switch (cave[x+1][y])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xplant:
case Yplant:
case Xacid_1:
static void Ltank_2_s(int x, int y)
{
- if (tab_amoeba[cave[x][y-1]] ||
- tab_amoeba[cave[x+1][y]] ||
- tab_amoeba[cave[x][y+1]] ||
- tab_amoeba[cave[x-1][y]])
+ if (is_amoeba[cave[x][y-1]] ||
+ is_amoeba[cave[x+1][y]] ||
+ is_amoeba[cave[x][y+1]] ||
+ is_amoeba[cave[x-1][y]])
{
Lboom_tank(x, y, Xtank_2_s);
switch (cave[x-1][y])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xplant:
case Yplant:
case Zplayer:
cave[x][y] = Ytank_wB;
next[x][y] = Xblank;
if (cave[x][y-1] == Xblank)
- cave[x][y-1] = Xacid_splash_e;
+ cave[x][y-1] = Xsplash_e;
if (cave[x-2][y-1] == Xblank)
- cave[x-2][y-1] = Xacid_splash_w;
+ cave[x-2][y-1] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
static void Ltank_1_w(int x, int y)
{
- if (tab_amoeba[cave[x][y-1]] ||
- tab_amoeba[cave[x+1][y]] ||
- tab_amoeba[cave[x][y+1]] ||
- tab_amoeba[cave[x-1][y]])
+ if (is_amoeba[cave[x][y-1]] ||
+ is_amoeba[cave[x+1][y]] ||
+ is_amoeba[cave[x][y+1]] ||
+ is_amoeba[cave[x-1][y]])
{
Lboom_tank(x, y, Xtank_1_w);
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xplant:
case Yplant:
case Xacid_1:
static void Ltank_2_w(int x, int y)
{
- if (tab_amoeba[cave[x][y-1]] ||
- tab_amoeba[cave[x+1][y]] ||
- tab_amoeba[cave[x][y+1]] ||
- tab_amoeba[cave[x-1][y]])
+ if (is_amoeba[cave[x][y-1]] ||
+ is_amoeba[cave[x+1][y]] ||
+ is_amoeba[cave[x][y+1]] ||
+ is_amoeba[cave[x-1][y]])
{
Lboom_tank(x, y, Xtank_2_w);
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x][y] = Yemerald_sB;
next[x][y] = Xblank;
cave[x][y+1] = Yemerald_s;
cave[x][y] = Yemerald_sB;
next[x][y] = Xblank;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
case Xball_2:
case Xnut:
case Xnut_pause:
- case Xslidewall_ns:
- case Xslidewall_ew:
+ case Xslide_ns:
+ case Xslide_ew:
case Xwonderwall:
case Xkey_1:
case Xkey_2:
case Xroundwall_4:
if (RANDOM(2))
{
- if (tab_blank[cave[x+1][y]] && tab_acid[cave[x+1][y+1]])
+ if (is_blank[cave[x+1][y]] && is_blank_or_acid[cave[x+1][y+1]])
{
cave[x][y] = Yemerald_eB;
next[x][y] = Xblank;
return;
}
- if (tab_blank[cave[x-1][y]] && tab_acid[cave[x-1][y+1]])
+ if (is_blank[cave[x-1][y]] && is_blank_or_acid[cave[x-1][y+1]])
{
cave[x][y] = Yemerald_wB;
next[x][y] = Xblank;
}
else
{
- if (tab_blank[cave[x-1][y]] && tab_acid[cave[x-1][y+1]])
+ if (is_blank[cave[x-1][y]] && is_blank_or_acid[cave[x-1][y+1]])
{
cave[x][y] = Yemerald_wB;
next[x][y] = Xblank;
return;
}
- if (tab_blank[cave[x+1][y]] && tab_acid[cave[x+1][y+1]])
+ if (is_blank[cave[x+1][y]] && is_blank_or_acid[cave[x+1][y+1]])
{
cave[x][y] = Yemerald_eB;
next[x][y] = Xblank;
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x][y] = Yemerald_sB;
next[x][y] = Xblank;
cave[x][y+1] = Yemerald_s;
cave[x][y] = Yemerald_sB;
next[x][y] = Xblank;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Zplayer:
cave[x][y] = Yemerald_sB;
next[x][y] = Xblank;
cave[x][y] = Yemerald_sB;
next[x][y] = Xblank;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
{
lev.wonderwall_state = 1;
cave[x][y] = Yemerald_sB;
- if (tab_blank[cave[x][y+2]])
+ if (is_blank[cave[x][y+2]])
{
cave[x][y+2] = Ydiamond_s;
next[x][y+2] = Xdiamond_fall;
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x][y] = Ydiamond_sB;
next[x][y] = Xblank;
cave[x][y+1] = Ydiamond_s;
cave[x][y] = Ydiamond_sB;
next[x][y] = Xblank;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
case Xball_2:
case Xnut:
case Xnut_pause:
- case Xslidewall_ns:
- case Xslidewall_ew:
+ case Xslide_ns:
+ case Xslide_ew:
case Xwonderwall:
case Xkey_1:
case Xkey_2:
case Xroundwall_4:
if (RANDOM(2))
{
- if (tab_blank[cave[x+1][y]] && tab_acid[cave[x+1][y+1]])
+ if (is_blank[cave[x+1][y]] && is_blank_or_acid[cave[x+1][y+1]])
{
cave[x][y] = Ydiamond_eB;
next[x][y] = Xblank;
return;
}
- if (tab_blank[cave[x-1][y]] && tab_acid[cave[x-1][y+1]])
+ if (is_blank[cave[x-1][y]] && is_blank_or_acid[cave[x-1][y+1]])
{
cave[x][y] = Ydiamond_wB;
next[x][y] = Xblank;
}
else
{
- if (tab_blank[cave[x-1][y]] && tab_acid[cave[x-1][y+1]])
+ if (is_blank[cave[x-1][y]] && is_blank_or_acid[cave[x-1][y+1]])
{
cave[x][y] = Ydiamond_wB;
next[x][y] = Xblank;
return;
}
- if (tab_blank[cave[x+1][y]] && tab_acid[cave[x+1][y+1]])
+ if (is_blank[cave[x+1][y]] && is_blank_or_acid[cave[x+1][y+1]])
{
cave[x][y] = Ydiamond_eB;
next[x][y] = Xblank;
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x][y] = Ydiamond_sB;
next[x][y] = Xblank;
cave[x][y+1] = Ydiamond_s;
cave[x][y] = Ydiamond_sB;
next[x][y] = Xblank;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Zplayer:
cave[x][y] = Ydiamond_sB;
next[x][y] = Xblank;
cave[x][y] = Ydiamond_sB;
next[x][y] = Xblank;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
{
lev.wonderwall_state = 1;
cave[x][y] = Ydiamond_sB;
- if (tab_blank[cave[x][y+2]])
+ if (is_blank[cave[x][y+2]])
{
cave[x][y+2] = Ystone_s;
next[x][y+2] = Xstone_fall;
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- case Xplant:
- case Yplant:
-#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS
+ case Xsplash_e:
+ case Xsplash_w:
case Xfake_acid_1:
case Xfake_acid_2:
case Xfake_acid_3:
case Xfake_acid_6:
case Xfake_acid_7:
case Xfake_acid_8:
-#endif
+ case Xplant:
+ case Yplant:
cave[x][y] = Ystone_sB;
next[x][y] = Xblank;
cave[x][y+1] = Ystone_s;
cave[x][y] = Ystone_sB;
next[x][y] = Xblank;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
case Xball_2:
case Xnut:
case Xnut_pause:
- case Xslidewall_ns:
- case Xslidewall_ew:
+ case Xslide_ns:
+ case Xslide_ew:
case Xkey_1:
case Xkey_2:
case Xkey_3:
case Xroundwall_4:
if (RANDOM(2))
{
- if (tab_blank[cave[x+1][y]] && tab_acid[cave[x+1][y+1]])
+ if (is_blank[cave[x+1][y]] && is_blank_or_acid[cave[x+1][y+1]])
{
cave[x][y] = Ystone_eB;
next[x][y] = Xblank;
return;
}
- if (tab_blank[cave[x-1][y]] && tab_acid[cave[x-1][y+1]])
+ if (is_blank[cave[x-1][y]] && is_blank_or_acid[cave[x-1][y+1]])
{
cave[x][y] = Ystone_wB;
next[x][y] = Xblank;
}
else
{
- if (tab_blank[cave[x-1][y]] && tab_acid[cave[x-1][y+1]])
+ if (is_blank[cave[x-1][y]] && is_blank_or_acid[cave[x-1][y+1]])
{
cave[x][y] = Ystone_wB;
next[x][y] = Xblank;
return;
}
- if (tab_blank[cave[x+1][y]] && tab_acid[cave[x+1][y+1]])
+ if (is_blank[cave[x+1][y]] && is_blank_or_acid[cave[x+1][y+1]])
{
cave[x][y] = Ystone_eB;
next[x][y] = Xblank;
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
-#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS
+ case Xsplash_e:
+ case Xsplash_w:
case Xfake_acid_1:
case Xfake_acid_2:
case Xfake_acid_3:
case Xfake_acid_6:
case Xfake_acid_7:
case Xfake_acid_8:
-#endif
cave[x][y] = Ystone_sB;
next[x][y] = Xblank;
cave[x][y+1] = Ystone_s;
cave[x][y] = Ystone_sB;
next[x][y] = Xblank;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
- case Zplayer:
-#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS
+ case Xsplash_e:
+ case Xsplash_w:
case Xfake_acid_1:
case Xfake_acid_2:
case Xfake_acid_3:
case Xfake_acid_6:
case Xfake_acid_7:
case Xfake_acid_8:
-#endif
+ case Zplayer:
cave[x][y] = Ystone_sB;
next[x][y] = Xblank;
cave[x][y+1] = Ystone_s;
cave[x][y] = Ystone_sB;
next[x][y] = Xblank;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
switch (cave[x+1][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xalien:
case Xalien_pause:
cave[x][y+1] = Xspring_e;
switch (cave[x-1][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xalien:
case Xalien_pause:
cave[x][y+1] = Xspring_w;
switch (cave[x][y+2])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Zplayer:
case Xbug_1_n:
case Xbug_1_e:
lev.wonderwall_state = 1;
cave[x][y] = Ystone_sB;
- if (tab_blank[cave[x][y+2]])
+ if (is_blank[cave[x][y+2]])
{
cave[x][y+2] = Yemerald_s;
next[x][y+2] = Xemerald_fall;
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x][y] = Ybomb_sB;
next[x][y] = Xblank;
cave[x][y+1] = Ybomb_s;
cave[x][y] = Ybomb_sB;
next[x][y] = Xblank;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
case Xball_2:
case Xnut:
case Xnut_pause:
- case Xslidewall_ns:
- case Xslidewall_ew:
+ case Xslide_ns:
+ case Xslide_ew:
case Xkey_1:
case Xkey_2:
case Xkey_3:
case Xroundwall_4:
if (RANDOM(2))
{
- if (tab_blank[cave[x+1][y]] && tab_acid[cave[x+1][y+1]])
+ if (is_blank[cave[x+1][y]] && is_blank_or_acid[cave[x+1][y+1]])
{
cave[x][y] = Ybomb_eB;
next[x][y] = Xblank;
return;
}
- if (tab_blank[cave[x-1][y]] && tab_acid[cave[x-1][y+1]])
+ if (is_blank[cave[x-1][y]] && is_blank_or_acid[cave[x-1][y+1]])
{
cave[x][y] = Ybomb_wB;
next[x][y] = Xblank;
}
else
{
- if (tab_blank[cave[x-1][y]] && tab_acid[cave[x-1][y+1]])
+ if (is_blank[cave[x-1][y]] && is_blank_or_acid[cave[x-1][y+1]])
{
cave[x][y] = Ybomb_wB;
next[x][y] = Xblank;
return;
}
- if (tab_blank[cave[x+1][y]] && tab_acid[cave[x+1][y+1]])
+ if (is_blank[cave[x+1][y]] && is_blank_or_acid[cave[x+1][y+1]])
{
cave[x][y] = Ybomb_eB;
next[x][y] = Xblank;
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x][y] = Ybomb_sB;
next[x][y] = Xblank;
cave[x][y+1] = Ybomb_s;
cave[x][y] = Ybomb_sB;
next[x][y] = Xblank;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x][y] = Ybomb_sB;
next[x][y] = Xblank;
cave[x][y+1] = Ybomb_s;
cave[x][y] = Ybomb_sB;
next[x][y] = Xblank;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x][y] = Ynut_sB;
next[x][y] = Xblank;
cave[x][y+1] = Ynut_s;
cave[x][y] = Ynut_sB;
next[x][y] = Xblank;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
case Xball_2:
case Xnut:
case Xnut_pause:
- case Xslidewall_ns:
- case Xslidewall_ew:
+ case Xslide_ns:
+ case Xslide_ew:
case Xkey_1:
case Xkey_2:
case Xkey_3:
case Xroundwall_4:
if (RANDOM(2))
{
- if (tab_blank[cave[x+1][y]] && tab_acid[cave[x+1][y+1]])
+ if (is_blank[cave[x+1][y]] && is_blank_or_acid[cave[x+1][y+1]])
{
cave[x][y] = Ynut_eB;
next[x][y] = Xblank;
return;
}
- if (tab_blank[cave[x-1][y]] && tab_acid[cave[x-1][y+1]])
+ if (is_blank[cave[x-1][y]] && is_blank_or_acid[cave[x-1][y+1]])
{
cave[x][y] = Ynut_wB;
next[x][y] = Xblank;
}
else
{
- if (tab_blank[cave[x-1][y]] && tab_acid[cave[x-1][y+1]])
+ if (is_blank[cave[x-1][y]] && is_blank_or_acid[cave[x-1][y+1]])
{
cave[x][y] = Ynut_wB;
next[x][y] = Xblank;
return;
}
- if (tab_blank[cave[x+1][y]] && tab_acid[cave[x+1][y+1]])
+ if (is_blank[cave[x+1][y]] && is_blank_or_acid[cave[x+1][y+1]])
{
cave[x][y] = Ynut_eB;
next[x][y] = Xblank;
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x][y] = Ynut_sB;
next[x][y] = Xblank;
cave[x][y+1] = Ynut_s;
cave[x][y] = Ynut_sB;
next[x][y] = Xblank;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Zplayer:
cave[x][y] = Ynut_sB;
next[x][y] = Xblank;
cave[x][y] = Ynut_sB;
next[x][y] = Xblank;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xplant:
case Yplant:
cave[x][y] = Yspring_sB;
cave[x][y] = Yspring_sB;
next[x][y] = Xblank;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
case Xball_2:
case Xnut:
case Xnut_pause:
- case Xslidewall_ns:
- case Xslidewall_ew:
+ case Xslide_ns:
+ case Xslide_ew:
case Xkey_1:
case Xkey_2:
case Xkey_3:
case Xroundwall_4:
if (RANDOM(2))
{
- if (tab_blank[cave[x+1][y]] && tab_acid[cave[x+1][y+1]])
+ if (is_blank[cave[x+1][y]] && is_blank_or_acid[cave[x+1][y+1]])
{
cave[x][y] = Yspring_eB;
next[x][y] = Xblank;
return;
}
- if (tab_blank[cave[x-1][y]] && tab_acid[cave[x-1][y+1]])
+ if (is_blank[cave[x-1][y]] && is_blank_or_acid[cave[x-1][y+1]])
{
cave[x][y] = Yspring_wB;
next[x][y] = Xblank;
}
else
{
- if (tab_blank[cave[x-1][y]] && tab_acid[cave[x-1][y+1]])
+ if (is_blank[cave[x-1][y]] && is_blank_or_acid[cave[x-1][y+1]])
{
cave[x][y] = Yspring_wB;
next[x][y] = Xblank;
return;
}
- if (tab_blank[cave[x+1][y]] && tab_acid[cave[x+1][y+1]])
+ if (is_blank[cave[x+1][y]] && is_blank_or_acid[cave[x+1][y+1]])
{
cave[x][y] = Yspring_eB;
next[x][y] = Xblank;
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x][y] = Yspring_sB;
next[x][y] = Xblank;
cave[x][y+1] = Yspring_s;
cave[x][y] = Yspring_sB;
next[x][y] = Xblank;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x][y] = Yspring_sB;
next[x][y] = Xblank;
cave[x][y+1] = Yspring_s;
cave[x][y] = Yspring_sB;
next[x][y] = Xblank;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
switch (cave[x+1][y])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Yalien_nB:
case Yalien_eB:
case Yalien_sB:
cave[x][y] = Yspring_eB;
next[x][y] = Xblank;
if (cave[x+2][y-1] == Xblank)
- cave[x+2][y-1] = Xacid_splash_e;
+ cave[x+2][y-1] = Xsplash_e;
if (cave[x][y-1] == Xblank)
- cave[x][y-1] = Xacid_splash_w;
+ cave[x][y-1] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x][y] = Yspring_sB;
next[x][y] = Xblank;
cave[x][y+1] = Yspring_s;
cave[x][y] = Yspring_sB;
next[x][y] = Xblank;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
switch (cave[x-1][y])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Yalien_nB:
case Yalien_eB:
case Yalien_sB:
cave[x][y] = Yspring_wB;
next[x][y] = Xblank;
if (cave[x][y-1] == Xblank)
- cave[x][y-1] = Xacid_splash_e;
+ cave[x][y-1] = Xsplash_e;
if (cave[x-2][y-1] == Xblank)
- cave[x-2][y-1] = Xacid_splash_w;
+ cave[x-2][y-1] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Zplayer:
cave[x][y] = Yspring_sB;
next[x][y] = Xblank;
cave[x][y] = Yspring_sB;
next[x][y] = Xblank;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
switch (cave[x][y-1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x][y] = Yballoon_nB;
next[x][y] = Xblank;
cave[x][y-1] = Yballoon_n;
cave[x][y] = Yballoon_nB;
next[x][y] = Xblank;
if (cave[x+1][y-2] == Xblank)
- cave[x+1][y-2] = Xacid_splash_e;
+ cave[x+1][y-2] = Xsplash_e;
if (cave[x-1][y-2] == Xblank)
- cave[x-1][y-2] = Xacid_splash_w;
+ cave[x-1][y-2] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
}
switch (cave[x+1][y])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x][y] = Yballoon_eB;
next[x][y] = Xblank;
cave[x+1][y] = Yballoon_e;
cave[x][y] = Yballoon_eB;
next[x][y] = Xblank;
if (cave[x+2][y-1] == Xblank)
- cave[x+2][y-1] = Xacid_splash_e;
+ cave[x+2][y-1] = Xsplash_e;
if (cave[x][y-1] == Xblank)
- cave[x][y-1] = Xacid_splash_w;
+ cave[x][y-1] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
}
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x][y] = Yballoon_sB;
next[x][y] = Xblank;
cave[x][y+1] = Yballoon_s;
cave[x][y] = Yballoon_sB;
next[x][y] = Xblank;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
}
switch (cave[x-1][y])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x][y] = Yballoon_wB;
next[x][y] = Xblank;
cave[x-1][y] = Yballoon_w;
cave[x][y] = Yballoon_wB;
next[x][y] = Xblank;
if (cave[x][y-1] == Xblank)
- cave[x][y-1] = Xacid_splash_e;
+ cave[x][y-1] = Xsplash_e;
if (cave[x-2][y-1] == Xblank)
- cave[x-2][y-1] = Xacid_splash_w;
+ cave[x-2][y-1] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
}
{
case 0:
if (lev.ball_array[lev.ball_pos][0] != Xblank &&
- tab_blank[cave[x-1][y-1]])
+ is_blank[cave[x-1][y-1]])
{
cave[x-1][y-1] = Yball_blank;
next[x-1][y-1] = lev.ball_array[lev.ball_pos][0];
case 1:
if (lev.ball_array[lev.ball_pos][1] != Xblank &&
- tab_blank[cave[x][y-1]])
+ is_blank[cave[x][y-1]])
{
cave[x][y-1] = Yball_blank;
next[x][y-1] = lev.ball_array[lev.ball_pos][1];
case 2:
if (lev.ball_array[lev.ball_pos][2] != Xblank &&
- tab_blank[cave[x+1][y-1]])
+ is_blank[cave[x+1][y-1]])
{
cave[x+1][y-1] = Yball_blank;
next[x+1][y-1] = lev.ball_array[lev.ball_pos][2];
case 3:
if (lev.ball_array[lev.ball_pos][3] != Xblank &&
- tab_blank[cave[x-1][y]])
+ is_blank[cave[x-1][y]])
{
cave[x-1][y] = Yball_blank;
next[x-1][y] = lev.ball_array[lev.ball_pos][3];
case 4:
if (lev.ball_array[lev.ball_pos][4] != Xblank &&
- tab_blank[cave[x+1][y]])
+ is_blank[cave[x+1][y]])
{
cave[x+1][y] = Yball_blank;
next[x+1][y] = lev.ball_array[lev.ball_pos][4];
case 5:
if (lev.ball_array[lev.ball_pos][5] != Xblank &&
- tab_blank[cave[x-1][y+1]])
+ is_blank[cave[x-1][y+1]])
{
cave[x-1][y+1] = Yball_blank;
next[x-1][y+1] = lev.ball_array[lev.ball_pos][5];
case 6:
if (lev.ball_array[lev.ball_pos][6] != Xblank &&
- tab_blank[cave[x][y+1]])
+ is_blank[cave[x][y+1]])
{
cave[x][y+1] = Yball_blank;
next[x][y+1] = lev.ball_array[lev.ball_pos][6];
case 7:
if (lev.ball_array[lev.ball_pos][7] != Xblank &&
- tab_blank[cave[x+1][y+1]])
+ is_blank[cave[x+1][y+1]])
{
cave[x+1][y+1] = Yball_blank;
next[x+1][y+1] = lev.ball_array[lev.ball_pos][7];
else
{
if (lev.ball_array[lev.ball_pos][0] != Xblank &&
- tab_blank[cave[x-1][y-1]])
+ is_blank[cave[x-1][y-1]])
{
cave[x-1][y-1] = Yball_blank;
next[x-1][y-1] = lev.ball_array[lev.ball_pos][0];
}
if (lev.ball_array[lev.ball_pos][1] != Xblank &&
- tab_blank[cave[x][y-1]])
+ is_blank[cave[x][y-1]])
{
cave[x][y-1] = Yball_blank;
next[x][y-1] = lev.ball_array[lev.ball_pos][1];
}
if (lev.ball_array[lev.ball_pos][2] != Xblank &&
- tab_blank[cave[x+1][y-1]])
+ is_blank[cave[x+1][y-1]])
{
cave[x+1][y-1] = Yball_blank;
next[x+1][y-1] = lev.ball_array[lev.ball_pos][2];
}
if (lev.ball_array[lev.ball_pos][3] != Xblank &&
- tab_blank[cave[x-1][y]])
+ is_blank[cave[x-1][y]])
{
cave[x-1][y] = Yball_blank;
next[x-1][y] = lev.ball_array[lev.ball_pos][3];
}
if (lev.ball_array[lev.ball_pos][4] != Xblank &&
- tab_blank[cave[x+1][y]])
+ is_blank[cave[x+1][y]])
{
cave[x+1][y] = Yball_blank;
next[x+1][y] = lev.ball_array[lev.ball_pos][4];
}
if (lev.ball_array[lev.ball_pos][5] != Xblank &&
- tab_blank[cave[x-1][y+1]])
+ is_blank[cave[x-1][y+1]])
{
cave[x-1][y+1] = Yball_blank;
next[x-1][y+1] = lev.ball_array[lev.ball_pos][5];
}
if (lev.ball_array[lev.ball_pos][6] != Xblank &&
- tab_blank[cave[x][y+1]])
+ is_blank[cave[x][y+1]])
{
cave[x][y+1] = Yball_blank;
next[x][y+1] = lev.ball_array[lev.ball_pos][6];
}
if (lev.ball_array[lev.ball_pos][7] != Xblank &&
- tab_blank[cave[x+1][y+1]])
+ is_blank[cave[x+1][y+1]])
{
cave[x+1][y+1] = Yball_blank;
next[x+1][y+1] = lev.ball_array[lev.ball_pos][7];
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xplant:
case Yplant:
case Zplayer:
cave[x][y] = Ydrip_1_sB;
next[x][y] = Xdrip_stretchB;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
switch (cave[x][y+1])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
cave[x][y] = Xsand_stonesand_quickout_1;
next[x][y] = Xsand_stonesand_quickout_2;
cave[x][y+1] = Xsand_stoneout_1;
cave[x][y] = Xsand_stonesand_quickout_1;
next[x][y] = Xsand_stonesand_quickout_2;
if (cave[x+1][y] == Xblank)
- cave[x+1][y] = Xacid_splash_e;
+ cave[x+1][y] = Xsplash_e;
if (cave[x-1][y] == Xblank)
- cave[x-1][y] = Xacid_splash_w;
+ cave[x-1][y] = Xsplash_w;
play_element_sound(x, y, SOUND_acid, Xacid_1);
return;
next[x][y] = Xstone_fall;
}
-#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS
static void Lsand_stonesand_quickout_1(int x, int y)
{
next[x][y] = Xsand_stonesand_quickout_2;
{
next[x][y] = Xsand;
}
-#endif
-static void Lslidewall_ns(int x, int y)
+static void Lslide_ns(int x, int y)
{
- if (tab_blank[cave[x][y-1]])
+ if (is_blank[cave[x][y-1]])
{
- cave[x][y-1] = Yslidewall_ns_blank;
- next[x][y-1] = Xslidewall_ns;
- play_element_sound(x, y, SOUND_slidewall, Xslidewall_ns);
+ cave[x][y-1] = Yslide_ns_blank;
+ next[x][y-1] = Xslide_ns;
+ play_element_sound(x, y, SOUND_slide, Xslide_ns);
}
- if (tab_blank[cave[x][y+1]])
+ if (is_blank[cave[x][y+1]])
{
- cave[x][y+1] = Yslidewall_ns_blank;
- next[x][y+1] = Xslidewall_ns;
- play_element_sound(x, y, SOUND_slidewall, Xslidewall_ns);
+ cave[x][y+1] = Yslide_ns_blank;
+ next[x][y+1] = Xslide_ns;
+ play_element_sound(x, y, SOUND_slide, Xslide_ns);
}
}
-static void Lslidewall_ew(int x, int y)
+static void Lslide_ew(int x, int y)
{
- if (tab_blank[cave[x+1][y]])
+ if (is_blank[cave[x+1][y]])
{
- cave[x+1][y] = Yslidewall_ew_blank;
- next[x+1][y] = Xslidewall_ew;
- play_element_sound(x, y, SOUND_slidewall, Xslidewall_ew);
+ cave[x+1][y] = Yslide_ew_blank;
+ next[x+1][y] = Xslide_ew;
+ play_element_sound(x, y, SOUND_slide, Xslide_ew);
}
- if (tab_blank[cave[x-1][y]])
+ if (is_blank[cave[x-1][y]])
{
- cave[x-1][y] = Yslidewall_ew_blank;
- next[x-1][y] = Xslidewall_ew;
- play_element_sound(x, y, SOUND_slidewall, Xslidewall_ew);
+ cave[x-1][y] = Yslide_ew_blank;
+ next[x-1][y] = Xslide_ew;
+ play_element_sound(x, y, SOUND_slide, Xslide_ew);
}
}
switch (cave[x][y])
{
case Xblank:
- case Xacid_splash_e:
- case Xacid_splash_w:
+ case Xsplash_e:
+ case Xsplash_w:
+ case Xfake_acid_1:
+ case Xfake_acid_2:
+ case Xfake_acid_3:
+ case Xfake_acid_4:
+ case Xfake_acid_5:
+ case Xfake_acid_6:
+ case Xfake_acid_7:
+ case Xfake_acid_8:
case Xgrass:
case Xdirt:
case Xsand:
case Xplant:
case Yplant:
- if (tab_amoeba[cave[x][y-1]] ||
- tab_amoeba[cave[x+1][y]] ||
- tab_amoeba[cave[x][y+1]] ||
- tab_amoeba[cave[x-1][y]])
+ if (is_amoeba[cave[x][y-1]] ||
+ is_amoeba[cave[x+1][y]] ||
+ is_amoeba[cave[x][y+1]] ||
+ is_amoeba[cave[x-1][y]])
cave[x][y] = Xdrip;
}
}
+static void Lboom_one(int x, int y, boolean by_dynamite)
+{
+ switch (cave[x][y])
+ {
+ case Zborder:
+ case Znormal:
+ case Zdynamite:
+ case Xboom_bug:
+ case Xboom_bomb:
+ case Xboom_android:
+ case Xacid_1:
+ case Xacid_2:
+ case Xacid_3:
+ case Xacid_4:
+ case Xacid_5:
+ case Xacid_6:
+ case Xacid_7:
+ case Xacid_8:
+ case Xacid_ne:
+ case Xacid_nw:
+ case Xacid_s:
+ case Xacid_se:
+ case Xacid_sw:
+ case Xplant:
+ case Yplant:
+ case Xdoor_1:
+ case Xdoor_2:
+ case Xdoor_3:
+ case Xdoor_4:
+ case Xdoor_5:
+ case Xdoor_6:
+ case Xdoor_7:
+ case Xdoor_8:
+ case Xfake_door_1:
+ case Xfake_door_2:
+ case Xfake_door_3:
+ case Xfake_door_4:
+ case Xfake_door_5:
+ case Xfake_door_6:
+ case Xfake_door_7:
+ case Xfake_door_8:
+ case Xsteel_1:
+ case Xsteel_2:
+ case Xsteel_3:
+ case Xsteel_4:
+ return;
+
+ case Xandroid:
+ case Xandroid_1_n:
+ case Xandroid_2_n:
+ case Xandroid_1_e:
+ case Xandroid_2_e:
+ case Xandroid_1_s:
+ case Xandroid_2_s:
+ case Xandroid_1_w:
+ case Xandroid_2_w:
+ if (by_dynamite)
+ cave[x][y] = Xboom_android;
+ return;
+
+ case Xbug_1_n:
+ case Xbug_1_e:
+ case Xbug_1_s:
+ case Xbug_1_w:
+ case Xbug_2_n:
+ case Xbug_2_e:
+ case Xbug_2_s:
+ case Xbug_2_w:
+ cave[x][y] = Xboom_bug;
+ return;
+
+ case Xbomb:
+ case Xbomb_pause:
+ case Xbomb_fall:
+ cave[x][y] = Xboom_bomb;
+ return;
+
+ default:
+ cave[x][y] = Xboom_1;
+ return;
+ }
+}
+
+static void Lboom_nine(int x, int y, boolean by_dynamite)
+{
+ Lboom_one(x, y-1, by_dynamite);
+ Lboom_one(x-1, y, by_dynamite);
+ Lboom_one(x+1, y, by_dynamite);
+ Lboom_one(x, y+1, by_dynamite);
+ Lboom_one(x-1, y-1, by_dynamite);
+ Lboom_one(x+1, y-1, by_dynamite);
+ Lboom_one(x-1, y+1, by_dynamite);
+ Lboom_one(x+1, y+1, by_dynamite);
+
+ cave[x][y] = Xboom_1;
+}
+
static void Lexplode(int x, int y)
{
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-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]];
- cave[x+1][y+1] = tab_explode_normal[cave[x+1][y+1]];
+ Lboom_nine(x, y, FALSE);
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-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]];
- cave[x+1][y+1] = tab_explode_dynamite[cave[x+1][y+1]];
+ Lboom_nine(x, y, TRUE);
break;
}
}
case Xacid_7: Lacid_7(x, y); break;
case Xacid_8: Lacid_8(x, y); break;
-#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS
case Xfake_acid_1: Lfake_acid_1(x, y); break;
case Xfake_acid_2: Lfake_acid_2(x, y); break;
case Xfake_acid_3: Lfake_acid_3(x, y); break;
case Xfake_acid_6: Lfake_acid_6(x, y); break;
case Xfake_acid_7: Lfake_acid_7(x, y); break;
case Xfake_acid_8: Lfake_acid_8(x, y); break;
-#endif
case Xandroid: Landroid(x, y); break;
case Xandroid_1_n: Landroid_1_n(x, y); break;
case Xsand_stonesand_4: Lsand_stonesand_4(x, y); break;
case Xsand_stoneout_1: Lsand_stoneout_1(x, y); break;
case Xsand_stoneout_2: Lsand_stoneout_2(x, y); break;
-#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS
case Xsand_stonesand_quickout_1: Lsand_stonesand_quickout_1(x, y); break;
case Xsand_stonesand_quickout_2: Lsand_stonesand_quickout_2(x, y); break;
-#endif
- case Xslidewall_ns: Lslidewall_ns(x, y); break;
- case Xslidewall_ew: Lslidewall_ew(x, y); break;
+ case Xslide_ns: Lslide_ns(x, y); break;
+ case Xslide_ew: Lslide_ew(x, y); break;
case Xexit: Lexit(x, y); break;
case Xexit_1: Lexit_1(x, y); break;
}
}
-void logic_1(void)
+void logic_players(void)
{
int start_check_nr;
int i;
}
}
-void logic_2(void)
+void logic_objects(void)
{
int x, y;
lev.draw = temp;
}
-void logic_3(void)
+void logic_globals(void)
{
int x;
int y;