added vid_conautoscale which allows vid_conheight/vid_conwiidth to be updated based on scale of current resolution, updated vc2005 project yet again
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2141 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
d0834bffc2
commit
1785c0bfc5
4 changed files with 46 additions and 18 deletions
|
@ -118,6 +118,7 @@ cvar_t gl_nocolors = SCVAR("gl_nocolors","0");
|
||||||
cvar_t gl_load24bit = SCVARF("gl_load24bit", "1", CVAR_ARCHIVE);
|
cvar_t gl_load24bit = SCVARF("gl_load24bit", "1", CVAR_ARCHIVE);
|
||||||
cvar_t vid_conwidth = SCVARF("vid_conwidth", "640", CVAR_ARCHIVE);
|
cvar_t vid_conwidth = SCVARF("vid_conwidth", "640", CVAR_ARCHIVE);
|
||||||
cvar_t vid_conheight = SCVARF("vid_conheight", "480", CVAR_ARCHIVE);
|
cvar_t vid_conheight = SCVARF("vid_conheight", "480", CVAR_ARCHIVE);
|
||||||
|
cvar_t vid_conautoscale = SCVARF("vid_conautoscale", "0", CVAR_ARCHIVE);
|
||||||
cvar_t gl_nobind = SCVAR("gl_nobind", "0");
|
cvar_t gl_nobind = SCVAR("gl_nobind", "0");
|
||||||
cvar_t gl_max_size = SCVAR("gl_max_size", "1024");
|
cvar_t gl_max_size = SCVAR("gl_max_size", "1024");
|
||||||
cvar_t gl_picmip = SCVAR("gl_picmip", "0");
|
cvar_t gl_picmip = SCVAR("gl_picmip", "0");
|
||||||
|
@ -301,8 +302,6 @@ void GLRenderer_Init(void)
|
||||||
Cvar_Register (&gl_max_size, GLRENDEREROPTIONS);
|
Cvar_Register (&gl_max_size, GLRENDEREROPTIONS);
|
||||||
Cvar_Register (&gl_maxdist, GLRENDEREROPTIONS);
|
Cvar_Register (&gl_maxdist, GLRENDEREROPTIONS);
|
||||||
Cvar_Register (&gl_mindist, GLRENDEREROPTIONS);
|
Cvar_Register (&gl_mindist, GLRENDEREROPTIONS);
|
||||||
Cvar_Register (&vid_conwidth, GLRENDEREROPTIONS);
|
|
||||||
Cvar_Register (&vid_conheight, GLRENDEREROPTIONS);
|
|
||||||
Cvar_Register (&vid_multisample, GLRENDEREROPTIONS);
|
Cvar_Register (&vid_multisample, GLRENDEREROPTIONS);
|
||||||
|
|
||||||
Cvar_Register (&gl_fontedgeclamp, GRAPHICALNICETIES);
|
Cvar_Register (&gl_fontedgeclamp, GRAPHICALNICETIES);
|
||||||
|
@ -478,6 +477,10 @@ void Renderer_Init(void)
|
||||||
// Cvar_Register (&vid_stretch, VIDCOMMANDGROUP);
|
// Cvar_Register (&vid_stretch, VIDCOMMANDGROUP);
|
||||||
Cvar_Register (&vid_bpp, VIDCOMMANDGROUP);
|
Cvar_Register (&vid_bpp, VIDCOMMANDGROUP);
|
||||||
|
|
||||||
|
Cvar_Register (&vid_conwidth, VIDCOMMANDGROUP);
|
||||||
|
Cvar_Register (&vid_conheight, VIDCOMMANDGROUP);
|
||||||
|
Cvar_Register (&vid_conautoscale, VIDCOMMANDGROUP);
|
||||||
|
|
||||||
Cvar_Register (&vid_allow_modex, VIDCOMMANDGROUP);
|
Cvar_Register (&vid_allow_modex, VIDCOMMANDGROUP);
|
||||||
|
|
||||||
Cvar_Register (&vid_width, VIDCOMMANDGROUP);
|
Cvar_Register (&vid_width, VIDCOMMANDGROUP);
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
<Configurations>
|
<Configurations>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug|Win32"
|
Name="Debug|Win32"
|
||||||
OutputDirectory=".\Debug"
|
OutputDirectory="..\gas2masm\Debug"
|
||||||
IntermediateDirectory=".\Debug"
|
IntermediateDirectory="..\gas2masm\Debug"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
|
||||||
UseOfMFC="0"
|
UseOfMFC="0"
|
||||||
|
@ -45,10 +45,10 @@
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
RuntimeLibrary="1"
|
RuntimeLibrary="1"
|
||||||
PrecompiledHeaderFile=".\Debug/gas2masm.pch"
|
PrecompiledHeaderFile="..\gas2masm\Debug\gas2masm.pch"
|
||||||
AssemblerListingLocation=".\Debug/"
|
AssemblerListingLocation="..\gas2masm\Debug\"
|
||||||
ObjectFile=".\Debug/"
|
ObjectFile="..\gas2masm\Debug\"
|
||||||
ProgramDataBaseFileName=".\Debug/"
|
ProgramDataBaseFileName="..\gas2masm\Debug\"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
DebugInformationFormat="4"
|
DebugInformationFormat="4"
|
||||||
|
@ -66,11 +66,11 @@
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
OutputFile=".\Debug/gas2masm.exe"
|
OutputFile="..\gas2masm\Debug\gas2masm.exe"
|
||||||
LinkIncremental="2"
|
LinkIncremental="2"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
ProgramDatabaseFile=".\Debug/gas2masm.pdb"
|
ProgramDatabaseFile="..\gas2masm\Debug\gas2masm.pdb"
|
||||||
SubSystem="1"
|
SubSystem="1"
|
||||||
TargetMachine="1"
|
TargetMachine="1"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -3755,6 +3755,7 @@ void GL_BuildLightmaps (void)
|
||||||
else
|
else
|
||||||
gl_lightmap_format = GL_LUMINANCE;
|
gl_lightmap_format = GL_LUMINANCE;
|
||||||
|
|
||||||
|
/*
|
||||||
if (COM_CheckParm ("-lm_1"))
|
if (COM_CheckParm ("-lm_1"))
|
||||||
gl_lightmap_format = GL_LUMINANCE;
|
gl_lightmap_format = GL_LUMINANCE;
|
||||||
if (COM_CheckParm ("-lm_a"))
|
if (COM_CheckParm ("-lm_a"))
|
||||||
|
@ -3765,7 +3766,7 @@ void GL_BuildLightmaps (void)
|
||||||
gl_lightmap_format = GL_RGB;
|
gl_lightmap_format = GL_RGB;
|
||||||
if (COM_CheckParm ("-lm_4"))
|
if (COM_CheckParm ("-lm_4"))
|
||||||
gl_lightmap_format = GL_RGBA;
|
gl_lightmap_format = GL_RGBA;
|
||||||
/* if (*gl_lightmapmode.string)
|
if (*gl_lightmapmode.string)
|
||||||
{
|
{
|
||||||
switch(*gl_lightmapmode.string)
|
switch(*gl_lightmapmode.string)
|
||||||
{
|
{
|
||||||
|
|
|
@ -131,7 +131,7 @@ needs almost the entire 256k of stack space!
|
||||||
|
|
||||||
void GLSCR_UpdateScreen (void)
|
void GLSCR_UpdateScreen (void)
|
||||||
{
|
{
|
||||||
extern cvar_t vid_conwidth, vid_conheight, gl_texturemode;
|
extern cvar_t vid_conwidth, vid_conheight, gl_texturemode, vid_conautoscale;
|
||||||
int uimenu;
|
int uimenu;
|
||||||
#ifdef TEXTEDITOR
|
#ifdef TEXTEDITOR
|
||||||
extern qboolean editormodal;
|
extern qboolean editormodal;
|
||||||
|
@ -145,16 +145,40 @@ void GLSCR_UpdateScreen (void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (vid_conautoscale.modified)
|
||||||
|
{
|
||||||
|
float xratio, yratio = 0;
|
||||||
|
|
||||||
|
xratio = vid_conautoscale.value;
|
||||||
|
if (xratio > 0)
|
||||||
|
{
|
||||||
|
char *s = strchr(vid_conautoscale.string, ' ');
|
||||||
|
if (s)
|
||||||
|
yratio = atof(s + 1);
|
||||||
|
|
||||||
|
if (yratio <= 0)
|
||||||
|
yratio = xratio;
|
||||||
|
|
||||||
|
xratio = 1 / xratio;
|
||||||
|
yratio = 1 / yratio;
|
||||||
|
|
||||||
|
Cvar_SetValue(&vid_conwidth, glwidth * xratio);
|
||||||
|
Cvar_SetValue(&vid_conheight, glheight * yratio);
|
||||||
|
}
|
||||||
|
|
||||||
|
vid_conautoscale.modified = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (vid_conwidth.modified || vid_conheight.modified)
|
if (vid_conwidth.modified || vid_conheight.modified)
|
||||||
{
|
{
|
||||||
//let let the user be too crazy
|
//let let the user be too crazy
|
||||||
if (vid_conwidth.value > 2048) //anything higher is unreadable.
|
if (vid_conwidth.value > (glwidth * 2)) //anything higher is unreadable.
|
||||||
Cvar_Set(&vid_conwidth, "2048");
|
Cvar_SetValue(&vid_conwidth, (float)(glwidth * 2));
|
||||||
if (vid_conwidth.value < 240) //lower would be wrong
|
if (vid_conwidth.value < 320) //lower would be wrong
|
||||||
Cvar_Set(&vid_conwidth, "320");
|
Cvar_Set(&vid_conwidth, "320");
|
||||||
if (vid_conheight.value > 1536) //anything higher is unreadable.
|
if (vid_conheight.value > (glheight * 2)) //anything higher is unreadable.
|
||||||
Cvar_Set(&vid_conheight, "1536");
|
Cvar_SetValue(&vid_conheight, (float)(glheight * 2));
|
||||||
if (vid_conheight.value < 240) //lower would be wrong
|
if (vid_conheight.value < 200) //lower would be wrong
|
||||||
Cvar_Set(&vid_conheight, "200");
|
Cvar_Set(&vid_conheight, "200");
|
||||||
|
|
||||||
vid_conwidth.modified = false;
|
vid_conwidth.modified = false;
|
||||||
|
|
Loading…
Reference in a new issue