From: Holger Schemel Date: Sat, 25 Aug 2007 07:06:57 +0000 (+0200) Subject: rnd-20070825-1-src X-Git-Tag: 3.2.4^2~18 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=43d8239a719759a411bc31e0330e5e1cb353c32e rnd-20070825-1-src --- diff --git a/ChangeLog b/ChangeLog index 5969c513..737d3f62 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,17 @@ -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 diff --git a/src/conftime.h b/src/conftime.h index efc5d524..b7a763cf 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2007-08-22 22:17" +#define COMPILE_DATE_STRING "2007-08-25 02:34" diff --git a/src/libgame/setup.c b/src/libgame/setup.c index 3ff14a1c..39165b06 100644 --- a/src/libgame/setup.c +++ b/src/libgame/setup.c @@ -501,16 +501,33 @@ char *getLevelSetInfoFilename() 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; } diff --git a/src/screens.c b/src/screens.c index 2a7db9c9..f1117601 100644 --- a/src/screens.c +++ b/src/screens.c @@ -747,6 +747,12 @@ static void InitializeTitleControls_CheckTitleInfo(boolean initial) 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); } @@ -757,6 +763,12 @@ static void InitializeTitleControls_CheckTitleInfo(boolean initial) 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); } @@ -1411,7 +1423,7 @@ void DrawMainMenuExt(int redraw_mask, boolean do_fading) MapTapeButtons(); MapScreenMenuGadgets(SCREEN_MASK_MAIN); -#if 1 +#if 0 DrawMaskedBorder(REDRAW_ALL); #endif @@ -1426,6 +1438,10 @@ void DrawMainMenuExt(int redraw_mask, boolean do_fading) } #endif +#if 1 + DrawMaskedBorder(REDRAW_ALL); +#endif + #if 0 if (redraw_all) redraw_mask = REDRAW_ALL; diff --git a/src/tools.c b/src/tools.c index f593aeda..e469a501 100644 --- a/src/tools.c +++ b/src/tools.c @@ -535,6 +535,11 @@ static void FadeExt(int fade_mask, int fade_mode, int fade_type) 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; @@ -6067,6 +6072,7 @@ void getGraphicSourceObjectExt_EM(int tile, int frame_em, 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 @@ -6112,14 +6118,23 @@ void getGraphicSourceObjectExt_EM(int tile, int frame_em, 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