rnd-20040207-1-src
authorHolger Schemel <info@artsoft.org>
Sat, 7 Feb 2004 03:08:34 +0000 (04:08 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:45:48 +0000 (10:45 +0200)
Makefile
src/Makefile
src/conftime.h
src/editor.c
src/files.c
src/game.c
src/init.c
src/main.c
src/main.h
src/netserv.c

index 1ea92b071143a8f34b3ef39b687194fc893a8a00..481244f71d62f19aa28798e6d2579a159c37ac06 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -50,8 +50,8 @@ CROSS_PATH_WIN32=/usr/local/cross-tools/i386-mingw32msvc
 SRC_DIR = src
 MAKE_CMD = $(MAKE) -C $(SRC_DIR)
 
-DEFAULT_TARGET = x11
-DEFAULT_TARGET = sdl
+DEFAULT_TARGET = x11
+DEFAULT_TARGET = sdl
 
 
 # -----------------------------------------------------------------------------
index ef1f52af1cd9b8b1be223b2036c4533f0076c8b3..f065f0b92cfb9a87ba2326f7db908e702e14b04a 100644 (file)
@@ -85,8 +85,7 @@ endif
 
 ifeq ($(TARGET),x11)
 SYS_CFLAGS  = -DTARGET_X11 $(X11_INCL)
-# SYS_LDFLAGS = $(X11_LIBS) -lX11
-SYS_LDFLAGS = $(XLIB_PATH)/libX11.a
+SYS_LDFLAGS = $(X11_LIBS) -lX11
 endif
 
 ifeq ($(TARGET),sdl)
index c477c00c411febc994a7660c3eb93d3d3aca2354..6ea446363404dc98599e36904496c84cd593f76d 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2004-02-06 15:14]"
+#define COMPILE_DATE_STRING "[2004-02-07 04:07]"
index 6ca13b17aef7bc78edf0ed2b6b2e82401a947fdc..9740597d7f82649de80d119fec5d637a56d7121f 100644 (file)
 #define GADGET_ID_MOVE_DELAY_RND_DOWN  (GADGET_ID_COUNTER_FIRST + 48)
 #define GADGET_ID_MOVE_DELAY_RND_TEXT  (GADGET_ID_COUNTER_FIRST + 49)
 #define GADGET_ID_MOVE_DELAY_RND_UP    (GADGET_ID_COUNTER_FIRST + 50)
