-#define COMPILE_DATE_STRING "[2003-07-19 19:45]"
+#define COMPILE_DATE_STRING "[2003-07-23 01:01]"
void TestIfPlayerTouchesCustomElement(int x, int y)
{
+ static boolean check_changing = FALSE;
static int xy[4][2] =
{
{ 0, -1 },
boolean center_is_player = (IS_PLAYER(x, y));
int i;
+ /* prevent TestIfPlayerTouchesCustomElement() from looping */
+ if (check_changing)
+ return;
+
+ check_changing = TRUE;
+
for (i=0; i<4; i++)
{
int xx = x + xy[i][0];
break;
}
}
+
+ check_changing = FALSE;
}
void TestIfElementTouchesCustomElement(int x, int y)
{
+ static boolean check_changing = FALSE;
static int xy[4][2] =
{
{ 0, -1 },
boolean center_is_custom = (IS_CUSTOM_ELEMENT(Feld[x][y]));
int i;
+ /* prevent TestIfElementTouchesCustomElement() from looping */
+ if (check_changing)
+ return;
+
+ check_changing = TRUE;
+
for (i=0; i<4; i++)
{
int xx = x + xy[i][0];
CheckElementChange(xx, yy, Feld[xx][yy], CE_OTHER_IS_TOUCHING);
}
}
+
+ check_changing = FALSE;
}
void TestIfGoodThingHitsBadThing(int good_x, int good_y, int good_move_dir)
if (leveldir_current->music_set != NULL)
mus_new_identifier = leveldir_current->music_set;
-#if 0
- printf("CHECKING OLD/NEW GFX:\n OLD: '%s'\n NEW: '%s' ['%s', '%s']\n",
+#if 1
+ printf("CHECKING OLD/NEW GFX:\n OLD: '%s'\n NEW: '%s' [setup '%s', level '%s']\n",
artwork.gfx_current_identifier, gfx_new_identifier,
artwork.gfx_current->identifier, leveldir_current->graphics_set);
#endif
if (strcmp(artwork.gfx_current_identifier, gfx_new_identifier) != 0 ||
last_override_level_graphics != setup.override_level_graphics)
{
-#if 0
+#if 1
printf("RELOADING GRAPHICS '%s' -> '%s' ['%s']\n",
artwork.gfx_current_identifier,
gfx_new_identifier,
ListNode *node;
char *filename = getCustomArtworkFilename(basename, artwork_info->type);
+#if 1
+ if (strcmp(basename, "RocksScreen.pcx") == 0)
+ printf("::: got filename '%s'\n", filename);
+#endif
+
if (filename == NULL)
{
int error_mode = ERR_WARN;
This usually means that this artwork does not exist in this artwork set
and a fallback to the existing artwork is done. */
-#if 0
- printf("[artwork '%s' already exists (same list entry)]\n", filename);
+#if 1
+#if 1
+ if (strcmp(basename, "RocksScreen.pcx") == 0)
+#endif
+ printf("[artwork '%s' already exists (same list entry)]\n", filename);
#endif
return;
{
/* 1st try: look for special artwork configured in level series config */
filename = getPath2(getLevelArtworkDir(TREE_TYPE_GRAPHICS_DIR), basename);
+#if 1
+ if (strcmp(basename, "RocksScreen.pcx") == 0)
+ printf("::: check 1: filename '%s'\n", filename);
+#endif
if (fileExists(filename))
return filename;
/* 2nd try: look for special artwork in current level series directory */
filename = getPath3(getCurrentLevelDir(), GRAPHICS_DIRECTORY, basename);
+#if 1
+ if (strcmp(basename, "RocksScreen.pcx") == 0)
+ printf("::: check 2: filename '%s'\n", filename);
+#endif
if (fileExists(filename))
return filename;
/* 3rd try: look for special artwork in configured artwork directory */
filename = getPath2(getSetupArtworkDir(artwork.gfx_current), basename);
+#if 1
+ if (strcmp(basename, "RocksScreen.pcx") == 0)
+ printf("::: check 3: filename '%s'\n", filename);
+#endif
if (fileExists(filename))
return filename;
/* 4th try: look for default artwork in new default artwork directory */
filename = getPath2(getDefaultGraphicsDir(GRAPHICS_SUBDIR), basename);
+#if 1
+ if (strcmp(basename, "RocksScreen.pcx") == 0)
+ printf("::: check 4: filename '%s'\n", filename);
+#endif
if (fileExists(filename))
return filename;
/* 5th try: look for default artwork in old default artwork directory */
filename = getPath2(options.graphics_directory, basename);
+#if 1
+ if (strcmp(basename, "RocksScreen.pcx") == 0)
+ printf("::: check 5: filename '%s'\n", filename);
+#endif
if (fileExists(filename))
return filename;
static void execSetupArtwork()
{
- /* needed if last screen (setup choice) changed graphics, sounds or music */
- ReloadCustomArtwork();
-
setup.graphics_set = artwork.gfx_current->identifier;
setup.sounds_set = artwork.snd_current->identifier;
setup.music_set = artwork.mus_current->identifier;
+ /* needed if last screen (setup choice) changed graphics, sounds or music */
+ ReloadCustomArtwork();
+
/* needed for displaying artwork name instead of artwork identifier */
graphics_set_name = artwork.gfx_current->name;
sounds_set_name = artwork.snd_current->name;