X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftools.c;h=354f196c48797f47612d8157fa2650029fa848c5;hb=4be46f1030df4cb7db0ce7c46d2518334861731a;hp=2eac4a7235b13d385d47526e6d0b120373c00bca;hpb=081f176501bc84d81d6f9d27d6170e70e4a23661;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index 2eac4a72..354f196c 100644 --- a/src/tools.c +++ b/src/tools.c @@ -364,7 +364,7 @@ void FadeToFront() void SetMainBackgroundImage(int graphic) { - SetMainBackgroundBitmap(graphic == IMG_NONE ? NULL : + SetMainBackgroundBitmap(graphic == IMG_UNDEFINED ? NULL : new_graphic_info[graphic].bitmap ? new_graphic_info[graphic].bitmap : new_graphic_info[IMG_BACKGROUND_DEFAULT].bitmap); @@ -372,7 +372,7 @@ void SetMainBackgroundImage(int graphic) void SetDoorBackgroundImage(int graphic) { - SetDoorBackgroundBitmap(graphic == IMG_NONE ? NULL : + SetDoorBackgroundBitmap(graphic == IMG_UNDEFINED ? NULL : new_graphic_info[graphic].bitmap ? new_graphic_info[graphic].bitmap : new_graphic_info[IMG_BACKGROUND_DEFAULT].bitmap); @@ -404,6 +404,37 @@ void ClearWindow() } } +void MarkTileDirty(int x, int y) +{ + int xx = redraw_x1 + x; + int yy = redraw_y1 + y; + + if (!redraw[xx][yy]) + redraw_tiles++; + + redraw[xx][yy] = TRUE; + redraw_mask |= REDRAW_TILES; +} + +void SetBorderElement() +{ + int x, y; + + BorderElement = EL_EMPTY; + + for(y=0; y= MAX_ELEMENTS) + if (element >= MAX_NUM_ELEMENTS) { - Error(ERR_WARN, "el2gfx: element == %d >= MAX_ELEMENTS", element); + Error(ERR_WARN, "el2gfx: element == %d >= MAX_NUM_ELEMENTS", element); } if (graphic_NEW != graphic_OLD)