X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Flibgame%2Fmisc.c;h=f222f31ea3bc4fdb0672245e12bdb50dee6556a7;hp=6db94000c6a955dc0c053639f310fef91b8e0c70;hb=467fb3a191a20318590ac5681e21bcfefb0eb2ad;hpb=28f0f8708f4b4f8c4f39f1b23bc5fc7e0fed7579 diff --git a/src/libgame/misc.c b/src/libgame/misc.c index 6db94000..f222f31e 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -1500,7 +1500,7 @@ void LoadArtworkToList(struct ArtworkListInfo *artwork_info, #endif } -void ReloadCustomArtworkFiles(struct ArtworkListInfo *artwork_info) +void ReloadCustomArtworkList(struct ArtworkListInfo *artwork_info) { static struct { @@ -1519,14 +1519,6 @@ void ReloadCustomArtworkFiles(struct ArtworkListInfo *artwork_info) struct ArtworkConfigInfo *config_list = artwork_info->config_list; int i; -#if 0 - Delay(5000); -#endif - -#if 0 - printf("DEBUG: reloading sounds '%s' ...\n",artwork.snd_current_identifier); -#endif - LoadArtworkConfig(artwork_info); if (draw_init[artwork_info->type].do_it) @@ -1558,6 +1550,32 @@ void ReloadCustomArtworkFiles(struct ArtworkListInfo *artwork_info) #endif } +void FreeCustomArtworkList(struct ArtworkListInfo *artwork_info) +{ + int i; + + if (artwork_info->artwork_list == NULL) + return; + +#if 0 + printf("%s: FREEING ARTWORK ...\n", + IS_CHILD_PROCESS(audio.mixer_pid) ? "CHILD" : "PARENT"); +#endif + + for(i=0; inum_list_entries; i++) + deleteArtworkListEntry(artwork_info, &artwork_info->artwork_list[i]); + +#if 0 + printf("%s: FREEING ARTWORK -- DONE\n", + IS_CHILD_PROCESS(audio.mixer_pid) ? "CHILD" : "PARENT"); +#endif + + free(artwork_info->artwork_list); + + artwork_info->artwork_list = NULL; + artwork_info->num_list_entries = 0; +} + /* ========================================================================= */ /* functions only needed for non-Unix (non-command-line) systems */