From: Holger Schemel Date: Fri, 18 Aug 2006 22:48:39 +0000 (+0200) Subject: rnd-20060819-1-src X-Git-Tag: 3.2.1^2~7 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=0cedc9a28aebd8a9791c374fe71d6c86a908a87d;p=rocksndiamonds.git rnd-20060819-1-src --- diff --git a/src/conftime.h b/src/conftime.h index 9e0a36fa..2d69a2ab 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2006-08-18 21:12]" +#define COMPILE_DATE_STRING "[2006-08-19 00:14]" diff --git a/src/game.c b/src/game.c index 703cfa54..c1dc0863 100644 --- a/src/game.c +++ b/src/game.c @@ -2644,6 +2644,11 @@ void InitGame() 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 { @@ -2654,6 +2659,7 @@ void InitGame() 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); @@ -2668,6 +2674,8 @@ void InitGame() if (do_fading) FadeIn(REDRAW_FIELD); + BackToFront(); + if (!game.restart_level) { /* copy default game door content to main double buffer */ diff --git a/src/game_em/export.h b/src/game_em/export.h index 9801d0cb..27e3c6f0 100644 --- a/src/game_em/export.h +++ b/src/game_em/export.h @@ -710,6 +710,7 @@ extern unsigned int InitEngineRND_EM(long); 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(); diff --git a/src/game_em/graphics.c b/src/game_em/graphics.c index 800ee03f..21ca0964 100644 --- a/src/game_em/graphics.c +++ b/src/game_em/graphics.c @@ -93,7 +93,7 @@ void BlitScreenToBitmap_EM(Bitmap *target_bitmap) } } -void blitscreen(void) +void BackToFront_EM(void) { static boolean scrolling_last = FALSE; int left = screen_x / TILEX; @@ -101,6 +101,8 @@ void blitscreen(void) 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 */ @@ -126,6 +128,8 @@ void blitscreen(void) } } + FlushDisplay(); + for (x = 0; x < MAX_BUF_XSIZE; x++) for (y = 0; y < MAX_BUF_YSIZE; y++) redraw[x][y] = FALSE; @@ -134,6 +138,11 @@ void blitscreen(void) scrolling_last = scrolling; } +void blitscreen(void) +{ + BackToFront_EM(); +} + static void DrawLevelField_EM(int x, int y, int sx, int sy, boolean draw_masked) { @@ -869,14 +878,16 @@ void RedrawPlayfield_EM(boolean force_redraw) 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(); @@ -884,7 +895,7 @@ void RedrawPlayfield_EM(boolean force_redraw) blitplayer(&ply[i]); blitscreen(); - FlushDisplay(); + Delay(wait_delay_value); } @@ -1028,12 +1039,12 @@ void RedrawPlayfield_EM(boolean force_redraw) for (i = 0; i < MAX_PLAYERS; i++) blitplayer(&ply[i]); +#if 0 #if 0 SyncDisplay(); +#endif blitscreen(); - - FlushDisplay(); #endif } diff --git a/src/game_em/input.c b/src/game_em/input.c index 8ea8c04b..0dd2bb3b 100644 --- a/src/game_em/input.c +++ b/src/game_em/input.c @@ -63,8 +63,10 @@ void InitGameEngine_EM() 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) @@ -90,11 +92,11 @@ 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; diff --git a/src/init.c b/src/init.c index e8bf10b6..bcfcdea3 100644 --- a/src/init.c +++ b/src/init.c @@ -4875,6 +4875,10 @@ void OpenAll() InitGfxBackground(); +#if 1 + em_open_all(); +#endif + if (global.autoplay_leveldir) { AutoPlayTape(); @@ -4888,7 +4892,7 @@ void OpenAll() game_status = GAME_MODE_MAIN; -#if 1 +#if 0 em_open_all(); #endif diff --git a/src/tools.c b/src/tools.c index 05219bf9..c808a904 100644 --- a/src/tools.c +++ b/src/tools.c @@ -140,6 +140,11 @@ void RedrawPlayfield(boolean force_redraw, int x, int y, int width, int height) /* 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) {