From: Holger Schemel Date: Sun, 23 Aug 2020 22:34:23 +0000 (+0200) Subject: fixed support for initially moving spring in EM game engine X-Git-Tag: 4.2.0.2~28 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=1d35e75d3e0a040a61fcdfb38c25811e68052230;p=rocksndiamonds.git fixed support for initially moving spring in EM game engine --- diff --git a/src/game_em/cave.h b/src/game_em/cave.h index cb189ce6..d1a9090b 100644 --- a/src/game_em/cave.h +++ b/src/game_em/cave.h @@ -52,6 +52,8 @@ enum Cbomb, Cnut, Cspring, + Cspring_e, + Cspring_w, Cpush_emerald_e, Cpush_emerald_w, Cpush_diamond_e, diff --git a/src/game_em/convert.c b/src/game_em/convert.c index bae0130c..c311bffa 100644 --- a/src/game_em/convert.c +++ b/src/game_em/convert.c @@ -53,6 +53,8 @@ static const short map[CAVE_TILE_MAX] = [Cbomb] = Xbomb, [Cnut] = Xnut, [Cspring] = Xspring, + [Cspring_e] = Xspring_e, + [Cspring_w] = Xspring_w, [Cpush_emerald_e] = Xpush_emerald_e, [Cpush_emerald_w] = Xpush_emerald_w, [Cpush_diamond_e] = Xpush_diamond_e, diff --git a/src/game_em/reademc.c b/src/game_em/reademc.c index 1308615c..f9331030 100644 --- a/src/game_em/reademc.c +++ b/src/game_em/reademc.c @@ -40,6 +40,12 @@ * behaviour. */ +/* changes for game engine integration in Rocks'n'Diamonds: + * + * added support for rolling spring (not mapped to pushed spring) + * - required for Elvis Mine 8, levels 3, 23, 48 and 73 + */ + #define GET_BE16(x) ((&x)[0] << 8 | (&x)[1]) static const short map_emc_raw[256] = @@ -62,8 +68,8 @@ static const short map_emc_raw[256] = Cdynamite_2, Cdynamite_3, Cdynamite_4, Cacid_s, // 60 Cexit_1, Cexit_2, Cexit_3, Cballoon, // 64 - Cplant, Cspring, Cspring, Cpush_spring_w, // 68 - Cpush_spring_e, Cball_1, Cball_2, Candroid, // 72 + Cplant, Cspring, Cspring, Cspring_w, // 68 + Cspring_e, Cball_1, Cball_2, Candroid, // 72 Cpause, Candroid, Candroid, Candroid, // 76 Candroid, Candroid, Candroid, Candroid, // 80 Candroid, Cblank, Cblank, Cblank, // 84 diff --git a/src/tools.c b/src/tools.c index 32d33f4d..473e652f 100644 --- a/src/tools.c +++ b/src/tools.c @@ -6535,11 +6535,11 @@ em_object_mapping_list[GAME_TILE_MAX + 1] = EL_SPRING, -1, -1 }, { - Xspring_e, FALSE, FALSE, + Xspring_e, TRUE, FALSE, EL_SPRING_RIGHT, -1, -1 }, { - Xspring_w, FALSE, FALSE, + Xspring_w, TRUE, FALSE, EL_SPRING_LEFT, -1, -1 }, { @@ -6628,11 +6628,11 @@ em_object_mapping_list[GAME_TILE_MAX + 1] = EL_NUT, -1, MV_BIT_LEFT }, { - Xpush_spring_e, TRUE, FALSE, + Xpush_spring_e, FALSE, FALSE, EL_SPRING_RIGHT, -1, MV_BIT_RIGHT }, { - Xpush_spring_w, TRUE, FALSE, + Xpush_spring_w, FALSE, FALSE, EL_SPRING_LEFT, -1, MV_BIT_LEFT },