#define GADGET_ID_USE_SPRING_BUG (GADGET_ID_CHECKBUTTON_FIRST + 7)
#define GADGET_ID_BLOCK_LAST_FIELD (GADGET_ID_CHECKBUTTON_FIRST + 8)
#define GADGET_ID_SP_BLOCK_LAST_FIELD (GADGET_ID_CHECKBUTTON_FIRST + 9)
-#define GADGET_ID_CAN_FALL_INTO_ACID (GADGET_ID_CHECKBUTTON_FIRST + 10)
-#define GADGET_ID_CAN_MOVE_INTO_ACID (GADGET_ID_CHECKBUTTON_FIRST + 11)
-#define GADGET_ID_DONT_COLLIDE_WITH (GADGET_ID_CHECKBUTTON_FIRST + 12)
-#define GADGET_ID_CUSTOM_EXPLODE_RESULT (GADGET_ID_CHECKBUTTON_FIRST + 13)
-#define GADGET_ID_CUSTOM_EXPLODE_FIRE (GADGET_ID_CHECKBUTTON_FIRST + 14)
-#define GADGET_ID_CUSTOM_EXPLODE_SMASH (GADGET_ID_CHECKBUTTON_FIRST + 15)
-#define GADGET_ID_CUSTOM_EXPLODE_IMPACT (GADGET_ID_CHECKBUTTON_FIRST + 16)
-#define GADGET_ID_CUSTOM_WALK_TO_OBJECT (GADGET_ID_CHECKBUTTON_FIRST + 17)
-#define GADGET_ID_CUSTOM_DEADLY (GADGET_ID_CHECKBUTTON_FIRST + 18)
-#define GADGET_ID_CUSTOM_CAN_MOVE (GADGET_ID_CHECKBUTTON_FIRST + 19)
-#define GADGET_ID_CUSTOM_CAN_FALL (GADGET_ID_CHECKBUTTON_FIRST + 20)
-#define GADGET_ID_CUSTOM_CAN_SMASH (GADGET_ID_CHECKBUTTON_FIRST + 21)
-#define GADGET_ID_CUSTOM_SLIPPERY (GADGET_ID_CHECKBUTTON_FIRST + 22)
-#define GADGET_ID_CUSTOM_ACCESSIBLE (GADGET_ID_CHECKBUTTON_FIRST + 23)
-#define GADGET_ID_CUSTOM_USE_GRAPHIC (GADGET_ID_CHECKBUTTON_FIRST + 24)
-#define GADGET_ID_CUSTOM_USE_TEMPLATE (GADGET_ID_CHECKBUTTON_FIRST + 25)
-#define GADGET_ID_CUSTOM_CAN_CHANGE (GADGET_ID_CHECKBUTTON_FIRST + 26)
-#define GADGET_ID_CHANGE_USE_CONTENT (GADGET_ID_CHECKBUTTON_FIRST + 27)
-#define GADGET_ID_CHANGE_USE_EXPLOSION (GADGET_ID_CHECKBUTTON_FIRST + 28)
-#define GADGET_ID_CHANGE_ONLY_COMPLETE (GADGET_ID_CHECKBUTTON_FIRST + 29)
-#define GADGET_ID_CHANGE_USE_RANDOM (GADGET_ID_CHECKBUTTON_FIRST + 30)
-#define GADGET_ID_CHANGE_DELAY (GADGET_ID_CHECKBUTTON_FIRST + 31)
-#define GADGET_ID_CHANGE_BY_DIRECT_ACT (GADGET_ID_CHECKBUTTON_FIRST + 32)
-#define GADGET_ID_CHANGE_BY_OTHER_ACT (GADGET_ID_CHECKBUTTON_FIRST + 33)
+#define GADGET_ID_INSTANT_RELOCATION (GADGET_ID_CHECKBUTTON_FIRST + 10)
+#define GADGET_ID_CAN_FALL_INTO_ACID (GADGET_ID_CHECKBUTTON_FIRST + 11)
+#define GADGET_ID_CAN_MOVE_INTO_ACID (GADGET_ID_CHECKBUTTON_FIRST + 12)
+#define GADGET_ID_DONT_COLLIDE_WITH (GADGET_ID_CHECKBUTTON_FIRST + 13)
+#define GADGET_ID_CUSTOM_EXPLODE_RESULT (GADGET_ID_CHECKBUTTON_FIRST + 14)
+#define GADGET_ID_CUSTOM_EXPLODE_FIRE (GADGET_ID_CHECKBUTTON_FIRST + 15)
+#define GADGET_ID_CUSTOM_EXPLODE_SMASH (GADGET_ID_CHECKBUTTON_FIRST + 16)
+#define GADGET_ID_CUSTOM_EXPLODE_IMPACT (GADGET_ID_CHECKBUTTON_FIRST + 17)
+#define GADGET_ID_CUSTOM_WALK_TO_OBJECT (GADGET_ID_CHECKBUTTON_FIRST + 18)
+#define GADGET_ID_CUSTOM_DEADLY (GADGET_ID_CHECKBUTTON_FIRST + 19)
+#define GADGET_ID_CUSTOM_CAN_MOVE (GADGET_ID_CHECKBUTTON_FIRST + 20)
+#define GADGET_ID_CUSTOM_CAN_FALL (GADGET_ID_CHECKBUTTON_FIRST + 21)
+#define GADGET_ID_CUSTOM_CAN_SMASH (GADGET_ID_CHECKBUTTON_FIRST + 22)
+#define GADGET_ID_CUSTOM_SLIPPERY (GADGET_ID_CHECKBUTTON_FIRST + 23)
+#define GADGET_ID_CUSTOM_ACCESSIBLE (GADGET_ID_CHECKBUTTON_FIRST + 24)
+#define GADGET_ID_CUSTOM_USE_GRAPHIC (GADGET_ID_CHECKBUTTON_FIRST + 25)
+#define GADGET_ID_CUSTOM_USE_TEMPLATE (GADGET_ID_CHECKBUTTON_FIRST + 26)
+#define GADGET_ID_CUSTOM_CAN_CHANGE (GADGET_ID_CHECKBUTTON_FIRST + 27)
+#define GADGET_ID_CHANGE_USE_CONTENT (GADGET_ID_CHECKBUTTON_FIRST + 28)
+#define GADGET_ID_CHANGE_USE_EXPLOSION (GADGET_ID_CHECKBUTTON_FIRST + 29)
+#define GADGET_ID_CHANGE_ONLY_COMPLETE (GADGET_ID_CHECKBUTTON_FIRST + 30)
+#define GADGET_ID_CHANGE_USE_RANDOM (GADGET_ID_CHECKBUTTON_FIRST + 31)
+#define GADGET_ID_CHANGE_DELAY (GADGET_ID_CHECKBUTTON_FIRST + 32)
+#define GADGET_ID_CHANGE_BY_DIRECT_ACT (GADGET_ID_CHECKBUTTON_FIRST + 33)
+#define GADGET_ID_CHANGE_BY_OTHER_ACT (GADGET_ID_CHECKBUTTON_FIRST + 34)
/* gadgets for buttons in element list */
-#define GADGET_ID_ELEMENTLIST_FIRST (GADGET_ID_CHECKBUTTON_FIRST + 34)
+#define GADGET_ID_ELEMENTLIST_FIRST (GADGET_ID_CHECKBUTTON_FIRST + 35)
#define GADGET_ID_ELEMENTLIST_LAST (GADGET_ID_ELEMENTLIST_FIRST + \
ED_NUM_ELEMENTLIST_BUTTONS - 1)
#define ED_CHECKBUTTON_ID_USE_SPRING_BUG 5
#define ED_CHECKBUTTON_ID_BLOCK_LAST_FIELD 6
#define ED_CHECKBUTTON_ID_SP_BLOCK_LAST_FIELD 7
-#define ED_CHECKBUTTON_ID_CAN_FALL_INTO_ACID 8
-#define ED_CHECKBUTTON_ID_CAN_MOVE_INTO_ACID 9
-#define ED_CHECKBUTTON_ID_DONT_COLLIDE_WITH 10
-#define ED_CHECKBUTTON_ID_CUSTOM_USE_GRAPHIC 11
-#define ED_CHECKBUTTON_ID_CUSTOM_USE_TEMPLATE 12
-#define ED_CHECKBUTTON_ID_CUSTOM_ACCESSIBLE 13
-#define ED_CHECKBUTTON_ID_CUSTOM_WALK_TO_OBJECT 14
-#define ED_CHECKBUTTON_ID_CUSTOM_CAN_MOVE 15
-#define ED_CHECKBUTTON_ID_CUSTOM_CAN_FALL 16
-#define ED_CHECKBUTTON_ID_CUSTOM_CAN_SMASH 17
-#define ED_CHECKBUTTON_ID_CUSTOM_SLIPPERY 18
-#define ED_CHECKBUTTON_ID_CUSTOM_DEADLY 19
-#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_RESULT 20
-#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_FIRE 21
-#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_SMASH 22
-#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_IMPACT 23
-#define ED_CHECKBUTTON_ID_CUSTOM_CAN_CHANGE 24
-#define ED_CHECKBUTTON_ID_CHANGE_DELAY 25
-#define ED_CHECKBUTTON_ID_CHANGE_BY_DIRECT_ACT 26
-#define ED_CHECKBUTTON_ID_CHANGE_BY_OTHER_ACT 27
-#define ED_CHECKBUTTON_ID_CHANGE_USE_EXPLOSION 28
-#define ED_CHECKBUTTON_ID_CHANGE_USE_CONTENT 29
-#define ED_CHECKBUTTON_ID_CHANGE_ONLY_COMPLETE 30
-#define ED_CHECKBUTTON_ID_CHANGE_USE_RANDOM 31
-
-#define ED_NUM_CHECKBUTTONS 32
+#define ED_CHECKBUTTON_ID_INSTANT_RELOCATION 8
+#define ED_CHECKBUTTON_ID_CAN_FALL_INTO_ACID 9
+#define ED_CHECKBUTTON_ID_CAN_MOVE_INTO_ACID 10
+#define ED_CHECKBUTTON_ID_DONT_COLLIDE_WITH 11
+#define ED_CHECKBUTTON_ID_CUSTOM_USE_GRAPHIC 12
+#define ED_CHECKBUTTON_ID_CUSTOM_USE_TEMPLATE 13
+#define ED_CHECKBUTTON_ID_CUSTOM_ACCESSIBLE 14
+#define ED_CHECKBUTTON_ID_CUSTOM_WALK_TO_OBJECT 15
+#define ED_CHECKBUTTON_ID_CUSTOM_CAN_MOVE 16
+#define ED_CHECKBUTTON_ID_CUSTOM_CAN_FALL 17
+#define ED_CHECKBUTTON_ID_CUSTOM_CAN_SMASH 18
+#define ED_CHECKBUTTON_ID_CUSTOM_SLIPPERY 19
+#define ED_CHECKBUTTON_ID_CUSTOM_DEADLY 20
+#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_RESULT 21
+#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_FIRE 22
+#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_SMASH 23
+#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_IMPACT 24
+#define ED_CHECKBUTTON_ID_CUSTOM_CAN_CHANGE 25
+#define ED_CHECKBUTTON_ID_CHANGE_DELAY 26
+#define ED_CHECKBUTTON_ID_CHANGE_BY_DIRECT_ACT 27
+#define ED_CHECKBUTTON_ID_CHANGE_BY_OTHER_ACT 28
+#define ED_CHECKBUTTON_ID_CHANGE_USE_EXPLOSION 29
+#define ED_CHECKBUTTON_ID_CHANGE_USE_CONTENT 30
+#define ED_CHECKBUTTON_ID_CHANGE_ONLY_COMPLETE 31
+#define ED_CHECKBUTTON_ID_CHANGE_USE_RANDOM 32
+
+#define ED_NUM_CHECKBUTTONS 33
#define ED_CHECKBUTTON_ID_LEVEL_FIRST ED_CHECKBUTTON_ID_DOUBLE_SPEED
#define ED_CHECKBUTTON_ID_LEVEL_LAST ED_CHECKBUTTON_ID_RANDOM_RESTRICTED
NULL,
"block last field when moving", "player blocks last field when moving"
},
+ {
+ ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(2),
+ GADGET_ID_INSTANT_RELOCATION, GADGET_ID_NONE,
+ &level.instant_relocation,
+ NULL,
+ "no scrolling when relocating", "player gets relocated without delay"
+ },
{
ED_SETTINGS_XPOS(0), ED_SETTINGS_YPOS(0),
GADGET_ID_CAN_FALL_INTO_ACID, GADGET_ID_NONE,
MapCheckbuttonGadget(properties_element == EL_SP_MURPHY ?
ED_CHECKBUTTON_ID_SP_BLOCK_LAST_FIELD :
ED_CHECKBUTTON_ID_BLOCK_LAST_FIELD);
+ MapCheckbuttonGadget(ED_CHECKBUTTON_ID_INSTANT_RELOCATION);
}
if (IS_GEM(properties_element))
boolean no_delay = (tape.index_search);
int frame_delay_value = (ffwd_delay ? FfwdFrameDelay : GameFrameDelay);
int wait_delay_value = (no_delay ? 0 : frame_delay_value);
-#if 1
int old_jx, old_jy;
-#endif
if (player->GameOver) /* do not reanimate dead player */
return;
-#if 1
RemoveField(x, y); /* temporarily remove newly placed player */
DrawLevelField(x, y);
-#endif
if (player->present)
{
player->is_moving = FALSE;
}
-#if 1
old_jx = player->jx;
old_jy = player->jy;
-#endif
Feld[x][y] = element;
InitPlayerField(x, y, element, TRUE);
-#if 0
- if (player == local_player)
- {
-#if 1
+ if (player != local_player) /* do not visually relocate other players */
+ return;
+ if (level.instant_relocation)
+ {
scroll_x += (local_player->jx - old_jx);
scroll_y += (local_player->jy - old_jy);
if (scroll_y < SBY_Upper || scroll_y > SBY_Lower)
scroll_y = (scroll_y < SBY_Upper ? SBY_Upper : SBY_Lower);
-#else
- scroll_x = (local_player->jx < SBX_Left + MIDPOSX ? SBX_Left :
- local_player->jx > SBX_Right + MIDPOSX ? SBX_Right :
- local_player->jx - MIDPOSX);
-
- scroll_y = (local_player->jy < SBY_Upper + MIDPOSY ? SBY_Upper :
- local_player->jy > SBY_Lower + MIDPOSY ? SBY_Lower :
- local_player->jy - MIDPOSY);
-#endif
-
RedrawPlayfield(TRUE, 0,0,0,0);
-#if 0
- DrawAllPlayers();
- BackToFront();
-#endif
}
-
-#else
-
- if (player == local_player)
+ else
{
int scroll_xx = -999, scroll_yy = -999;
+ ScrollScreen(NULL, SCROLL_GO_ON); /* scroll last frame to full tile */
+
while (scroll_xx != scroll_x || scroll_yy != scroll_y)
{
int dx = 0, dy = 0;
dx = (scroll_xx < scroll_x ? +1 : scroll_xx > scroll_x ? -1 : 0);
dy = (scroll_yy < scroll_y ? +1 : scroll_yy > scroll_y ? -1 : 0);
+#if 1
+ if (dx == 0 && dy == 0) /* no scrolling needed at all */
+ break;
+#else
+ if (scroll_xx == scroll_x && scroll_yy == scroll_y)
+ break;
+#endif
+
scroll_x -= dx;
scroll_y -= dy;
Delay(wait_delay_value);
}
}
-#endif
}
void Explode(int ex, int ey, int phase, int mode)
player->is_dropping = FALSE;
-#if 1
+#if 0
+ /* !!! ENABLE THIS FOR OLD VERSIONS !!! */
{
static int trigger_sides[4][2] =
{
player->LevelSolved = player->GameOver = TRUE;
}
-#if 0
+#if 1
/* !!! ENABLE THIS FOR NEW VERSIONS !!! */
+ /* this breaks one level: "machine", level 000 */
{
static int trigger_sides[4][2] =
{