-#define GADGET_ID_CHANGE_DELAY_FIX_DOWN        (GADGET_ID_COUNTER_FIRST + 51)
-#define GADGET_ID_CHANGE_DELAY_FIX_TEXT        (GADGET_ID_COUNTER_FIRST + 52)
-#define GADGET_ID_CHANGE_DELAY_FIX_UP  (GADGET_ID_COUNTER_FIRST + 53)
-#define GADGET_ID_CHANGE_DELAY_RND_DOWN        (GADGET_ID_COUNTER_FIRST + 54)
-#define GADGET_ID_CHANGE_DELAY_RND_TEXT        (GADGET_ID_COUNTER_FIRST + 55)
-#define GADGET_ID_CHANGE_DELAY_RND_UP  (GADGET_ID_COUNTER_FIRST + 56)
-#define GADGET_ID_CHANGE_CONT_RND_DOWN (GADGET_ID_COUNTER_FIRST + 57)
-#define GADGET_ID_CHANGE_CONT_RND_TEXT (GADGET_ID_COUNTER_FIRST + 58)
-#define GADGET_ID_CHANGE_CONT_RND_UP   (GADGET_ID_COUNTER_FIRST + 59)
-#define GADGET_ID_GROUP_CONTENT_DOWN   (GADGET_ID_COUNTER_FIRST + 60)
-#define GADGET_ID_GROUP_CONTENT_TEXT   (GADGET_ID_COUNTER_FIRST + 61)
-#define GADGET_ID_GROUP_CONTENT_UP     (GADGET_ID_COUNTER_FIRST + 62)
+#define GADGET_ID_EXPLOSION_DELAY_DOWN (GADGET_ID_COUNTER_FIRST + 51)
+#define GADGET_ID_EXPLOSION_DELAY_TEXT (GADGET_ID_COUNTER_FIRST + 52)
+#define GADGET_ID_EXPLOSION_DELAY_UP   (GADGET_ID_COUNTER_FIRST + 53)
+#define GADGET_ID_IGNITION_DELAY_DOWN  (GADGET_ID_COUNTER_FIRST + 54)
+#define GADGET_ID_IGNITION_DELAY_TEXT  (GADGET_ID_COUNTER_FIRST + 55)
+#define GADGET_ID_IGNITION_DELAY_UP    (GADGET_ID_COUNTER_FIRST + 56)
+#define GADGET_ID_CHANGE_DELAY_FIX_DOWN        (GADGET_ID_COUNTER_FIRST + 57)
+#define GADGET_ID_CHANGE_DELAY_FIX_TEXT        (GADGET_ID_COUNTER_FIRST + 58)
+#define GADGET_ID_CHANGE_DELAY_FIX_UP  (GADGET_ID_COUNTER_FIRST + 59)
+#define GADGET_ID_CHANGE_DELAY_RND_DOWN        (GADGET_ID_COUNTER_FIRST + 60)
+#define GADGET_ID_CHANGE_DELAY_RND_TEXT        (GADGET_ID_COUNTER_FIRST + 61)
+#define GADGET_ID_CHANGE_DELAY_RND_UP  (GADGET_ID_COUNTER_FIRST + 62)
+#define GADGET_ID_CHANGE_CONT_RND_DOWN (GADGET_ID_COUNTER_FIRST + 63)
+#define GADGET_ID_CHANGE_CONT_RND_TEXT (GADGET_ID_COUNTER_FIRST + 64)
+#define GADGET_ID_CHANGE_CONT_RND_UP   (GADGET_ID_COUNTER_FIRST + 65)
+#define GADGET_ID_GROUP_CONTENT_DOWN   (GADGET_ID_COUNTER_FIRST + 66)
+#define GADGET_ID_GROUP_CONTENT_TEXT   (GADGET_ID_COUNTER_FIRST + 67)
+#define GADGET_ID_GROUP_CONTENT_UP     (GADGET_ID_COUNTER_FIRST + 68)
 
 /* drawing area identifiers */
-#define GADGET_ID_DRAWING_AREA_FIRST   (GADGET_ID_COUNTER_FIRST + 63)
+#define GADGET_ID_DRAWING_AREA_FIRST   (GADGET_ID_COUNTER_FIRST + 69)
 
 #define GADGET_ID_DRAWING_LEVEL                (GADGET_ID_DRAWING_AREA_FIRST + 0)
 #define GADGET_ID_ELEMENT_CONTENT_0    (GADGET_ID_DRAWING_AREA_FIRST + 1)
 #define ED_COUNTER_ID_PUSH_DELAY_RND   14
 #define ED_COUNTER_ID_MOVE_DELAY_FIX   15
 #define ED_COUNTER_ID_MOVE_DELAY_RND   16
-#define ED_COUNTER_ID_GROUP_CONTENT    17
-#define ED_COUNTER_ID_CHANGE_DELAY_FIX 18
-#define ED_COUNTER_ID_CHANGE_DELAY_RND 19
-#define ED_COUNTER_ID_CHANGE_CONT_RND  20
+#define ED_COUNTER_ID_EXPLOSION_DELAY  17
+#define ED_COUNTER_ID_IGNITION_DELAY   18
+#define ED_COUNTER_ID_GROUP_CONTENT    19
+#define ED_COUNTER_ID_CHANGE_DELAY_FIX 20
+#define ED_COUNTER_ID_CHANGE_DELAY_RND 21
+#define ED_COUNTER_ID_CHANGE_CONT_RND  22
 
-#define ED_NUM_COUNTERBUTTONS          21
+#define ED_NUM_COUNTERBUTTONS          23
 
 #define ED_COUNTER_ID_LEVEL_FIRST      ED_COUNTER_ID_LEVEL_XSIZE
 #define ED_COUNTER_ID_LEVEL_LAST       ED_COUNTER_ID_LEVEL_RANDOM
 
