fixed position of initial busy animation
authorHolger Schemel <info@artsoft.org>
Wed, 6 Apr 2022 17:20:06 +0000 (19:20 +0200)
committerHolger Schemel <info@artsoft.org>
Wed, 6 Apr 2022 17:21:55 +0000 (19:21 +0200)
This fixes a bug introduced with commit b1734380.

src/init.c

index 8b0d8ef39600de69f49b8916bea19047334d759c..a79bd5bbb2b9483ae0a3a0a5a91e03d0bed69606 100644 (file)
@@ -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);