added new level option to only redraw off-screen player relocation
authorHolger Schemel <info@artsoft.org>
Tue, 1 Sep 2015 23:42:26 +0000 (01:42 +0200)
committerHolger Schemel <info@artsoft.org>
Tue, 1 Sep 2015 23:42:26 +0000 (01:42 +0200)
src/editor.c
src/files.c
src/game.c
src/main.h

index 828ebd7fd9987128d896279f0636d60d51720582..7ed0f977d73c0879885ffca809831064589a560c 100644 (file)
 #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)
+#define GADGET_ID_LAZY_RELOCATION      (GADGET_ID_CHECKBUTTON_FIRST + 18)
+#define GADGET_ID_USE_START_ELEMENT    (GADGET_ID_CHECKBUTTON_FIRST + 19)
+#define GADGET_ID_USE_ARTWORK_ELEMENT  (GADGET_ID_CHECKBUTTON_FIRST + 20)
+#define GADGET_ID_USE_EXPLOSION_ELEMENT        (GADGET_ID_CHECKBUTTON_FIRST + 21)
+#define GADGET_ID_INITIAL_GRAVITY      (GADGET_ID_CHECKBUTTON_FIRST + 22)
+#define GADGET_ID_USE_INITIAL_INVENTORY        (GADGET_ID_CHECKBUTTON_FIRST + 23)
+#define GADGET_ID_CAN_PASS_TO_WALKABLE (GADGET_ID_CHECKBUTTON_FIRST + 24)
+#define GADGET_ID_CAN_FALL_INTO_ACID   (GADGET_ID_CHECKBUTTON_FIRST + 25)
+#define GADGET_ID_CAN_MOVE_INTO_ACID   (GADGET_ID_CHECKBUTTON_FIRST + 26)
+#define GADGET_ID_DONT_COLLIDE_WITH    (GADGET_ID_CHECKBUTTON_FIRST + 27)
+#define GADGET_ID_ENVELOPE_AUTOWRAP    (GADGET_ID_CHECKBUTTON_FIRST + 28)
+#define GADGET_ID_ENVELOPE_CENTERED    (GADGET_ID_CHECKBUTTON_FIRST + 29)
+#define GADGET_ID_CUSTOM_INDESTRUCTIBLE        (GADGET_ID_CHECKBUTTON_FIRST + 30)
+#define GADGET_ID_CUSTOM_CAN_EXPLODE   (GADGET_ID_CHECKBUTTON_FIRST + 31)
+#define GADGET_ID_CUSTOM_EXPLODE_FIRE  (GADGET_ID_CHECKBUTTON_FIRST + 32)
+#define GADGET_ID_CUSTOM_EXPLODE_SMASH (GADGET_ID_CHECKBUTTON_FIRST + 33)
+#define GADGET_ID_CUSTOM_EXPLODE_IMPACT        (GADGET_ID_CHECKBUTTON_FIRST + 34)
+#define GADGET_ID_CUSTOM_WALK_TO_OBJECT        (GADGET_ID_CHECKBUTTON_FIRST + 35)
+#define GADGET_ID_CUSTOM_DEADLY                (GADGET_ID_CHECKBUTTON_FIRST + 36)
+#define GADGET_ID_CUSTOM_CAN_MOVE      (GADGET_ID_CHECKBUTTON_FIRST + 37)
+#define GADGET_ID_CUSTOM_CAN_FALL      (GADGET_ID_CHECKBUTTON_FIRST + 38)
+#define GADGET_ID_CUSTOM_CAN_SMASH     (GADGET_ID_CHECKBUTTON_FIRST + 39)
+#define GADGET_ID_CUSTOM_SLIPPERY      (GADGET_ID_CHECKBUTTON_FIRST + 40)
+#define GADGET_ID_CUSTOM_ACCESSIBLE    (GADGET_ID_CHECKBUTTON_FIRST + 41)
+#define GADGET_ID_CUSTOM_GRAV_REACHABLE        (GADGET_ID_CHECKBUTTON_FIRST + 42)
+#define GADGET_ID_CUSTOM_USE_LAST_VALUE        (GADGET_ID_CHECKBUTTON_FIRST + 43)
+#define GADGET_ID_CUSTOM_USE_GRAPHIC   (GADGET_ID_CHECKBUTTON_FIRST + 44)
+#define GADGET_ID_CUSTOM_USE_TEMPLATE  (GADGET_ID_CHECKBUTTON_FIRST + 45)
+#define GADGET_ID_CUSTOM_CAN_CHANGE    (GADGET_ID_CHECKBUTTON_FIRST + 46)
+#define GADGET_ID_CHANGE_USE_CONTENT   (GADGET_ID_CHECKBUTTON_FIRST + 47)
+#define GADGET_ID_CHANGE_USE_EXPLOSION (GADGET_ID_CHECKBUTTON_FIRST + 48)
+#define GADGET_ID_CHANGE_ONLY_COMPLETE (GADGET_ID_CHECKBUTTON_FIRST + 49)
+#define GADGET_ID_CHANGE_USE_RANDOM    (GADGET_ID_CHECKBUTTON_FIRST + 50)
+#define GADGET_ID_CHANGE_HAS_ACTION    (GADGET_ID_CHECKBUTTON_FIRST + 51)
+#define GADGET_ID_CHANGE_DELAY         (GADGET_ID_CHECKBUTTON_FIRST + 52)
+#define GADGET_ID_CHANGE_BY_DIRECT_ACT (GADGET_ID_CHECKBUTTON_FIRST + 53)
+#define GADGET_ID_CHANGE_BY_OTHER_ACT  (GADGET_ID_CHECKBUTTON_FIRST + 54)
 
 /* gadgets for buttons in element list */
