mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-29 07:41:47 +00:00
Hide console scaling behin gl_consolescale
With this change it's possible to scale the HUD but not the console. And vice versa.
This commit is contained in:
parent
074891a8a2
commit
869ce24922
4 changed files with 48 additions and 7 deletions
9
README
9
README
|
@ -530,8 +530,13 @@ the most common questions are answered.
|
|||
followd by a vid_restart. Please note that very old graphic cards may not
|
||||
support antialiasing at all.
|
||||
|
||||
- If you want to scale the HUD (e.g. for high resoltutions), set the
|
||||
gl_hudscale cvar to a value > 1 (2.0 works well).
|
||||
- If you want to scale the HUD (e.g. for high resolutions), set the
|
||||
gl_hudscale cvar to -1. To specify the scale factor by hand, set the
|
||||
cvar to a value > 0.
|
||||
|
||||
- If you want to scale the console (e.g. for high resolutions), set the
|
||||
gl_consolescale cvar to -1. To specify the scale factor by hand, set the
|
||||
cvar to a value > 0.
|
||||
|
||||
5.2 Input
|
||||
---------
|
||||
|
|
|
@ -487,7 +487,7 @@ Con_DrawInput(void)
|
|||
return;
|
||||
}
|
||||
|
||||
scale = SCR_GetHUDScale();
|
||||
scale = SCR_GetConsoleScale();
|
||||
text = key_lines[edit_line];
|
||||
|
||||
/* add the cursor frame */
|
||||
|
@ -529,7 +529,7 @@ Con_DrawNotify(void)
|
|||
float scale;
|
||||
|
||||
v = 0;
|
||||
scale = SCR_GetHUDScale();
|
||||
scale = SCR_GetConsoleScale();
|
||||
|
||||
for (i = con.current - NUM_CON_TIMES + 1; i <= con.current; i++)
|
||||
{
|
||||
|
@ -621,7 +621,7 @@ Con_DrawConsole(float frac)
|
|||
time_t t;
|
||||
struct tm *today;
|
||||
|
||||
scale = SCR_GetHUDScale();
|
||||
scale = SCR_GetConsoleScale();
|
||||
lines = viddef.height * frac;
|
||||
|
||||
if (lines <= 0)
|
||||
|
|
|
@ -51,6 +51,7 @@ cvar_t *scr_graphshift;
|
|||
cvar_t *scr_drawall;
|
||||
|
||||
cvar_t *gl_hudscale; /* named for consistency with R1Q2 */
|
||||
cvar_t *gl_consolescale;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -257,7 +258,7 @@ SCR_DrawCenterString(void)
|
|||
|
||||
scr_erase_center = 0;
|
||||
start = scr_centerstring;
|
||||
scale = SCR_GetHUDScale();
|
||||
scale = SCR_GetConsoleScale();
|
||||
|
||||
if (scr_center_lines <= 4)
|
||||
{
|
||||
|
@ -431,6 +432,7 @@ SCR_Init(void)
|
|||
scr_graphshift = Cvar_Get("graphshift", "0", 0);
|
||||
scr_drawall = Cvar_Get("scr_drawall", "0", 0);
|
||||
gl_hudscale = Cvar_Get("gl_hudscale", "1", CVAR_ARCHIVE);
|
||||
gl_consolescale = Cvar_Get("gl_consolescale", "1", CVAR_ARCHIVE);
|
||||
|
||||
/* register our commands */
|
||||
Cmd_AddCommand("timerefresh", SCR_TimeRefresh_f);
|
||||
|
@ -1581,7 +1583,7 @@ SCR_DrawCrosshair(void)
|
|||
}
|
||||
|
||||
float
|
||||
SCR_GetHUDScale(void)
|
||||
SCR_GetScale(void)
|
||||
{
|
||||
float scale;
|
||||
|
||||
|
@ -1609,3 +1611,36 @@ SCR_GetHUDScale(void)
|
|||
return scale;
|
||||
}
|
||||
|
||||
float
|
||||
SCR_GetHUDScale(void)
|
||||
{
|
||||
float scale;
|
||||
|
||||
if (gl_hudscale->value < 0)
|
||||
{
|
||||
scale = SCR_GetScale();
|
||||
}
|
||||
else
|
||||
{
|
||||
scale = gl_hudscale->value;
|
||||
}
|
||||
|
||||
return scale;
|
||||
}
|
||||
|
||||
float
|
||||
SCR_GetConsoleScale(void)
|
||||
{
|
||||
float scale;
|
||||
|
||||
if (gl_consolescale->value < 0)
|
||||
{
|
||||
scale = SCR_GetScale();
|
||||
}
|
||||
else
|
||||
{
|
||||
scale = gl_consolescale->value;
|
||||
}
|
||||
|
||||
return scale;
|
||||
}
|
||||
|
|
|
@ -68,5 +68,6 @@ void SCR_FinishCinematic(void);
|
|||
void SCR_DrawCrosshair(void);
|
||||
|
||||
float SCR_GetHUDScale(void);
|
||||
float SCR_GetConsoleScale(void);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue