/***********************************************************
* Rocks'n'Diamonds -- McDuffin Strikes Back! *
*----------------------------------------------------------*
-* (c) 1995-2001 Artsoft Entertainment *
+* (c) 1995-2002 Artsoft Entertainment *
* Holger Schemel *
* Detmolder Strasse 189 *
* 33604 Bielefeld *
void ReloadCustomArtwork()
{
- static char *leveldir_current_name = NULL;
+ static char *leveldir_current_filename = NULL;
static boolean last_override_level_graphics = FALSE;
static boolean last_override_level_sounds = FALSE;
static boolean last_override_level_music = FALSE;
- if (leveldir_current_name != leveldir_current->name)
+ if (leveldir_current_filename != leveldir_current->filename)
{
- /* force reload of custom artwork after new level series was selected */
- artwork.graphics_set_current_name = NULL;
- artwork.sounds_set_current_name = NULL;
- artwork.music_set_current_name = NULL;
-
- leveldir_current_name = leveldir_current->name;
+ char *filename_old = leveldir_current_filename;
+ char *filename_new = leveldir_current->filename;
+
+ /* force reload of custom artwork after new level series was selected,
+ but reload only that part of the artwork that really has changed */
+ if (getTreeInfoFromFilename(artwork.gfx_first, filename_old) !=
+ getTreeInfoFromFilename(artwork.gfx_first, filename_new))
+ artwork.graphics_set_current_name = NULL;
+ if (getTreeInfoFromFilename(artwork.snd_first, filename_old) !=
+ getTreeInfoFromFilename(artwork.snd_first, filename_new))
+ artwork.sounds_set_current_name = NULL;
+ if (getTreeInfoFromFilename(artwork.mus_first, filename_new) !=
+ getTreeInfoFromFilename(artwork.mus_first, filename_new))
+ artwork.music_set_current_name = NULL;
+
+ leveldir_current_filename = leveldir_current->filename;
}
if (artwork.graphics_set_current_name != artwork.gfx_current->name ||
InitTileClipmasks();
InitGfxBackground();
- SetDoorState(DOOR_OPEN_1 | DOOR_CLOSE_2);
+ /* force redraw of (open or closed) door graphics */
+ SetDoorState(DOOR_OPEN_ALL);
+ CloseDoor(DOOR_CLOSE_ALL | DOOR_NO_DELAY);
artwork.graphics_set_current_name = artwork.gfx_current->name;
last_override_level_graphics = setup.override_level_graphics;
void Execute_Debug_Command(char *command)
{
- if (strcmp(command, "create soundinfo.conf") == 0)
+ if (strcmp(command, "create graphicsinfo.conf") == 0)
+ {
+ printf("# (Currently only the \"name\" directive is recognized.)\n");
+ printf("\n");
+ printf("%s\n", getFormattedSetupEntry("name", "Classic Graphics"));
+ printf("\n");
+ }
+ else if (strcmp(command, "create soundsinfo.conf") == 0)
{
int i;
printf("# You can configure additional/alternative sound effects here\n");
printf("# (The sounds below are default and therefore commented out.)\n");
printf("\n");
+ printf("%s\n", getFormattedSetupEntry("name", "Classic Sounds"));
+ printf("\n");
for (i=0; i<NUM_SOUND_EFFECTS; i++)
printf("# %s\n",
getFormattedSetupEntry(sound_effects[i].text,
sound_effects[i].default_filename));
}
+ else if (strcmp(command, "create musicinfo.conf") == 0)
+ {
+ printf("# (Currently only the \"name\" directive is recognized.)\n");
+ printf("\n");
+ printf("%s\n", getFormattedSetupEntry("name", "Classic Music"));
+ printf("\n");
+ }
}
void CloseAllAndExit(int exit_value)