#if 1
struct TextPosInfo *pos = &game.panel.key[i];
#endif
- int src_x = DOOR_GFX_PAGEX5 + 18;
+ int src_x = DOOR_GFX_PAGEX5 + 18 + (i % 4) * MINI_TILEX;
int src_y = DOOR_GFX_PAGEY1 + 123;
#if 1
int dst_x = PANEL_XPOS(pos);
boolean emulate_bd = TRUE; /* unless non-BOULDERDASH elements found */
boolean emulate_sb = TRUE; /* unless non-SOKOBAN elements found */
boolean emulate_sp = TRUE; /* unless non-SUPAPLEX elements found */
+#if 0
boolean do_fading = (game_status == GAME_MODE_MAIN);
+#endif
int i, j, x, y;
game_status = GAME_MODE_PLAYING;
if (!game.restart_level)
CloseDoor(DOOR_CLOSE_1);
+#if 1
+ if (level_editor_test_game)
+ FadeSkipNextFadeIn();
+ else
+ FadeSetStartItem();
+#else
if (level_editor_test_game)
fading = fading_none;
else
fading = menu.destination;
+#endif
#if 1
- if (fading.anim_mode == ANIM_CROSSFADE)
- FadeCrossSaveBackbuffer();
- else
- FadeOut(REDRAW_FIELD);
+ FadeOut(REDRAW_FIELD);
#else
if (do_fading)
FadeOut(REDRAW_FIELD);
/* !!! FIX THIS (END) !!! */
#if 1
- if (fading.anim_mode == ANIM_CROSSFADE)
- FadeCross(redraw_mask);
- else
- FadeIn(redraw_mask);
+ FadeIn(REDRAW_FIELD);
#else
if (do_fading)
FadeIn(REDRAW_FIELD);
if (!local_player->LevelSolved_SaveScore)
{
#if 1
- if (fading.anim_mode == ANIM_CROSSFADE)
- FadeCrossSaveBackbuffer();
- else
- FadeOut(REDRAW_FIELD);
-#else
FadeOut(REDRAW_FIELD);
#endif
else
{
#if 1
- if (fading.anim_mode == ANIM_CROSSFADE)
- FadeCrossSaveBackbuffer();
- else
- FadeOut(REDRAW_FIELD);
-#else
FadeOut(REDRAW_FIELD);
#endif
if (!IN_VIS_FIELD(SCREENX(x), SCREENY(y)) || center_screen)
{
- if (center_screen)
+ if (!level.shifted_relocation || center_screen)
{
+ /* quick relocation (without scrolling), with centering of screen */
+
scroll_x = (x < SBX_Left + MIDPOSX ? SBX_Left :
x > SBX_Right + MIDPOSX ? SBX_Right :
x - MIDPOSX);
}
else
{
+ /* quick relocation (without scrolling), inside visible screen area */
+
if ((move_dir == MV_LEFT && scroll_x > x - MIDPOSX + offset) ||
(move_dir == MV_RIGHT && scroll_x < x - MIDPOSX - offset))
scroll_x = x - MIDPOSX + (scroll_x < x - MIDPOSX ? -offset : +offset);
}
else
{
+#if 1
+ int scroll_xx, scroll_yy;
+
+ if (!level.shifted_relocation || center_screen)
+ {
+ /* visible relocation (with scrolling), with centering of screen */
+
+ scroll_xx = (x < SBX_Left + MIDPOSX ? SBX_Left :
+ x > SBX_Right + MIDPOSX ? SBX_Right :
+ x - MIDPOSX);
+
+ scroll_yy = (y < SBY_Upper + MIDPOSY ? SBY_Upper :
+ y > SBY_Lower + MIDPOSY ? SBY_Lower :
+ y - MIDPOSY);
+ }
+ else
+ {
+ /* visible relocation (with scrolling), but do not center screen */
+
+ int center_scroll_x = (old_x < SBX_Left + MIDPOSX ? SBX_Left :
+ old_x > SBX_Right + MIDPOSX ? SBX_Right :
+ old_x - MIDPOSX);
+
+ int center_scroll_y = (old_y < SBY_Upper + MIDPOSY ? SBY_Upper :
+ old_y > SBY_Lower + MIDPOSY ? SBY_Lower :
+ old_y - MIDPOSY);
+
+ int offset_x = x + (scroll_x - center_scroll_x);
+ int offset_y = y + (scroll_y - center_scroll_y);
+
+ scroll_xx = (offset_x < SBX_Left + MIDPOSX ? SBX_Left :
+ offset_x > SBX_Right + MIDPOSX ? SBX_Right :
+ offset_x - MIDPOSX);
+
+ scroll_yy = (offset_y < SBY_Upper + MIDPOSY ? SBY_Upper :
+ offset_y > SBY_Lower + MIDPOSY ? SBY_Lower :
+ offset_y - MIDPOSY);
+ }
+
+#else
+
+ /* visible relocation (with scrolling), with centering of screen */
+
int scroll_xx = (x < SBX_Left + MIDPOSX ? SBX_Left :
x > SBX_Right + MIDPOSX ? SBX_Right :
x - MIDPOSX);
int scroll_yy = (y < SBY_Upper + MIDPOSY ? SBY_Upper :
y > SBY_Lower + MIDPOSY ? SBY_Lower :
y - MIDPOSY);
+#endif
ScrollScreen(NULL, SCROLL_GO_ON); /* scroll last frame to full tile */
if (quick_quit)
{
#if 1
+
+#if 1
+ FadeSkipNextFadeIn();
+#else
fading = fading_none;
+#endif
+
#else
OpenDoor(DOOR_CLOSE_1);
#endif
else
{
#if 0
-#if 1
- if (fading.anim_mode == ANIM_CROSSFADE)
- FadeCrossSaveBackbuffer();
- else
- FadeOut(REDRAW_FIELD);
-#else
FadeOut(REDRAW_FIELD);
-#endif
#endif
game_status = GAME_MODE_MAIN;