-#define ED_COUNTER_ID_CUSTOM_FIRST     ED_COUNTER_ID_CUSTOM_SCORE
-#define ED_COUNTER_ID_CUSTOM_LAST      ED_COUNTER_ID_MOVE_DELAY_RND
+#define ED_COUNTER_ID_CUSTOM1_FIRST    ED_COUNTER_ID_CUSTOM_SCORE
+#define ED_COUNTER_ID_CUSTOM1_LAST     ED_COUNTER_ID_MOVE_DELAY_RND
+#define ED_COUNTER_ID_CUSTOM2_FIRST    ED_COUNTER_ID_EXPLOSION_DELAY
+#define ED_COUNTER_ID_CUSTOM2_LAST     ED_COUNTER_ID_IGNITION_DELAY
+#define ED_COUNTER_ID_CUSTOM_FIRST     ED_COUNTER_ID_CUSTOM1_FIRST
+#define ED_COUNTER_ID_CUSTOM_LAST      ED_COUNTER_ID_CUSTOM2_LAST
 
 #define ED_COUNTER_ID_CHANGE_FIRST     ED_COUNTER_ID_CHANGE_DELAY_FIX
 #define ED_COUNTER_ID_CHANGE_LAST      ED_COUNTER_ID_CHANGE_CONT_RND
 #define ED_SELECTBOX_ID_CUSTOM1_LAST   ED_SELECTBOX_ID_CUSTOM_SLIPPERY_TYPE
 #define ED_SELECTBOX_ID_CUSTOM2_FIRST  ED_SELECTBOX_ID_CUSTOM_DEADLINESS
 #define ED_SELECTBOX_ID_CUSTOM2_LAST   ED_SELECTBOX_ID_CUSTOM_CONSISTENCY
+#define ED_SELECTBOX_ID_CUSTOM_FIRST   ED_SELECTBOX_ID_CUSTOM1_FIRST
+#define ED_SELECTBOX_ID_CUSTOM_LAST    ED_SELECTBOX_ID_CUSTOM2_LAST
 
 #define ED_SELECTBOX_ID_CHANGE_FIRST   ED_SELECTBOX_ID_CHANGE_TIME_UNITS
 #define ED_SELECTBOX_ID_CHANGE_LAST    ED_SELECTBOX_ID_SELECT_CHANGE_PAGE
 #define ED_CHECKBUTTON_ID_CUSTOM1_LAST ED_CHECKBUTTON_ID_CUSTOM_SLIPPERY
 #define ED_CHECKBUTTON_ID_CUSTOM2_FIRST        ED_CHECKBUTTON_ID_CUSTOM_DEADLY
 #define ED_CHECKBUTTON_ID_CUSTOM2_LAST ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_IMPACT
+#define ED_CHECKBUTTON_ID_CUSTOM_FIRST ED_CHECKBUTTON_ID_CUSTOM1_FIRST
+#define ED_CHECKBUTTON_ID_CUSTOM_LAST  ED_CHECKBUTTON_ID_CUSTOM2_LAST
 
 #define ED_CHECKBUTTON_ID_CHANGE_FIRST ED_CHECKBUTTON_ID_CUSTOM_CAN_CHANGE
 #define ED_CHECKBUTTON_ID_CHANGE_LAST  ED_CHECKBUTTON_ID_CHANGE_USE_RANDOM
@@ -948,7 +964,7 @@ static struct
     NULL,                              " ", "height",
   },
 
-  /* ---------- element settings: configure (custom elements) -------------- */
+  /* ---------- element settings: configure 1 (custom elements) ------------ */
 
   {
     ED_SETTINGS_XPOS(1),               ED_SETTINGS_YPOS(5),
@@ -999,6 +1015,25 @@ static struct
     NULL,                              "+random", NULL
   },
 
+  /* ---------- element settings: configure 2 (custom elements) ------------ */
+
+  {
+    ED_SETTINGS_XPOS(1),               ED_SETTINGS_YPOS(4),
+    0,                                 255,
+    GADGET_ID_EXPLOSION_DELAY_DOWN,    GADGET_ID_EXPLOSION_DELAY_UP,
+    GADGET_ID_EXPLOSION_DELAY_TEXT,    GADGET_ID_NONE,
+    &custom_element.explosion_delay,
+    NULL,                              "explosion delay", NULL
+  },
+  {
+    ED_SETTINGS_XPOS(1),               ED_SETTINGS_YPOS(5),
+    0,                                 255,
+    GADGET_ID_IGNITION_DELAY_DOWN,     GADGET_ID_IGNITION_DELAY_UP,
+    GADGET_ID_IGNITION_DELAY_TEXT,     GADGET_ID_NONE,
+    &custom_element.ignition_delay,
+    NULL,                              "ignition delay", NULL
+  },
+
   /* ---------- element settings: configure (group elements) --------------- */
 
   {
@@ -6639,7 +6674,8 @@ static void DrawPropertiesConfig()
        MapCheckbuttonGadget(i);
 
       /* draw counter gadgets */
-      for (i = ED_COUNTER_ID_CUSTOM_FIRST; i <= ED_COUNTER_ID_CUSTOM_LAST; i++)
+      for (i =  ED_COUNTER_ID_CUSTOM1_FIRST;
+          i <= ED_COUNTER_ID_CUSTOM1_LAST; i++)
        MapCounterButtons(i);
 
       /* draw selectbox gadgets */
@@ -6665,6 +6701,11 @@ static void DrawPropertiesConfig()
           i <= ED_CHECKBUTTON_ID_CUSTOM2_LAST; i++)
        MapCheckbuttonGadget(i);
 
