-#define COMPILE_DATE_STRING "[2006-08-18 21:12]"
+#define COMPILE_DATE_STRING "[2006-08-19 00:14]"
if (level.game_engine_type == GAME_ENGINE_TYPE_EM)
{
InitGameEngine_EM();
+
+#if 1
+ /* blit playfield from scroll buffer to normal back buffer for fading in */
+ BlitScreenToBitmap_EM(backbuffer);
+#endif
}
else
{
if (game.timegate_time_left == 0)
CloseAllOpenTimegates();
+ /* blit playfield from scroll buffer to normal back buffer for fading in */
if (setup.soft_scrolling)
BlitBitmap(fieldbuffer, backbuffer, FX, FY, SXSIZE, SYSIZE, SX, SY);
if (do_fading)
FadeIn(REDRAW_FIELD);
+ BackToFront();
+
if (!game.restart_level)
{
/* copy default game door content to main double buffer */
extern void setLevelInfoToDefaults_EM();
extern boolean LoadNativeLevel_EM(char *);
+extern void BackToFront_EM(void);
extern void BlitScreenToBitmap_EM(Bitmap *);
extern void RedrawPlayfield_EM(boolean);
extern void DrawGameDoorValues_EM();
}
}
-void blitscreen(void)
+void BackToFront_EM(void)
{
static boolean scrolling_last = FALSE;
int left = screen_x / TILEX;
boolean scrolling = (screen_x % TILEX != 0 || screen_y % TILEY != 0);
int x, y;
+ SyncDisplay();
+
if (redraw_tiles > REDRAWTILES_THRESHOLD || scrolling || scrolling_last)
{
/* blit all (up to four) parts of the scroll buffer to the backbuffer */
}
}
+ FlushDisplay();
+
for (x = 0; x < MAX_BUF_XSIZE; x++)
for (y = 0; y < MAX_BUF_YSIZE; y++)
redraw[x][y] = FALSE;
scrolling_last = scrolling;
}
+void blitscreen(void)
+{
+ BackToFront_EM();
+}
+
static void DrawLevelField_EM(int x, int y, int sx, int sy,
boolean draw_masked)
{
blitplayer(&ply[i]);
blitscreen();
- FlushDisplay();
+
Delay(wait_delay_value);
/* scroll second step to align at full tile size */
screen_x -= dxx;
screen_y -= dyy;
+#if 0
SyncDisplay();
+#endif
animscreen();
blitplayer(&ply[i]);
blitscreen();
- FlushDisplay();
+
Delay(wait_delay_value);
}
for (i = 0; i < MAX_PLAYERS; i++)
blitplayer(&ply[i]);
+#if 0
#if 0
SyncDisplay();
+#endif
blitscreen();
-
- FlushDisplay();
#endif
}
game_initscreen();
game_animscreen();
- /* blit playfield from scroll buffer to back buffer for fading in */
+#if 0
+ /* blit playfield from scroll buffer to normal back buffer for fading in */
BlitScreenToBitmap_EM(backbuffer);
+#endif
}
void GameActions_EM(byte action[MAX_PLAYERS], boolean warp_mode)
game_animscreen();
#if 1
+#if 0
SyncDisplay();
+#endif
blitscreen();
-
- FlushDisplay();
#endif
RandomEM = RandomEM * 129 + 1;
InitGfxBackground();
+#if 1
+ em_open_all();
+#endif
+
if (global.autoplay_leveldir)
{
AutoPlayTape();
game_status = GAME_MODE_MAIN;
-#if 1
+#if 0
em_open_all();
#endif
/* currently there is no partial redraw -- always redraw whole playfield */
RedrawPlayfield_EM(TRUE);
+
+#if 1
+ /* blit playfield from scroll buffer to normal back buffer for fading in */
+ BlitScreenToBitmap_EM(backbuffer);
+#endif
}
else if (game_status == GAME_MODE_PLAYING && !game.envelope_active)
{