X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Finit.c;h=e4b15279a401e5024b84b343b1fb16613e1f0f06;hb=3282aa616432ea42399d4dc4ffe637c4406a71c4;hp=aea5c31bd576c806c7519a320cd8f7525ab10075;hpb=983d4e27852f9c81935bf4ae36482f6084264e15;p=rocksndiamonds.git diff --git a/src/init.c b/src/init.c index aea5c31b..e4b15279 100644 --- a/src/init.c +++ b/src/init.c @@ -157,10 +157,6 @@ inline void InitElementSmallImagesScaledUp(int graphic) // create small and game tile sized bitmaps (and scale up, if needed) CreateImageWithSmallImages(graphic, g->scale_up_factor, g->tile_size); - - // default (standard sized) bitmap may have changed now -- update it - if (g->bitmaps) - g->bitmap = g->bitmaps[IMG_BITMAP_STANDARD]; } void InitElementSmallImages() @@ -214,6 +210,17 @@ void InitScaledImages() ScaleImage(i, graphic_info[i].scale_up_factor); } +void InitBitmapPointers() +{ + int num_images = getImageListSize(); + int i; + + // standard size bitmap may have changed -- update default bitmap pointer + for (i = 0; i < num_images; i++) + if (graphic_info[i].bitmaps) + graphic_info[i].bitmap = graphic_info[i].bitmaps[IMG_BITMAP_STANDARD]; +} + #if 1 /* !!! FIX THIS (CHANGE TO USING NORMAL ELEMENT GRAPHIC DEFINITIONS) !!! */ void SetBitmaps_EM(Bitmap **em_bitmap) @@ -1918,6 +1925,8 @@ static void ReinitializeGraphics() print_timestamp_time("InitElementSmallImages"); InitScaledImages(); /* scale all other images, if needed */ print_timestamp_time("InitScaledImages"); + InitBitmapPointers(); /* set standard size bitmap pointers */ + print_timestamp_time("InitBitmapPointers"); InitFontGraphicInfo(); /* initialize text drawing functions */ print_timestamp_time("InitFontGraphicInfo"); @@ -5005,6 +5014,9 @@ void InitGfxBuffers() InitGfxScrollbufferInfo(FXSIZE, FYSIZE); InitGfxClipRegion(FALSE, -1, -1, -1, -1); + /* required if door size definitions have changed */ + InitGraphicCompatibilityInfo_Doors(); + InitGfxBuffers_EM(); InitGfxBuffers_SP(); }