From: Holger Schemel Date: Wed, 6 Apr 2022 17:20:06 +0000 (+0200) Subject: fixed position of initial busy animation X-Git-Tag: 4.3.2.0~37 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=1e7efe72121a22a3eed6412f08fd1718287e2952;p=rocksndiamonds.git fixed position of initial busy animation This fixes a bug introduced with commit b1734380. --- diff --git a/src/init.c b/src/init.c index 8b0d8ef3..a79bd5bb 100644 --- a/src/init.c +++ b/src/init.c @@ -41,6 +41,9 @@ #define INITIAL_IMG_GLOBAL_BUSY_INITIAL 0 #define INITIAL_IMG_GLOBAL_BUSY 1 + +#define NUM_INITIAL_IMAGES_BUSY 2 + #define INITIAL_IMG_BACKGROUND_LOADING_INITIAL 2 #define INITIAL_IMG_BACKGROUND_LOADING 3 @@ -5587,6 +5590,11 @@ static void InitGfx(void) CONFIG_TOKEN_BACKGROUND_LOADING_INITIAL, CONFIG_TOKEN_BACKGROUND_LOADING }; + struct MenuPosInfo *init_busy[NUM_INITIAL_IMAGES_BUSY] = + { + &init.busy_initial, + &init.busy + }; Bitmap *bitmap_font_initial = NULL; int parameter[NUM_INITIAL_IMAGES][NUM_GFX_ARGS]; int i, j, k; @@ -5751,6 +5759,13 @@ static void InitGfx(void) graphic_info = graphic_info_last; + for (i = 0; i < NUM_INITIAL_IMAGES_BUSY; i++) + { + // set image size for busy animations + init_busy[i]->width = image_initial[i].width; + init_busy[i]->height = image_initial[i].height; + } + SetLoadingBackgroundImage(); ClearRectangleOnBackground(window, 0, 0, WIN_XSIZE, WIN_YSIZE);