From: Holger Schemel Date: Tue, 20 Mar 2007 00:37:39 +0000 (+0100) Subject: rnd-20070320-2-src X-Git-Tag: 3.2.4^2~61 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=2f8bd98e428f73379a9173ccc9f7d03c885d641a;p=rocksndiamonds.git rnd-20070320-2-src --- diff --git a/src/conf_gfx.c b/src/conf_gfx.c index cb7bcc17..5e26e68f 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -5221,15 +5221,12 @@ struct ConfigInfo image_config[] = { "border.draw_masked.PLAYING", "false" }, { "border.draw_masked.DOOR", "false" }, -#if 0 - { "[title].fade_delay", "500" }, - { "[title].post_delay", "250" }, - { "[title].auto_delay", "-1" }, -#endif - - { "menu.fade_delay", "250" }, - { "menu.post_delay", "125" }, - { "menu.auto_delay", "-1" }, + { "menu.navigation.anim_mode", "none" }, + { "menu.navigation.fade_delay", "250" }, + { "menu.navigation.post_delay", "125" }, + { "menu.destination.anim_mode", "fade" }, + { "menu.destination.fade_delay", "250" }, + { "menu.destination.post_delay", "125" }, { "menu.draw_xoffset", "0" }, { "menu.draw_yoffset", "0" }, diff --git a/src/conf_var.c b/src/conf_var.c index c51af90a..bd0662df 100644 --- a/src/conf_var.c +++ b/src/conf_var.c @@ -961,28 +961,28 @@ struct TokenIntPtrInfo image_config_vars[] = &border.draw_masked[GFX_SPECIAL_ARG_DOOR] }, { - "[title].fade_delay", - &title_default.fade_delay + "menu.navigation.anim_mode", + &menu.navigation.anim_mode }, { - "[title].post_delay", - &title_default.post_delay + "menu.navigation.fade_delay", + &menu.navigation.fade_delay }, { - "[title].auto_delay", - &title_default.auto_delay + "menu.navigation.post_delay", + &menu.navigation.post_delay }, { - "menu.fade_delay", - &menu.fade_delay + "menu.destination.anim_mode", + &menu.destination.anim_mode }, { - "menu.post_delay", - &menu.post_delay + "menu.destination.fade_delay", + &menu.destination.fade_delay }, { - "menu.auto_delay", - &menu.auto_delay + "menu.destination.post_delay", + &menu.destination.post_delay }, { "menu.draw_xoffset", diff --git a/src/conftime.h b/src/conftime.h index 7c057e9d..4f9b213b 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2007-03-20 00:07" +#define COMPILE_DATE_STRING "2007-03-20 01:35" diff --git a/src/main.c b/src/main.c index 7199ab7d..5174a162 100644 --- a/src/main.c +++ b/src/main.c @@ -106,9 +106,9 @@ struct SetupInfo setup; struct GameInfo game; struct GlobalInfo global; struct BorderInfo border; -struct TitleInfo title_initial_default; -struct TitleInfo title_default; -struct TitleInfo title; +struct TitleFadingInfo fading; +struct TitleFadingInfo title_initial_default; +struct TitleFadingInfo title_default; struct TitleMessageInfo titlemessage_initial_default; struct TitleMessageInfo titlemessage_initial[MAX_NUM_TITLE_MESSAGES]; struct TitleMessageInfo titlemessage_default; diff --git a/src/main.h b/src/main.h index eb8ebd31..11ee9c0f 100644 --- a/src/main.h +++ b/src/main.h @@ -2047,7 +2047,7 @@ struct MenuMainInfo struct MenuMainInputInfo input; }; -struct TitleInfo +struct TitleFadingInfo { int anim_mode; int fade_delay; @@ -2084,9 +2084,8 @@ struct MenuInfo int list_size[NUM_SPECIAL_GFX_ARGS]; - int fade_delay; - int post_delay; - int auto_delay; + struct TitleFadingInfo navigation; + struct TitleFadingInfo destination; int sound[NUM_SPECIAL_GFX_ARGS]; int music[NUM_SPECIAL_GFX_ARGS]; @@ -2686,9 +2685,9 @@ extern struct HiScore highscore[]; extern struct TapeInfo tape; extern struct GlobalInfo global; extern struct BorderInfo border; -extern struct TitleInfo title_initial_default; -extern struct TitleInfo title_default; -extern struct TitleInfo title; +extern struct TitleFadingInfo fading; +extern struct TitleFadingInfo title_initial_default; +extern struct TitleFadingInfo title_default; extern struct TitleMessageInfo titlemessage_initial_default; extern struct TitleMessageInfo titlemessage_initial[]; extern struct TitleMessageInfo titlemessage_default; diff --git a/src/screens.c b/src/screens.c index 6f994a53..66544991 100644 --- a/src/screens.c +++ b/src/screens.c @@ -599,12 +599,12 @@ static int getTitleMusic(struct TitleControlInfo *tci) return MUS_UNDEFINED; } -static struct TitleInfo getTitleFading(struct TitleControlInfo *tci) +static struct TitleFadingInfo getTitleFading(struct TitleControlInfo *tci) { boolean is_image = tci->is_image; int initial = tci->initial; int nr = tci->local_nr; - struct TitleInfo ti; + struct TitleFadingInfo ti; if (is_image) { @@ -1275,7 +1275,7 @@ void DrawMainMenuExt(int redraw_mask, boolean do_fading) #if 1 if (levelset_has_changed) - title = title_default; + fading = title_default; #endif #if 1 @@ -1411,7 +1411,7 @@ void DrawMainMenuExt(int redraw_mask, boolean do_fading) #if 1 if (!do_fading) BackToFront(); - else if (title.anim_mode == ANIM_CROSSFADE) + else if (fading.anim_mode == ANIM_CROSSFADE) FadeCross(redraw_mask); else FadeIn(redraw_mask); @@ -1423,7 +1423,9 @@ void DrawMainMenuExt(int redraw_mask, boolean do_fading) #endif #if 1 - title = title_default; + fading = menu.navigation; +#else + fading = title_default; #endif SetMouseCursor(CURSOR_DEFAULT); @@ -1489,11 +1491,15 @@ void HandleTitleScreen(int mx, int my, int dx, int dy, int button) #endif #endif struct TitleControlInfo *tci; - struct TitleInfo title_fading_next; + struct TitleFadingInfo fading_next; int sound, music; if (button == MB_MENU_INITIALIZE) { +#if 1 + boolean use_cross_fading = (fading.anim_mode == ANIM_CROSSFADE); +#endif + #if 0 int last_game_status = game_status; /* save current game status */ #endif @@ -1518,15 +1524,22 @@ void HandleTitleScreen(int mx, int my, int dx, int dy, int button) "No title screen for this level set."); /* use default settings for fading, but always disable auto delay */ - title = title_default; - title.auto_delay = -1; + fading = title_default; + fading.auto_delay = -1; return; } FadeSoundsAndMusic(); +#if 1 + if (use_cross_fading) + FadeCrossSaveBackbuffer(); + else + FadeOut(REDRAW_ALL); +#else FadeOut(REDRAW_ALL); +#endif } if (tci->is_image) @@ -1534,7 +1547,7 @@ void HandleTitleScreen(int mx, int my, int dx, int dy, int button) else DrawTitleScreenMessage(tci->local_nr, tci->initial); - title = getTitleFading(tci); + fading = getTitleFading(tci); #if 1 sound = getTitleSound(tci); @@ -1551,14 +1564,21 @@ void HandleTitleScreen(int mx, int my, int dx, int dy, int button) SetMouseCursor(CURSOR_NONE); +#if 1 + if (use_cross_fading) + FadeCross(REDRAW_ALL); + else + FadeIn(REDRAW_ALL); +#else FadeIn(REDRAW_ALL); +#endif DelayReached(&title_delay, 0); /* reset delay counter */ return; } - if (title.auto_delay > -1 && DelayReached(&title_delay, title.auto_delay)) + if (fading.auto_delay > -1 && DelayReached(&title_delay, fading.auto_delay)) button = MB_MENU_CHOICE; if (button == MB_MENU_LEAVE) @@ -1569,7 +1589,7 @@ void HandleTitleScreen(int mx, int my, int dx, int dy, int button) else if (button == MB_MENU_CHOICE) { #if 1 - boolean use_cross_fading = (title.anim_mode == ANIM_CROSSFADE); + boolean use_cross_fading = (fading.anim_mode == ANIM_CROSSFADE); #endif if (game_status == GAME_MODE_INFO && num_title_screens == 0) @@ -1589,7 +1609,7 @@ void HandleTitleScreen(int mx, int my, int dx, int dy, int button) { #if 1 #if 0 - boolean use_cross_fading = (title.anim_mode == ANIM_CROSSFADE); + boolean use_cross_fading = (fading.anim_mode == ANIM_CROSSFADE); #endif #else int anim_mode; @@ -1624,7 +1644,7 @@ void HandleTitleScreen(int mx, int my, int dx, int dy, int button) else DrawTitleScreenMessage(tci->local_nr, tci->initial); - title_fading_next = getTitleFading(tci); + fading_next = getTitleFading(tci); #if 1 sound = getTitleSound(tci); @@ -1640,15 +1660,15 @@ void HandleTitleScreen(int mx, int my, int dx, int dy, int button) #endif /* last screen already faded out, next screen has no animation */ - if (!use_cross_fading && title_fading_next.anim_mode == ANIM_NONE) - title = title_fading_next; + if (!use_cross_fading && fading_next.anim_mode == ANIM_NONE) + fading = fading_next; if (use_cross_fading) FadeCross(REDRAW_ALL); else FadeIn(REDRAW_ALL); - title = title_fading_next; + fading = fading_next; DelayReached(&title_delay, 0); /* reset delay counter */ } @@ -1659,7 +1679,7 @@ void HandleTitleScreen(int mx, int my, int dx, int dy, int button) #if 1 { #if 0 - boolean use_cross_fading = (title.anim_mode == ANIM_CROSSFADE); + boolean use_cross_fading = (fading.anim_mode == ANIM_CROSSFADE); #endif if (use_cross_fading) @@ -2142,7 +2162,7 @@ static void DrawInfoScreen_Main(int redraw_mask, boolean do_fading) #if 1 if (!do_fading) BackToFront(); - else if (title.anim_mode == ANIM_CROSSFADE) + else if (fading.anim_mode == ANIM_CROSSFADE) FadeCross(redraw_mask); else FadeIn(redraw_mask); @@ -3294,6 +3314,8 @@ void DrawAndFadeInInfoScreen(int redraw_mask) void DrawInfoScreen() { + fading = menu.destination; + DrawInfoScreenExt(REDRAW_ALL, FALSE); } diff --git a/src/tools.c b/src/tools.c index c1509c1d..f21f2329 100644 --- a/src/tools.c +++ b/src/tools.c @@ -533,8 +533,8 @@ void FadeExt(int fade_mask, int fade_mode) width = FULL_SXSIZE; height = FULL_SYSIZE; - fade_delay = menu.fade_delay; - post_delay = (fade_mode == FADE_MODE_FADE_OUT ? menu.post_delay : 0); + fade_delay = fading.fade_delay; + post_delay = (fade_mode == FADE_MODE_FADE_OUT ? fading.post_delay : 0); draw_border_function = DrawMaskedBorder_FIELD; } @@ -545,8 +545,8 @@ void FadeExt(int fade_mask, int fade_mode) width = WIN_XSIZE; height = WIN_YSIZE; - fade_delay = title.fade_delay; - post_delay = (fade_mode == FADE_MODE_FADE_OUT ? title.post_delay : 0); + fade_delay = fading.fade_delay; + post_delay = (fade_mode == FADE_MODE_FADE_OUT ? fading.post_delay : 0); } redraw_mask |= fade_mask;