-#define GADGET_ID_ELEMENTLIST_FIRST    (GADGET_ID_CHECKBUTTON_FIRST + 54)
+#define GADGET_ID_ELEMENTLIST_FIRST    (GADGET_ID_CHECKBUTTON_FIRST + 55)
 #define GADGET_ID_ELEMENTLIST_LAST     (GADGET_ID_ELEMENTLIST_FIRST +  \
                                        ED_NUM_ELEMENTLIST_BUTTONS - 1)
 
 #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_LAZY_RELOCATION      16
+#define ED_CHECKBUTTON_ID_USE_START_ELEMENT    17
+#define ED_CHECKBUTTON_ID_USE_ARTWORK_ELEMENT  18
+#define ED_CHECKBUTTON_ID_USE_EXPLOSION_ELEMENT        19
+#define ED_CHECKBUTTON_ID_INITIAL_GRAVITY      20
+#define ED_CHECKBUTTON_ID_USE_INITIAL_INVENTORY        21
+#define ED_CHECKBUTTON_ID_CAN_PASS_TO_WALKABLE 22
+#define ED_CHECKBUTTON_ID_CAN_FALL_INTO_ACID   23
+#define ED_CHECKBUTTON_ID_CAN_MOVE_INTO_ACID   24
+#define ED_CHECKBUTTON_ID_DONT_COLLIDE_WITH    25
+#define ED_CHECKBUTTON_ID_ENVELOPE_AUTOWRAP    26
+#define ED_CHECKBUTTON_ID_ENVELOPE_CENTERED    27
+#define ED_CHECKBUTTON_ID_CUSTOM_USE_GRAPHIC   28
+#define ED_CHECKBUTTON_ID_CUSTOM_USE_TEMPLATE  29
+#define ED_CHECKBUTTON_ID_CUSTOM_ACCESSIBLE    30
+#define ED_CHECKBUTTON_ID_CUSTOM_GRAV_REACHABLE        31
+#define ED_CHECKBUTTON_ID_CUSTOM_USE_LAST_VALUE        32
+#define ED_CHECKBUTTON_ID_CUSTOM_WALK_TO_OBJECT        33
+#define ED_CHECKBUTTON_ID_CUSTOM_INDESTRUCTIBLE        34
+#define ED_CHECKBUTTON_ID_CUSTOM_CAN_MOVE      35
+#define ED_CHECKBUTTON_ID_CUSTOM_CAN_FALL      36
+#define ED_CHECKBUTTON_ID_CUSTOM_CAN_SMASH     37
+#define ED_CHECKBUTTON_ID_CUSTOM_SLIPPERY      38
+#define ED_CHECKBUTTON_ID_CUSTOM_DEADLY                39
+#define ED_CHECKBUTTON_ID_CUSTOM_CAN_EXPLODE   40
+#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_FIRE  41
+#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_SMASH 42
+#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_IMPACT        43
+#define ED_CHECKBUTTON_ID_CUSTOM_CAN_CHANGE    44
+#define ED_CHECKBUTTON_ID_CHANGE_DELAY         45
+#define ED_CHECKBUTTON_ID_CHANGE_BY_DIRECT_ACT 46
+#define ED_CHECKBUTTON_ID_CHANGE_BY_OTHER_ACT  47
+#define ED_CHECKBUTTON_ID_CHANGE_USE_EXPLOSION 48
+#define ED_CHECKBUTTON_ID_CHANGE_USE_CONTENT   49
+#define ED_CHECKBUTTON_ID_CHANGE_ONLY_COMPLETE 50
+#define ED_CHECKBUTTON_ID_CHANGE_USE_RANDOM    51
+#define ED_CHECKBUTTON_ID_CHANGE_HAS_ACTION    52
+
+#define ED_NUM_CHECKBUTTONS                    53
 
 #define ED_CHECKBUTTON_ID_EDITOR_FIRST ED_CHECKBUTTON_ID_RANDOM_RESTRICTED
 #define ED_CHECKBUTTON_ID_EDITOR_LAST  ED_CHECKBUTTON_ID_RANDOM_RESTRICTED
