X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;ds=inline;f=src%2Ftools.c;h=2c3fb9cde5e622989b23541e2df7b083fb90839d;hb=97f03ad86e7458be79933d91363a38c4d2e35deb;hp=0eb8ab1422e6cc985ca1646d7c8919ef5b86120c;hpb=786d4ea93b159a7f4cc09c4f05ec75939d8928d4;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index 0eb8ab14..2c3fb9cd 100644 --- a/src/tools.c +++ b/src/tools.c @@ -713,15 +713,37 @@ void BackToFront() if (redraw_mask & REDRAW_ALL) { +#if 0 + if (game_status != GAME_MODE_PLAYING || + redraw_mask & REDRAW_FROM_BACKBUFFER) + { +#if 0 + printf("::: REDRAW_ALL [%d]\n", FrameCounter); +#endif + + BlitBitmap(backbuffer, window, 0, 0, WIN_XSIZE, WIN_YSIZE, 0, 0); + + redraw_mask = REDRAW_NONE; + } + else + { + redraw_mask &= ~REDRAW_ALL; + } +#else +#if 0 + printf("::: REDRAW_ALL [%d]\n", FrameCounter); +#endif + BlitBitmap(backbuffer, window, 0, 0, WIN_XSIZE, WIN_YSIZE, 0, 0); redraw_mask = REDRAW_NONE; +#endif } if (redraw_mask & REDRAW_FIELD) { #if 0 - printf("::: REDRAW_FIELD\n"); + printf("::: REDRAW_FIELD [%d]\n", FrameCounter); #endif if (game_status != GAME_MODE_PLAYING || @@ -1587,6 +1609,7 @@ inline void getGraphicSourceExt(int graphic, int frame, Bitmap **bitmap, int src_y = g->src_y + (get_backside ? g->offset2_y : 0); #if NEW_TILESIZE + if (TILESIZE_VAR != TILESIZE) return getSizedGraphicSourceExt(graphic, frame, TILESIZE_VAR, bitmap, x, y, get_backside); @@ -11498,6 +11521,7 @@ void ChangeViewportPropertiesIfNeeded() boolean init_gfx_buffers = FALSE; boolean init_video_buffer = FALSE; boolean init_gadgets_and_toons = FALSE; + boolean init_em_graphics = FALSE; #if 0 /* !!! TEST ONLY !!! */ @@ -11585,12 +11609,15 @@ void ChangeViewportPropertiesIfNeeded() ) { #if 1 - // changing tile size invalidates scroll values of engine snapshots if (new_tilesize_var != TILESIZE_VAR) { // printf("::: new_tilesize_var != TILESIZE_VAR\n"); + // changing tile size invalidates scroll values of engine snapshots FreeEngineSnapshot(); + + // changing tile size requires update of graphic mapping for EM engine + init_em_graphics = TRUE; } #endif @@ -11683,6 +11710,11 @@ void ChangeViewportPropertiesIfNeeded() InitToons(); } + if (init_em_graphics) + { + InitGraphicInfo_EM(); + } + #if 0 printf("::: %d, %d / %d, %d [%d]\n", VX, VY, EX, EY, game_status); #endif