rnd-20030611-1-src
authorHolger Schemel <info@artsoft.org>
Tue, 10 Jun 2003 22:53:43 +0000 (00:53 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:42:04 +0000 (10:42 +0200)
src/conftime.h
src/editor.c
src/game.c
src/init.c
src/main.h

index 76000455b1ea2a6f7460f3c82120b528a461b3c9..f453ceeeb7252016c662e65e821b3736c9307e11 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2003-06-10 02:16]"
+#define COMPILE_DATE_STRING "[2003-06-10 23:15]"
index 6e7edd102c187170e5800fb5d01c0fa95ad8b071..afd0a884d7a8cc126dab49a31ef070cb0a177c90 100644 (file)
@@ -884,9 +884,9 @@ static int value_deadliness = 0;
 
 static struct ValueTextInfo options_smash_targets[] =
 {
-  { EP_CAN_SMASH_FRIENDS,      "friends"                       },
+  { EP_CAN_SMASH_PLAYER,       "player"                        },
   { EP_CAN_SMASH_ENEMIES,      "enemies"                       },
-  { EP_CAN_SMASH_EXPLOSIVES,   "explosives"                    },
+  { EP_CAN_SMASH_EVERYTHING,   "everything"                    },
   { -1,                                NULL                            }
 };
 static int value_smash_targets = 0;
@@ -3447,14 +3447,14 @@ static void CopyCustomElementPropertiesToEditor(int element)
 
   /* set smash targets selectbox help value */
   value_smash_targets =
-    (CAN_SMASH_EXPLOSIVES(element) ? EP_CAN_SMASH_EXPLOSIVES :
+    (CAN_SMASH_EVERYTHING(element) ? EP_CAN_SMASH_EVERYTHING :
      CAN_SMASH_ENEMIES(element) ? EP_CAN_SMASH_ENEMIES :
-     CAN_SMASH_FRIENDS(element) ? EP_CAN_SMASH_FRIENDS :
-     EP_CAN_SMASH_FRIENDS);
+     CAN_SMASH_PLAYER(element) ? EP_CAN_SMASH_PLAYER :
+     EP_CAN_SMASH_PLAYER);
   custom_element_properties[EP_CAN_SMASH] =
-    (CAN_SMASH_EXPLOSIVES(element) ||
+    (CAN_SMASH_EVERYTHING(element) ||
      CAN_SMASH_ENEMIES(element) ||
-     CAN_SMASH_FRIENDS(element));
+     CAN_SMASH_PLAYER(element));
 
   /* set walkable layer selectbox help value */
   value_walkable_layer =
@@ -3501,9 +3501,9 @@ static void CopyCustomElementPropertiesToGame(int element)
     custom_element_properties[EP_DEADLY];
 
   /* set smash property from checkbox and selectbox */
-  custom_element_properties[EP_CAN_SMASH_FRIENDS] = FALSE;
+  custom_element_properties[EP_CAN_SMASH_PLAYER] = FALSE;
   custom_element_properties[EP_CAN_SMASH_ENEMIES] = FALSE;
-  custom_element_properties[EP_CAN_SMASH_EXPLOSIVES] = FALSE;
+  custom_element_properties[EP_CAN_SMASH_EVERYTHING] = FALSE;
   custom_element_properties[value_smash_targets] =
     custom_element_properties[EP_CAN_SMASH];
 
@@ -4253,9 +4253,9 @@ static void DrawPropertiesInfo()
 #if 0
     { EP_CAN_SMASH,            "- can smash"                           },
 #endif
-    { EP_CAN_SMASH_FRIENDS,    "- can smash player and friends"        },
+    { EP_CAN_SMASH_PLAYER,     "- can smash player"                    },
     { EP_CAN_SMASH_ENEMIES,    "- can smash good and bad guys"         },
-    { EP_CAN_SMASH_EXPLOSIVES, "- can smash everything smashable"      },
+    { EP_CAN_SMASH_EVERYTHING, "- can smash everything smashable"      },
     { EP_CAN_EXPLODE,          "- can explode"                         },
     { EP_CAN_EXPLODE_BY_FIRE,  "  - by fire or explosions"             },
     { EP_CAN_EXPLODE_SMASHED,  "  - when smashed"                      },
