static void RedrawPlayfield_RND()
{
- int x, y;
-
if (game.envelope_active)
return;
-#if 0
- DrawLevel();
+#if 1
+ DrawLevel(REDRAW_ALL);
#else
+ int x, y;
SetMainBackgroundImage(IMG_BACKGROUND_PLAYING);
// SetDrawBackgroundMask(REDRAW_FIELD); // !!! CHECK THIS !!!
+ SetDrawBackgroundMask(REDRAW_ALL); // !!! CHECK THIS !!!
for (x = BX1; x <= BX2; x++)
for (y = BY1; y <= BY2; y++)
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 ||
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);
BlitBitmap(src_bitmap, drawto, src_x, src_y, tilesize, tilesize, dst_x,dst_y);
}
-void DrawLevel()
+void DrawLevel(int draw_background_mask)
{
int x,y;
+#if 1
+ SetMainBackgroundImage(IMG_BACKGROUND_PLAYING);
+ SetDrawBackgroundMask(draw_background_mask);
+#else
#if 1
SetMainBackgroundImage(IMG_BACKGROUND_PLAYING);
SetDrawBackgroundMask(REDRAW_FIELD);
#else
SetDrawBackgroundMask(REDRAW_NONE);
+#endif
#endif
ClearField();
break;
case KSYM_Return:
+#if defined(TARGET_SDL2)
+ case KSYM_Menu:
+#endif
result = 1;
break;
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 !!! */
)
{
#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
InitToons();
}
+ if (init_em_graphics)
+ {
+ InitGraphicInfo_EM();
+ }
+
#if 0
printf("::: %d, %d / %d, %d [%d]\n", VX, VY, EX, EY, game_status);
#endif