-#define COMPILE_DATE_STRING "[2003-06-10 02:16]"
+#define COMPILE_DATE_STRING "[2003-06-10 23:15]"
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;
/* 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 =
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];
#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" },
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 */
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 ||
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)
{
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 ||
smashed == EL_PIG ||
smashed == EL_DRAGON ||
smashed == EL_MOLE)
+#endif
{
Bang(x, y + 1);
return;
-1
};
- static int ep_can_smash_friends[] =
+ static int ep_can_smash_player[] =
{
EL_ROCK,
EL_BD_ROCK,
-1
};
- static int ep_can_smash_explosives[] =
+ static int ep_can_smash_everything[] =
{
EL_ROCK,
EL_BD_ROCK,
{ 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 },
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,
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) ||
#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)