fixed bug with non-element images from dynamic configuration _not_ being scaled by...
authorHolger Schemel <info@artsoft.org>
Mon, 30 Jan 2017 20:28:39 +0000 (21:28 +0100)
committerHolger Schemel <info@artsoft.org>
Mon, 30 Jan 2017 20:28:39 +0000 (21:28 +0100)
src/init.c

index 29f4fd4b130744436de7c7fe4951de2c44035a79..169d0582f3a359f9482bd15107c1e850fd498b00 100644 (file)
@@ -219,13 +219,26 @@ void InitElementSmallImages()
   print_timestamp_done("InitElementSmallImages");
 }
 
+inline static void InitScaledImagesScaledUp(int graphic)
+{
+  struct GraphicInfo *g = &graphic_info[graphic];
+
+  ScaleImage(graphic, g->scale_up_factor);
+}
+
 void InitScaledImages()
 {
+  struct PropertyMapping *property_mapping = getImageListPropertyMapping();
+  int num_property_mappings = getImageListPropertyMappingSize();
   int i;
 
   /* scale normal images from static configuration, if not already scaled */
   for (i = 0; i < NUM_IMAGE_FILES; i++)
-    ScaleImage(i, graphic_info[i].scale_up_factor);
+    InitScaledImagesScaledUp(i);
+
+  /* scale images from dynamic configuration, if not already scaled */
+  for (i = 0; i < num_property_mappings; i++)
+    InitScaledImagesScaledUp(property_mapping[i].artwork_index);
 }
 
 void InitBitmapPointers()