rnd-20030209-1-src
authorHolger Schemel <info@artsoft.org>
Sun, 9 Feb 2003 22:23:01 +0000 (23:23 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:40:19 +0000 (10:40 +0200)
src/conftime.h
src/editor.c
src/game.c
src/init.c

index a95a19e73efacbe9426c93d1aec4c19970ec41e2..71df4b0964b8cde2f35bb8a3c07f9d94be5c06dd 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2003-02-08 18:58]"
+#define COMPILE_DATE_STRING "[2003-02-09 21:58]"
index ed78feab149af7f69bbd7efbb7416d79d9ff8514..407d31073c8be9c6bd98c6f1a7e526297659a213 100644 (file)
 #define GADGET_ID_EM_SLIPPERY_GEMS     77
 #define GADGET_ID_CUSTOM_INDESTRUCTIBLE        78
 #define GADGET_ID_CUSTOM_CAN_FALL      79
-#define GADGET_ID_CUSTOM_SLIPPERY      80
+#define GADGET_ID_CUSTOM_CAN_SMASH     80
+#define GADGET_ID_CUSTOM_SLIPPERY      81
 
 /* gadgets for buttons in element list */
-#define GADGET_ID_ELEMENTLIST_FIRST    81
-#define GADGET_ID_ELEMENTLIST_LAST     (81 + ED_NUM_ELEMENTLIST_BUTTONS - 1)
+#define GADGET_ID_ELEMENTLIST_FIRST    82
+#define GADGET_ID_ELEMENTLIST_LAST     (GADGET_ID_ELEMENTLIST_FIRST +  \
+                                       ED_NUM_ELEMENTLIST_BUTTONS - 1)
 
 #define NUM_EDITOR_GADGETS             (GADGET_ID_ELEMENTLIST_LAST + 1)
 
 #define ED_CHECKBUTTON_ID_EM_SLIPPERY_GEMS     4
 #define ED_CHECKBUTTON_ID_CUSTOM_INDESTRUCTIBLE        5
 #define ED_CHECKBUTTON_ID_CUSTOM_CAN_FALL      6
-#define ED_CHECKBUTTON_ID_CUSTOM_SLIPPERY      7
+#define ED_CHECKBUTTON_ID_CUSTOM_CAN_SMASH     7
+#define ED_CHECKBUTTON_ID_CUSTOM_SLIPPERY      8
 
-#define ED_NUM_CHECKBUTTONS                    8
+#define ED_NUM_CHECKBUTTONS                    9
 
 #define ED_CHECKBUTTON_ID_LEVEL_FIRST  ED_CHECKBUTTON_ID_DOUBLE_SPEED
 #define ED_CHECKBUTTON_ID_LEVEL_LAST   ED_CHECKBUTTON_ID_RANDOM_RESTRICTED
@@ -435,6 +438,7 @@ static struct
 {
   boolean indestructible;
   boolean can_fall;
+  boolean can_smash;
   boolean slippery;
 } custom_element_properties[NUM_CUSTOM_ELEMENTS];
 
@@ -707,6 +711,12 @@ static struct
   },
   {
     ED_SETTINGS_XPOS,                  ED_COUNTER_YPOS(6),
+    GADGET_ID_CUSTOM_CAN_SMASH,
+    &custom_element_properties[0].can_smash,
+    "can smash",                       "element can smash other elements"
+  },
+  {
+    ED_SETTINGS_XPOS,                  ED_COUNTER_YPOS(7),
     GADGET_ID_CUSTOM_SLIPPERY,
     &custom_element_properties[0].slippery,
     "slippery",                                "other elements can fall down from it"
@@ -2477,6 +2487,9 @@ static void CopyCustomElementPropertiesToEditor()
     custom_element_properties[i].can_fall =
       ((properties & EP_BIT_CAN_FALL) != 0 ? TRUE : FALSE);
 
+    custom_element_properties[i].can_smash =
+      ((properties & EP_BIT_CAN_SMASH) != 0 ? TRUE : FALSE);
+
     custom_element_properties[i].slippery =
       ((properties & EP_BIT_SLIPPERY) != 0 ? TRUE : FALSE);
   }
@@ -2502,6 +2515,11 @@ static void CopyCustomElementPropertiesToGame()
     else
       Properties1[element] &= ~EP_BIT_CAN_FALL;
 
+    if (custom_element_properties[i].can_smash)
+      Properties1[element] |= EP_BIT_CAN_SMASH;
+    else
+      Properties1[element] &= ~EP_BIT_CAN_SMASH;
+
     if (custom_element_properties[i].slippery)
       Properties1[element] |= EP_BIT_SLIPPERY;
     else
@@ -3143,6 +3161,18 @@ static void DrawPropertiesWindow()
                 GDI_CHECKED, *checkbutton_info[i].value, GDI_END);
     MapCheckbuttonGadget(i);
 
+    /* draw checkbutton gadget */
+    i = ED_CHECKBUTTON_ID_CUSTOM_CAN_SMASH;
+    x = checkbutton_info[i].x + xoffset_right2;
+    y = checkbutton_info[i].y + yoffset_right2;
+
+    checkbutton_info[i].value = &custom_element_properties[nr].can_smash;
+
+    DrawTextF(x, y, font_color, checkbutton_info[i].text);
+    ModifyGadget(level_editor_gadget[checkbutton_info[i].gadget_id],
+                GDI_CHECKED, *checkbutton_info[i].value, GDI_END);
+    MapCheckbuttonGadget(i);
+
     /* draw checkbutton gadget */
     i = ED_CHECKBUTTON_ID_CUSTOM_SLIPPERY;
     x = checkbutton_info[i].x + xoffset_right2;
index 48ec54275ed16ea36422b6c148ea4005f45be4e9..4a297314858004b037a51cfff7eff27e3d91f7de 100644 (file)
@@ -2900,7 +2900,11 @@ void StartMoving(int x, int y)
         EL_BD_MAGIC_WALL_FILLING);
       Store[x][y] = element;
     }
+#if 0
     else if (CAN_SMASH(element) && Feld[x][y+1] == EL_ACID)
+#else
+    else if (CAN_FALL(element) && Feld[x][y+1] == EL_ACID)
+#endif
     {
       SplashAcid(x, y);
 
index 0e208dbb66e676ea16db2512c0d279cb3f74532a..60f6febb1d948eb5f7b8e2b1955ece08dfeac1e0 100644 (file)
@@ -1695,14 +1695,6 @@ void InitElementProperties()
     EL_EMERALD_RED,
     EL_EMERALD_PURPLE,
     EL_DIAMOND,
-    EL_KEY1,
-    EL_KEY2,
-    EL_KEY3,
-    EL_KEY4,
-    EL_EM_KEY1,
-    EL_EM_KEY2,
-    EL_EM_KEY3,
-    EL_EM_KEY4,
     EL_BOMB,
     EL_NUT,
     EL_AMOEBA_DROP,