X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Finit.c;h=183ba2b9a45862ff63d71ee25ca8666d2c405036;hb=22473d4140e896b64767e3349ef308f69b7668b9;hp=53066410638a70567b0d43e9615353c4291bd3ef;hpb=467fb3a191a20318590ac5681e21bcfefb0eb2ad;p=rocksndiamonds.git diff --git a/src/init.c b/src/init.c index 53066410..183ba2b9 100644 --- a/src/init.c +++ b/src/init.c @@ -46,7 +46,7 @@ static void InitLevelInfo(void); static void InitArtworkInfo(void); static void InitLevelArtworkInfo(void); static void InitNetworkServer(void); -static void InitImageConfig(); +static void InitImages(void); static void InitMixer(void); static void InitSound(void); static void InitGfx(void); @@ -87,7 +87,6 @@ void OpenAll(void) InitArtworkInfo(); /* needed before loading gfx, sound & music */ InitCounter(); - InitImageConfig(); InitMixer(); InitJoysticks(); InitRND(NEW_RANDOMIZE); @@ -106,6 +105,7 @@ void OpenAll(void) InitLevelInfo(); InitLevelArtworkInfo(); InitGadgets(); /* needs to know number of level series */ + InitImages(); /* needs to know current level directory */ InitSound(); /* needs to know current level directory */ InitGfxBackground(); @@ -174,9 +174,12 @@ void InitNetworkServer() #endif } -static void InitImageConfig() +static void InitImages() { InitImageList(image_config, NUM_IMAGE_CONFIG_ENTRIES); + + /* load custom images */ + ReloadCustomImages(); } static void InitMixer() @@ -274,8 +277,8 @@ static void InitTileClipmasks() clip_gc_values.graphics_exposures = False; clip_gc_valuemask = GCGraphicsExposures; - tile_clip_gc = - XCreateGC(display, window->drawable, clip_gc_valuemask, &clip_gc_values); + tile_clip_gc = XCreateGC(display, window->drawable, + clip_gc_valuemask, &clip_gc_values); for(i=0; iclip_mask, - clip_gc_valuemask, &clip_gc_values); + copy_clipmask_gc = XCreateGC(display, pix[PIX_BACK]->clip_mask, + clip_gc_valuemask, &clip_gc_values); /* create only those clipping Pixmaps we really need */ for(i=0; tile_needs_clipping[i].start>=0; i++) @@ -494,6 +496,8 @@ void ReloadCustomArtwork() ReloadCustomImage(pix[i], image_filename[i]); } + ReloadCustomImages(); + FreeTileClipmasks(); InitTileClipmasks(); InitGfxBackground(); @@ -2061,17 +2065,26 @@ void Execute_Debug_Command(char *command) { if (strcmp(command, "create graphicsinfo.conf") == 0) { - printf("# (Currently only \"name\" and \"sort_priority\" recognized.)\n"); + int i; + + printf("# You can configure additional/alternative image files here.\n"); + printf("# (The images below are default and therefore commented out.)\n"); printf("\n"); printf("%s\n", getFormattedSetupEntry("name", "Classic Graphics")); printf("\n"); printf("%s\n", getFormattedSetupEntry("sort_priority", "100")); + printf("\n"); + + for (i=0; i