#define SPRING_ROLL /* spring rolling off round things continues to roll */
+#define ACID_ROLL /* rolling objects go into acid rather than remove it */
+
#define USE_CHANGED_ACID_STUFF
#define RANDOM_RAW (seed = seed << 31 | seed >> 1)
next[x][y] = Zplayer;
play_element_sound(x, y, SOUND_collect, element);
lev.score += lev.diamond_score;
- lev.required = lev.required < 3 ? 0 : lev.required - 3;
+ lev.gems_needed = lev.gems_needed < 3 ? 0 : lev.gems_needed - 3;
game.snapshot.collected_item = TRUE;
ply->anim = PLY_walk_n + anim;
ply->x = x;
next[x][y] = Zplayer;
play_element_sound(x, y, SOUND_collect, element);
lev.score += lev.emerald_score;
- lev.required = lev.required < 1 ? 0 : lev.required - 1;
+ lev.gems_needed = lev.gems_needed < 1 ? 0 : lev.gems_needed - 1;
game.snapshot.collected_item = TRUE;
ply->anim = PLY_walk_n + anim;
ply->x = x;
next[x][y] = Xblank;
play_element_sound(x, y, SOUND_collect, element);
lev.score += lev.diamond_score;
- lev.required = lev.required < 3 ? 0 : lev.required - 3;
+ lev.gems_needed = lev.gems_needed < 3 ? 0 : lev.gems_needed - 3;
game.snapshot.collected_item = TRUE;
ply->anim = PLY_walk_n + anim;
break;
next[x][y] = Xblank;
play_element_sound(x, y, SOUND_collect, element);
lev.score += lev.emerald_score;
- lev.required = lev.required < 1 ? 0 : lev.required - 1;
+ lev.gems_needed = lev.gems_needed < 1 ? 0 : lev.gems_needed - 1;
game.snapshot.collected_item = TRUE;
ply->anim = PLY_walk_n + anim;
break;
next[x][y] = Xemerald;
return;
+#ifdef ACID_ROLL
+ 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] = Yemerald_eB;
+ next[x][y] = Xblank;
+ if (cave[x+2][y-1] == Xblank)
+ cave[x+2][y-1] = Xsplash_e;
+ if (cave[x][y-1] == Xblank)
+ cave[x][y-1] = Xsplash_w;
+ play_element_sound(x, y, SOUND_acid, Xacid_1);
+ return;
+#endif
+
default:
cave[x][y] = Yemerald_eB;
next[x][y] = Xblank;
next[x][y] = Xemerald;
return;
+#ifdef ACID_ROLL
+ 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] = Yemerald_wB;
+ next[x][y] = Xblank;
+ if (cave[x][y-1] == Xblank)
+ cave[x][y-1] = Xsplash_e;
+ if (cave[x-2][y-1] == Xblank)
+ cave[x-2][y-1] = Xsplash_w;
+ play_element_sound(x, y, SOUND_acid, Xacid_1);
+ return;
+#endif
+
default:
cave[x][y] = Yemerald_wB;
next[x][y] = Xblank;
next[x][y] = Xdiamond;
return;
+#ifdef ACID_ROLL
+ 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] = Ydiamond_eB;
+ next[x][y] = Xblank;
+ if (cave[x+2][y-1] == Xblank)
+ cave[x+2][y-1] = Xsplash_e;
+ if (cave[x][y-1] == Xblank)
+ cave[x][y-1] = Xsplash_w;
+ play_element_sound(x, y, SOUND_acid, Xacid_1);
+ return;
+#endif
+
default:
cave[x][y] = Ydiamond_eB;
next[x][y] = Xblank;
next[x][y] = Xdiamond;
return;
+#ifdef ACID_ROLL
+ 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] = Ydiamond_wB;
+ next[x][y] = Xblank;
+ if (cave[x][y-1] == Xblank)
+ cave[x][y-1] = Xsplash_e;
+ if (cave[x-2][y-1] == Xblank)
+ cave[x-2][y-1] = Xsplash_w;
+ play_element_sound(x, y, SOUND_acid, Xacid_1);
+ return;
+#endif
+
default:
cave[x][y] = Ydiamond_wB;
next[x][y] = Xblank;
next[x][y] = Xstone;
return;
+#ifdef ACID_ROLL
+ 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_eB;
+ next[x][y] = Xblank;
+ if (cave[x+2][y-1] == Xblank)
+ cave[x+2][y-1] = Xsplash_e;
+ if (cave[x][y-1] == Xblank)
+ cave[x][y-1] = Xsplash_w;
+ play_element_sound(x, y, SOUND_acid, Xacid_1);
+ return;
+#endif
+
default:
cave[x][y] = Ystone_eB;
next[x][y] = Xblank;
next[x][y] = Xstone;
return;
+#ifdef ACID_ROLL
+ 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_wB;
+ next[x][y] = Xblank;
+ if (cave[x][y-1] == Xblank)
+ cave[x][y-1] = Xsplash_e;
+ if (cave[x-2][y-1] == Xblank)
+ cave[x-2][y-1] = Xsplash_w;
+ play_element_sound(x, y, SOUND_acid, Xacid_1);
+ return;
+#endif
+
default:
cave[x][y] = Ystone_wB;
next[x][y] = Xblank;
next[x][y] = Xbomb;
return;
+#ifdef ACID_ROLL
+ 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] = Ybomb_eB;
+ next[x][y] = Xblank;
+ if (cave[x+2][y-1] == Xblank)
+ cave[x+2][y-1] = Xsplash_e;
+ if (cave[x][y-1] == Xblank)
+ cave[x][y-1] = Xsplash_w;
+ play_element_sound(x, y, SOUND_acid, Xacid_1);
+ return;
+#endif
+
default:
cave[x][y] = Ybomb_eB;
next[x][y] = Xblank;
next[x][y] = Xbomb;
return;
+#ifdef ACID_ROLL
+ 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] = Ybomb_wB;
+ next[x][y] = Xblank;
+ if (cave[x][y-1] == Xblank)
+ cave[x][y-1] = Xsplash_e;
+ if (cave[x-2][y-1] == Xblank)
+ cave[x-2][y-1] = Xsplash_w;
+ play_element_sound(x, y, SOUND_acid, Xacid_1);
+ return;
+#endif
+
default:
cave[x][y] = Ybomb_wB;
next[x][y] = Xblank;
next[x][y] = Xnut;
return;
+#ifdef ACID_ROLL
+ 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] = Ynut_eB;
+ next[x][y] = Xblank;
+ if (cave[x+2][y-1] == Xblank)
+ cave[x+2][y-1] = Xsplash_e;
+ if (cave[x][y-1] == Xblank)
+ cave[x][y-1] = Xsplash_w;
+ play_element_sound(x, y, SOUND_acid, Xacid_1);
+ return;
+#endif
+
default:
cave[x][y] = Ynut_eB;
next[x][y] = Xblank;
next[x][y] = Xnut;
return;
+#ifdef ACID_ROLL
+ 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] = Ynut_wB;
+ next[x][y] = Xblank;
+ if (cave[x][y-1] == Xblank)
+ cave[x][y-1] = Xsplash_e;
+ if (cave[x-2][y-1] == Xblank)
+ cave[x-2][y-1] = Xsplash_w;
+ play_element_sound(x, y, SOUND_acid, Xacid_1);
+ return;
+#endif
+
default:
cave[x][y] = Ynut_wB;
next[x][y] = Xblank;
next[x][y] = Xspring;
return;
+#ifdef ACID_ROLL
+ 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] = Yspring_eB;
+ next[x][y] = Xblank;
+ if (cave[x+2][y-1] == Xblank)
+ cave[x+2][y-1] = Xsplash_e;
+ if (cave[x][y-1] == Xblank)
+ cave[x][y-1] = Xsplash_w;
+ play_element_sound(x, y, SOUND_acid, Xacid_1);
+ return;
+#endif
+
default:
cave[x][y] = Yspring_eB;
next[x][y] = Xblank;
next[x][y] = Xspring;
return;
+#ifdef ACID_ROLL
+ 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] = Yspring_wB;
+ next[x][y] = Xblank;
+ if (cave[x][y-1] == Xblank)
+ cave[x][y-1] = Xsplash_e;
+ if (cave[x-2][y-1] == Xblank)
+ cave[x-2][y-1] = Xsplash_w;
+ play_element_sound(x, y, SOUND_acid, Xacid_1);
+ return;
+#endif
+
default:
cave[x][y] = Yspring_wB;
next[x][y] = Xblank;
static void Lexit(int x, int y)
{
- if (lev.required > 0)
+ if (lev.gems_needed > 0)
return;
switch (RANDOM(64) / 21)