From: Holger Schemel Date: Mon, 3 Feb 2020 22:43:15 +0000 (+0100) Subject: fixed handling of fake acid for EM engine X-Git-Tag: 4.2.0.0~153 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=c734235e0757e54dfdf6645d07a76c2a0bc591ba;p=rocksndiamonds.git fixed handling of fake acid for EM engine --- diff --git a/src/game_em/logic.c b/src/game_em/logic.c index 5b39eab0..2c5f74b3 100644 --- a/src/game_em/logic.c +++ b/src/game_em/logic.c @@ -174,11 +174,6 @@ static boolean player_killed(struct PLAYER *ply) 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 Xfake_acid_1: case Xfake_acid_2: @@ -189,6 +184,11 @@ static boolean player_killed(struct PLAYER *ply) 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; } @@ -569,6 +569,16 @@ static boolean player_digfield(struct PLAYER *ply, int dx, int dy) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x+dx][y] = dx > 0 ? Ystone_e : Ystone_w; next[x+dx][y] = Xstone_pause; goto stone_walk; @@ -608,6 +618,16 @@ static boolean player_digfield(struct PLAYER *ply, int dx, int dy) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x+dx][y] = dx > 0 ? Ybomb_e : Ybomb_w; next[x+dx][y] = Xbomb_pause; goto bomb_walk; @@ -647,6 +667,16 @@ static boolean player_digfield(struct PLAYER *ply, int dx, int dy) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x+dx][y] = dx > 0 ? Ynut_e : Ynut_w; next[x+dx][y] = Xnut_pause; goto nut_walk; @@ -686,6 +716,16 @@ static boolean player_digfield(struct PLAYER *ply, int dx, int dy) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x+dx][y] = dx > 0 ? Yspring_e : Yspring_w; next[x+dx][y] = dx > 0 ? Xspring_e : Xspring_w; goto spring_walk; @@ -747,6 +787,16 @@ static boolean player_digfield(struct PLAYER *ply, int dx, int dy) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x+dx][y+dy] = (dy ? (dy < 0 ? Yballoon_n : Yballoon_s) : (dx > 0 ? Yballoon_e : Yballoon_w)); next[x+dx][y+dy] = Xballoon; @@ -794,6 +844,16 @@ static boolean player_digfield(struct PLAYER *ply, int dx, int dy) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif 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) : @@ -889,8 +949,12 @@ static boolean player_digfield(struct PLAYER *ply, int dx, int dy) if (!tab_blank[cave[x+dx][y+dy]]) break; - cave[x+dx][y+dy] = Zplayer; - next[x+dx][y+dy] = Zplayer; + if (!tab_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; @@ -1744,6 +1808,16 @@ static void Landroid_1_n(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x][y] = Yandroid_nB; next[x][y] = Xblank; cave[x][y-1] = Yandroid_n; @@ -1781,6 +1855,16 @@ static void Landroid_2_n(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x][y] = Yandroid_nB; next[x][y] = Xblank; cave[x][y-1] = Yandroid_n; @@ -1818,6 +1902,16 @@ static void Landroid_1_e(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x][y] = Yandroid_eB; next[x][y] = Xblank; cave[x+1][y] = Yandroid_e; @@ -1855,6 +1949,16 @@ static void Landroid_2_e(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x][y] = Yandroid_eB; next[x][y] = Xblank; cave[x+1][y] = Yandroid_e; @@ -1892,6 +1996,16 @@ static void Landroid_1_s(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x][y] = Yandroid_sB; next[x][y] = Xblank; cave[x][y+1] = Yandroid_s; @@ -1929,6 +2043,16 @@ static void Landroid_2_s(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x][y] = Yandroid_sB; next[x][y] = Xblank; cave[x][y+1] = Yandroid_s; @@ -1966,6 +2090,16 @@ static void Landroid_1_w(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x][y] = Yandroid_wB; next[x][y] = Xblank; cave[x-1][y] = Yandroid_w; @@ -2003,6 +2137,16 @@ static void Landroid_2_w(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x][y] = Yandroid_wB; next[x][y] = Xblank; cave[x-1][y] = Yandroid_w; @@ -2072,6 +2216,16 @@ static void Leater_n(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xplant: case Yplant: case Zplayer: @@ -2144,6 +2298,16 @@ static void Leater_e(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xplant: case Yplant: case Zplayer: @@ -2216,6 +2380,16 @@ static void Leater_s(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xplant: case Yplant: case Zplayer: @@ -2288,6 +2462,16 @@ static void Leater_w(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xplant: case Yplant: case Zplayer: @@ -2344,6 +2528,16 @@ static void Lalien(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xplant: case Yplant: case Zplayer: @@ -2379,6 +2573,16 @@ static void Lalien(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xplant: case Yplant: case Zplayer: @@ -2417,6 +2621,16 @@ static void Lalien(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xplant: case Yplant: case Zplayer: @@ -2452,6 +2666,16 @@ static void Lalien(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xplant: case Yplant: case Zplayer: @@ -2495,6 +2719,16 @@ static void Lbug_n(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xplant: case Yplant: case Zplayer: @@ -2547,6 +2781,16 @@ static void Lbug_1_n(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xplant: case Yplant: case Xacid_1: @@ -2591,6 +2835,16 @@ static void Lbug_e(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xplant: case Yplant: case Zplayer: @@ -2643,6 +2897,16 @@ static void Lbug_1_e(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xplant: case Yplant: case Xacid_1: @@ -2687,6 +2951,16 @@ static void Lbug_s(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xplant: case Yplant: case Zplayer: @@ -2739,6 +3013,16 @@ static void Lbug_1_s(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xplant: case Yplant: case Xacid_1: @@ -2783,6 +3067,16 @@ static void Lbug_w(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xplant: case Yplant: case Zplayer: @@ -2835,6 +3129,16 @@ static void Lbug_1_w(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xplant: case Yplant: case Xacid_1: @@ -2879,6 +3183,16 @@ static void Ltank_n(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xplant: case Yplant: case Zplayer: @@ -2931,6 +3245,16 @@ static void Ltank_1_n(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xplant: case Yplant: case Xacid_1: @@ -2975,6 +3299,16 @@ static void Ltank_e(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xplant: case Yplant: case Zplayer: @@ -3027,6 +3361,16 @@ static void Ltank_1_e(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xplant: case Yplant: case Xacid_1: @@ -3071,6 +3415,16 @@ static void Ltank_s(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xplant: case Yplant: case Zplayer: @@ -3123,6 +3477,16 @@ static void Ltank_1_s(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xplant: case Yplant: case Xacid_1: @@ -3167,6 +3531,16 @@ static void Ltank_w(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xplant: case Yplant: case Zplayer: @@ -3219,6 +3593,16 @@ static void Ltank_1_w(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xplant: case Yplant: case Xacid_1: @@ -3263,6 +3647,16 @@ static void Lemerald(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x][y] = Yemerald_sB; next[x][y] = Xblank; cave[x][y+1] = Yemerald_s; @@ -3398,6 +3792,16 @@ static void Lemerald_pause(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x][y] = Yemerald_sB; next[x][y] = Xblank; cave[x][y+1] = Yemerald_s; @@ -3435,6 +3839,16 @@ static void Lemerald_fall(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Zplayer: cave[x][y] = Yemerald_sB; next[x][y] = Xblank; @@ -3490,6 +3904,16 @@ static void Ldiamond(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x][y] = Ydiamond_sB; next[x][y] = Xblank; cave[x][y+1] = Ydiamond_s; @@ -3625,6 +4049,16 @@ static void Ldiamond_pause(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x][y] = Ydiamond_sB; next[x][y] = Xblank; cave[x][y+1] = Ydiamond_s; @@ -3662,6 +4096,16 @@ static void Ldiamond_fall(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Zplayer: cave[x][y] = Ydiamond_sB; next[x][y] = Xblank; @@ -3717,8 +4161,6 @@ static void Lstone(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: - case Xplant: - case Yplant: #ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS case Xfake_acid_1: case Xfake_acid_2: @@ -3729,6 +4171,8 @@ static void Lstone(int x, int y) 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; @@ -3902,7 +4346,6 @@ static void Lstone_fall(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: - case Zplayer: #ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS case Xfake_acid_1: case Xfake_acid_2: @@ -3913,6 +4356,7 @@ static void Lstone_fall(int x, int y) 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; @@ -3981,6 +4425,16 @@ static void Lstone_fall(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xalien: case Xalien_pause: cave[x][y+1] = Xspring_e; @@ -3998,6 +4452,16 @@ static void Lstone_fall(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xalien: case Xalien_pause: cave[x][y+1] = Xspring_w; @@ -4036,6 +4500,16 @@ static void Lstone_fall(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Zplayer: case Xbug_1_n: case Xbug_1_e: @@ -4129,6 +4603,16 @@ static void Lbomb(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x][y] = Ybomb_sB; next[x][y] = Xblank; cave[x][y+1] = Ybomb_s; @@ -4246,6 +4730,16 @@ static void Lbomb_pause(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x][y] = Ybomb_sB; next[x][y] = Xblank; cave[x][y+1] = Ybomb_s; @@ -4283,6 +4777,16 @@ static void Lbomb_fall(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x][y] = Ybomb_sB; next[x][y] = Xblank; cave[x][y+1] = Ybomb_s; @@ -4320,6 +4824,16 @@ static void Lnut(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x][y] = Ynut_sB; next[x][y] = Xblank; cave[x][y+1] = Ynut_s; @@ -4437,6 +4951,16 @@ static void Lnut_pause(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x][y] = Ynut_sB; next[x][y] = Xblank; cave[x][y+1] = Ynut_s; @@ -4474,6 +4998,16 @@ static void Lnut_fall(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Zplayer: cave[x][y] = Ynut_sB; next[x][y] = Xblank; @@ -4513,6 +5047,16 @@ static void Lspring(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xplant: case Yplant: cave[x][y] = Yspring_sB; @@ -4660,6 +5204,16 @@ static void Lspring_pause(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x][y] = Yspring_sB; next[x][y] = Xblank; cave[x][y+1] = Yspring_s; @@ -4697,6 +5251,16 @@ static void Lspring_e(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x][y] = Yspring_sB; next[x][y] = Xblank; cave[x][y+1] = Yspring_s; @@ -4729,6 +5293,16 @@ static void Lspring_e(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Yalien_nB: case Yalien_eB: case Yalien_sB: @@ -4792,6 +5366,16 @@ static void Lspring_w(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x][y] = Yspring_sB; next[x][y] = Xblank; cave[x][y+1] = Yspring_s; @@ -4824,6 +5408,16 @@ static void Lspring_w(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Yalien_nB: case Yalien_eB: case Yalien_sB: @@ -4887,6 +5481,16 @@ static void Lspring_fall(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Zplayer: cave[x][y] = Yspring_sB; next[x][y] = Xblank; @@ -5358,6 +5962,16 @@ static void Lballoon(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x][y] = Yballoon_nB; next[x][y] = Xblank; cave[x][y-1] = Yballoon_n; @@ -5389,6 +6003,16 @@ static void Lballoon(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x][y] = Yballoon_eB; next[x][y] = Xblank; cave[x+1][y] = Yballoon_e; @@ -5420,6 +6044,16 @@ static void Lballoon(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x][y] = Yballoon_sB; next[x][y] = Xblank; cave[x][y+1] = Yballoon_s; @@ -5451,6 +6085,16 @@ static void Lballoon(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x][y] = Yballoon_wB; next[x][y] = Xblank; cave[x-1][y] = Yballoon_w; @@ -5661,6 +6305,16 @@ static void Ldrip_fall(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xplant: case Yplant: case Zplayer: @@ -5765,6 +6419,16 @@ static void Lsand_stone(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif cave[x][y] = Xsand_stonesand_quickout_1; next[x][y] = Xsand_stonesand_quickout_2; cave[x][y+1] = Xsand_stoneout_1; @@ -5966,6 +6630,16 @@ static void Lamoeba(int x, int y) case Xblank: case Xacid_splash_e: case Xacid_splash_w: +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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: +#endif case Xgrass: case Xdirt: case Xsand: diff --git a/src/game_em/main_em.h b/src/game_em/main_em.h index ac00b423..0620b725 100644 --- a/src/game_em/main_em.h +++ b/src/game_em/main_em.h @@ -97,6 +97,7 @@ extern struct GameInfo_EM game_em; extern unsigned char tab_blank[TILE_MAX]; extern unsigned char tab_acid[TILE_MAX]; +extern unsigned char tab_fake_acid[TILE_MAX]; extern unsigned char tab_amoeba[TILE_MAX]; extern unsigned char tab_android_move[TILE_MAX]; extern unsigned short tab_explode_normal[TILE_MAX]; diff --git a/src/game_em/tab_generate.c b/src/game_em/tab_generate.c index 69e9036b..c532f7d3 100644 --- a/src/game_em/tab_generate.c +++ b/src/game_em/tab_generate.c @@ -22,6 +22,16 @@ int tile_blank[] = Xblank, 1, Xacid_splash_e, 1, Xacid_splash_w, 1, +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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, +#endif TILE_MAX }; @@ -31,6 +41,16 @@ int tile_acid[] = Xblank, 1, Xacid_splash_e, 1, Xacid_splash_w, 1, +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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, +#endif Xacid_1, 1, Xacid_2, 1, Xacid_3, 1, @@ -42,6 +62,22 @@ int tile_acid[] = TILE_MAX }; +/* 0=stop 1=fake_acid */ +int tile_fake_acid[] = +{ +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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, +#endif + TILE_MAX +}; + /* 0=stop 1=amoeba */ int tile_amoeba[] = { @@ -64,6 +100,16 @@ int tile_android_move[] = Xblank, 1, Xacid_splash_e, 1, Xacid_splash_w, 1, +#ifdef EM_ENGINE_USE_ADDITIONAL_ELEMENTS + 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, +#endif Xplant, 1, TILE_MAX }; @@ -4387,6 +4433,9 @@ unsigned char tab_blank[TILE_MAX]; /* 0=stop 1=acid */ unsigned char tab_acid[TILE_MAX]; +/* 0=stop 1=fake_acid */ +unsigned char tab_fake_acid[TILE_MAX]; + /* 0=stop 1=amoeba */ unsigned char tab_amoeba[TILE_MAX]; @@ -4579,6 +4628,7 @@ void tab_generate(void) { create_tab(tile_blank, tab_blank); create_tab(tile_acid, tab_acid); + create_tab(tile_fake_acid, tab_fake_acid); create_tab(tile_amoeba, tab_amoeba); create_tab(tile_android_move, tab_android_move); create_explode();