Skip to content

Commit

Permalink
Fixed All games: The automap display was being drawn behind the "Read…
Browse files Browse the repository at this point in the history
…This" helpscreens even though it could not be seen.
  • Loading branch information
danij-deng committed Apr 20, 2010
1 parent 6653380 commit a3ba04a
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 83 deletions.
24 changes: 9 additions & 15 deletions doomsday/plugins/jdoom/src/d_refresh.c
Expand Up @@ -278,8 +278,14 @@ static void rendHUD(int player)
if(IS_CLIENT && (!Get(DD_GAME_READY) || !Get(DD_GOTFRAME)))
return;

if(MN_CurrentMenuHasBackground() && Hu_MenuAlpha() >= 1)
return;

plr = &players[player];

// Draw the automap.
AM_Drawer(player);

// These various HUD's will be drawn unless Doomsday advises not to
if(DD_GetInteger(DD_GAME_DRAW_HUD_HINT))
{
Expand All @@ -304,6 +310,9 @@ static void rendHUD(int player)
}

HU_Drawer(player);

// Map information is shown for a few seconds in the beginning of a map.
R_DrawMapTitle();
}
}

Expand Down Expand Up @@ -368,9 +377,6 @@ void D_Display(int layer)
if(!(P_MobjIsCamera(plr->plr->mo) && Get(DD_PLAYBACK))) // $democam
X_Drawer(player);
}

// Draw the automap.
AM_Drawer(player);
break;
case GS_STARTUP:
DGL_Disable(DGL_TEXTURING);
Expand All @@ -389,18 +395,6 @@ void D_Display2(void)
{
switch(G_GetGameState())
{
case GS_MAP:
if(IS_CLIENT && (!Get(DD_GAME_READY) || !Get(DD_GOTFRAME)))
break;

if(DD_GetInteger(DD_GAME_DRAW_HUD_HINT))
{
// Map information is shown for a few seconds in the
// beginning of a map.
R_DrawMapTitle();
}
break;

case GS_INTERMISSION:
WI_Drawer();
break;
Expand Down
27 changes: 10 additions & 17 deletions doomsday/plugins/jdoom64/src/d_refresh.c
Expand Up @@ -279,12 +279,18 @@ static void rendHUD(int player)
if(IS_CLIENT && (!Get(DD_GAME_READY) || !Get(DD_GOTFRAME)))
return;

if(MN_CurrentMenuHasBackground() && Hu_MenuAlpha() >= 1)
return;

plr = &players[player];

// Draw the automap?
AM_Drawer(player);

// These various HUD's will be drawn unless Doomsday advises not to
if(DD_GetInteger(DD_GAME_DRAW_HUD_HINT))
{
automapid_t map = AM_MapForPlayer(player);
automapid_t map = AM_MapForPlayer(player);

// Draw HUD displays only visible when the automap is open.
if(AM_IsActive(map))
Expand All @@ -306,6 +312,9 @@ static void rendHUD(int player)
}

HU_Drawer(player);

// Level information is shown for a few seconds in the beginning of a level.
R_DrawMapTitle();
}
}

Expand Down Expand Up @@ -371,9 +380,6 @@ void D_Display(int layer)
if(!(P_MobjIsCamera(plr->plr->mo) && Get(DD_PLAYBACK))) // $democam
X_Drawer(player);
}

// Draw the automap?
AM_Drawer(player);
break;
case GS_STARTUP:
DGL_Disable(DGL_TEXTURING);
Expand All @@ -389,19 +395,6 @@ void D_Display2(void)
{
switch(G_GetGameState())
{
case GS_MAP:
if(IS_CLIENT && (!Get(DD_GAME_READY) || !Get(DD_GOTFRAME)))
break;

// These various HUD's will be drawn unless Doomsday advises not to.
if(DD_GetInteger(DD_GAME_DRAW_HUD_HINT))
{
// Level information is shown for a few seconds in the
// beginning of a level.
R_DrawMapTitle();
}
break;

case GS_INTERMISSION:
WI_Drawer();
break;
Expand Down
64 changes: 29 additions & 35 deletions doomsday/plugins/jheretic/src/h_refresh.c
Expand Up @@ -233,21 +233,27 @@ static void rendHUD(int player)
if(IS_CLIENT && (!Get(DD_GAME_READY) || !Get(DD_GOTFRAME)))
return;

if(MN_CurrentMenuHasBackground() && Hu_MenuAlpha() >= 1)
return;

plr = &players[player];

// Draw the automap?
AM_Drawer(player);

// These various HUD's will be drawn unless Doomsday advises not to
if(DD_GetInteger(DD_GAME_DRAW_HUD_HINT))
{
automapid_t map = AM_MapForPlayer(player);
boolean redrawsbar = false;

if((WINDOWHEIGHT != 200))
redrawsbar = true;
automapid_t map = AM_MapForPlayer(player);
boolean redrawsbar = false;

// Draw HUD displays only visible when the automap is open.
if(AM_IsActive(map))
HU_DrawMapCounters();

if((WINDOWHEIGHT != 200))
redrawsbar = true;

// Do we need to render a full status bar at this point?
if(!(AM_IsActive(map) && cfg.automapHudDisplay == 0) &&
!(P_MobjIsCamera(plr->plr->mo) && Get(DD_PLAYBACK)))
Expand All @@ -259,6 +265,24 @@ static void rendHUD(int player)
}

HU_Drawer(player);

// Level information is shown for a few seconds in the beginning of a level.
if(cfg.mapTitle || actualMapTime <= 6 * TICSPERSEC)
{
int x, y;
float alpha = 1;

if(actualMapTime < 35)
alpha = actualMapTime / 35.0f;
if(actualMapTime > 5 * 35)
alpha = 1 - (actualMapTime - 5 * 35) / 35.0f;

x = SCREENWIDTH / 2;
y = 13;
Draw_BeginZoom((1 + cfg.hudScale)/2, x, y);
R_DrawMapTitle(x, y, alpha, GF_FONTB, true);
Draw_EndZoom();
}
}
}

Expand Down Expand Up @@ -324,9 +348,6 @@ void H_Display(int layer)
if(!(P_MobjIsCamera(plr->plr->mo) && Get(DD_PLAYBACK))) // $democam
X_Drawer(player);
}

// Draw the automap?
AM_Drawer(player);
break;
case GS_STARTUP:
DGL_Disable(DGL_TEXTURING);
Expand All @@ -342,33 +363,6 @@ void H_Display2(void)
{
switch(G_GetGameState())
{
case GS_MAP:
if(IS_CLIENT && (!Get(DD_GAME_READY) || !Get(DD_GOTFRAME)))
break;

if(DD_GetInteger(DD_GAME_DRAW_HUD_HINT))
{
// Level information is shown for a few seconds in the
// beginning of a level.
if(cfg.mapTitle || actualMapTime <= 6 * TICSPERSEC)
{
int x, y;
float alpha = 1;

if(actualMapTime < 35)
alpha = actualMapTime / 35.0f;
if(actualMapTime > 5 * 35)
alpha = 1 - (actualMapTime - 5 * 35) / 35.0f;

x = SCREENWIDTH / 2;
y = 13;
Draw_BeginZoom((1 + cfg.hudScale)/2, x, y);
R_DrawMapTitle(x, y, alpha, GF_FONTB, true);
Draw_EndZoom();
}
}
break;

case GS_INTERMISSION:
IN_Drawer();
break;
Expand Down
26 changes: 10 additions & 16 deletions doomsday/plugins/jhexen/src/hrefresh.c
Expand Up @@ -225,12 +225,18 @@ static void rendHUD(int player)
if(IS_CLIENT && (!Get(DD_GAME_READY) || !Get(DD_GOTFRAME)))
return;

if(MN_CurrentMenuHasBackground() && Hu_MenuAlpha() >= 1)
return;

plr = &players[player];

// Draw the automap.
AM_Drawer(player);

// These various HUD's will be drawn unless Doomsday advises not to
if(DD_GetInteger(DD_GAME_DRAW_HUD_HINT))
{
automapid_t map = AM_MapForPlayer(player);
automapid_t map = AM_MapForPlayer(player);

// Draw HUD displays only visible when the automap is open.
if(AM_IsActive(map))
Expand All @@ -252,6 +258,9 @@ static void rendHUD(int player)
}

HU_Drawer(player);

// Map information is shown for a few seconds in the beginning of a map.
R_DrawMapTitle();
}
}

Expand Down Expand Up @@ -316,9 +325,6 @@ void G_Display(int layer)
if(!(P_MobjIsCamera(plr->plr->mo) && Get(DD_PLAYBACK))) // $democam
X_Drawer(player);
}

// Draw the automap.
AM_Drawer(player);
break;
case GS_STARTUP:
DGL_Disable(DGL_TEXTURING);
Expand All @@ -334,18 +340,6 @@ void G_Display2(void)
{
switch(G_GetGameState())
{
case GS_MAP:
if(IS_CLIENT && (!Get(DD_GAME_READY) || !Get(DD_GOTFRAME)))
break;

if(DD_GetInteger(DD_GAME_DRAW_HUD_HINT))
{
// Map information is shown for a few seconds in the
// beginning of a map.
R_DrawMapTitle();
}
break;

case GS_INTERMISSION:
IN_Drawer();
break;
Expand Down

0 comments on commit a3ba04a

Please sign in to comment.