static void InitImages()
{
+#if 0
setLevelArtworkDir(artwork.gfx_first);
+#endif
#if 0
printf("::: InitImages for '%s' ['%s', '%s'] ['%s', '%s']\n",
if (identifier == NULL)
identifier = artwork.snd_current->identifier;
+#if 0
/* set artwork path to send it to the sound server process */
setLevelArtworkDir(artwork.snd_first);
+#endif
InitReloadCustomSounds(identifier);
ReinitializeSounds();
if (identifier == NULL)
identifier = artwork.mus_current->identifier;
+#if 0
/* set artwork path to send it to the sound server process */
setLevelArtworkDir(artwork.mus_first);
+#endif
InitReloadCustomMusic(identifier);
ReinitializeMusic();
boolean setup_override_artwork = SETUP_OVERRIDE_ARTWORK(setup, type);
char *setup_artwork_set = SETUP_ARTWORK_SET(setup, type);
char *leveldir_identifier = leveldir_current->identifier;
+#if 1
+ char *leveldir_artwork_set = setLevelArtworkDir(artwork_first_node);
+#else
char *leveldir_artwork_set = LEVELDIR_ARTWORK_SET(leveldir_current, type);
+#endif
boolean has_level_artwork_set = (leveldir_artwork_set != NULL);
char *artwork_current_identifier;
char *artwork_new_identifier = NULL; /* default: nothing has changed */
if (!validLevelSeries(leveldir_current))
return NULL;
-
/* 1st step: determine artwork set to be activated in descending order:
--------------------------------------------------------------------
1. setup artwork (when configured to override everything else)
/* 2nd step: check if it is really needed to reload artwork set
------------------------------------------------------------ */
+#if 0
+ if (type == ARTWORK_TYPE_GRAPHICS)
+ printf("::: 0: '%s' ['%s', '%s'] ['%s' ('%s')]\n",
+ artwork_new_identifier,
+ ARTWORK_CURRENT_IDENTIFIER(artwork, type),
+ artwork_current_identifier,
+ leveldir_current->graphics_set,
+ leveldir_current->identifier);
+#endif
+
/* ---------- reload if level set and also artwork set has changed ------- */
if (leveldir_current_identifier[type] != leveldir_identifier &&
(last_has_level_artwork_set[type] || has_level_artwork_set))
leveldir_current_identifier[type] = leveldir_identifier;
last_has_level_artwork_set[type] = has_level_artwork_set;
+#if 0
+ if (type == ARTWORK_TYPE_GRAPHICS)
+ printf("::: 1: '%s'\n", artwork_new_identifier);
+#endif
+
/* ---------- reload if "override artwork" setting has changed ----------- */
if (last_override_level_artwork[type] != setup_override_artwork)
artwork_new_identifier = artwork_current_identifier;
last_override_level_artwork[type] = setup_override_artwork;
+#if 0
+ if (type == ARTWORK_TYPE_GRAPHICS)
+ printf("::: 2: '%s'\n", artwork_new_identifier);
+#endif
+
/* ---------- reload if current artwork identifier has changed ----------- */
if (strcmp(ARTWORK_CURRENT_IDENTIFIER(artwork, type),
artwork_current_identifier) != 0)
*(&(ARTWORK_CURRENT_IDENTIFIER(artwork, type))) = artwork_current_identifier;
+#if 0
+ if (type == ARTWORK_TYPE_GRAPHICS)
+ printf("::: 3: '%s'\n", artwork_new_identifier);
+#endif
+
/* ---------- do not reload directly after starting ---------------------- */
if (!initialized[type])
artwork_new_identifier = NULL;
initialized[type] = TRUE;
#if 0
- printf("CHECKING OLD/NEW GFX:\n- OLD: %s\n- NEW: %s ['%s', '%s'] ['%s']\n",
- artwork.gfx_current_identifier, artwork_current_identifier,
- artwork.gfx_current->identifier, leveldir_current->graphics_set,
- artwork_new_identifier);
+ if (type == ARTWORK_TYPE_GRAPHICS)
+ printf("::: 4: '%s'\n", artwork_new_identifier);
+#endif
+
+#if 0
+ if (type == ARTWORK_TYPE_GRAPHICS)
+ printf("CHECKING OLD/NEW GFX:\n- OLD: %s\n- NEW: %s ['%s', '%s'] ['%s']\n",
+ artwork.gfx_current_identifier, artwork_current_identifier,
+ artwork.gfx_current->identifier, leveldir_current->graphics_set,
+ artwork_new_identifier);
#endif
return artwork_new_identifier;
if (gfx_new_identifier != NULL)
{
#if 0
- printf("RELOADING GRAPHICS '%s' -> '%s' ['%s']\n",
+ printf("RELOADING GRAPHICS '%s' -> '%s' ['%s', '%s']\n",
artwork.gfx_current_identifier,
gfx_new_identifier,
- artwork.gfx_current->identifier);
+ artwork.gfx_current->identifier,
+ leveldir_current->graphics_set);
#endif
ClearRectangle(window, 0, 0, WIN_XSIZE, WIN_YSIZE);
InitImages();
+#if 0
+ printf("... '%s'\n",
+ leveldir_current->graphics_set);
+#endif
+
FreeTileClipmasks();
InitTileClipmasks();
static struct TokenInfo setup_info_sound[] =
{
- { TYPE_SWITCH, &setup.sound, "Sound:", },
- { TYPE_EMPTY, NULL, "" },
{ TYPE_SWITCH, &setup.sound_simple, "Simple Sound:" },
{ TYPE_SWITCH, &setup.sound_loops, "Sound Loops:" },
{ TYPE_SWITCH, &setup.sound_music, "Game Music:" },
int font_nr = FONT_MENU_1;
/* set some entries to "unchangeable" according to other variables */
- if ((value_ptr == &setup.sound && !audio.sound_available) ||
- (value_ptr == &setup.sound_loops && !audio.loops_available) ||
- (value_ptr == &setup.sound_music && !audio.music_available) ||
- (value_ptr == &setup.fullscreen && !video.fullscreen_available))
+ if ((value_ptr == &setup.sound_simple && !audio.sound_available) ||
+ (value_ptr == &setup.sound_loops && !audio.loops_available) ||
+ (value_ptr == &setup.sound_music && !audio.music_available) ||
+ (value_ptr == &setup.fullscreen && !video.fullscreen_available))
setup_info[i].type |= TYPE_GHOSTED;
if (setup_info[i].type & TYPE_STRING)