-2007-05-07
+2007-08-25
+ * title messages are now also searched in graphics artwork directory;
+ those found in graphics directory have precendence over those found
+ in level directory -- this handles title messages stored in graphics
+ directories as part of the artwork set, just like title images; this
+ makes sense, as corresponding special font definitions for messages
+ are usually defined in the same graphics artwork directory, and also
+ because title images and title messages that are combined in a level
+ set introduction should usually not be separated when the level set
+ is used with a different artwork set (e.g. using "override graphics")
+ * fixed problem with door borders on main screen by first drawing doors
+ and then the corresponding border masks, but not vice versa
+
+2007-08-22
* fixed problem with broken crumbled graphics after level set changes
when using R'n'D custom artwork with level sets using the EMC engine
-#define COMPILE_DATE_STRING "2007-08-22 22:17"
+#define COMPILE_DATE_STRING "2007-08-25 02:34"
char *getLevelSetTitleMessageFilename(int nr, boolean initial)
{
static char *filename = NULL;
+#if 1
+ char *filename_from_artwork;
+#endif
char basename[32];
sprintf(basename, "%s_%d.txt",
(initial ? "titlemessage_initial" : "titlemessage"), nr + 1);
- checked_free(filename);
- filename = getPath2(getCurrentLevelDir(), basename);
+#if 1
+ /* 1st try: look for message file in all relevant graphics directories */
+ if ((filename_from_artwork = getCustomImageFilename(basename)) != NULL)
+ return filename_from_artwork;
+#endif
- if (fileExists(filename))
- return filename;
+#if 1
+ /* forced custom graphics also override messages in level set directory */
+ if (!setup.override_level_graphics)
+#endif
+ {
+ checked_free(filename);
+
+ /* 2nd try: look for message file in current level set directory */
+ filename = getPath2(getCurrentLevelDir(), basename);
+
+ if (fileExists(filename))
+ return filename;
+ }
return NULL;
}
Bitmap *bitmap = graphic_info[graphic].bitmap;
int sort_priority = graphic_info[graphic].sort_priority;
+#if 0
+ /* skip images and messages (fonts!) when using forced custom graphics */
+ if (setup.override_level_graphics && !initial)
+ continue;
+#endif
+
if (bitmap != NULL)
InitializeTitleControlsExt_AddTitleInfo(TRUE, initial, i, sort_priority);
}
char *filename = getLevelSetTitleMessageFilename(i, initial);
int sort_priority = tmi->sort_priority;
+#if 0
+ /* skip images and messages (fonts!) when using forced custom graphics */
+ if (setup.override_level_graphics)
+ continue;
+#endif
+
if (filename != NULL)
InitializeTitleControlsExt_AddTitleInfo(FALSE, initial, i, sort_priority);
}
MapTapeButtons();
MapScreenMenuGadgets(SCREEN_MASK_MAIN);
-#if 1
+#if 0
DrawMaskedBorder(REDRAW_ALL);
#endif
}
#endif
+#if 1
+ DrawMaskedBorder(REDRAW_ALL);
+#endif
+
#if 0
if (redraw_all)
redraw_mask = REDRAW_ALL;
printf("::: NOW FADING %d ... [%d]\n", fade_mode, fade_type);
#endif
+#if 1
+ if (fade_mask == REDRAW_NONE)
+ fade_mask = REDRAW_FIELD;
+#endif
+
if (fade_mask & REDRAW_FIELD)
{
x = REAL_SX;
int base_crumbled = el_act2crm(effective_element, ACTION_DEFAULT);
boolean has_crumbled_graphics = (base_crumbled != base_graphic);
struct GraphicInfo *g = &graphic_info[graphic];
+ struct GraphicInfo *g_crumbled = &graphic_info[crumbled];
int sync_frame;
#if 0
crumbled_src_x, crumbled_src_y);
#endif
-#if 0
+#if 1
+ /* (updating the "crumbled" graphic definitions is probably not really needed,
+ as animations for crumbled graphics can't be longer than one EMC cycle) */
+
*crumbled_src_bitmap = NULL;
*crumbled_src_x = 0;
*crumbled_src_y = 0;
if (has_crumbled_graphics && crumbled != IMG_EMPTY_SPACE)
{
- getGraphicSource(crumbled, frame, crumbled_src_bitmap,
+ int frame_crumbled = getAnimationFrame(g_crumbled->anim_frames,
+ g_crumbled->anim_delay,
+ g_crumbled->anim_mode,
+ g_crumbled->anim_start_frame,
+ sync_frame);
+
+ getGraphicSource(crumbled, frame_crumbled, crumbled_src_bitmap,
crumbled_src_x, crumbled_src_y);
}
#endif