rnd-20021129-3-src
authorHolger Schemel <info@artsoft.org>
Fri, 29 Nov 2002 22:43:51 +0000 (23:43 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:39:06 +0000 (10:39 +0200)
src/conftime.h
src/init.c
src/libgame/misc.c

index 830305a941fae8dcc2923b8c7d8d7cd5196029bd..7dadbdcae588888aea6ecef9ba5ec0f736fc9a1b 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2002-11-29 19:51]"
+#define COMPILE_DATE_STRING "[2002-11-29 21:30]"
index 8471ac00ea9979ffd92324b39e36c7e3e2da7b87..5dea5dfca4522d457075464fd2481c31b935a6e8 100644 (file)
@@ -189,14 +189,23 @@ void InitNetworkServer()
 #endif
 }
 
+static void ReinitializeGraphics()
+{
+  ReloadCustomImages();                /* load custom image files */
+
+  InitGraphicInfo();           /* initialize graphic info from config file */
+
+  InitFontInfo(new_graphic_info[IMG_MENU_FONT_BIG].bitmap,
+              new_graphic_info[IMG_MENU_FONT_MEDIUM].bitmap,
+              new_graphic_info[IMG_MENU_FONT_SMALL].bitmap,
+              new_graphic_info[IMG_MENU_FONT_EM].bitmap);
+}
+
 static void InitImages()
 {
   InitImageList(image_config, image_config_suffix, NUM_IMAGE_FILES);
 
-  /* load custom images */
-  ReloadCustomImages();
-
-  InitGraphicInfo();
+  ReinitializeGraphics();
 }
 
 static void InitMixer()
@@ -301,6 +310,7 @@ static void InitTileClipmasks()
   tile_clip_gc = XCreateGC(display, window->drawable,
                           clip_gc_valuemask, &clip_gc_values);
 
+#if 0
   for (i=0; i<NUM_BITMAPS; i++)
   {
     if (pix[i]->clip_mask)
@@ -312,6 +322,7 @@ static void InitTileClipmasks()
                                         clip_gc_valuemask, &clip_gc_values);
     }
   }
+#endif
 
 #if defined(TARGET_X11_NATIVE)
 
@@ -371,6 +382,7 @@ void FreeTileClipmasks()
     XFreeGC(display, tile_clip_gc);
   tile_clip_gc = None;
 
+#if 0
   for (i=0; i<NUM_BITMAPS; i++)
   {
     if (pix[i] != NULL && pix[i]->stored_clip_gc)
@@ -379,6 +391,8 @@ void FreeTileClipmasks()
       pix[i]->stored_clip_gc = None;
     }
   }
+#endif
+
 #endif /* TARGET_X11 */
 }
 
@@ -439,7 +453,8 @@ void InitGfxBackground()
   fieldbuffer = bitmap_db_field;
   SetDrawtoField(DRAW_BACKBUFFER);
 
-  BlitBitmap(pix[PIX_BACK], backbuffer, 0, 0, WIN_XSIZE, WIN_YSIZE, 0, 0);
+  BlitBitmap(new_graphic_info[IMG_MENU_BACK].bitmap, backbuffer,
+            0, 0, WIN_XSIZE, WIN_YSIZE, 0, 0);
   ClearRectangle(backbuffer, REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE);
   ClearRectangle(bitmap_db_door, 0, 0, 3 * DXSIZE, DYSIZE + VYSIZE);
 
@@ -524,8 +539,7 @@ void ReloadCustomArtwork()
       ReloadCustomImage(pix[i], image_filename[i]);
     }
 
-    ReloadCustomImages();
-    InitGraphicInfo();
+    ReinitializeGraphics();
 
     FreeTileClipmasks();
     InitTileClipmasks();
index 8caa755b23be4b1ed2c491c7c125a00a9bded114..7637dc2d8473efc6ac661c9bd93a12c49d131b7c 100644 (file)
@@ -1569,6 +1569,10 @@ static void replaceArtworkListEntry(struct ArtworkListInfo *artwork_info,
   }
   else if ((*listnode = artwork_info->load_artwork(filename)) != NULL)
   {
+#if 0
+      printf("[adding new artwork '%s']\n", filename);
+#endif
+
     (*listnode)->num_references = 1;
     addNodeToList(&artwork_info->content_list, (*listnode)->source_filename,
                  *listnode);