mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 06:32:37 +00:00
Remove the ratio correction slider and replace it with a simple widescreen toggle
git-svn-id: https://svn.eduke32.com/eduke32@180 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
76eb4ada1d
commit
ce4b067e65
5 changed files with 42 additions and 58 deletions
|
@ -124,7 +124,7 @@ long gltexmaxsize = 0; // 0 means autodetection on first run
|
|||
long gltexmiplevel = 0; // discards this many mipmap levels
|
||||
static long lastglpolygonmode = 0; //FUK
|
||||
long glpolygonmode = 0; // 0:GL_FILL,1:GL_LINE,2:GL_POINT //FUK
|
||||
long glratiocorrection = 63;
|
||||
long glratiocorrection = 1;
|
||||
long glhudcorrect = 0;
|
||||
static GLuint polymosttext = 0;
|
||||
extern char nofog;
|
||||
|
@ -593,7 +593,7 @@ void resizeglcheck ()
|
|||
glox2 = windowx2; gloy2 = windowy2;
|
||||
|
||||
ratioratio = 1.2; //1.6 / (((float)(windowx2-windowx1+1)) / (windowy2-windowy1)); // computes the ratio between 16/10 and current resolution ratio
|
||||
fovcorrect = (((windowx2-windowx1+1) * ratioratio) - (windowx2-windowx1+1)) * ((float)glratiocorrection / 63);
|
||||
fovcorrect = (((windowx2-windowx1+1) * ratioratio) - (windowx2-windowx1+1)) * ((float)glratiocorrection / 1);
|
||||
|
||||
bglViewport(windowx1 - (fovcorrect / 2), yres-(windowy2+1),windowx2-windowx1+1 + fovcorrect, windowy2-windowy1+1);
|
||||
|
||||
|
|
|
@ -605,7 +605,7 @@ void CONFIG_ReadSetup( void )
|
|||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLAnisotropy", &glanisotropy);
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLHUDCorrect", &glhudcorrect);
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLUseTextureCompr", &glusetexcompr);
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLRatioCorrection", &glratiocorrection);
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLWidescreen", &glratiocorrection);
|
||||
|
||||
glusetexcache = glusetexcachecompression = -1;
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLUseCompressedTextureCache", &glusetexcache);
|
||||
|
@ -745,11 +745,11 @@ void CONFIG_WriteSetup( void )
|
|||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLAnisotropy",glanisotropy,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLHUDCorrect",glhudcorrect,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLRatioCorrection",glratiocorrection,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLTextureMode",gltexfiltermode,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLUseCompressedTextureCache", glusetexcache,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLUseTextureCacheCompression", glusetexcachecompression,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLUseTextureCompr",glusetexcompr,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLWidescreen",glratiocorrection,false,false);
|
||||
#endif
|
||||
#ifdef RENDERTYPEWIN
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "MaxRefreshFreq",maxrefreshfreq,false,false);
|
||||
|
|
|
@ -5004,7 +5004,6 @@ SKIPJIBS:
|
|||
|
||||
screencapt = 1;
|
||||
displayrooms(myconnectindex,65536);
|
||||
//savetemp("duke3d.tmp",waloff[TILE_SAVESHOT],160*100);
|
||||
screencapt = 0;
|
||||
if(ud.multimode > 1)
|
||||
saveplayer(-1-(lastsavedpos));
|
||||
|
@ -5254,9 +5253,6 @@ SKIPJIBS:
|
|||
|
||||
case CON_IFSPAWNEDBY:
|
||||
insptr++;
|
||||
// if(g_sp->owner >= 0 && sprite[g_sp->owner].picnum == *insptr)
|
||||
// parseifelse(1);
|
||||
// else
|
||||
parseifelse( hittype[g_i].picnum == *insptr);
|
||||
break;
|
||||
|
||||
|
@ -5349,13 +5345,11 @@ SKIPJIBS:
|
|||
|
||||
case CON_IFFLOORDISTL:
|
||||
insptr++;
|
||||
// getglobalz(g_i);
|
||||
parseifelse( (hittype[g_i].floorz - g_sp->z) <= ((*insptr)<<8));
|
||||
break;
|
||||
|
||||
case CON_IFCEILINGDISTL:
|
||||
insptr++;
|
||||
// getglobalz(g_i);
|
||||
parseifelse( ( g_sp->z - hittype[g_i].ceilingz ) <= ((*insptr)<<8));
|
||||
break;
|
||||
|
||||
|
@ -5386,13 +5380,6 @@ SKIPJIBS:
|
|||
break;
|
||||
}
|
||||
|
||||
/* case 74:
|
||||
insptr++;
|
||||
getglobalz(g_i);
|
||||
parseifelse( (( hittype[g_i].floorz - hittype[g_i].ceilingz ) >> 8 ) >= *insptr);
|
||||
break;
|
||||
*/
|
||||
|
||||
case CON_ADDLOG:
|
||||
{
|
||||
long l;
|
||||
|
@ -5545,18 +5532,16 @@ good:
|
|||
// that is of <type> into <getvar>
|
||||
// -1 for none found
|
||||
// <type> <maxdistvarid> <varid>
|
||||
long lType, lMaxDistVar, lMaxDist;
|
||||
long lVarID, lTemp, lFound, lDist;
|
||||
long lType, lMaxDist;
|
||||
long lVarID, lTemp, lFound;
|
||||
short j, k;
|
||||
|
||||
insptr++;
|
||||
|
||||
lType=*insptr++;
|
||||
lMaxDistVar=*insptr++;
|
||||
lMaxDist=GetGameVarID(*insptr++, g_i, g_p);
|
||||
lVarID=*insptr++;
|
||||
lMaxDist=GetGameVarID(lMaxDistVar, g_i, g_p);
|
||||
lFound=-1;
|
||||
lDist=32767; // big number
|
||||
|
||||
for (k=0;k<MAXSTATUS;k++)
|
||||
{
|
||||
|
@ -5568,7 +5553,7 @@ good:
|
|||
if(tw==CON_FINDNEARACTOR3DVAR || tw==CON_FINDNEARSPRITE3DVAR)
|
||||
lTemp=dist(&sprite[g_i], &sprite[j]);
|
||||
else lTemp=ldist(&sprite[g_i], &sprite[j]);
|
||||
if( lTemp < lMaxDist && lTemp < lDist)
|
||||
if( lTemp < lMaxDist)
|
||||
{
|
||||
lFound=j;
|
||||
j = MAXSPRITES;
|
||||
|
@ -5584,29 +5569,6 @@ good:
|
|||
break;
|
||||
}
|
||||
|
||||
case CON_FINDPLAYER:
|
||||
case CON_FINDOTHERPLAYER:
|
||||
{
|
||||
// syntax findnearactorvar <type> <maxdistvar> <getvar>
|
||||
// gets the sprite ID of the nearest actor within max dist
|
||||
// that is of <type> into <getvar>
|
||||
// -1 for none found
|
||||
// <type> <maxdistvarid> <varid>
|
||||
short j=0;
|
||||
long var1, d;
|
||||
|
||||
insptr++;
|
||||
var1 = *insptr++;
|
||||
|
||||
if (tw == CON_FINDPLAYER) j=findplayer(&sprite[g_i],&d);
|
||||
else if (tw == CON_FINDOTHERPLAYER) j=findotherplayer(g_i,&d);
|
||||
|
||||
SetGameVarID(g_iReturnVarID, j, g_i, g_p);
|
||||
SetGameVarID(var1, d, g_i, g_p);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case CON_FINDNEARACTORZVAR:
|
||||
case CON_FINDNEARSPRITEZVAR:
|
||||
{
|
||||
|
@ -5615,18 +5577,16 @@ good:
|
|||
// that is of <type> into <getvar>
|
||||
// -1 for none found
|
||||
// <type> <maxdistvarid> <varid>
|
||||
long lType, lMaxDistVar, lMaxZDistVar, lMaxDist, lMaxZDist;
|
||||
long lType, lMaxDist, lMaxZDist;
|
||||
long lVarID, lTemp, lTemp2, lFound;
|
||||
short j, k;
|
||||
|
||||
insptr++;
|
||||
|
||||
lType=*insptr++;
|
||||
lMaxDistVar=*insptr++;
|
||||
lMaxZDistVar=*insptr++;
|
||||
lMaxDist=GetGameVarID(*insptr++, g_i, g_p);
|
||||
lMaxZDist=GetGameVarID(*insptr++, g_i, g_p);
|
||||
lVarID=*insptr++;
|
||||
lMaxDist=GetGameVarID(lMaxDistVar, g_i, g_p);
|
||||
lMaxZDist=GetGameVarID(lMaxZDistVar, g_i, g_p);
|
||||
lFound=-1;
|
||||
|
||||
for (k=0;k<MAXSTATUS;k++)
|
||||
|
@ -5707,6 +5667,29 @@ good:
|
|||
break;
|
||||
}
|
||||
|
||||
case CON_FINDPLAYER:
|
||||
case CON_FINDOTHERPLAYER:
|
||||
{
|
||||
// syntax findnearactorvar <type> <maxdistvar> <getvar>
|
||||
// gets the sprite ID of the nearest actor within max dist
|
||||
// that is of <type> into <getvar>
|
||||
// -1 for none found
|
||||
// <type> <maxdistvarid> <varid>
|
||||
short j=0;
|
||||
long var1, d;
|
||||
|
||||
insptr++;
|
||||
var1 = *insptr++;
|
||||
|
||||
if (tw == CON_FINDPLAYER) j=findplayer(&sprite[g_i],&d);
|
||||
else if (tw == CON_FINDOTHERPLAYER) j=findotherplayer(g_i,&d);
|
||||
|
||||
SetGameVarID(g_iReturnVarID, j, g_i, g_p);
|
||||
SetGameVarID(var1, d, g_i, g_p);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case CON_SETPLAYER:
|
||||
case CON_GETPLAYER:
|
||||
{
|
||||
|
|
|
@ -2100,7 +2100,7 @@ cheat_for_port_credits:
|
|||
{
|
||||
int io, ii, yy, d=c+160+40, enabled;
|
||||
char *opts[] = {
|
||||
"Aspect ratio correction",
|
||||
"Widescreen",
|
||||
"-",
|
||||
"Hightile textures",
|
||||
"Precache textures",
|
||||
|
@ -2131,7 +2131,7 @@ cheat_for_port_credits:
|
|||
io++;
|
||||
}
|
||||
|
||||
onbar = (probey == 0);
|
||||
onbar = 0;
|
||||
x = probesm(c,yy+5,0,io);
|
||||
|
||||
if (x == -1) { cmenu(203); probey = 7; break; }
|
||||
|
@ -2144,9 +2144,9 @@ cheat_for_port_credits:
|
|||
}
|
||||
enabled = 1;
|
||||
switch (io) {
|
||||
case 0:
|
||||
barsm(d+8,yy+7, (short *)&glratiocorrection,8,x==io,MENUHIGHLIGHT(io),PHX(-5));
|
||||
break;
|
||||
case 0: if (x==io) glratiocorrection = 1-glratiocorrection;
|
||||
modval(0,1,(int *)&glratiocorrection,1,probey==io);
|
||||
gametextpal(d,yy, glratiocorrection ? "Off" : "On", MENUHIGHLIGHT(io), 0); break;
|
||||
case 1: if (x==io) usehightile = 1-usehightile;
|
||||
modval(0,1,(int *)&usehightile,1,probey==io);
|
||||
gametextpal(d,yy, usehightile ? "On" : "Off", MENUHIGHLIGHT(io), 0); break;
|
||||
|
|
|
@ -454,9 +454,10 @@ struct cvarmappings {
|
|||
{ "cl_smoothinput", "cl_smoothinput: enable/disable input smoothing\n", (void*)&SmoothInput, CVAR_BOOL, 0, 0, 1 },
|
||||
|
||||
{ "cl_weaponswitch", "cl_weaponswitch: enable/disable auto weapon switching", (void*)&ud.weaponswitch, CVAR_INT|256, 0, 0, 3 },
|
||||
|
||||
{ "r_arcorrection", "r_arcorrection: sets amount of aspect ratio correction", (void*)&glratiocorrection, CVAR_INT, 0, 0, 63 },
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
{ "r_anamorphic", "r_anamorphic: enable/disable widescreen mode", (void*)&glratiocorrection, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "r_hudcorrect", "r_hudcorrect: enable/disable correct HUD weapon rendering", (void*)&glhudcorrect, CVAR_BOOL, 0, 0, 1 },
|
||||
#endif
|
||||
{ "r_precache", "r_precache: enable/disable the pre-level caching routine", (void*)&useprecache, CVAR_BOOL, 0, 0, 1 }
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue