better screen function list selection

This commit is contained in:
Bill Currie 2004-03-02 00:02:09 +00:00
parent 2955fac550
commit d3dfb0ebd1
2 changed files with 26 additions and 20 deletions

View file

@ -78,29 +78,32 @@ static SCR_Func scr_funcs_normal[] = {
static SCR_Func scr_funcs_intermission[] = {
Sbar_IntermissionOverlay,
Con_DrawConsole,
0
};
static SCR_Func scr_funcs_finale[] = {
Sbar_FinaleOverlay,
Con_DrawConsole,
0,
};
static SCR_Func *scr_funcs[] = {
scr_funcs_normal,
scr_funcs_intermission,
scr_funcs_finale,
};
void
CL_UpdateScreen (double realtime)
{
SCR_Func *scr_funcs = scr_funcs_normal;
unsigned index = cl.intermission;
if (index > sizeof (scr_funcs) / sizeof (scr_funcs[0]))
index = 0;
cl_wateralpha = r_wateralpha->value;
if (r_force_fullscreen /*FIXME better test*/ == 1
&& key_dest == key_game) {
scr_funcs = scr_funcs_intermission;
} else if (r_force_fullscreen /*FIXME better test*/ == 2
&& key_dest == key_game) {
scr_funcs = scr_funcs_finale;
}
V_PrepBlend ();
SCR_UpdateScreen (realtime, scr_funcs);
SCR_UpdateScreen (realtime, scr_funcs[index]);
}

View file

@ -84,18 +84,29 @@ static SCR_Func scr_funcs_normal[] = {
static SCR_Func scr_funcs_intermission[] = {
Sbar_IntermissionOverlay,
Con_DrawConsole,
0
};
static SCR_Func scr_funcs_finale[] = {
Sbar_FinaleOverlay,
Con_DrawConsole,
0,
};
static SCR_Func *scr_funcs[] = {
scr_funcs_normal,
scr_funcs_intermission,
scr_funcs_finale,
};
void
CL_UpdateScreen (double realtime)
{
SCR_Func *scr_funcs = scr_funcs_normal;
unsigned index = cl.intermission;
if (index > sizeof (scr_funcs) / sizeof (scr_funcs[0]))
index = 0;
// don't allow cheats in multiplayer
if (r_active) {
@ -105,16 +116,8 @@ CL_UpdateScreen (double realtime)
cl_wateralpha = 1.0;
}
if (r_force_fullscreen /*FIXME better test*/ == 1
&& key_dest == key_game) {
scr_funcs = scr_funcs_intermission;
} else if (r_force_fullscreen /*FIXME better test*/ == 2
&& key_dest == key_game) {
scr_funcs = scr_funcs_finale;
}
V_PrepBlend ();
SCR_UpdateScreen (realtime, scr_funcs);
SCR_UpdateScreen (realtime, scr_funcs[index]);
}
void