From: Holger Schemel Date: Fri, 29 Nov 2002 22:43:51 +0000 (+0100) Subject: rnd-20021129-3-src X-Git-Tag: 3.0.0^2~208 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=09e22b6b1f060be3ac1aca3937ff29c9d53e5866;p=rocksndiamonds.git rnd-20021129-3-src --- diff --git a/src/conftime.h b/src/conftime.h index 830305a9..7dadbdca 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2002-11-29 19:51]" +#define COMPILE_DATE_STRING "[2002-11-29 21:30]" diff --git a/src/init.c b/src/init.c index 8471ac00..5dea5dfc 100644 --- a/src/init.c +++ b/src/init.c @@ -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; iclip_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; istored_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(); diff --git a/src/libgame/misc.c b/src/libgame/misc.c index 8caa755b..7637dc2d 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -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);