diff --git a/polymer/build/src/polymost.c b/polymer/build/src/polymost.c index ad57ec473..454945d21 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 = 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); diff --git a/polymer/eduke32/source/config.c b/polymer/eduke32/source/config.c index a2a834943..1171a8065 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", "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); diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index b1be679c8..1d7cef33f 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -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 into // -1 for none found // - 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 - // gets the sprite ID of the nearest actor within max dist - // that is of into - // -1 for none found - // - 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 into // -1 for none found // - 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 + // gets the sprite ID of the nearest actor within max dist + // that is of into + // -1 for none found + // + 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: { diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index 24ee3a77b..6731df111 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -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; diff --git a/polymer/eduke32/source/osdcmds.c b/polymer/eduke32/source/osdcmds.c index 15c2c3d8e..16bcbc148 100644 --- a/polymer/eduke32/source/osdcmds.c +++ b/polymer/eduke32/source/osdcmds.c @@ -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 } };