projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0568200
)
added pushed objects going into acid (with compile time option)
author
Holger Schemel
<info@artsoft.org>
Sat, 15 Feb 2020 16:57:08 +0000
(17:57 +0100)
committer
Holger Schemel
<info@artsoft.org>
Tue, 19 May 2020 16:19:56 +0000
(18:19 +0200)
src/game_em/logic.c
patch
|
blob
|
history
diff --git
a/src/game_em/logic.c
b/src/game_em/logic.c
index ae3a9541517d078149f94306388afc8ebca175a9..e149fc6f0561cee15d147667d7855e7a029a064a 100644
(file)
--- a/
src/game_em/logic.c
+++ b/
src/game_em/logic.c
@@
-9,6
+9,8
@@
#define SPRING_ROLL /* spring rolling off round things continues to roll */
#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)
#define USE_CHANGED_ACID_STUFF
#define RANDOM_RAW (seed = seed << 31 | seed >> 1)
@@
-5577,6
+5579,25
@@
static void Lpush_emerald_e(int x, int y)
next[x][y] = Xemerald;
return;
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;
default:
cave[x][y] = Yemerald_eB;
next[x][y] = Xblank;
@@
-5602,6
+5623,25
@@
static void Lpush_emerald_w(int x, int y)
next[x][y] = Xemerald;
return;
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;
default:
cave[x][y] = Yemerald_wB;
next[x][y] = Xblank;
@@
-5627,6
+5667,25
@@
static void Lpush_diamond_e(int x, int y)
next[x][y] = Xdiamond;
return;
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;
default:
cave[x][y] = Ydiamond_eB;
next[x][y] = Xblank;
@@
-5652,6
+5711,25
@@
static void Lpush_diamond_w(int x, int y)
next[x][y] = Xdiamond;
return;
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;
default:
cave[x][y] = Ydiamond_wB;
next[x][y] = Xblank;
@@
-5677,6
+5755,25
@@
static void Lpush_stone_e(int x, int y)
next[x][y] = Xstone;
return;
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;
default:
cave[x][y] = Ystone_eB;
next[x][y] = Xblank;
@@
-5702,6
+5799,25
@@
static void Lpush_stone_w(int x, int y)
next[x][y] = Xstone;
return;
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;
default:
cave[x][y] = Ystone_wB;
next[x][y] = Xblank;
@@
-5727,6
+5843,25
@@
static void Lpush_bomb_e(int x, int y)
next[x][y] = Xbomb;
return;
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;
default:
cave[x][y] = Ybomb_eB;
next[x][y] = Xblank;
@@
-5752,6
+5887,25
@@
static void Lpush_bomb_w(int x, int y)
next[x][y] = Xbomb;
return;
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;
default:
cave[x][y] = Ybomb_wB;
next[x][y] = Xblank;
@@
-5777,6
+5931,25
@@
static void Lpush_nut_e(int x, int y)
next[x][y] = Xnut;
return;
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;
default:
cave[x][y] = Ynut_eB;
next[x][y] = Xblank;
@@
-5802,6
+5975,25
@@
static void Lpush_nut_w(int x, int y)
next[x][y] = Xnut;
return;
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;
default:
cave[x][y] = Ynut_wB;
next[x][y] = Xblank;
@@
-5827,6
+6019,25
@@
static void Lpush_spring_e(int x, int y)
next[x][y] = Xspring;
return;
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;
default:
cave[x][y] = Yspring_eB;
next[x][y] = Xblank;
@@
-5852,6
+6063,25
@@
static void Lpush_spring_w(int x, int y)
next[x][y] = Xspring;
return;
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;
default:
cave[x][y] = Yspring_wB;
next[x][y] = Xblank;