changed internal element name in BD engine
authorHolger Schemel <holger.schemel@virtion.de>
Sun, 11 Aug 2024 13:35:49 +0000 (15:35 +0200)
committerHolger Schemel <holger.schemel@virtion.de>
Sun, 11 Aug 2024 13:36:12 +0000 (15:36 +0200)
src/game_bd/bd_cavedb.c
src/game_bd/bd_caveengine.c
src/game_bd/bd_elements.h
src/tools.c

index d5230b8efaea4ece2e03e18a117a360b6a6b63ac..26d52ce9566da8212de3f599aa55fa6367391e03 100644 (file)
@@ -1236,25 +1236,28 @@ GdElementProperty gd_element_properties[] =
     P_EXPLOSION,
     "AMOEBA2EXPLOSION4", 0, 295, 295, 295, 280
   },    // has ckdelay
+
+  // nut "explosions" are not real explosions, but the stages of a cracked nut opening.
+  // therefore they are sloped
   {
-    O_NUT_EXPL_1, N_("Nut explosion (1)"),
+    O_NUT_CRACK_1, N_("Nut crack (1)"),
     P_SLOPED | P_EXPLOSION | P_EXPLOSION_FIRST_STAGE,
-    "NUTEXPLOSION1", 0, 360, 360, 360, 280
+    "NUTCRACK1", 0, 360, 360, 360, 280
   },    // has ckdelay
   {
-    O_NUT_EXPL_2, N_("Nut explosion (2)"),
+    O_NUT_CRACK_2, N_("Nut crack (2)"),
     P_SLOPED | P_EXPLOSION,
-    "NUTEXPLOSION2", 0, 361, 361, 361, 280
+    "NUTCRACK2", 0, 361, 361, 361, 280
   },    /* has ckdelay */        /* these are rounded!! */
   {
-    O_NUT_EXPL_3, N_("Nut explosion (3)"),
+    O_NUT_CRACK_3, N_("Nut crack (3)"),
     P_SLOPED | P_EXPLOSION,
-    "NUTEXPLOSION3", 0, 362, 362, 362, 280
+    "NUTCRACK3", 0, 362, 362, 362, 280
   },    // has ckdelay
   {
-    O_NUT_EXPL_4, N_("Nut explosion (4)"),
+    O_NUT_CRACK_4, N_("Nut crack (4)"),
     P_SLOPED | P_EXPLOSION,
-    "NUTEXPLOSION4", 0, 363, 363, 363, 280
+    "NUTCRACK4", 0, 363, 363, 363, 280
   },    // has ckdelay
 
   {
@@ -2734,7 +2737,7 @@ GdPropertyDefault gd_cave_defaults_gdash[] =
   { CAVE_OFFSET(water_does_not_flow_down),                     FALSE                           },
 
   // nut
-  { CAVE_OFFSET(nut_turns_to_when_crushed),                    O_NUT_EXPL_1                    },
+  { CAVE_OFFSET(nut_turns_to_when_crushed),                    O_NUT_CRACK_1                   },
 
   // replicator
   { CAVE_OFFSET(replicator_delay_frame),                       4                               },
index 44da27df866420dc2280da2380118dee7cdfdd1c..1b743c5a775065474feb5f06be83bb59a5c99681 100644 (file)
@@ -3444,7 +3444,7 @@ void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire,
          store(cave, x, y, cave->explosion_effect);
          break;
 
-       case O_NUT_EXPL_4:
+       case O_NUT_CRACK_4:
          store(cave, x, y, O_DIAMOND);
          break;
 
@@ -3537,9 +3537,9 @@ void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire,
        case O_BOMB_EXPL_1:
        case O_BOMB_EXPL_2:
        case O_BOMB_EXPL_3:
-       case O_NUT_EXPL_1:
-       case O_NUT_EXPL_2:
-       case O_NUT_EXPL_3:
+       case O_NUT_CRACK_1:
+       case O_NUT_CRACK_2:
+       case O_NUT_CRACK_3:
        case O_GHOST_EXPL_1:
        case O_GHOST_EXPL_2:
        case O_GHOST_EXPL_3:
index 9beef2fee0023ef395c850d76854d67644eb4fd1..1737915f84279cb3a2092688dac257b9a885e331 100644 (file)
@@ -251,10 +251,10 @@ typedef enum _element
   O_AMOEBA_2_EXPL_2,
   O_AMOEBA_2_EXPL_3,
   O_AMOEBA_2_EXPL_4,
-  O_NUT_EXPL_1,
-  O_NUT_EXPL_2,
-  O_NUT_EXPL_3,
-  O_NUT_EXPL_4,
+  O_NUT_CRACK_1,
+  O_NUT_CRACK_2,
+  O_NUT_CRACK_3,
+  O_NUT_CRACK_4,
 
   // these are used internally for the pneumatic hammer, and should not be used in the editor!
   // (not even as an effect destination or something like that)
index 09933f1d4bc3507a0fca7eda48ac16259ff68254..bfcaaed04da0fda5dab6e2ef36c7b082a5486388 100644 (file)
@@ -7401,35 +7401,35 @@ bd_object_mapping_list[] =
     EL_BDX_AMOEBA_2,                           ACTION_EXPLODING, -1
   },
   {
-    O_NUT_EXPL_1,                              TRUE,
+    O_NUT_CRACK_1,                             TRUE,
     EL_BDX_NUT_BREAKING_1,                     -1, -1
   },
   {
-    O_NUT_EXPL_1,                              FALSE,
+    O_NUT_CRACK_1,                             FALSE,
     EL_BDX_NUT,                                        ACTION_BREAKING, -1
   },
   {
-    O_NUT_EXPL_2,                              TRUE,
+    O_NUT_CRACK_2,                             TRUE,
     EL_BDX_NUT_BREAKING_2,                     -1, -1
   },
   {
-    O_NUT_EXPL_2,                              FALSE,
+    O_NUT_CRACK_2,                             FALSE,
     EL_BDX_NUT,                                        ACTION_BREAKING, -1
   },
   {
-    O_NUT_EXPL_3,                              TRUE,
+    O_NUT_CRACK_3,                             TRUE,
     EL_BDX_NUT_BREAKING_3,                     -1, -1
   },
   {
-    O_NUT_EXPL_3,                              FALSE,
+    O_NUT_CRACK_3,                             FALSE,
     EL_BDX_NUT,                                        ACTION_BREAKING, -1
   },
   {
-    O_NUT_EXPL_4,                              TRUE,
+    O_NUT_CRACK_4,                             TRUE,
     EL_BDX_NUT_BREAKING_4,                     -1, -1
   },
   {
-    O_NUT_EXPL_4,                              FALSE,
+    O_NUT_CRACK_4,                             FALSE,
     EL_BDX_NUT,                                        ACTION_BREAKING, -1
   },
   {
@@ -10763,7 +10763,7 @@ void InitGraphicInfo_BD(void)
                        BD_GFX_RANGE(O_PRE_STEEL_1, 4, i)     ? BD_GFX_FRAME(O_PRE_STEEL_1, i) :
                        BD_GFX_RANGE(O_BOMB_TICK_1, 7, i)     ? BD_GFX_FRAME(O_BOMB_TICK_1, i) :
                        BD_GFX_RANGE(O_BOMB_EXPL_1, 4, i)     ? BD_GFX_FRAME(O_BOMB_EXPL_1, i) :
-                       BD_GFX_RANGE(O_NUT_EXPL_1, 4, i)      ? BD_GFX_FRAME(O_NUT_EXPL_1, i) :
+                       BD_GFX_RANGE(O_NUT_CRACK_1, 4, i)     ? BD_GFX_FRAME(O_NUT_CRACK_1, i) :
                        BD_GFX_RANGE(O_GHOST_EXPL_1, 4, i)    ? BD_GFX_FRAME(O_GHOST_EXPL_1, i) :
                        BD_GFX_RANGE(O_EXPLODE_1, 5, i)       ? BD_GFX_FRAME(O_EXPLODE_1, i) :
                        BD_GFX_RANGE(O_PRE_CLOCK_1, 4, i)     ? BD_GFX_FRAME(O_PRE_CLOCK_1, i) :