@@ -2262,7 +2264,7 @@ static struct
   /* ---------- element settings: configure (several elements) ------------- */
 
   {
-    ED_ELEMENT_SETTINGS_XPOS(0),       ED_ELEMENT_SETTINGS_YPOS(6),
+    ED_ELEMENT_SETTINGS_XPOS(0),       ED_ELEMENT_SETTINGS_YPOS(7),
     GADGET_ID_PLAYER_SPEED,            GADGET_ID_NONE,
     -1,
     options_player_speed,
@@ -2786,14 +2788,14 @@ static struct
     "exit level if all fields solved", "automatically finish Sokoban levels"
   },
   {
-    ED_ELEMENT_SETTINGS_XPOS(0),       ED_ELEMENT_SETTINGS_YPOS(8),
+    ED_ELEMENT_SETTINGS_XPOS(0),       ED_ELEMENT_SETTINGS_YPOS(9),
     GADGET_ID_CONTINUOUS_SNAPPING,     GADGET_ID_NONE,
     &level.continuous_snapping,
     NULL,
     "continuous snapping",             "use snapping without releasing key"
   },
   {
-    ED_ELEMENT_SETTINGS_XPOS(0),       ED_ELEMENT_SETTINGS_YPOS(7),
+    ED_ELEMENT_SETTINGS_XPOS(0),       ED_ELEMENT_SETTINGS_YPOS(8),
     GADGET_ID_BLOCK_SNAP_FIELD,                GADGET_ID_NONE,
     &level.block_snap_field,
     NULL,
@@ -2828,28 +2830,35 @@ static struct
     "no centering when relocating",    "level not centered after relocation"
   },
   {
-    ED_ELEMENT_SETTINGS_XPOS(0),       ED_ELEMENT_SETTINGS_YPOS(9),
+    ED_ELEMENT_SETTINGS_XPOS(0),       ED_ELEMENT_SETTINGS_YPOS(5),
+    GADGET_ID_LAZY_RELOCATION,         GADGET_ID_NONE,
+    &level.lazy_relocation,
+    NULL,
+    "only redraw off-screen relocation","no redraw if relocation target visible"
+  },
+  {
+    ED_ELEMENT_SETTINGS_XPOS(0),       ED_ELEMENT_SETTINGS_YPOS(10),
     GADGET_ID_USE_START_ELEMENT,       GADGET_ID_NONE,
     &level.use_start_element[0],
     NULL,
     "use level start element:",               "start level at this element's position"
   },
   {
-    ED_ELEMENT_SETTINGS_XPOS(0),       ED_ELEMENT_SETTINGS_YPOS(10),
+    ED_ELEMENT_SETTINGS_XPOS(0),       ED_ELEMENT_SETTINGS_YPOS(11),
     GADGET_ID_USE_ARTWORK_ELEMENT,     GADGET_ID_NONE,
     &level.use_artwork_element[0],
     NULL,
     "use artwork from element:",       "use player artwork from other element"
   },
   {
-    ED_ELEMENT_SETTINGS_XPOS(0),       ED_ELEMENT_SETTINGS_YPOS(11),
+    ED_ELEMENT_SETTINGS_XPOS(0),       ED_ELEMENT_SETTINGS_YPOS(12),
     GADGET_ID_USE_EXPLOSION_ELEMENT,   GADGET_ID_NONE,
     &level.use_explosion_element[0],
     NULL,
     "use explosion from element:",     "use explosion properties from element"
   },
   {
-    ED_ELEMENT_SETTINGS_XPOS(0),       ED_ELEMENT_SETTINGS_YPOS(12),
+    ED_ELEMENT_SETTINGS_XPOS(0),       ED_ELEMENT_SETTINGS_YPOS(13),
     GADGET_ID_INITIAL_GRAVITY,         GADGET_ID_NONE,
     &level.initial_player_gravity[0],
     NULL,
@@ -2863,7 +2872,7 @@ static struct
     "use initial inventory:",          "use collected elements on level start"
   },
   {
-    ED_ELEMENT_SETTINGS_XPOS(0),       ED_ELEMENT_SETTINGS_YPOS(5),
+    ED_ELEMENT_SETTINGS_XPOS(0),       ED_ELEMENT_SETTINGS_YPOS(6),
     GADGET_ID_CAN_PASS_TO_WALKABLE,    GADGET_ID_NONE,
     &level.can_pass_to_walkable,
     NULL,
@@ -3253,7 +3262,7 @@ static struct
   /* ---------- level start element ---------------------------------------- */
 
   {
-    -1,                                        ED_AREA_1X1_SETTINGS_YPOS(9),
+    -1,                                        ED_AREA_1X1_SETTINGS_YPOS(10),
     0,                                 ED_AREA_1X1_SETTINGS_YOFF,
     GADGET_ID_START_ELEMENT,           GADGET_ID_USE_START_ELEMENT,
     &level.start_element[0],           1, 1,
@@ -3263,7 +3272,7 @@ static struct
   /* ---------- player artwork element ------------------------------------- */
 
   {
-    -1,                                        ED_AREA_1X1_SETTINGS_YPOS(10),
+    -1,                                        ED_AREA_1X1_SETTINGS_YPOS(11),
     0,                                 ED_AREA_1X1_SETTINGS_YOFF,
     GADGET_ID_ARTWORK_ELEMENT,         GADGET_ID_USE_ARTWORK_ELEMENT,
     &level.artwork_element[0],         1, 1,
@@ -3273,7 +3282,7 @@ static struct
   /* ---------- player explosion element ----------------------------------- */
 
   {
-    -1,                                        ED_AREA_1X1_SETTINGS_YPOS(11),
+    -1,                                        ED_AREA_1X1_SETTINGS_YPOS(12),
     0,                                 ED_AREA_1X1_SETTINGS_YOFF,
     GADGET_ID_EXPLOSION_ELEMENT,       GADGET_ID_USE_EXPLOSION_ELEMENT,
     &level.explosion_element[0],       1, 1,
@@ -8777,6 +8786,7 @@ static void DrawPropertiesConfig()
       MapCheckbuttonGadget(ED_CHECKBUTTON_ID_CONTINUOUS_SNAPPING);
       MapCheckbuttonGadget(ED_CHECKBUTTON_ID_INSTANT_RELOCATION);
       MapCheckbuttonGadget(ED_CHECKBUTTON_ID_SHIFTED_RELOCATION);
+      MapCheckbuttonGadget(ED_CHECKBUTTON_ID_LAZY_RELOCATION);
       MapCheckbuttonGadget(ED_CHECKBUTTON_ID_USE_START_ELEMENT);
       MapCheckbuttonGadget(ED_CHECKBUTTON_ID_USE_ARTWORK_ELEMENT);
       MapCheckbuttonGadget(ED_CHECKBUTTON_ID_USE_EXPLOSION_ELEMENT);
index beda7425a6c4da570e0caa59417fc247fe5f5031..ac73db93f8faf2337d1cba0f3e8e268b998478cc 100644 (file)
@@ -288,6 +288,11 @@ static struct LevelFileConfigInfo chunk_config_ELEM[] =
     TYPE_BOOLEAN,                      CONF_VALUE_8_BIT(12),
     &li.shifted_relocation,            FALSE
   },
+  {
+    EL_PLAYER_1,                       -1,
+    TYPE_BOOLEAN,                      CONF_VALUE_8_BIT(15),
+    &li.lazy_relocation,               FALSE
+  },
 
   /* (these values are different for each player) */
   {
index 028e9f4ef91da6b372e5b9547d6f4d822c436c38..cea1b769be4fd43ad9ece0c2710720b63434caa9 100644 (file)
@@ -4896,7 +4896,11 @@ void DrawRelocateScreen(int old_x, int old_y, int x, int y, int move_dir,
   int frame_delay_value = (ffwd_delay ? FfwdFrameDelay : GameFrameDelay);
   int wait_delay_value = (no_delay ? 0 : frame_delay_value);
 
-  if (quick_relocation)
+  if (level.lazy_relocation && IN_VIS_FIELD(SCREENX(x), SCREENY(y)))
+  {
+    RedrawPlayfield();
+  }
+  else if (quick_relocation)
   {
     if (!IN_VIS_FIELD(SCREENX(x), SCREENY(y)) || center_screen)
     {
@@ -5017,7 +5021,6 @@ void DrawRelocateScreen(int old_x, int old_y, int x, int y, int move_dir,
                   offset_y - MIDPOSY);
     }
 
-
     ScrollScreen(NULL, SCROLL_GO_ON);  /* scroll last frame to full tile */
 
     while (scroll_x != scroll_xx || scroll_y != scroll_yy)
index 61bc328e52c81c014ac2a560c07985d0746ef7c5..1085907150c93f831b66040344b9becb1dfedb53 100644 (file)
@@ -2498,6 +2498,7 @@ struct LevelInfo
   boolean use_time_orb_bug;    /* for compatibility with old levels */
   boolean instant_relocation;  /* no visual delay when relocating player */
   boolean shifted_relocation;  /* no level centering when relocating player */
+  boolean lazy_relocation;     /* only redraw off-screen player relocation */
   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 */