BackToFront();
}
+void SetMainBackgroundImage(int graphic)
+{
+ SetMainBackgroundBitmap(graphic == IMG_NONE ? NULL :
+ new_graphic_info[graphic].bitmap ?
+ new_graphic_info[graphic].bitmap :
+ new_graphic_info[IMG_BACKGROUND_DEFAULT].bitmap);
+}
+
+void SetDoorBackgroundImage(int graphic)
+{
+ SetDoorBackgroundBitmap(graphic == IMG_NONE ? NULL :
+ new_graphic_info[graphic].bitmap ?
+ new_graphic_info[graphic].bitmap :
+ new_graphic_info[IMG_BACKGROUND_DEFAULT].bitmap);
+}
+
void DrawBackground(int dest_x, int dest_y, int width, int height)
{
- if (DrawingOnBackground(dest_x, dest_y) && game_status != PLAYING)
- BlitBitmap(gfx.background_bitmap, backbuffer, dest_x, dest_y,
- width, height, dest_x, dest_y);
- else
- ClearRectangle(backbuffer, dest_x, dest_y, width, height);
+ ClearRectangleOnBackground(backbuffer, dest_x, dest_y, width, height);
redraw_mask |= REDRAW_FIELD;
}
{
int px = SCREENX(next_jx), py = SCREENY(next_jy);
- if (element == EL_SOKOBAN_FIELD_EMPTY ||
- Feld[next_jx][next_jy] == EL_SOKOBAN_FIELD_FULL)
- DrawGraphicShiftedThruMask(px, py, sxx, syy, GFX_SOKOBAN_OBJEKT, 0,
+ if ((sxx || syy) &&
+ (element == EL_SOKOBAN_FIELD_EMPTY ||
+ Feld[next_jx][next_jy] == EL_SOKOBAN_FIELD_FULL))
+ DrawGraphicShiftedThruMask(px, py, sxx, syy, IMG_SOKOBAN_OBJECT, 0,
NO_CUTTING);
else
{
int frame = 0;
#endif
- if (sxx && IS_PUSHABLE(element))
+ if ((sxx || syy) && IS_PUSHABLE(element))
{
graphic = el_dir_act2img(element, player->MovDir, GFX_ACTION_MOVING);
#if 1
#endif
if (game.emulation == EMU_SUPAPLEX)
- DrawGraphic(sx, sy, GFX_SP_DISK_RED, 0);
+ DrawGraphic(sx, sy, IMG_SP_DISK_RED, 0);
else
DrawGraphicThruMask(sx, sy, graphic, frame);
}
{
int x,y;
+ SetDrawBackgroundMask(REDRAW_NONE);
ClearWindow();
for(x=BX1; x<=BX2; x++)