X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Finit.c;h=3118aa35a76b2d294e2b62d3495f8860a02d96ed;hb=dfe0a71a9939e0c55bb54dcc92db1749e8e21747;hp=fe585257360fc68d0dc3785be8dbf0f4761013b4;hpb=bcb3453f710b95ec98b188b95574bea9ab336e96;p=rocksndiamonds.git diff --git a/src/init.c b/src/init.c index fe585257..3118aa35 100644 --- a/src/init.c +++ b/src/init.c @@ -71,6 +71,7 @@ void OpenAll(void) InitSetup(); InitPlayerInfo(); + InitArtworkInfo(); /* needed before loading gfx, sound & music */ InitCounter(); InitSound(); @@ -83,7 +84,6 @@ void OpenAll(void) InitEventFilter(FilterMouseMotionEvents); - InitArtworkInfo(); InitGfx(); InitElementProperties(); /* initializes IS_CHAR() for el2gfx() */ @@ -366,6 +366,36 @@ void InitGfxBackground() redraw_mask = REDRAW_ALL; } +void ReloadCustomArtwork() +{ + if (artwork.graphics_set_current != artwork.gfx_current->name) + { + int i; + + for(i=0; iname; + } + + if (artwork.sounds_set_current != artwork.snd_current->name) + { + printf("reload sounds ...\n"); + + artwork.sounds_set_current = artwork.snd_current->name; + } + + if (artwork.music_set_current != artwork.mus_current->name) + { + printf("reload music ...\n"); + + artwork.music_set_current = artwork.mus_current->name; + } +} + void InitGadgets() { CreateLevelEditorGadgets();