mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- integrate hud_althud into hud_size
This makes it easier to use and avoids rendering a fullscreen hud on a screen size with view border.
This commit is contained in:
parent
914bec7d65
commit
562c1a18c8
10 changed files with 26 additions and 14 deletions
|
@ -45,7 +45,7 @@
|
|||
#include "gamecontrol.h"
|
||||
#include "version.h"
|
||||
|
||||
#define LASTRUNVERSION "2"
|
||||
#define LASTRUNVERSION "3"
|
||||
|
||||
#if !defined _MSC_VER && !defined __APPLE__
|
||||
#include "i_system.h" // for SHARE_DIR
|
||||
|
@ -297,6 +297,17 @@ void FGameConfigFile::DoGlobalSetup ()
|
|||
UCVarValue v = var->GetGenericRep(CVAR_Float);
|
||||
v.Float /= 4.f;
|
||||
if (v.Float < 1.f) v.Float = 1.f;
|
||||
var->SetGenericRep(v, CVAR_Float);
|
||||
}
|
||||
}
|
||||
if (last < 3)
|
||||
{
|
||||
auto var = FindCVar("hud_size", NULL);
|
||||
if (var != NULL)
|
||||
{
|
||||
UCVarValue v = var->GetGenericRep(CVAR_Int);
|
||||
if(v.Int == Hud_Althud) v.Int = Hud_Nothing;
|
||||
var->SetGenericRep(v, CVAR_Int);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -135,7 +135,8 @@ enum EHudSize
|
|||
Hud_Stbar,
|
||||
Hud_StbarOverlay,
|
||||
Hud_Mini,
|
||||
Hud_full,
|
||||
Hud_Full,
|
||||
Hud_Althud,
|
||||
Hud_Nothing,
|
||||
Hud_MAX
|
||||
};
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
|
||||
CVAR(Int,hud_althudscale, 0, CVAR_ARCHIVE) // Scale the hud to 640x400?
|
||||
CVAR(Bool,hud_althud, false, CVAR_ARCHIVE) // Enable/Disable the alternate HUD
|
||||
//CVAR(Bool,hud_althud, false, CVAR_ARCHIVE) // Enable/Disable the alternate HUD
|
||||
|
||||
CVAR(Int, am_showtotaltime, 0, CVAR_ARCHIVE); // Show time on automap
|
||||
CVAR(Int, am_showtime, 0, CVAR_ARCHIVE); // Show time on automap
|
||||
|
|
|
@ -73,7 +73,6 @@ EXTERN_CVAR (Bool, am_showtotaltime)
|
|||
EXTERN_CVAR (Bool, noisedebug)
|
||||
EXTERN_CVAR(Bool, vid_fps)
|
||||
EXTERN_CVAR(Bool, inter_subtitles)
|
||||
EXTERN_CVAR(Bool, hud_althud)
|
||||
|
||||
extern int setblocks;
|
||||
|
||||
|
@ -186,7 +185,7 @@ void DrawAltHUD(SummaryInfo* info);
|
|||
|
||||
void UpdateStatusBar(SummaryInfo* info)
|
||||
{
|
||||
if (hud_althud)
|
||||
if (hud_size == Hud_Althud)
|
||||
{
|
||||
DrawAltHUD(info);
|
||||
return;
|
||||
|
|
|
@ -725,7 +725,7 @@ class BloodStatusBar : RazeStatusBar
|
|||
nPalette = Translation.MakeID(Translation_Remap, nPalette);
|
||||
}
|
||||
|
||||
if (hud_size == Hud_full)
|
||||
if (hud_size == Hud_Full)
|
||||
{
|
||||
y = DrawHUD2(pPlayer);
|
||||
}
|
||||
|
|
|
@ -473,7 +473,7 @@ class DukeStatusBar : DukeCommonStatusBar
|
|||
let p = Duke.GetViewPlayer();
|
||||
if (hud_size >= Hud_Mini)
|
||||
{
|
||||
DrawHud(p, hud_size == Hud_Nothing ? 0 : hud_size == Hud_full ? 1 : 2, info);
|
||||
DrawHud(p, hud_size == Hud_Nothing ? 0 : hud_size == Hud_Full ? 1 : 2, info);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -439,7 +439,7 @@ class RedneckStatusBar : DukeCommonStatusBar
|
|||
let p = Duke.GetViewPlayer();
|
||||
if (hud_size >= Hud_Mini)
|
||||
{
|
||||
DrawHud(p, hud_size == Hud_Nothing ? 0 : hud_size == Hud_full ? 1 : 2, info);
|
||||
DrawHud(p, hud_size == Hud_Nothing ? 0 : hud_size == Hud_Full ? 1 : 2, info);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -389,7 +389,7 @@ class ExhumedStatusBar : RazeStatusBar
|
|||
DrawImage("hud_l", (0, 0), DI_ITEM_LEFT_BOTTOM | DI_SCREEN_LEFT_BOTTOM);
|
||||
DrawImage("hud_r", (0, 0), DI_ITEM_RIGHT_BOTTOM | DI_SCREEN_RIGHT_BOTTOM);
|
||||
}
|
||||
else if (hud_size == Hud_full)
|
||||
else if (hud_size == Hud_Full)
|
||||
{
|
||||
DrawHUD2(pp);
|
||||
return;
|
||||
|
@ -436,7 +436,7 @@ class ExhumedStatusBar : RazeStatusBar
|
|||
// draw compass
|
||||
if (hud_size <= Hud_StbarOverlay) DrawStatusSequence(35, ((pp.GetAngle() + 128) & Raze.kAngleMask) >> 8, 0, 0.5, true);
|
||||
|
||||
//if (hud_size < Hud_full)
|
||||
//if (hud_size < Hud_Full)
|
||||
{
|
||||
// draw ammo count
|
||||
DrawStatusSequence(44, nDigit[2], 0, 0.5, true);
|
||||
|
@ -803,11 +803,11 @@ class ExhumedStatusBar : RazeStatusBar
|
|||
|
||||
override void UpdateStatusBar(SummaryInfo info)
|
||||
{
|
||||
if (hud_size <= Hud_full)
|
||||
if (hud_size <= Hud_Full)
|
||||
{
|
||||
DrawStatus(Exhumed.GetViewPlayer());
|
||||
}
|
||||
DoLevelStats(hud_size == Hud_Nothing ? 0 : hud_size == Hud_full ? 20 : 45, info);
|
||||
DoLevelStats(hud_size == Hud_Nothing ? 0 : hud_size == Hud_Full ? 20 : 45, info);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -931,7 +931,7 @@ class SWStatusBar : RazeStatusBar
|
|||
inv_y = -28;
|
||||
DoLevelStats(2, info);
|
||||
}
|
||||
else if (hud_size == Hud_full)
|
||||
else if (hud_size == Hud_Full)
|
||||
{
|
||||
align = DI_SCREEN_CENTER_BOTTOM;
|
||||
inv_x = -80;
|
||||
|
|
|
@ -52,7 +52,8 @@ enum EHudSize
|
|||
Hud_Stbar,
|
||||
Hud_StbarOverlay,
|
||||
Hud_Mini,
|
||||
Hud_full,
|
||||
Hud_Full,
|
||||
Hud_Althud,
|
||||
Hud_Nothing,
|
||||
Hud_MAX
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue