rnd-20100202-1-src
authorHolger Schemel <info@artsoft.org>
Tue, 2 Feb 2010 15:41:56 +0000 (16:41 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:58:20 +0000 (10:58 +0200)
* added small kludge that allows transparent pushing animation over
  non-black background
* added editor flag to Sokoban field/object elements to automatically
  finish solved Sokoban style levels (even if they contain non-Sokoban
  elements, which prevents auto-enabling this feature for such levels)

ChangeLog
src/conftime.h
src/editor.c
src/files.c
src/game.c
src/init.c
src/main.h
src/tools.c

index c4ffb8114a6743728548102aa89c6be35f631d36..babc5be443f3664e70a1dccf5da222c972dee12a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-02-02
+       * added small kludge that allows transparent pushing animation over
+         non-black background
+       * added editor flag to Sokoban field/object elements to automatically
+         finish solved Sokoban style levels (even if they contain non-Sokoban
+         elements, which prevents auto-enabling this feature for such levels)
+
 2010-01-10
        * added new element "from_level_template" which is replaced by element
          from level template at same playfield position when loaded (currently
index ddc93aa31e87152791bcb37a66ad0718f3254e1c..39e9985cfc8ff279bb34b92880c1fbe330359c8a 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "2010-01-11 01:33"
+#define COMPILE_DATE_STRING "2010-02-02 16:06"
index 739713440de0b57b8f56637bb12469a7a9d25f48..a5e5006e4c45964d1a005c805b2c8e55e9f449ff 100644 (file)
 #define GADGET_ID_RANDOM_BALL_CONTENT  (GADGET_ID_CHECKBUTTON_FIRST + 8)
 #define GADGET_ID_INITIAL_BALL_STATE   (GADGET_ID_CHECKBUTTON_FIRST + 9)
 #define GADGET_ID_GROW_INTO_DIGGABLE   (GADGET_ID_CHECKBUTTON_FIRST + 10)
-#define GADGET_ID_CONTINUOUS_SNAPPING  (GADGET_ID_CHECKBUTTON_FIRST + 11)
-#define GADGET_ID_BLOCK_SNAP_FIELD     (GADGET_ID_CHECKBUTTON_FIRST + 12)
-#define GADGET_ID_BLOCK_LAST_FIELD     (GADGET_ID_CHECKBUTTON_FIRST + 13)
-#define GADGET_ID_SP_BLOCK_LAST_FIELD  (GADGET_ID_CHECKBUTTON_FIRST + 14)
-#define GADGET_ID_INSTANT_RELOCATION   (GADGET_ID_CHECKBUTTON_FIRST + 15)
-#define GADGET_ID_SHIFTED_RELOCATION   (GADGET_ID_CHECKBUTTON_FIRST + 16)
-#define GADGET_ID_USE_START_ELEMENT    (GADGET_ID_CHECKBUTTON_FIRST + 17)
-#define GADGET_ID_USE_ARTWORK_ELEMENT  (GADGET_ID_CHECKBUTTON_FIRST + 18)
-#define GADGET_ID_USE_EXPLOSION_ELEMENT        (GADGET_ID_CHECKBUTTON_FIRST + 19)
-#define GADGET_ID_INITIAL_GRAVITY      (GADGET_ID_CHECKBUTTON_FIRST + 20)
-#define GADGET_ID_USE_INITIAL_INVENTORY        (GADGET_ID_CHECKBUTTON_FIRST + 21)
-#define GADGET_ID_CAN_PASS_TO_WALKABLE (GADGET_ID_CHECKBUTTON_FIRST + 22)
-#define GADGET_ID_CAN_FALL_INTO_ACID   (GADGET_ID_CHECKBUTTON_FIRST + 23)
-#define GADGET_ID_CAN_MOVE_INTO_ACID   (GADGET_ID_CHECKBUTTON_FIRST + 24)
-#define GADGET_ID_DONT_COLLIDE_WITH    (GADGET_ID_CHECKBUTTON_FIRST + 25)
-#define GADGET_ID_ENVELOPE_AUTOWRAP    (GADGET_ID_CHECKBUTTON_FIRST + 26)
-#define GADGET_ID_ENVELOPE_CENTERED    (GADGET_ID_CHECKBUTTON_FIRST + 27)
-#define GADGET_ID_CUSTOM_INDESTRUCTIBLE        (GADGET_ID_CHECKBUTTON_FIRST + 28)
-#define GADGET_ID_CUSTOM_CAN_EXPLODE   (GADGET_ID_CHECKBUTTON_FIRST + 29)
-#define GADGET_ID_CUSTOM_EXPLODE_FIRE  (GADGET_ID_CHECKBUTTON_FIRST + 30)
-#define GADGET_ID_CUSTOM_EXPLODE_SMASH (GADGET_ID_CHECKBUTTON_FIRST + 31)
-#define GADGET_ID_CUSTOM_EXPLODE_IMPACT        (GADGET_ID_CHECKBUTTON_FIRST + 32)
-#define GADGET_ID_CUSTOM_WALK_TO_OBJECT        (GADGET_ID_CHECKBUTTON_FIRST + 33)
-#define GADGET_ID_CUSTOM_DEADLY                (GADGET_ID_CHECKBUTTON_FIRST + 34)
-#define GADGET_ID_CUSTOM_CAN_MOVE      (GADGET_ID_CHECKBUTTON_FIRST + 35)
-#define GADGET_ID_CUSTOM_CAN_FALL      (GADGET_ID_CHECKBUTTON_FIRST + 36)
-#define GADGET_ID_CUSTOM_CAN_SMASH     (GADGET_ID_CHECKBUTTON_FIRST + 37)
-#define GADGET_ID_CUSTOM_SLIPPERY      (GADGET_ID_CHECKBUTTON_FIRST + 38)
-#define GADGET_ID_CUSTOM_ACCESSIBLE    (GADGET_ID_CHECKBUTTON_FIRST + 39)
-#define GADGET_ID_CUSTOM_GRAV_REACHABLE        (GADGET_ID_CHECKBUTTON_FIRST + 40)
-#define GADGET_ID_CUSTOM_USE_LAST_VALUE        (GADGET_ID_CHECKBUTTON_FIRST + 41)
-#define GADGET_ID_CUSTOM_USE_GRAPHIC   (GADGET_ID_CHECKBUTTON_FIRST + 42)
-#define GADGET_ID_CUSTOM_USE_TEMPLATE  (GADGET_ID_CHECKBUTTON_FIRST + 43)
-#define GADGET_ID_CUSTOM_CAN_CHANGE    (GADGET_ID_CHECKBUTTON_FIRST + 44)
-#define GADGET_ID_CHANGE_USE_CONTENT   (GADGET_ID_CHECKBUTTON_FIRST + 45)
-#define GADGET_ID_CHANGE_USE_EXPLOSION (GADGET_ID_CHECKBUTTON_FIRST + 46)
-#define GADGET_ID_CHANGE_ONLY_COMPLETE (GADGET_ID_CHECKBUTTON_FIRST + 47)
-#define GADGET_ID_CHANGE_USE_RANDOM    (GADGET_ID_CHECKBUTTON_FIRST + 48)
-#define GADGET_ID_CHANGE_HAS_ACTION    (GADGET_ID_CHECKBUTTON_FIRST + 49)
-#define GADGET_ID_CHANGE_DELAY         (GADGET_ID_CHECKBUTTON_FIRST + 50)
-#define GADGET_ID_CHANGE_BY_DIRECT_ACT (GADGET_ID_CHECKBUTTON_FIRST + 51)
-#define GADGET_ID_CHANGE_BY_OTHER_ACT  (GADGET_ID_CHECKBUTTON_FIRST + 52)
+#define GADGET_ID_AUTO_EXIT_SOKOBAN    (GADGET_ID_CHECKBUTTON_FIRST + 11)
+#define GADGET_ID_CONTINUOUS_SNAPPING  (GADGET_ID_CHECKBUTTON_FIRST + 12)
+#define GADGET_ID_BLOCK_SNAP_FIELD     (GADGET_ID_CHECKBUTTON_FIRST + 13)
+#define GADGET_ID_BLOCK_LAST_FIELD     (GADGET_ID_CHECKBUTTON_FIRST + 14)
+#define GADGET_ID_SP_BLOCK_LAST_FIELD  (GADGET_ID_CHECKBUTTON_FIRST + 15)
+#define GADGET_ID_INSTANT_RELOCATION   (GADGET_ID_CHECKBUTTON_FIRST + 16)
+#define GADGET_ID_SHIFTED_RELOCATION   (GADGET_ID_CHECKBUTTON_FIRST + 17)
+#define GADGET_ID_USE_START_ELEMENT    (GADGET_ID_CHECKBUTTON_FIRST + 18)
+#define GADGET_ID_USE_ARTWORK_ELEMENT  (GADGET_ID_CHECKBUTTON_FIRST + 19)
+#define GADGET_ID_USE_EXPLOSION_ELEMENT        (GADGET_ID_CHECKBUTTON_FIRST + 20)
+#define GADGET_ID_INITIAL_GRAVITY      (GADGET_ID_CHECKBUTTON_FIRST + 21)
+#define GADGET_ID_USE_INITIAL_INVENTORY        (GADGET_ID_CHECKBUTTON_FIRST + 22)
+#define GADGET_ID_CAN_PASS_TO_WALKABLE (GADGET_ID_CHECKBUTTON_FIRST + 23)
+#define GADGET_ID_CAN_FALL_INTO_ACID   (GADGET_ID_CHECKBUTTON_FIRST + 24)
+#define GADGET_ID_CAN_MOVE_INTO_ACID   (GADGET_ID_CHECKBUTTON_FIRST + 25)
+#define GADGET_ID_DONT_COLLIDE_WITH    (GADGET_ID_CHECKBUTTON_FIRST + 26)
+#define GADGET_ID_ENVELOPE_AUTOWRAP    (GADGET_ID_CHECKBUTTON_FIRST + 27)
+#define GADGET_ID_ENVELOPE_CENTERED    (GADGET_ID_CHECKBUTTON_FIRST + 28)
+#define GADGET_ID_CUSTOM_INDESTRUCTIBLE        (GADGET_ID_CHECKBUTTON_FIRST + 29)
+#define GADGET_ID_CUSTOM_CAN_EXPLODE   (GADGET_ID_CHECKBUTTON_FIRST + 30)
+#define GADGET_ID_CUSTOM_EXPLODE_FIRE  (GADGET_ID_CHECKBUTTON_FIRST + 31)
+#define GADGET_ID_CUSTOM_EXPLODE_SMASH (GADGET_ID_CHECKBUTTON_FIRST + 32)
+#define GADGET_ID_CUSTOM_EXPLODE_IMPACT        (GADGET_ID_CHECKBUTTON_FIRST + 33)
+#define GADGET_ID_CUSTOM_WALK_TO_OBJECT        (GADGET_ID_CHECKBUTTON_FIRST + 34)
+#define GADGET_ID_CUSTOM_DEADLY                (GADGET_ID_CHECKBUTTON_FIRST + 35)
+#define GADGET_ID_CUSTOM_CAN_MOVE      (GADGET_ID_CHECKBUTTON_FIRST + 36)
+#define GADGET_ID_CUSTOM_CAN_FALL      (GADGET_ID_CHECKBUTTON_FIRST + 37)
+#define GADGET_ID_CUSTOM_CAN_SMASH     (GADGET_ID_CHECKBUTTON_FIRST + 38)
+#define GADGET_ID_CUSTOM_SLIPPERY      (GADGET_ID_CHECKBUTTON_FIRST + 39)
+#define GADGET_ID_CUSTOM_ACCESSIBLE    (GADGET_ID_CHECKBUTTON_FIRST + 40)
+#define GADGET_ID_CUSTOM_GRAV_REACHABLE        (GADGET_ID_CHECKBUTTON_FIRST + 41)
+#define GADGET_ID_CUSTOM_USE_LAST_VALUE        (GADGET_ID_CHECKBUTTON_FIRST + 42)
+#define GADGET_ID_CUSTOM_USE_GRAPHIC   (GADGET_ID_CHECKBUTTON_FIRST + 43)
+#define GADGET_ID_CUSTOM_USE_TEMPLATE  (GADGET_ID_CHECKBUTTON_FIRST + 44)
+#define GADGET_ID_CUSTOM_CAN_CHANGE    (GADGET_ID_CHECKBUTTON_FIRST + 45)
+#define GADGET_ID_CHANGE_USE_CONTENT   (GADGET_ID_CHECKBUTTON_FIRST + 46)
+#define GADGET_ID_CHANGE_USE_EXPLOSION (GADGET_ID_CHECKBUTTON_FIRST + 47)
+#define GADGET_ID_CHANGE_ONLY_COMPLETE (GADGET_ID_CHECKBUTTON_FIRST + 48)
+#define GADGET_ID_CHANGE_USE_RANDOM    (GADGET_ID_CHECKBUTTON_FIRST + 49)
+#define GADGET_ID_CHANGE_HAS_ACTION    (GADGET_ID_CHECKBUTTON_FIRST + 50)
+#define GADGET_ID_CHANGE_DELAY         (GADGET_ID_CHECKBUTTON_FIRST + 51)
+#define GADGET_ID_CHANGE_BY_DIRECT_ACT (GADGET_ID_CHECKBUTTON_FIRST + 52)
+#define GADGET_ID_CHANGE_BY_OTHER_ACT  (GADGET_ID_CHECKBUTTON_FIRST + 53)
 
 /* gadgets for buttons in element list */
-#define GADGET_ID_ELEMENTLIST_FIRST    (GADGET_ID_CHECKBUTTON_FIRST + 53)
+#define GADGET_ID_ELEMENTLIST_FIRST    (GADGET_ID_CHECKBUTTON_FIRST + 54)
 #define GADGET_ID_ELEMENTLIST_LAST     (GADGET_ID_ELEMENTLIST_FIRST +  \
                                        ED_NUM_ELEMENTLIST_BUTTONS - 1)
 
 #define ED_CHECKBUTTON_ID_RANDOM_BALL_CONTENT  6
 #define ED_CHECKBUTTON_ID_INITIAL_BALL_STATE   7
 #define ED_CHECKBUTTON_ID_GROW_INTO_DIGGABLE   8
-#define ED_CHECKBUTTON_ID_CONTINUOUS_SNAPPING  9
-#define ED_CHECKBUTTON_ID_BLOCK_SNAP_FIELD     10
-#define ED_CHECKBUTTON_ID_BLOCK_LAST_FIELD     11
-#define ED_CHECKBUTTON_ID_SP_BLOCK_LAST_FIELD  12
-#define ED_CHECKBUTTON_ID_INSTANT_RELOCATION   13
-#define ED_CHECKBUTTON_ID_SHIFTED_RELOCATION   14
-#define ED_CHECKBUTTON_ID_USE_START_ELEMENT    15
-#define ED_CHECKBUTTON_ID_USE_ARTWORK_ELEMENT  16
-#define ED_CHECKBUTTON_ID_USE_EXPLOSION_ELEMENT        17
-#define ED_CHECKBUTTON_ID_INITIAL_GRAVITY      18
-#define ED_CHECKBUTTON_ID_USE_INITIAL_INVENTORY        19
-#define ED_CHECKBUTTON_ID_CAN_PASS_TO_WALKABLE 20
-#define ED_CHECKBUTTON_ID_CAN_FALL_INTO_ACID   21
-#define ED_CHECKBUTTON_ID_CAN_MOVE_INTO_ACID   22
-#define ED_CHECKBUTTON_ID_DONT_COLLIDE_WITH    23
-#define ED_CHECKBUTTON_ID_ENVELOPE_AUTOWRAP    24
-#define ED_CHECKBUTTON_ID_ENVELOPE_CENTERED    25
-#define ED_CHECKBUTTON_ID_CUSTOM_USE_GRAPHIC   26
-#define ED_CHECKBUTTON_ID_CUSTOM_USE_TEMPLATE  27
-#define ED_CHECKBUTTON_ID_CUSTOM_ACCESSIBLE    28
-#define ED_CHECKBUTTON_ID_CUSTOM_GRAV_REACHABLE        29
-#define ED_CHECKBUTTON_ID_CUSTOM_USE_LAST_VALUE        30
-#define ED_CHECKBUTTON_ID_CUSTOM_WALK_TO_OBJECT        31
-#define ED_CHECKBUTTON_ID_CUSTOM_INDESTRUCTIBLE        32
-#define ED_CHECKBUTTON_ID_CUSTOM_CAN_MOVE      33
-#define ED_CHECKBUTTON_ID_CUSTOM_CAN_FALL      34
-#define ED_CHECKBUTTON_ID_CUSTOM_CAN_SMASH     35
-#define ED_CHECKBUTTON_ID_CUSTOM_SLIPPERY      36
-#define ED_CHECKBUTTON_ID_CUSTOM_DEADLY                37
-#define ED_CHECKBUTTON_ID_CUSTOM_CAN_EXPLODE   38
-#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_FIRE  39
-#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_SMASH 40
-#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_IMPACT        41
-#define ED_CHECKBUTTON_ID_CUSTOM_CAN_CHANGE    42
-#define ED_CHECKBUTTON_ID_CHANGE_DELAY         43
-#define ED_CHECKBUTTON_ID_CHANGE_BY_DIRECT_ACT 44
-#define ED_CHECKBUTTON_ID_CHANGE_BY_OTHER_ACT  45
-#define ED_CHECKBUTTON_ID_CHANGE_USE_EXPLOSION 46
-#define ED_CHECKBUTTON_ID_CHANGE_USE_CONTENT   47
-#define ED_CHECKBUTTON_ID_CHANGE_ONLY_COMPLETE 48
-#define ED_CHECKBUTTON_ID_CHANGE_USE_RANDOM    49
-#define ED_CHECKBUTTON_ID_CHANGE_HAS_ACTION    50
-
-#define ED_NUM_CHECKBUTTONS                    51
+#define ED_CHECKBUTTON_ID_AUTO_EXIT_SOKOBAN    9
+#define ED_CHECKBUTTON_ID_CONTINUOUS_SNAPPING  10
+#define ED_CHECKBUTTON_ID_BLOCK_SNAP_FIELD     11
+#define ED_CHECKBUTTON_ID_BLOCK_LAST_FIELD     12
+#define ED_CHECKBUTTON_ID_SP_BLOCK_LAST_FIELD  13
+#define ED_CHECKBUTTON_ID_INSTANT_RELOCATION   14
+#define ED_CHECKBUTTON_ID_SHIFTED_RELOCATION   15
+#define ED_CHECKBUTTON_ID_USE_START_ELEMENT    16
+#define ED_CHECKBUTTON_ID_USE_ARTWORK_ELEMENT  17
+#define ED_CHECKBUTTON_ID_USE_EXPLOSION_ELEMENT        18
+#define ED_CHECKBUTTON_ID_INITIAL_GRAVITY      19
+#define ED_CHECKBUTTON_ID_USE_INITIAL_INVENTORY        20
+#define ED_CHECKBUTTON_ID_CAN_PASS_TO_WALKABLE 21
+#define ED_CHECKBUTTON_ID_CAN_FALL_INTO_ACID   22
+#define ED_CHECKBUTTON_ID_CAN_MOVE_INTO_ACID   23
+#define ED_CHECKBUTTON_ID_DONT_COLLIDE_WITH    24
+#define ED_CHECKBUTTON_ID_ENVELOPE_AUTOWRAP    25
+#define ED_CHECKBUTTON_ID_ENVELOPE_CENTERED    26
+#define ED_CHECKBUTTON_ID_CUSTOM_USE_GRAPHIC   27
+#define ED_CHECKBUTTON_ID_CUSTOM_USE_TEMPLATE  28
+#define ED_CHECKBUTTON_ID_CUSTOM_ACCESSIBLE    29
+#define ED_CHECKBUTTON_ID_CUSTOM_GRAV_REACHABLE        30
+#define ED_CHECKBUTTON_ID_CUSTOM_USE_LAST_VALUE        31
+#define ED_CHECKBUTTON_ID_CUSTOM_WALK_TO_OBJECT        32
+#define ED_CHECKBUTTON_ID_CUSTOM_INDESTRUCTIBLE        33
+#define ED_CHECKBUTTON_ID_CUSTOM_CAN_MOVE      34
+#define ED_CHECKBUTTON_ID_CUSTOM_CAN_FALL      35
+#define ED_CHECKBUTTON_ID_CUSTOM_CAN_SMASH     36
+#define ED_CHECKBUTTON_ID_CUSTOM_SLIPPERY      37
+#define ED_CHECKBUTTON_ID_CUSTOM_DEADLY                38
+#define ED_CHECKBUTTON_ID_CUSTOM_CAN_EXPLODE   39
+#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_FIRE  40
+#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_SMASH 41
+#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_IMPACT        42
+#define ED_CHECKBUTTON_ID_CUSTOM_CAN_CHANGE    43
+#define ED_CHECKBUTTON_ID_CHANGE_DELAY         44
+#define ED_CHECKBUTTON_ID_CHANGE_BY_DIRECT_ACT 45
+#define ED_CHECKBUTTON_ID_CHANGE_BY_OTHER_ACT  46
+#define ED_CHECKBUTTON_ID_CHANGE_USE_EXPLOSION 47
+#define ED_CHECKBUTTON_ID_CHANGE_USE_CONTENT   48
+#define ED_CHECKBUTTON_ID_CHANGE_ONLY_COMPLETE 49
+#define ED_CHECKBUTTON_ID_CHANGE_USE_RANDOM    50
+#define ED_CHECKBUTTON_ID_CHANGE_HAS_ACTION    51
+
+#define ED_NUM_CHECKBUTTONS                    52
 
 #define ED_CHECKBUTTON_ID_EDITOR_FIRST ED_CHECKBUTTON_ID_RANDOM_RESTRICTED
 #define ED_CHECKBUTTON_ID_EDITOR_LAST  ED_CHECKBUTTON_ID_RANDOM_RESTRICTED
@@ -2671,6 +2673,13 @@ static struct
     NULL,
     "can grow into anything diggable", "grow into more than just sand"
   },
