fixed support for initially moving spring in EM game engine
authorHolger Schemel <info@artsoft.org>
Sun, 23 Aug 2020 22:34:23 +0000 (00:34 +0200)
committerHolger Schemel <info@artsoft.org>
Sun, 23 Aug 2020 22:39:16 +0000 (00:39 +0200)
src/game_em/cave.h
src/game_em/convert.c
src/game_em/reademc.c
src/tools.c

index cb189ce661a1632a2c755c9998ac5737893cb2f4..d1a9090bf3aea83bc170070d9fa6a0cad86421fb 100644 (file)
@@ -52,6 +52,8 @@ enum
   Cbomb,
   Cnut,
   Cspring,
+  Cspring_e,
+  Cspring_w,
   Cpush_emerald_e,
   Cpush_emerald_w,
   Cpush_diamond_e,
index bae0130c3920adcd4ed56a4e3e0ea4a0474855d5..c311bffa34e76b9291172f44110d6c471d14c254 100644 (file)
@@ -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,
index 1308615c363d7ceee40d581fa8c11036e933ca1d..f93310309df3fa452c6f2b943ee6b78e3ad9eb40 100644 (file)
  * 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
index 32d33f4d76d275195f200d63f5cdece94ce6142d..473e652f687d2167c401fd63be5b53f4936340f2 100644 (file)
@@ -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
   },