rnd-20140515-1-src
[rocksndiamonds.git] / src / libgame / image.c
index 498c1c0bfb3a2c034cda879797ac2401e9cb54d8..505238dc6a015db3d057f7696e035bbd70b8b89a 100644 (file)
@@ -23,8 +23,6 @@
 
 #if defined(TARGET_X11)
 
-/* for MS-DOS/Allegro, exclude all except newImage() and freeImage() */
-
 Image *newImage(unsigned int width, unsigned int height, unsigned int depth)
 {
   Image *image;
@@ -55,8 +53,6 @@ void freeImage(Image *image)
   free(image);
 }
 
-#if defined(PLATFORM_UNIX)
-
 /* extra colors to try allocating in private color maps to minimize flashing */
 #define NOFLASH_COLORS 256
 
@@ -807,7 +803,6 @@ int Read_PCX_to_Pixmap(Display *display, Window window, GC gc, char *filename,
   return PCX_Success;
 }
 
-#endif /* PLATFORM_UNIX */
 #endif /* TARGET_X11 */
 
 
@@ -832,7 +827,11 @@ typedef struct ImageInfo ImageInfo;
 
 static struct ArtworkListInfo *image_info = NULL;
 
+#if 1
+static void *Load_Image(char *filename)
+#else
 static void *Load_PCX(char *filename)
+#endif
 {
   ImageInfo *img_info;
 
@@ -1030,7 +1029,11 @@ void InitImageList(struct ConfigInfo *config_list, int num_file_list_entries,
 
   /* ---------- initialize artwork loading/freeing functions ---------- */
 
+#if 1
+  image_info->load_artwork = Load_Image;
+#else
   image_info->load_artwork = Load_PCX;
+#endif
   image_info->free_artwork = FreeImage;
 }
 
@@ -1040,8 +1043,15 @@ void ReloadCustomImages()
   printf("::: reloading images '%s' ...\n", artwork.gfx_current_identifier);
 #endif
 
+  print_timestamp_init("ReloadCustomImages");
+
   LoadArtworkConfig(image_info);
+  print_timestamp_time("LoadArtworkConfig");
+
   ReloadCustomArtworkList(image_info);
+  print_timestamp_time("ReloadCustomArtworkList");
+
+  print_timestamp_done("ReloadCustomImages");
 }
 
 void CreateImageWithSmallImages(int pos, int zoom_factor)