// (c) 1995-2014 by Artsoft Entertainment
// Holger Schemel
// info@artsoft.org
-// http://www.artsoft.org/
+// https://www.artsoft.org/
// ----------------------------------------------------------------------------
// tools.c
// ============================================================================
return s;
}
-int correctLevelPosX_EM(int lx)
-{
- lx -= 1;
- lx -= (BorderElement != EL_EMPTY ? 1 : 0);
-
- return lx;
-}
-
-int correctLevelPosY_EM(int ly)
-{
- ly -= 1;
- ly -= (BorderElement != EL_EMPTY ? 1 : 0);
-
- return ly;
-}
-
int getFieldbufferOffsetX_RND(int dir, int pos)
{
int full_lev_fieldx = lev_fieldx + (BorderElement != EL_EMPTY ? 2 : 0);
int px = sx - SX;
int lx = LEVELX((px + dx) / TILESIZE_VAR);
- lx = correctLevelPosX_EM(lx);
-
return lx;
}
int py = sy - SY;
int ly = LEVELY((py + dy) / TILESIZE_VAR);
- ly = correctLevelPosY_EM(ly);
-
return ly;
}
height = WIN_YSIZE;
}
- if (!setup.fade_screens ||
- fade_delay == 0 ||
- fading.fade_mode == FADE_MODE_NONE)
- {
- if (fade_mode == FADE_MODE_FADE_OUT)
- return;
-
- BlitBitmap(backbuffer, window, x, y, width, height, x, y);
-
- redraw_mask &= ~fade_mask;
+ // when switching screens without fading, set fade delay to zero
+ if (!setup.fade_screens || fading.fade_mode == FADE_MODE_NONE)
+ fade_delay = 0;
+ // do not display black frame when fading out without fade delay
+ if (fade_mode == FADE_MODE_FADE_OUT && fade_delay == 0)
return;
- }
FadeRectangle(x, y, width, height, fade_mode, fade_delay, post_delay,
draw_border_function);
global.anim_status = global.anim_status_next;
// store backbuffer with all animations that will be started after fading in
- if (fade_type_skip != FADE_MODE_SKIP_FADE_IN)
- PrepareFadeBitmap(DRAW_TO_FADE_TARGET);
+ PrepareFadeBitmap(DRAW_TO_FADE_TARGET);
// set screen mode for animations back to fading
global.anim_status = GAME_MODE_PSEUDO_FADING;
global.anim_status = GAME_MODE_PSEUDO_FADING;
// store backbuffer with all animations that will be stopped for fading out
- if (fade_type_skip != FADE_MODE_SKIP_FADE_OUT)
- PrepareFadeBitmap(DRAW_TO_FADE_SOURCE);
+ PrepareFadeBitmap(DRAW_TO_FADE_SOURCE);
}
static void SetScreenStates_AfterFadingOut(void)
EL_SPRING, -1, -1
},
{
- Xspring_e, FALSE, FALSE,
- EL_SPRING, -1, -1
+ Xspring_e, TRUE, FALSE,
+ EL_SPRING_RIGHT, -1, -1
},
{
- Xspring_w, FALSE, FALSE,
- EL_SPRING, -1, -1
+ Xspring_w, TRUE, FALSE,
+ EL_SPRING_LEFT, -1, -1
},
{
Xspring_fall, FALSE, FALSE,
},
{
Xpush_spring_e, FALSE, FALSE,
- EL_SPRING, -1, MV_BIT_RIGHT
+ EL_SPRING_RIGHT, -1, MV_BIT_RIGHT
},
{
Xpush_spring_w, FALSE, FALSE,
- EL_SPRING, -1, MV_BIT_LEFT
+ EL_SPRING_LEFT, -1, MV_BIT_LEFT
},
{
},
{
- Xdrip, FALSE, FALSE,
+ Xdrip, TRUE, FALSE,
EL_AMOEBA_DROP, ACTION_GROWING, -1
},
{
- Xdrip_fall, TRUE, FALSE,
+ Xdrip_fall, FALSE, FALSE,
EL_AMOEBA_DROP, -1, -1
},
{
return getBeltSwitchElementFromBeltNrAndBeltDirNr(belt_nr, belt_dir_nr);
}
+boolean swapTiles_EM(boolean is_pre_emc_cave)
+{
+ return is_pre_emc_cave && leveldir_current->use_emc_tiles;
+}
+
boolean getTeamMode_EM(void)
{
return game.team_mode || network_playing;
}
+boolean isActivePlayer_EM(int player_nr)
+{
+ return stored_player[player_nr].active;
+}
+
unsigned int InitRND(int seed)
{
if (level.game_engine_type == GAME_ENGINE_TYPE_EM)
boolean any_player_snapping,
boolean any_player_dropping)
{
- if (frame == 0 && !any_player_dropping)
+ if (frame == 7 && !any_player_dropping)
{
if (!local_player->was_waiting)
{
boolean any_player_dropping)
{
if (tape.single_step && tape.recording && !tape.pausing)
- if (frame == 0 && !any_player_dropping)
+ if (frame == 7 && !any_player_dropping)
TapeTogglePause(TAPE_TOGGLE_AUTOMATIC);
CheckSaveEngineSnapshot_EM(action, frame, any_player_moving,
if (init_em_graphics)
{
- InitGraphicInfo_EM();
+ InitGraphicInfo_EM();
}
}