diff --git a/polymer/build/include/build.h b/polymer/build/include/build.h index 8880ffb3c..432038b2e 100644 --- a/polymer/build/include/build.h +++ b/polymer/build/include/build.h @@ -472,7 +472,7 @@ extern long glusetexcompr; extern long gltexfiltermode; extern long glredbluemode; extern long glusetexcache, glusetexcachecompression; -extern long glmultisample, glnvmultisamplehint, glratiocorrection, glhudcorrect; +extern long glmultisample, glnvmultisamplehint, glwidescreen, glhudcorrect; void gltexapplyprops (void); #endif diff --git a/polymer/build/src/polymost.c b/polymer/build/src/polymost.c index 454945d21..1edc3830e 100644 --- a/polymer/build/src/polymost.c +++ b/polymer/build/src/polymost.c @@ -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 = 1; +long glwidescreen = 0; long glhudcorrect = 0; static GLuint polymosttext = 0; extern char nofog; @@ -557,7 +557,6 @@ void polymost_glinit() void resizeglcheck () { float m[4][4]; - float ratioratio = 1.0; int fovcorrect; if (glredbluemode < lastglredbluemode) { @@ -592,8 +591,7 @@ void resizeglcheck () glox1 = windowx1; gloy1 = windowy1; 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 / 1); + fovcorrect = glwidescreen?0:(((windowx2-windowx1+1) * 1.2) - (windowx2-windowx1+1)); bglViewport(windowx1 - (fovcorrect / 2), yres-(windowy2+1),windowx2-windowx1+1 + fovcorrect, windowy2-windowy1+1); @@ -3970,7 +3968,6 @@ void polymost_dorotatesprite (long sx, long sy, long z, short a, short picnum, double ogrhalfxdown10, ogrhalfxdown10x; double d, cosang, sinang, cosang2, sinang2, px[8], py[8], px2[8], py2[8]; float m[4][4]; - float ratioratio = 1.0; int fovcorrect; #ifdef USE_OPENGL @@ -4043,8 +4040,7 @@ void polymost_dorotatesprite (long sx, long sy, long z, short a, short picnum, { if(glhudcorrect) { - ratioratio = 1.2; - fovcorrect = ((xdimen*ratioratio)-(xdimen+1)) * 2; + fovcorrect = ((xdimen*1.2)-(xdimen+1)) * 2; bglViewport(windowx1 - (fovcorrect / 2),yres-(windowy2+1),windowx2-windowx1+1 + fovcorrect,windowy2-windowy1+1); } else bglViewport(windowx1,yres-(windowy2+1),windowx2-windowx1+1,windowy2-windowy1+1); } @@ -4058,7 +4054,7 @@ void polymost_dorotatesprite (long sx, long sy, long z, short a, short picnum, memset(m,0,sizeof(m)); if ((dastat&10) == 2) { - ratioratio = (float)xdim/ydim; + float ratioratio = (float)xdim/ydim; m[0][0] = (float)ydimen*(ratioratio >= 1.6?1.2:1); m[0][2] = 1.0; m[1][1] = (float)xdimen; m[1][2] = 1.0; m[2][2] = 1.0; m[2][3] = (float)ydimen*(ratioratio >= 1.6?1.2:1); diff --git a/polymer/eduke32/source/config.c b/polymer/eduke32/source/config.c index 1171a8065..43ab1d39c 100644 --- a/polymer/eduke32/source/config.c +++ b/polymer/eduke32/source/config.c @@ -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", "GLWidescreen", &glratiocorrection); + SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLWidescreen", &glwidescreen); glusetexcache = glusetexcachecompression = -1; SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLUseCompressedTextureCache", &glusetexcache); @@ -749,7 +749,7 @@ void CONFIG_WriteSetup( void ) 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); + SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLWidescreen",glwidescreen,false,false); #endif #ifdef RENDERTYPEWIN SCRIPT_PutNumber( scripthandle, "Screen Setup", "MaxRefreshFreq",maxrefreshfreq,false,false); diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index 6731df111..9fe15a48e 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -2144,9 +2144,9 @@ cheat_for_port_credits: } enabled = 1; switch (io) { - 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 0: if (x==io) glwidescreen = 1-glwidescreen; + modval(0,1,(int *)&glwidescreen,1,probey==io); + gametextpal(d,yy, glwidescreen ? "On" : "Off", 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; diff --git a/polymer/eduke32/source/osdcmds.c b/polymer/eduke32/source/osdcmds.c index 16bcbc148..e3c7cf604 100644 --- a/polymer/eduke32/source/osdcmds.c +++ b/polymer/eduke32/source/osdcmds.c @@ -455,7 +455,7 @@ struct cvarmappings { { "cl_weaponswitch", "cl_weaponswitch: enable/disable auto weapon switching", (void*)&ud.weaponswitch, CVAR_INT|256, 0, 0, 3 }, #if defined(POLYMOST) && defined(USE_OPENGL) - { "r_anamorphic", "r_anamorphic: enable/disable widescreen mode", (void*)&glratiocorrection, CVAR_BOOL, 0, 0, 1 }, + { "r_anamorphic", "r_anamorphic: enable/disable widescreen mode", (void*)&glwidescreen, 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 } diff --git a/polymer/eduke32/source/premap.c b/polymer/eduke32/source/premap.c index 3c4b8657e..3cacd0c83 100644 --- a/polymer/eduke32/source/premap.c +++ b/polymer/eduke32/source/premap.c @@ -998,7 +998,7 @@ void newgame(char vn,char ln,char sk) struct player_struct *p = &ps[0]; short i; - if(globalskillsound >= 0) + if(globalskillsound >= 0 && FXDevice >= 0 && SoundToggle) while(issoundplaying(-1,globalskillsound)) { handleevents(); getpackets(); } globalskillsound = -1;