X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;ds=inline;f=src%2Finit.c;h=ecbe8b61bf05d74a262b556fa60d93579b16b04b;hb=ab15698ba2ad29ab6c0af5f022fb2bffc57e382f;hp=864d0b3b6395753964fb40a791ac7403ab269247;hpb=f6e7c3f82181ecb9e1a8e2de37672c838998e942;p=rocksndiamonds.git diff --git a/src/init.c b/src/init.c index 864d0b3b..ecbe8b61 100644 --- a/src/init.c +++ b/src/init.c @@ -1843,7 +1843,6 @@ void InitElementPropertiesStatic() EL_SP_ELECTRON, EL_BALLOON, EL_SPRING, - EL_MAZE_RUNNER, -1 }; @@ -3209,7 +3208,8 @@ void InitElementPropertiesEngine(int engine_version) #endif /* this is needed because some graphics depend on element properties */ - InitElementGraphicInfo(); + if (game_status == GAME_MODE_PLAYING) + InitElementGraphicInfo(); } static void InitGlobal() @@ -3825,14 +3825,17 @@ static char *getNewArtworkIdentifier(int type) return artwork_new_identifier; } -void ReloadCustomArtwork() +void ReloadCustomArtwork(int force_reload) { char *gfx_new_identifier = getNewArtworkIdentifier(ARTWORK_TYPE_GRAPHICS); char *snd_new_identifier = getNewArtworkIdentifier(ARTWORK_TYPE_SOUNDS); char *mus_new_identifier = getNewArtworkIdentifier(ARTWORK_TYPE_MUSIC); + boolean force_reload_gfx = (force_reload & (1 << ARTWORK_TYPE_GRAPHICS)); + boolean force_reload_snd = (force_reload & (1 << ARTWORK_TYPE_SOUNDS)); + boolean force_reload_mus = (force_reload & (1 << ARTWORK_TYPE_MUSIC)); boolean redraw_screen = FALSE; - if (gfx_new_identifier != NULL) + if (gfx_new_identifier != NULL || force_reload_gfx) { #if 0 printf("RELOADING GRAPHICS '%s' -> '%s' ['%s', '%s']\n", @@ -3857,7 +3860,7 @@ void ReloadCustomArtwork() redraw_screen = TRUE; } - if (snd_new_identifier != NULL) + if (snd_new_identifier != NULL || force_reload_snd) { ClearRectangle(window, 0, 0, WIN_XSIZE, WIN_YSIZE); @@ -3866,7 +3869,7 @@ void ReloadCustomArtwork() redraw_screen = TRUE; } - if (mus_new_identifier != NULL) + if (mus_new_identifier != NULL || force_reload_mus) { ClearRectangle(window, 0, 0, WIN_XSIZE, WIN_YSIZE);