+      /* draw counter gadgets */
+      for (i =  ED_COUNTER_ID_CUSTOM2_FIRST;
+          i <= ED_COUNTER_ID_CUSTOM2_LAST; i++)
+       MapCounterButtons(i);
+
       /* draw selectbox gadgets */
       for (i =  ED_SELECTBOX_ID_CUSTOM2_FIRST;
           i <= ED_SELECTBOX_ID_CUSTOM2_LAST; i++)
@@ -7958,10 +7999,8 @@ static void HandleSelectboxGadgets(struct GadgetInfo *gi)
 
     DrawPropertiesWindow();
   }
-  else if ((type_id >= ED_SELECTBOX_ID_CUSTOM1_FIRST &&
-           type_id <= ED_SELECTBOX_ID_CUSTOM1_LAST) ||
-          (type_id >= ED_SELECTBOX_ID_CUSTOM2_FIRST &&
-           type_id <= ED_SELECTBOX_ID_CUSTOM2_LAST) ||
+  else if ((type_id >= ED_SELECTBOX_ID_CUSTOM_FIRST &&
+           type_id <= ED_SELECTBOX_ID_CUSTOM_LAST) ||
           (type_id >= ED_SELECTBOX_ID_CHANGE_FIRST &&
            type_id <= ED_SELECTBOX_ID_CHANGE_LAST) ||
           (type_id == ED_SELECTBOX_ID_GROUP_CHOICE_MODE))
@@ -8056,10 +8095,8 @@ static void HandleCheckbuttons(struct GadgetInfo *gi)
 
   *checkbutton_info[type_id].value ^= TRUE;
 
-  if (((type_id >= ED_CHECKBUTTON_ID_CUSTOM1_FIRST &&
-       type_id <= ED_CHECKBUTTON_ID_CUSTOM1_LAST) ||
-       (type_id >= ED_CHECKBUTTON_ID_CUSTOM2_FIRST &&
-       type_id <= ED_CHECKBUTTON_ID_CUSTOM2_LAST) ||
+  if (((type_id >= ED_CHECKBUTTON_ID_CUSTOM_FIRST &&
+       type_id <= ED_CHECKBUTTON_ID_CUSTOM_LAST) ||
        (type_id >= ED_CHECKBUTTON_ID_CHANGE_FIRST &&
        type_id <= ED_CHECKBUTTON_ID_CHANGE_LAST)) &&
       type_id != ED_CHECKBUTTON_ID_CUSTOM_USE_TEMPLATE)
index 59adf524c7fc7460b17d1e45039f9f43806a4d76..c93d187175c40c5cd658f50c8386741846372a6f 100644 (file)
@@ -225,8 +225,8 @@ static void setLevelInfoToDefaults(struct LevelInfo *level)
 
       element_info[element].slippery_type = SLIPPERY_ANY_RANDOM;
 
-      element_info[element].explosion_delay = 0;
-      element_info[element].ignition_delay = 0;
+      element_info[element].explosion_delay = 18;
+      element_info[element].ignition_delay = 8;
 
       for (x = 0; x < 3; x++)
        for (y = 0; y < 3; y++)
index 0efc0328827c6ce3f65b309b3a1c92356c8ddea4..4bd3f46cbf61cccdc10ef407d2b9578ab508d284 100644 (file)
@@ -1385,6 +1385,7 @@ void InitGame()
       ChangeEvent[x][y] = CE_BITMASK_DEFAULT;
 
       ExplodePhase[x][y] = 0;
+      ExplodeDelay[x][y] = 0;
       ExplodeField[x][y] = EX_NO_EXPLOSION;
 
       RunnerVisit[x][y] = 0;
@@ -1419,6 +1420,30 @@ void InitGame()
                    emulate_sb ? EMU_SOKOBAN :
                    emulate_sp ? EMU_SUPAPLEX : EMU_NONE);
 
+  /* initialize explosion and ignition delay */
+  for (i = 0; i < MAX_NUM_ELEMENTS; i++)
+  {
+    if (!IS_CUSTOM_ELEMENT(i))
+    {
+      int num_phase = 9;
+      int delay = (game.emulation == EMU_SUPAPLEX ? 3 : 2);
+      int last_phase = num_phase * delay;
+      int half_phase = (num_phase / 2) * delay;
+
+      element_info[i].explosion_delay = last_phase;
+      element_info[i].ignition_delay = half_phase;
+
+      if (i == EL_BLACK_ORB)
+       element_info[i].ignition_delay = 1;
+    }
+
+    if (element_info[i].explosion_delay < 2)   /* !!! check again !!! */
+      element_info[i].explosion_delay = 2;
+
+    if (element_info[i].ignition_delay < 1)    /* !!! check again !!! */
+      element_info[i].ignition_delay = 1;
+  }
+
   /* correct non-moving belts to start moving left */
   for (i = 0; i < 4; i++)
     if (game.belt_dir[i] == MV_NO_MOVING)
@@ -2424,6 +2449,9 @@ void Explode(int ex, int ey, int phase, int mode)
   int last_phase = num_phase * delay;
   int half_phase = (num_phase / 2) * delay;
   int first_phase_after_start = EX_PHASE_START + 1;
+  int border_element;
+
+  int last_phase_TEST = last_phase;
 
   if (game.explosions_delayed)
   {
@@ -2458,6 +2486,10 @@ void Explode(int ex, int ey, int phase, int mode)
       Feld[ex][ey] = center_element;
     }
 
+#if 1
+    last_phase = element_info[center_element].explosion_delay;
+#endif
+
     for (y = ey - 1; y <= ey + 1; y++) for (x = ex - 1; x <= ex + 1; x++)
     {
       int xx = x - ex + 1;
@@ -2628,6 +2660,9 @@ void Explode(int ex, int ey, int phase, int mode)
 #endif
 
       ExplodePhase[x][y] = 1;
+#if 1
+      ExplodeDelay[x][y] = last_phase;
+#endif
       Stop[x][y] = TRUE;
     }
 
@@ -2644,6 +2679,10 @@ void Explode(int ex, int ey, int phase, int mode)
   x = ex;
   y = ey;
 
+#if 1
+  last_phase = ExplodeDelay[x][y];
+#endif
+
   ExplodePhase[x][y] = (phase < last_phase ? phase + 1 : 0);
 
 #ifdef DEBUG
@@ -2664,6 +2703,127 @@ void Explode(int ex, int ey, int phase, int mode)
   }
 #endif
 
+#if 1
+
+  border_element = Store2[x][y];
+  if (IS_PLAYER(x, y))
+    border_element = StorePlayer[x][y];
+
+  if (phase == element_info[border_element].ignition_delay ||
+      phase == last_phase)
+  {
+    if (IS_PLAYER(x, y))
+    {
+      if (phase == 2)
+       printf("::: IS_PLAYER\n");
+
+      KillHeroUnlessExplosionProtected(x, y);
+      return;
+    }
+    else if (CAN_EXPLODE_BY_FIRE(border_element))
+    {
+      if (phase == 2)
+       printf("::: CAN_EXPLODE_BY_FIRE\n");
+
+      Feld[x][y] = Store2[x][y];
+      Store2[x][y] = 0;
+      Bang(x, y);
+      return;
+    }
+    else if (border_element == EL_AMOEBA_TO_DIAMOND)
+    {
+      if (phase == 2)
+       printf("::: EL_AMOEBA_TO_DIAMOND\n");
+
+      AmoebeUmwandeln(x, y);
+      return;
+    }
+  }
+
+  if (phase == last_phase)
+  {
+    int element;
+
+    element = Feld[x][y] = Store[x][y];
+    Store[x][y] = Store2[x][y] = 0;
+    GfxElement[x][y] = EL_UNDEFINED;
+
+    /* player can escape from explosions and might therefore be still alive */
+    if (element >= EL_PLAYER_IS_EXPLODING_1 &&
+       element <= EL_PLAYER_IS_EXPLODING_4)
+      Feld[x][y] = (stored_player[element - EL_PLAYER_IS_EXPLODING_1].active ?
+                   EL_EMPTY :
+                   element == EL_PLAYER_IS_EXPLODING_1 ? EL_EMERALD_YELLOW :
+                   element == EL_PLAYER_IS_EXPLODING_2 ? EL_EMERALD_RED :
+                   element == EL_PLAYER_IS_EXPLODING_3 ? EL_EMERALD :
+                   EL_EMERALD_PURPLE);
+
+    /* restore probably existing indestructible background element */
+    if (Back[x][y] && IS_INDESTRUCTIBLE(Back[x][y]))
+      element = Feld[x][y] = Back[x][y];
+    Back[x][y] = 0;
+
+    MovDir[x][y] = MovPos[x][y] = MovDelay[x][y] = 0;
+    GfxDir[x][y] = MV_NO_MOVING;
+    ChangeDelay[x][y] = 0;
+    ChangePage[x][y] = -1;
+
+    InitField(x, y, FALSE);
+#if 1
+    /* !!! not needed !!! */
+    if (CAN_MOVE(element))
+      InitMovDir(x, y);
+#endif
+    DrawLevelField(x, y);
+
+    TestIfElementTouchesCustomElement(x, y);
+
+    if (GFX_CRUMBLED(element))
+      DrawLevelFieldCrumbledSandNeighbours(x, y);
+
+    if (IS_PLAYER(x, y) && !PLAYERINFO(x,y)->present)
+      StorePlayer[x][y] = 0;
+
+    if (ELEM_IS_PLAYER(element))
+      RelocatePlayer(x, y, element);
+  }
+  else if (IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
+  {
+#if 1
+    int graphic = el_act2img(GfxElement[x][y], ACTION_EXPLODING);
+#else
+    int stored = Store[x][y];
+    int graphic = (game.emulation != EMU_SUPAPLEX ? IMG_EXPLOSION :
+                  stored == EL_SP_INFOTRON ? IMG_SP_EXPLOSION_INFOTRON :
+                  IMG_SP_EXPLOSION);
+#endif
+    int frame = getGraphicAnimationFrame(graphic, phase - delay);
+
+#if 0
+    printf("::: %d ['%s'] -> %d\n", GfxElement[x][y],
+          element_info[GfxElement[x][y]].token_name,
+          graphic);
+#endif
+
+    if (phase == delay)
+      DrawLevelFieldCrumbledSand(x, y);
+
+    if (IS_WALKABLE_OVER(Back[x][y]) && Back[x][y] != EL_EMPTY)
+    {
+      DrawLevelElement(x, y, Back[x][y]);
+      DrawGraphicThruMask(SCREENX(x), SCREENY(y), graphic, frame);
+    }
+    else if (IS_WALKABLE_UNDER(Back[x][y]))
+    {
+      DrawGraphic(SCREENX(x), SCREENY(y), graphic, frame);
+      DrawLevelElementThruMask(x, y, Back[x][y]);
+    }
+    else if (!IS_WALKABLE_INSIDE(Back[x][y]))
+      DrawGraphic(SCREENX(x), SCREENY(y), graphic, frame);
+  }
+
+#else
+
   if (phase == first_phase_after_start)
   {
     int element = Store2[x][y];
@@ -2772,6 +2932,7 @@ void Explode(int ex, int ey, int phase, int mode)
     else if (!IS_WALKABLE_INSIDE(Back[x][y]))
       DrawGraphic(SCREENX(x), SCREENY(y), graphic, frame);
   }
+#endif
 }
 
 void DynaExplode(int ex, int ey)
index 853588131e640718f8e6a5a81f073f7505d4367b..f8004d0bd7ef5397cc1c09ae50130180a6daa06e 100644 (file)
@@ -1945,6 +1945,9 @@ void InitElementPropertiesStatic()
     EL_SP_DISK_YELLOW,
     EL_SP_SNIKSNAK,
     EL_SP_ELECTRON,
+#if 1
+    EL_BLACK_ORB,
+#endif
     -1
   };
 