+  {
+    ED_ELEMENT_SETTINGS_XPOS(0),       ED_ELEMENT_SETTINGS_YPOS(0),
+    GADGET_ID_AUTO_EXIT_SOKOBAN,       GADGET_ID_NONE,
+    &level.auto_exit_sokoban,
+    NULL,
+    "exit level if all fields solved", "automatically finish Sokoban levels"
+  },
   {
     ED_ELEMENT_SETTINGS_XPOS(0),       ED_ELEMENT_SETTINGS_YPOS(8),
     GADGET_ID_CONTINUOUS_SNAPPING,     GADGET_ID_NONE,
@@ -8213,7 +8222,10 @@ static boolean checkPropertiesConfig(int element)
       HAS_EDITOR_CONTENT(element) ||
       CAN_GROW(element) ||
       COULD_MOVE_INTO_ACID(element) ||
-      MAYBE_DONT_COLLIDE_WITH(element))
+      MAYBE_DONT_COLLIDE_WITH(element) ||
+      element == EL_SOKOBAN_OBJECT ||
+      element == EL_SOKOBAN_FIELD_EMPTY ||
+      element == EL_SOKOBAN_FIELD_FULL)
     return TRUE;
   else
     for (i = 0; elements_with_counter[i].element != -1; i++)
@@ -8407,6 +8419,11 @@ static void DrawPropertiesConfig()
     MapCheckbuttonGadget(ED_CHECKBUTTON_ID_GROW_INTO_DIGGABLE);
   }
 
