// copy global masked border to render target buffer, if defined
if (gfx.draw_global_border_function != NULL)
- gfx.draw_global_border_function(DRAW_BORDER_TO_SCREEN);
+ gfx.draw_global_border_function(DRAW_TO_SCREEN);
// copy global animations to render target buffer, if defined (above border)
if (gfx.draw_global_anim_function != NULL)
SDL_BlitSurface(surface_cross, &src_rect, surface_source, &src_rect);
SDL_BlitSurface(surface_screen, &dst_rect, surface_target, &src_rect);
- draw_global_border_function(DRAW_BORDER_TO_FADE_SOURCE);
- draw_global_border_function(DRAW_BORDER_TO_FADE_TARGET);
+ draw_global_border_function(DRAW_TO_FADE_SOURCE);
+ draw_global_border_function(DRAW_TO_FADE_TARGET);
}
else if (fade_mode & FADE_TYPE_FADE_IN)
{
SDL_BlitSurface(surface_black, &src_rect, surface_source, &src_rect);
SDL_BlitSurface(surface_screen, &dst_rect, surface_target, &src_rect);
- draw_global_border_function(DRAW_BORDER_TO_FADE_TARGET);
+ draw_global_border_function(DRAW_TO_FADE_TARGET);
}
else /* FADE_TYPE_FADE_OUT */
{
SDL_BlitSurface(surface_screen, &dst_rect, surface_source, &src_rect);
SDL_BlitSurface(surface_black, &src_rect, surface_target, &src_rect);
- draw_global_border_function(DRAW_BORDER_TO_FADE_SOURCE);
+ draw_global_border_function(DRAW_TO_FADE_SOURCE);
}
time_current = SDL_GetTicks();
void SetDrawtoField(int mode)
{
- if (mode == DRAW_FIELDBUFFER)
+ if (mode == DRAW_TO_FIELDBUFFER)
{
FX = 2 * TILEX_VAR;
FY = 2 * TILEY_VAR;
drawto_field = fieldbuffer;
}
- else /* DRAW_BACKBUFFER */
+ else /* DRAW_TO_BACKBUFFER */
{
FX = SX;
FY = SY;
if (x == -1 && y == -1)
return;
- if (draw_target == DRAW_BORDER_TO_SCREEN)
+ if (draw_target == DRAW_TO_SCREEN)
BlitToScreenMasked(src_bitmap, x, y, width, height, x, y);
else
BlitBitmapMasked(src_bitmap, dst_bitmap, x, y, width, height, x, y);
static void DrawMaskedBorderExt_DOOR_1(int draw_target)
{
// when drawing to backbuffer, never draw border over open doors
- if (draw_target == DRAW_BORDER_TO_BACKBUFFER &&
+ if (draw_target == DRAW_TO_BACKBUFFER &&
(GetDoorState() & DOOR_OPEN_1))
return;
static void DrawMaskedBorderExt_DOOR_2(int draw_target)
{
// when drawing to backbuffer, never draw border over open doors
- if (draw_target == DRAW_BORDER_TO_BACKBUFFER &&
+ if (draw_target == DRAW_TO_BACKBUFFER &&
(GetDoorState() & DOOR_OPEN_2))
return;
void DrawMaskedBorder_FIELD()
{
- DrawMaskedBorderExt_FIELD(DRAW_BORDER_TO_BACKBUFFER);
+ DrawMaskedBorderExt_FIELD(DRAW_TO_BACKBUFFER);
}
void DrawMaskedBorder(int redraw_mask)
{
- DrawMaskedBorderExt(redraw_mask, DRAW_BORDER_TO_BACKBUFFER);
+ DrawMaskedBorderExt(redraw_mask, DRAW_TO_BACKBUFFER);
}
void DrawMaskedBorderToTarget(int draw_target)
{
- if (draw_target == DRAW_BORDER_TO_BACKBUFFER ||
- draw_target == DRAW_BORDER_TO_SCREEN)
+ if (draw_target == DRAW_TO_BACKBUFFER ||
+ draw_target == DRAW_TO_SCREEN)
{
DrawMaskedBorderExt(REDRAW_ALL, draw_target);
}
{
int last_border_status = global.border_status;
- if (draw_target == DRAW_BORDER_TO_FADE_SOURCE)
+ if (draw_target == DRAW_TO_FADE_SOURCE)
{
global.border_status = gfx.fade_border_source_status;
gfx.masked_border_bitmap_ptr = gfx.fade_bitmap_source;
}
- else if (draw_target == DRAW_BORDER_TO_FADE_TARGET)
+ else if (draw_target == DRAW_TO_FADE_TARGET)
{
global.border_status = gfx.fade_border_target_status;
gfx.masked_border_bitmap_ptr = gfx.fade_bitmap_target;
if (game_status == GAME_MODE_PLAYING)
{
ClearRectangle(fieldbuffer, 0, 0, FXSIZE, FYSIZE);
- SetDrawtoField(DRAW_FIELDBUFFER);
+ SetDrawtoField(DRAW_TO_FIELDBUFFER);
}
else
{
- SetDrawtoField(DRAW_BACKBUFFER);
+ SetDrawtoField(DRAW_TO_BACKBUFFER);
}
}
int sy = SY + (SYSIZE - ysize * font_height) / 2;
int xx, yy;
- SetDrawtoField(DRAW_FIELDBUFFER);
+ SetDrawtoField(DRAW_TO_FIELDBUFFER);
BlitScreenToBitmap(backbuffer);
- SetDrawtoField(DRAW_BACKBUFFER);
+ SetDrawtoField(DRAW_TO_BACKBUFFER);
for (yy = 0; yy < ysize; yy++)
for (xx = 0; xx < xsize; xx++)
game.envelope_active = FALSE;
- SetDrawtoField(DRAW_FIELDBUFFER);
+ SetDrawtoField(DRAW_TO_FIELDBUFFER);
redraw_mask |= REDRAW_FIELD;
BackToFront();
if (game_status == GAME_MODE_PLAYING)
BlitScreenToBitmap(backbuffer);
- SetDrawtoField(DRAW_BACKBUFFER);
+ SetDrawtoField(DRAW_TO_BACKBUFFER);
// SetDrawBackgroundMask(REDRAW_NONE);
if (action == ACTION_CLOSING &&
game_status == GAME_MODE_PLAYING &&
level.game_engine_type == GAME_ENGINE_TYPE_RND)
- SetDrawtoField(DRAW_FIELDBUFFER);
+ SetDrawtoField(DRAW_TO_FIELDBUFFER);
}
void DrawPreviewElement(int dst_x, int dst_y, int element, int tilesize)
{
if (level_solved)
{
- SetDrawtoField(DRAW_FIELDBUFFER);
+ SetDrawtoField(DRAW_TO_FIELDBUFFER);
HandleGameActions();
- SetDrawtoField(DRAW_BACKBUFFER);
+ SetDrawtoField(DRAW_TO_BACKBUFFER);
if (global.use_envelope_request)
{