index c4764283bb635d6a25c086410d69e80695cd4c53..abd3bd4b41f325ebd2fd01261560e833a551ca21 100644 (file)
@@ -2326,10 +2326,12 @@ void Impact(int x, int y)
       return;
 
     object_hit = (!IS_FREE(x, y+1) && (!IS_MOVING(x, y+1) ||
-                                     MovDir[x][y+1] != MV_DOWN ||
-                                     MovPos[x][y+1] <= TILEY / 2));
+                                      MovDir[x][y+1] != MV_DOWN ||
+                                      MovPos[x][y+1] <= TILEY / 2));
     if (object_hit)
       smashed = MovingOrBlocked2Element(x, y+1);
+
+    impact = (lastline || object_hit);
   }
 
   if (!lastline && smashed == EL_ACID) /* element falls into acid */
@@ -2379,7 +2381,11 @@ void Impact(int x, int y)
     return;
   }
 
+#if 1
+  if (object_hit)              /* check which object was hit */
+#else
   if (!lastline && object_hit)         /* check which object was hit */
+#endif
   {
     if (CAN_PASS_MAGIC_WALL(element) && 
        (smashed == EL_MAGIC_WALL ||
@@ -2406,13 +2412,19 @@ void Impact(int x, int y)
 
     if (IS_PLAYER(x, y + 1))
     {
-      KillHeroUnlessProtected(x, y+1);
-      return;
+      if (CAN_SMASH_PLAYER(element))
+      {
+       KillHeroUnlessProtected(x, y+1);
+       return;
+      }
     }
     else if (smashed == EL_PENGUIN)
     {
-      Bang(x, y + 1);
-      return;
+      if (CAN_SMASH_PLAYER(element))
+      {
+       Bang(x, y + 1);
+       return;
+      }
     }
     else if (element == EL_BD_DIAMOND)
     {
@@ -2431,11 +2443,18 @@ void Impact(int x, int y)
       Bang(x, y + 1);
       return;
     }
+#if 1
+    else if (CAN_SMASH_EVERYTHING(element))
+#else
     else if (element == EL_ROCK ||
             element == EL_SP_ZONK ||
             element == EL_BD_ROCK)
+#endif
     {
       if (IS_CLASSIC_ENEMY(smashed) ||
+#if 1
+         CAN_EXPLODE_SMASHED(smashed))
+#else
          smashed == EL_BOMB ||
          smashed == EL_SP_DISK_ORANGE ||
          smashed == EL_DX_SUPABOMB ||
@@ -2443,6 +2462,7 @@ void Impact(int x, int y)
          smashed == EL_PIG ||
          smashed == EL_DRAGON ||
          smashed == EL_MOLE)
+#endif
       {
        Bang(x, y + 1);
        return;
index 111008428fb635d4a2908e9e151cdc2bb0c75650..a5b386bc0ec88457c2d5b8abf517cf33dec076ad 100644 (file)
@@ -1383,7 +1383,7 @@ void InitElementPropertiesStatic()
     -1
   };
 
-  static int ep_can_smash_friends[] =
+  static int ep_can_smash_player[] =
   {
     EL_ROCK,
     EL_BD_ROCK,
@@ -1416,7 +1416,7 @@ void InitElementPropertiesStatic()
     -1
   };
 
-  static int ep_can_smash_explosives[] =
+  static int ep_can_smash_everything[] =
   {
     EL_ROCK,
     EL_BD_ROCK,
@@ -2310,9 +2310,9 @@ void InitElementPropertiesStatic()
     { ep_can_change,           EP_CAN_CHANGE           },
     { ep_can_move,             EP_CAN_MOVE             },
     { ep_can_fall,             EP_CAN_FALL             },
-    { ep_can_smash_friends,    EP_CAN_SMASH_FRIENDS    },
+    { ep_can_smash_player,     EP_CAN_SMASH_PLAYER     },
     { ep_can_smash_enemies,    EP_CAN_SMASH_ENEMIES    },
-    { ep_can_smash_explosives, EP_CAN_SMASH_EXPLOSIVES },
+    { ep_can_smash_everything, EP_CAN_SMASH_EVERYTHING },
     { ep_can_explode_by_fire,  EP_CAN_EXPLODE_BY_FIRE  },
     { ep_can_explode_smashed,  EP_CAN_EXPLODE_SMASHED  },
     { ep_can_explode_impact,   EP_CAN_EXPLODE_IMPACT   },
@@ -2450,9 +2450,9 @@ void InitElementPropertiesEngine(int engine_version)
     EP_DONT_COLLIDE_WITH,
     EP_CAN_MOVE,
     EP_CAN_FALL,
-    EP_CAN_SMASH_FRIENDS,
+    EP_CAN_SMASH_PLAYER,
     EP_CAN_SMASH_ENEMIES,
-    EP_CAN_SMASH_EXPLOSIVES,
+    EP_CAN_SMASH_EVERYTHING,
     EP_PUSHABLE,
 
     EP_CAN_BE_CRUMBLED,
@@ -2562,17 +2562,17 @@ void InitElementPropertiesEngine(int engine_version)
       if (DONT_COLLIDE_WITH(i))
        SET_PROPERTY(i, EP_DONT_RUN_INTO, TRUE);
 
-      /* ---------- CAN_SMASH_ENEMIES / CAN_SMASH_FRIENDS ------------------ */
-      if (CAN_SMASH_EXPLOSIVES(i))
+      /* ---------- CAN_SMASH_ENEMIES / CAN_SMASH_PLAYER ------------------- */
+      if (CAN_SMASH_EVERYTHING(i))
        SET_PROPERTY(i, EP_CAN_SMASH_ENEMIES, TRUE);
       if (CAN_SMASH_ENEMIES(i))
-       SET_PROPERTY(i, EP_CAN_SMASH_FRIENDS, TRUE);
+       SET_PROPERTY(i, EP_CAN_SMASH_PLAYER, TRUE);
     }
 
     /* ---------- CAN_SMASH ------------------------------------------------ */
-    SET_PROPERTY(i, EP_CAN_SMASH, (CAN_SMASH_FRIENDS(i) ||
+    SET_PROPERTY(i, EP_CAN_SMASH, (CAN_SMASH_PLAYER(i) ||
                                   CAN_SMASH_ENEMIES(i) ||
-                                  CAN_SMASH_EXPLOSIVES(i)));
+                                  CAN_SMASH_EVERYTHING(i)));
 
     /* ---------- CAN_EXPLODE ---------------------------------------------- */
     SET_PROPERTY(i, EP_CAN_EXPLODE, (CAN_EXPLODE_BY_FIRE(i) ||
index 239e6afbe7a5f632c7036473975ab8f8ba36e9d1..ec1f8f6de202d5a48f4030e35d355d7c8e053b23 100644 (file)
@@ -71,9 +71,9 @@
 #define EP_CAN_CHANGE          7
 #define EP_CAN_MOVE            8
 #define EP_CAN_FALL            9
-#define EP_CAN_SMASH_FRIENDS   10
+#define EP_CAN_SMASH_PLAYER    10
 #define EP_CAN_SMASH_ENEMIES   11
-#define EP_CAN_SMASH_EXPLOSIVES        12
+#define EP_CAN_SMASH_EVERYTHING        12
 #define EP_CAN_EXPLODE_BY_FIRE 13
 #define EP_CAN_EXPLODE_SMASHED 14
 #define EP_CAN_EXPLODE_IMPACT  15
 #define CAN_CHANGE(e)          HAS_PROPERTY(e, EP_CAN_CHANGE)
 #define CAN_MOVE(e)            HAS_PROPERTY(e, EP_CAN_MOVE)
 #define CAN_FALL(e)            HAS_PROPERTY(e, EP_CAN_FALL)
-#define CAN_SMASH_FRIENDS(e)   HAS_PROPERTY(e, EP_CAN_SMASH_FRIENDS)
+#define CAN_SMASH_PLAYER(e)    HAS_PROPERTY(e, EP_CAN_SMASH_PLAYER)
 #define CAN_SMASH_ENEMIES(e)   HAS_PROPERTY(e, EP_CAN_SMASH_ENEMIES)
-#define CAN_SMASH_EXPLOSIVES(e)        HAS_PROPERTY(e, EP_CAN_SMASH_EXPLOSIVES)
+#define CAN_SMASH_EVERYTHING(e)        HAS_PROPERTY(e, EP_CAN_SMASH_EVERYTHING)
 #define CAN_EXPLODE_BY_FIRE(e) HAS_PROPERTY(e, EP_CAN_EXPLODE_BY_FIRE)
 #define CAN_EXPLODE_SMASHED(e) HAS_PROPERTY(e, EP_CAN_EXPLODE_SMASHED)
 #define CAN_EXPLODE_IMPACT(e)  HAS_PROPERTY(e, EP_CAN_EXPLODE_IMPACT)