+  if (properties_element == EL_SOKOBAN_OBJECT ||
+      properties_element == EL_SOKOBAN_FIELD_EMPTY ||
+      properties_element == EL_SOKOBAN_FIELD_FULL)
+    MapCheckbuttonGadget(ED_CHECKBUTTON_ID_AUTO_EXIT_SOKOBAN);
+
   if (IS_ENVELOPE(properties_element))
   {
     int counter1_id = ED_COUNTER_ID_ENVELOPE_XSIZE;
index ab949e18883acad59ac2db75d7f8d8e2e0665952..01c1b1ac9a4bdb1c21d808d36e054efbe3331f21 100644 (file)
@@ -236,6 +236,12 @@ static struct LevelFileConfigInfo chunk_config_INFO[] =
     &li.score[SC_TIME_BONUS],          1
   },
 
+  {
+    -1,                                        -1,
+    TYPE_BOOLEAN,                      CONF_VALUE_8_BIT(9),
+    &li.auto_exit_sokoban,             FALSE
+  },
+
   {
     -1,                                        -1,
     -1,                                        -1,
index e2b67c24da8a67be955cc3b5b9414702c158d1a1..1a04be1c3b6be86a8cb2786d60b7eee30968fd81 100644 (file)
@@ -15389,8 +15389,13 @@ static int DigField(struct PlayerInfo *player,
        PlayLevelSoundElementAction(nextx, nexty, EL_SOKOBAN_FIELD_EMPTY,
                                    ACTION_FILLING);
 
+#if 1
+      if (local_player->sokobanfields_still_needed == 0 &&
+         (game.emulation == EMU_SOKOBAN || level.auto_exit_sokoban))
+#else
       if (local_player->sokobanfields_still_needed == 0 &&
          game.emulation == EMU_SOKOBAN)
+#endif
       {
        PlayerWins(player);
 
index 222e1d33c2ad966be33fbdae20d70415be81929d..0d7dfe9359ded8e89ef18cc74ac6d7584785af8e 100644 (file)
@@ -4186,6 +4186,7 @@ void InitElementPropertiesStatic()
     EL_PLAYER_2,
     EL_PLAYER_3,
     EL_PLAYER_4,
+    EL_SOKOBAN_FIELD_PLAYER,
     EL_SP_MURPHY,
     EL_YAMYAM,
     EL_YAMYAM_LEFT,
index 7b345be7156185460f9c2bfbb32db5d3b8708189..13f6f8120af639c0d16d3d49420123518cde066a 100644 (file)
@@ -2389,6 +2389,7 @@ struct LevelInfo
   boolean shifted_relocation;  /* no level centering when relocating player */
   boolean can_pass_to_walkable;        /* player can pass to empty or walkable tile */
   boolean grow_into_diggable;  /* amoeba can grow into anything diggable */
+  boolean auto_exit_sokoban;   /* automatically finish solved Sokoban levels */
 
   boolean continuous_snapping; /* repeated snapping without releasing key */
   boolean block_snap_field;    /* snapping blocks field to show animation */
index 270b153c9579b5614a8a325ef2d05e9812c4465a..aacba67058f44f8bebadf1863a52c87cb4bd551e 100644 (file)
@@ -2719,8 +2719,24 @@ void DrawPlayer(struct PlayerInfo *player)
 #endif
 
     /* draw background element under pushed element (like the Sokoban field) */
+#if 1
+    /* this allows transparent pushing animation over non-black background */
+    if (IS_MOVING(jx, jy))
+    {
+      if (Back[jx][jy])
+       DrawLevelElement(jx, jy, Back[jx][jy]);
+      else
+       DrawLevelElement(jx, jy, EL_EMPTY);
+
+      if (Back[next_jx][next_jy])
+       DrawLevelElement(next_jx, next_jy, Back[next_jx][next_jy]);
+      else
+       DrawLevelElement(next_jx, next_jy, EL_EMPTY);
+    }
+#else
     if (Back[next_jx][next_jy])
       DrawLevelElement(next_jx, next_jy, Back[next_jx][next_jy]);
+#endif
 
 #if 0
     printf("::: %d, %d, %d, %d [%d] [%d, %d, %d] [%d] [%d, %d] [%d, %d]\n",