projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4b9cc1b
)
added missing handling of bumper element in EM engine
author
Holger Schemel
<info@artsoft.org>
Thu, 6 Feb 2020 18:27:04 +0000
(19:27 +0100)
committer
Holger Schemel
<info@artsoft.org>
Tue, 19 May 2020 16:13:00 +0000
(18:13 +0200)
src/game_em/logic.c
patch
|
blob
|
history
diff --git
a/src/game_em/logic.c
b/src/game_em/logic.c
index 19930d24eba7d12cf920d40f787907ebca1fd2be..bfe1d8436e78a4a03b4117bdf5e26e875412e790 100644
(file)
--- a/
src/game_em/logic.c
+++ b/
src/game_em/logic.c
@@
-3713,6
+3713,7
@@
static void Lemerald(int x, int y)
case Xwonderwall:
case Xswitch:
case Xbumper:
case Xwonderwall:
case Xswitch:
case Xbumper:
+ case Ybumper:
case Xacid_ne:
case Xacid_nw:
case Xslide_ns:
case Xacid_ne:
case Xacid_nw:
case Xslide_ns:
@@
-3737,6
+3738,8
@@
static void Lemerald(int x, int y)
next[x][y] = Xblank;
cave[x+1][y] = Yemerald_e;
next[x+1][y] = Xemerald_pause;
next[x][y] = Xblank;
cave[x+1][y] = Yemerald_e;
next[x+1][y] = Xemerald_pause;
+ if (cave[x][y+1] == Xbumper)
+ cave[x][y+1] = Ybumper;
return;
}
return;
}
@@
-3746,6
+3749,8
@@
static void Lemerald(int x, int y)
next[x][y] = Xblank;
cave[x-1][y] = Yemerald_w;
next[x-1][y] = Xemerald_pause;
next[x][y] = Xblank;
cave[x-1][y] = Yemerald_w;
next[x-1][y] = Xemerald_pause;
+ if (cave[x][y+1] == Xbumper)
+ cave[x][y+1] = Ybumper;
return;
}
}
return;
}
}
@@
-3757,6
+3762,8
@@
static void Lemerald(int x, int y)
next[x][y] = Xblank;
cave[x-1][y] = Yemerald_w;
next[x-1][y] = Xemerald_pause;
next[x][y] = Xblank;
cave[x-1][y] = Yemerald_w;
next[x-1][y] = Xemerald_pause;
+ if (cave[x][y+1] == Xbumper)
+ cave[x][y+1] = Ybumper;
return;
}
return;
}
@@
-3766,6
+3773,8
@@
static void Lemerald(int x, int y)
next[x][y] = Xblank;
cave[x+1][y] = Yemerald_e;
next[x+1][y] = Xemerald_pause;
next[x][y] = Xblank;
cave[x+1][y] = Yemerald_e;
next[x+1][y] = Xemerald_pause;
+ if (cave[x][y+1] == Xbumper)
+ cave[x][y+1] = Ybumper;
return;
}
}
return;
}
}
@@
-3963,6
+3972,7
@@
static void Ldiamond(int x, int y)
case Xwonderwall:
case Xswitch:
case Xbumper:
case Xwonderwall:
case Xswitch:
case Xbumper:
+ case Ybumper:
case Xacid_ne:
case Xacid_nw:
case Xslide_ns:
case Xacid_ne:
case Xacid_nw:
case Xslide_ns:
@@
-3987,6
+3997,8
@@
static void Ldiamond(int x, int y)
next[x][y] = Xblank;
cave[x+1][y] = Ydiamond_e;
next[x+1][y] = Xdiamond_pause;
next[x][y] = Xblank;
cave[x+1][y] = Ydiamond_e;
next[x+1][y] = Xdiamond_pause;
+ if (cave[x][y+1] == Xbumper)
+ cave[x][y+1] = Ybumper;
return;
}
return;
}
@@
-3996,6
+4008,8
@@
static void Ldiamond(int x, int y)
next[x][y] = Xblank;
cave[x-1][y] = Ydiamond_w;
next[x-1][y] = Xdiamond_pause;
next[x][y] = Xblank;
cave[x-1][y] = Ydiamond_w;
next[x-1][y] = Xdiamond_pause;
+ if (cave[x][y+1] == Xbumper)
+ cave[x][y+1] = Ybumper;
return;
}
}
return;
}
}
@@
-4007,6
+4021,8
@@
static void Ldiamond(int x, int y)
next[x][y] = Xblank;
cave[x-1][y] = Ydiamond_w;
next[x-1][y] = Xdiamond_pause;
next[x][y] = Xblank;
cave[x-1][y] = Ydiamond_w;
next[x-1][y] = Xdiamond_pause;
+ if (cave[x][y+1] == Xbumper)
+ cave[x][y+1] = Ybumper;
return;
}
return;
}
@@
-4016,6
+4032,8
@@
static void Ldiamond(int x, int y)
next[x][y] = Xblank;
cave[x+1][y] = Ydiamond_e;
next[x+1][y] = Xdiamond_pause;
next[x][y] = Xblank;
cave[x+1][y] = Ydiamond_e;
next[x+1][y] = Xdiamond_pause;
+ if (cave[x][y+1] == Xbumper)
+ cave[x][y+1] = Ybumper;
return;
}
}
return;
}
}
@@
-4221,6
+4239,7
@@
static void Lstone(int x, int y)
case Xball_2:
case Xswitch:
case Xbumper:
case Xball_2:
case Xswitch:
case Xbumper:
+ case Ybumper:
case Xacid_ne:
case Xacid_nw:
case Xlenses:
case Xacid_ne:
case Xacid_nw:
case Xlenses:
@@
-4239,6
+4258,8
@@
static void Lstone(int x, int y)
next[x][y] = Xblank;
cave[x+1][y] = Ystone_e;
next[x+1][y] = Xstone_pause;
next[x][y] = Xblank;
cave[x+1][y] = Ystone_e;
next[x+1][y] = Xstone_pause;
+ if (cave[x][y+1] == Xbumper)
+ cave[x][y+1] = Ybumper;
return;
}
return;
}
@@
-4248,6
+4269,8
@@
static void Lstone(int x, int y)
next[x][y] = Xblank;
cave[x-1][y] = Ystone_w;
next[x-1][y] = Xstone_pause;
next[x][y] = Xblank;
cave[x-1][y] = Ystone_w;
next[x-1][y] = Xstone_pause;
+ if (cave[x][y+1] == Xbumper)
+ cave[x][y+1] = Ybumper;
return;
}
}
return;
}
}
@@
-4259,6
+4282,8
@@
static void Lstone(int x, int y)
next[x][y] = Xblank;
cave[x-1][y] = Ystone_w;
next[x-1][y] = Xstone_pause;
next[x][y] = Xblank;
cave[x-1][y] = Ystone_w;
next[x-1][y] = Xstone_pause;
+ if (cave[x][y+1] == Xbumper)
+ cave[x][y+1] = Ybumper;
return;
}
return;
}
@@
-4268,6
+4293,8
@@
static void Lstone(int x, int y)
next[x][y] = Xblank;
cave[x+1][y] = Ystone_e;
next[x+1][y] = Xstone_pause;
next[x][y] = Xblank;
cave[x+1][y] = Ystone_e;
next[x+1][y] = Xstone_pause;
+ if (cave[x][y+1] == Xbumper)
+ cave[x][y+1] = Ybumper;
return;
}
}
return;
}
}
@@
-4640,6
+4667,7
@@
static void Lbomb(int x, int y)
case Xball_2:
case Xswitch:
case Xbumper:
case Xball_2:
case Xswitch:
case Xbumper:
+ case Ybumper:
case Xacid_ne:
case Xacid_nw:
case Xslide_ns:
case Xacid_ne:
case Xacid_nw:
case Xslide_ns:
@@
-4656,6
+4684,8
@@
static void Lbomb(int x, int y)
next[x][y] = Xblank;
cave[x+1][y] = Ybomb_e;
next[x+1][y] = Xbomb_pause;
next[x][y] = Xblank;
cave[x+1][y] = Ybomb_e;
next[x+1][y] = Xbomb_pause;
+ if (cave[x][y+1] == Xbumper)
+ cave[x][y+1] = Ybumper;
return;
}
return;
}
@@
-4665,6
+4695,8
@@
static void Lbomb(int x, int y)
next[x][y] = Xblank;
cave[x-1][y] = Ybomb_w;
next[x-1][y] = Xbomb_pause;
next[x][y] = Xblank;
cave[x-1][y] = Ybomb_w;
next[x-1][y] = Xbomb_pause;
+ if (cave[x][y+1] == Xbumper)
+ cave[x][y+1] = Ybumper;
return;
}
}
return;
}
}
@@
-4676,6
+4708,8
@@
static void Lbomb(int x, int y)
next[x][y] = Xblank;
cave[x-1][y] = Ybomb_w;
next[x-1][y] = Xbomb_pause;
next[x][y] = Xblank;
cave[x-1][y] = Ybomb_w;
next[x-1][y] = Xbomb_pause;
+ if (cave[x][y+1] == Xbumper)
+ cave[x][y+1] = Ybumper;
return;
}
return;
}
@@
-4685,6
+4719,8
@@
static void Lbomb(int x, int y)
next[x][y] = Xblank;
cave[x+1][y] = Ybomb_e;
next[x+1][y] = Xbomb_pause;
next[x][y] = Xblank;
cave[x+1][y] = Ybomb_e;
next[x+1][y] = Xbomb_pause;
+ if (cave[x][y+1] == Xbumper)
+ cave[x][y+1] = Ybumper;
return;
}
}
return;
}
}
@@
-4855,6
+4891,7
@@
static void Lnut(int x, int y)
case Xball_2:
case Xswitch:
case Xbumper:
case Xball_2:
case Xswitch:
case Xbumper:
+ case Ybumper:
case Xacid_ne:
case Xacid_nw:
case Xslide_ns:
case Xacid_ne:
case Xacid_nw:
case Xslide_ns:
@@
-4871,6
+4908,8
@@
static void Lnut(int x, int y)
next[x][y] = Xblank;
cave[x+1][y] = Ynut_e;
next[x+1][y] = Xnut_pause;
next[x][y] = Xblank;
cave[x+1][y] = Ynut_e;
next[x+1][y] = Xnut_pause;
+ if (cave[x][y+1] == Xbumper)
+ cave[x][y+1] = Ybumper;
return;
}
return;
}
@@
-4880,6
+4919,8
@@
static void Lnut(int x, int y)
next[x][y] = Xblank;
cave[x-1][y] = Ynut_w;
next[x-1][y] = Xnut_pause;
next[x][y] = Xblank;
cave[x-1][y] = Ynut_w;
next[x-1][y] = Xnut_pause;
+ if (cave[x][y+1] == Xbumper)
+ cave[x][y+1] = Ybumper;
return;
}
}
return;
}
}
@@
-4891,6
+4932,8
@@
static void Lnut(int x, int y)
next[x][y] = Xblank;
cave[x-1][y] = Ynut_w;
next[x-1][y] = Xnut_pause;
next[x][y] = Xblank;
cave[x-1][y] = Ynut_w;
next[x-1][y] = Xnut_pause;
+ if (cave[x][y+1] == Xbumper)
+ cave[x][y+1] = Ybumper;
return;
}
return;
}
@@
-4900,6
+4943,8
@@
static void Lnut(int x, int y)
next[x][y] = Xblank;
cave[x+1][y] = Ynut_e;
next[x+1][y] = Xnut_pause;
next[x][y] = Xblank;
cave[x+1][y] = Ynut_e;
next[x+1][y] = Xnut_pause;
+ if (cave[x][y+1] == Xbumper)
+ cave[x][y+1] = Ybumper;
return;
}
}
return;
}
}
@@
-5074,6
+5119,7
@@
static void Lspring(int x, int y)
case Xball_2:
case Xswitch:
case Xbumper:
case Xball_2:
case Xswitch:
case Xbumper:
+ case Ybumper:
case Xacid_ne:
case Xacid_nw:
case Xslide_ns:
case Xacid_ne:
case Xacid_nw:
case Xslide_ns:
@@
-5089,14
+5135,13
@@
static void Lspring(int x, int y)
cave[x][y] = Yspring_eB;
next[x][y] = Xblank;
cave[x+1][y] = Yspring_e;
cave[x][y] = Yspring_eB;
next[x][y] = Xblank;
cave[x+1][y] = Yspring_e;
- if (cave[x][y+1] == Xbumper)
- cave[x][y+1] = Ybumper;
-
#ifdef SPRING_ROLL
next[x+1][y] = Xspring_e;
#else
next[x+1][y] = Xspring_pause;
#endif
#ifdef SPRING_ROLL
next[x+1][y] = Xspring_e;
#else
next[x+1][y] = Xspring_pause;
#endif
+ if (cave[x][y+1] == Xbumper)
+ cave[x][y+1] = Ybumper;
return;
}
return;
}
@@
-5105,14
+5150,13
@@
static void Lspring(int x, int y)
cave[x][y] = Yspring_wB;
next[x][y] = Xblank;
cave[x-1][y] = Yspring_w;
cave[x][y] = Yspring_wB;
next[x][y] = Xblank;
cave[x-1][y] = Yspring_w;
- if (cave[x][y+1] == Xbumper)
- cave[x][y+1] = Ybumper;
-
#ifdef SPRING_ROLL
next[x-1][y] = Xspring_w;
#else
next[x-1][y] = Xspring_pause;
#endif
#ifdef SPRING_ROLL
next[x-1][y] = Xspring_w;
#else
next[x-1][y] = Xspring_pause;
#endif
+ if (cave[x][y+1] == Xbumper)
+ cave[x][y+1] = Ybumper;
return;
}
}
return;
}
}
@@
-5123,14
+5167,13
@@
static void Lspring(int x, int y)
cave[x][y] = Yspring_wB;
next[x][y] = Xblank;
cave[x-1][y] = Yspring_w;
cave[x][y] = Yspring_wB;
next[x][y] = Xblank;
cave[x-1][y] = Yspring_w;
- if (cave[x][y+1] == Xbumper)
- cave[x][y+1] = Ybumper;
-
#ifdef SPRING_ROLL
next[x-1][y] = Xspring_w;
#else
next[x-1][y] = Xspring_pause;
#endif
#ifdef SPRING_ROLL
next[x-1][y] = Xspring_w;
#else
next[x-1][y] = Xspring_pause;
#endif
+ if (cave[x][y+1] == Xbumper)
+ cave[x][y+1] = Ybumper;
return;
}
return;
}
@@
-5139,14
+5182,13
@@
static void Lspring(int x, int y)
cave[x][y] = Yspring_eB;
next[x][y] = Xblank;
cave[x+1][y] = Yspring_e;
cave[x][y] = Yspring_eB;
next[x][y] = Xblank;
cave[x+1][y] = Yspring_e;
- if (cave[x][y+1] == Xbumper)
- cave[x][y+1] = Ybumper;
-
#ifdef SPRING_ROLL
next[x+1][y] = Xspring_e;
#else
next[x+1][y] = Xspring_pause;
#endif
#ifdef SPRING_ROLL
next[x+1][y] = Xspring_e;
#else
next[x+1][y] = Xspring_pause;
#endif
+ if (cave[x][y+1] == Xbumper)
+ cave[x][y+1] = Ybumper;
return;
}
}
return;
}
}