@@ -3097,8 +3100,20 @@ void InitElementPropertiesEngine(int engine_version)
     else if (engine_version < VERSION_IDENT(2,2,0,0))
       SET_PROPERTY(i, EP_EXPLOSION_PROOF, IS_INDESTRUCTIBLE(i));
     else
+#if 1
+      SET_PROPERTY(i, EP_EXPLOSION_PROOF, (IS_INDESTRUCTIBLE(i) &&
+                                          (!IS_WALKABLE(i) ||
+                                           IS_PROTECTED(i))));
+#else
+#if 1
+      SET_PROPERTY(i, EP_EXPLOSION_PROOF, (IS_INDESTRUCTIBLE(i) &&
+                                          !IS_WALKABLE_OVER(i) &&
+                                          !IS_WALKABLE_UNDER(i)));
+#else
       SET_PROPERTY(i, EP_EXPLOSION_PROOF, (IS_INDESTRUCTIBLE(i) &&
                                           IS_PROTECTED(i)));
+#endif
+#endif
 
     if (IS_CUSTOM_ELEMENT(i))
     {
index 2fa12d6a5f7901d754ca75db5683ce2aeb3525d6..5e5e5f67c62464497e7507595c27b1867d22962f 100644 (file)
@@ -58,8 +58,9 @@ short                 WasJustFalling[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 short                  AmoebaNr[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 short                  AmoebaCnt[MAX_NUM_AMOEBA];
 short                  AmoebaCnt2[MAX_NUM_AMOEBA];
-short                  ExplodePhase[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 short                  ExplodeField[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                  ExplodePhase[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                  ExplodeDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 int                    RunnerVisit[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 int                    PlayerVisit[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 
index d09b3278e5eea8ba321998d87e74035acee18c83..486f6f2a020e889fce10eab3994bb1126cb898f4 100644 (file)
 #define SHIELD_ON(p)           ((p)->shield_normal_time_left > 0)
 
 #if 1
+
 #define ENEMY_PROTECTED_FIELD(x,y)     (IS_PROTECTED(Feld[x][y]) ||       \
                                         IS_PROTECTED(Back[x][y]))
 #define EXPLOSION_PROTECTED_FIELD(x,y)  (IS_EXPLOSION_PROOF(Feld[x][y]))
                                         ENEMY_PROTECTED_FIELD(x, y))
 #define PLAYER_EXPLOSION_PROTECTED(x,y) (SHIELD_ON(PLAYERINFO(x, y)) ||           \
                                         EXPLOSION_PROTECTED_FIELD(x, y))
+
 #else
+
 #define PROTECTED_FIELD(x,y)   (IS_ACCESSIBLE_INSIDE(Feld[x][y]) &&    \
                                 IS_INDESTRUCTIBLE(Feld[x][y]))
-#define PLAYER_PROTECTED(x,y)  (SHIELD_ON(PLAYERINFO(x, y)) ||         \
+#define PLAYER_ENEMY_PROTECTED(x,y)    (SHIELD_ON(PLAYERINFO(x, y)) || \
+                                PROTECTED_FIELD(x, y))
+#define PLAYER_EXPLOSION_PROTECTED(x,y)        (SHIELD_ON(PLAYERINFO(x, y)) || \
                                 PROTECTED_FIELD(x, y))
 #endif
 
@@ -1762,8 +1767,9 @@ extern short                      WasJustFalling[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 extern short                   AmoebaNr[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 extern short                   AmoebaCnt[MAX_NUM_AMOEBA];
 extern short                   AmoebaCnt2[MAX_NUM_AMOEBA];
-extern short                   ExplodePhase[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 extern short                   ExplodeField[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+extern short                   ExplodePhase[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+extern short                   ExplodeDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 extern int                     RunnerVisit[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 extern int                     PlayerVisit[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 
index 7343be6272fd4b431c259328a79d988061348eb8..08d161023dbf20312319899a9161b853bac9a1fd 100644 (file)
@@ -24,7 +24,7 @@
 #include <netinet/tcp.h>
 #include <arpa/inet.h>
 #include <netdb.h>
-#include <sys/select.h>                /* apparently needed by OS/2 */
+#include <sys/select.h>                        /* apparently needed for OS/2 port */
 
 #include "libgame/libgame.h"