X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;ds=inline;f=src%2Ftools.c;h=ddc8353b5c9da4a33b9d0caa3d3911f3690ac87d;hb=1264abe158bef8419451c95e6db9a738eeec76f8;hp=3228959755cc0ea844df4885eb485e2e62e244c8;hpb=5b31d2c27a79ba23688c130c3324cadfa110d0fa;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index 32289597..ddc8353b 100644 --- a/src/tools.c +++ b/src/tools.c @@ -627,19 +627,39 @@ void SetPanelBackground() SetDoorBackgroundBitmap(bitmap_db_panel); } -void DrawBackground(int dst_x, int dst_y, int width, int height) +void DrawBackground(int x, int y, int width, int height) { /* !!! "drawto" might still point to playfield buffer here (see below) !!! */ /* (when entering hall of fame after playing) */ #if 0 - ClearRectangleOnBackground(drawto, dst_x, dst_y, width, height); + ClearRectangleOnBackground(drawto, x, y, width, height); #else - ClearRectangleOnBackground(backbuffer, dst_x, dst_y, width, height); + ClearRectangleOnBackground(backbuffer, x, y, width, height); #endif redraw_mask |= REDRAW_FIELD; } +void DrawBackgroundForFont(int x, int y, int width, int height, int font_nr) +{ + struct FontBitmapInfo *font = getFontBitmapInfo(font_nr); + + if (font->bitmap == NULL) + return; + + DrawBackground(x, y, width, height); +} + +void DrawBackgroundForGraphic(int x, int y, int width, int height, int graphic) +{ + struct GraphicInfo *g = &graphic_info[graphic]; + + if (g->bitmap == NULL) + return; + + DrawBackground(x, y, width, height); +} + void ClearWindow() { /* !!! "drawto" might still point to playfield buffer here (see above) !!! */