mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- renamed testnewrenderer CVAR.
This commit is contained in:
parent
5ce9955f39
commit
a3162f6ccf
11 changed files with 38 additions and 36 deletions
|
@ -91,7 +91,7 @@ int pm_smoothratio;
|
|||
|
||||
// For testing - will be removed later.
|
||||
CVAR(Int, skytile, 0, 0)
|
||||
CVAR(Bool, testnewrenderer, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
CVAR(Bool, vid_renderer, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
|
||||
static vec3_t spritesxyz[MAXSPRITESONSCREEN + 1];
|
||||
static int16_t thewall[MAXWALLSB];
|
||||
|
|
|
@ -121,7 +121,7 @@ CUSTOM_CVAR(Int, vid_preferbackend, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_N
|
|||
Printf("Changing the video backend requires a restart for " GAMENAME ".\n");
|
||||
}
|
||||
|
||||
CVAR(Int, vid_renderer, 1, 0) // for some stupid mods which threw caution out of the window...
|
||||
//CVAR(Int, vid_renderer, 1, 0) // for some stupid mods which threw caution out of the window...
|
||||
|
||||
CUSTOM_CVAR(Int, uiscale, 0, CVAR_ARCHIVE | CVAR_NOINITCALL)
|
||||
{
|
||||
|
|
|
@ -223,11 +223,11 @@ bool writingsavepic;
|
|||
FileWriter* savefile;
|
||||
int savewidth, saveheight;
|
||||
void PM_WriteSavePic(FileWriter* file, int width, int height);
|
||||
EXTERN_CVAR(Bool, testnewrenderer);
|
||||
EXTERN_CVAR(Bool, vid_renderer);
|
||||
|
||||
void WriteSavePic(FileWriter* file, int width, int height)
|
||||
{
|
||||
if (!testnewrenderer)
|
||||
if (!vid_renderer)
|
||||
{
|
||||
PM_WriteSavePic(file, width, height);
|
||||
return;
|
||||
|
|
|
@ -45,7 +45,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "razefont.h"
|
||||
|
||||
|
||||
EXTERN_CVAR(Bool, testnewrenderer)
|
||||
EXTERN_CVAR(Bool, vid_renderer)
|
||||
BEGIN_BLD_NS
|
||||
|
||||
VIEW gPrevView[kMaxPlayers];
|
||||
|
@ -766,7 +766,7 @@ void viewDrawScreen(bool sceneonly)
|
|||
}
|
||||
}
|
||||
|
||||
if (testnewrenderer)
|
||||
if (vid_renderer)
|
||||
{
|
||||
fixedhoriz deliriumPitchI = q16horiz(interpolatedvalue(IntToFixed(deliriumPitchO), IntToFixed(deliriumPitch), gInterpolate));
|
||||
auto bakCstat = gView->actor->spr.cstat;
|
||||
|
|
|
@ -42,7 +42,7 @@ Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au)
|
|||
extern PalEntry GlobalMapFog;
|
||||
extern float GlobalFogDensity;
|
||||
|
||||
EXTERN_CVAR(Bool, testnewrenderer)
|
||||
EXTERN_CVAR(Bool, vid_renderer)
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
|
@ -66,7 +66,7 @@ BEGIN_DUKE_NS
|
|||
|
||||
void renderView(DDukeActor* playersprite, sectortype* sect, int x, int y, int z, binangle a, fixedhoriz h, binangle rotscrnang, int smoothratio)
|
||||
{
|
||||
if (!testnewrenderer)
|
||||
if (!vid_renderer)
|
||||
{
|
||||
// do screen rotation.
|
||||
renderSetRollAngle((float)rotscrnang.asbuildf());
|
||||
|
@ -112,7 +112,7 @@ void GameInterface::UpdateCameras(double smoothratio)
|
|||
auto camera = camsprite->GetOwner();
|
||||
auto ang = buildang(camera->interpolatedang(smoothratio));
|
||||
display_mirror = 1; // should really be 'display external view'.
|
||||
if (!testnewrenderer)
|
||||
if (!vid_renderer)
|
||||
{
|
||||
// Note: no ROR or camera here - Polymost has no means to detect these things before rendering the scene itself.
|
||||
renderDrawRoomsQ16(camera->spr.pos.X, camera->spr.pos.Y, camera->spr.pos.Z, ang.asq16(), IntToFixed(camera->spr.shade), camera->sector(), false); // why 'shade'...?
|
||||
|
@ -281,7 +281,7 @@ void displayrooms(int snum, double smoothratio)
|
|||
DoInterpolations(smoothratio / 65536.);
|
||||
|
||||
setgamepalette(BASEPAL);
|
||||
if (!testnewrenderer) gi->UpdateCameras(smoothratio); // Only Polymost does this here. The new renderer calls this internally.
|
||||
if (!vid_renderer) gi->UpdateCameras(smoothratio); // Only Polymost does this here. The new renderer calls this internally.
|
||||
|
||||
if (ud.cameraactor)
|
||||
{
|
||||
|
@ -412,7 +412,7 @@ void displayrooms(int snum, double smoothratio)
|
|||
|
||||
auto cstat = viewer->spr.cstat;
|
||||
if (camview) viewer->spr.cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
if (isRR() && sect->lotag == 848 && !testnewrenderer)
|
||||
if (isRR() && sect->lotag == 848 && !vid_renderer)
|
||||
{
|
||||
renderSetRollAngle((float)rotscrnang.asbuildf());
|
||||
geometryEffect(cposx, cposy, cposz, cang, choriz, sectnum(sect), (int)smoothratio);
|
||||
|
|
|
@ -1270,7 +1270,7 @@ void moveclouds(double smoothratio)
|
|||
cloudy += (float)ps[screenpeek].angle.ang.fsin() * 0.5f;
|
||||
for (int i = 0; i < numclouds; i++)
|
||||
{
|
||||
if (!testnewrenderer)
|
||||
if (!vid_renderer)
|
||||
{
|
||||
clouds[i]->setceilingxpan(cloudx);
|
||||
clouds[i]->setceilingypan(cloudy);
|
||||
|
|
|
@ -32,7 +32,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "render.h"
|
||||
#include <string.h>
|
||||
|
||||
EXTERN_CVAR(Bool, testnewrenderer)
|
||||
EXTERN_CVAR(Bool, vid_renderer)
|
||||
|
||||
BEGIN_PS_NS
|
||||
|
||||
|
@ -353,7 +353,7 @@ void DrawView(double smoothRatio, bool sceneonly)
|
|||
}
|
||||
}
|
||||
|
||||
if (!testnewrenderer)
|
||||
if (!vid_renderer)
|
||||
{
|
||||
// this little block of code is Exhumed's entire interface to Polymost.
|
||||
int const vr = xs_CRoundToInt(65536. * tan(r_fov * (pi::pi() / 360.)));
|
||||
|
|
|
@ -56,7 +56,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
|||
#include "v_draw.h"
|
||||
#include "render.h"
|
||||
#include "razefont.h"
|
||||
EXTERN_CVAR(Bool, testnewrenderer)
|
||||
EXTERN_CVAR(Bool, vid_renderer)
|
||||
|
||||
extern DCoreActor* wall_to_sprite_actors[8];
|
||||
|
||||
|
@ -342,7 +342,7 @@ void DoShadows(tspritetype* tsprite, int& spritesortcnt, tspritetype* tsp, int v
|
|||
tSpr->clipdist |= TSPR_FLAGS_MDHACK;
|
||||
tSpr->cstat |= CSTAT_SPRITE_TRANS_FLIP;
|
||||
}
|
||||
else if (!testnewrenderer)
|
||||
else if (!vid_renderer)
|
||||
{
|
||||
// Alter the shadow's position so that it appears behind the sprite itself.
|
||||
int look = getangle(tSpr->pos.X - Player[screenpeek].si.X, tSpr->pos.Y - Player[screenpeek].si.Y);
|
||||
|
@ -1502,11 +1502,11 @@ void drawscreen(PLAYER* pp, double smoothratio)
|
|||
if (automapMode != am_full)// && !ScreenSavePic)
|
||||
{
|
||||
// Cameras must be done before the main loop.
|
||||
if (!testnewrenderer) JS_DrawCameras(pp, tx, ty, tz, smoothratio);
|
||||
if (!vid_renderer) JS_DrawCameras(pp, tx, ty, tz, smoothratio);
|
||||
else JS_CameraParms(pp, tx, ty, tz);
|
||||
}
|
||||
|
||||
if (!testnewrenderer)
|
||||
if (!vid_renderer)
|
||||
{
|
||||
renderSetRollAngle((float)trotscrnang.asbuildf());
|
||||
polymost_drawscreen(pp, tx, ty, tz, tang, thoriz, tsect);
|
||||
|
|
|
@ -46,7 +46,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
|||
#include "v_video.h"
|
||||
#include "render.h"
|
||||
|
||||
EXTERN_CVAR(Bool, testnewrenderer)
|
||||
EXTERN_CVAR(Bool, vid_renderer)
|
||||
|
||||
BEGIN_SW_NS
|
||||
|
||||
|
@ -412,7 +412,7 @@ void drawroomstotile(int daposx, int daposy, int daposz,
|
|||
|
||||
screen->RenderTextureView(canvas, [=](IntRect& rect)
|
||||
{
|
||||
if (!testnewrenderer)
|
||||
if (!vid_renderer)
|
||||
{
|
||||
renderDrawRoomsQ16(daposx, daposy, daposz, ang.asq16(), horiz.asq16(), dacursect, false);
|
||||
analyzesprites(pm_tsprite, pm_spritesortcnt, daposx, daposy, daposz, ang.asbuild());
|
||||
|
|
|
@ -708,7 +708,7 @@ bool FindCeilingView(int match, int* x, int* y, int z, sectortype** sect)
|
|||
}
|
||||
|
||||
|
||||
if (!testnewrenderer)
|
||||
if (!vid_renderer)
|
||||
{
|
||||
SW_CeilingPortalHack(actor, z, match);
|
||||
}
|
||||
|
@ -769,7 +769,7 @@ bool FindFloorView(int match, int* x, int* y, int z, sectortype** sect)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!testnewrenderer)
|
||||
if (!vid_renderer)
|
||||
{
|
||||
SW_FloorPortalHack(actor, z, match);
|
||||
}
|
||||
|
@ -814,8 +814,8 @@ struct PortalGroup
|
|||
// This is very messy because some portals are linked outside the actual portal sectors, so we have to use the complicated original linking logic to find the connection. :?
|
||||
void CollectPortals()
|
||||
{
|
||||
int t = testnewrenderer;
|
||||
testnewrenderer = true;
|
||||
int t = vid_renderer;
|
||||
vid_renderer = true;
|
||||
TArray<PortalGroup> floorportals;
|
||||
TArray<PortalGroup> ceilingportals;
|
||||
BitArray floordone(sector.Size()), ceilingdone(sector.Size());
|
||||
|
@ -980,7 +980,7 @@ void CollectPortals()
|
|||
}
|
||||
}
|
||||
}
|
||||
testnewrenderer = t;
|
||||
vid_renderer = t;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1059,10 +1059,10 @@ OptionValue "Precision"
|
|||
1, "$OPTVAL_QUALITY"
|
||||
}
|
||||
|
||||
OptionValue "Video Renderers"
|
||||
OptionValue "VideoRenderers"
|
||||
{
|
||||
0, "$OPTVAL_POLYMOST"
|
||||
1, "$OPTVAL_NEWRENDERER"
|
||||
0, "Polymost"
|
||||
1, "Raze3D"
|
||||
}
|
||||
|
||||
OptionMenu "VideoOptions" protected
|
||||
|
@ -1075,6 +1075,8 @@ OptionMenu "VideoOptions" protected
|
|||
Submenu "$GLMNU_POSTPROCESS", "PostProcessMenu"
|
||||
Submenu "$GLTEXMNU_TITLE", "GLTextureGLOptions"
|
||||
StaticText ""
|
||||
Option "Renderer", vid_renderer, "VideoRenderers"
|
||||
StaticText ""
|
||||
|
||||
Slider "$DSPLYMNU_GAMMA", "vid_gamma", 0.75, 3.0, 0.05, 2
|
||||
Slider "$DSPLYMNU_BRIGHTNESS", "vid_brightness", -0.8,0.8, 0.05,2
|
||||
|
@ -1083,9 +1085,9 @@ OptionMenu "VideoOptions" protected
|
|||
Slider "$DSPLYMNU_AMBIENT_LIGHT", "r_ambientlight", 0.5, 4.0, 0.1
|
||||
|
||||
StaticText ""
|
||||
Option "$DSPLYMNU_VOXELS", "r_voxels", "OnOff"
|
||||
Option "$DSPLYMNU_VOXELS", "r_voxels", "OnOff"
|
||||
Option "$DSPLYMNU_SHADOWS", "r_shadows", "OnOff"
|
||||
Option "$DSPLYMNU_SLOPETILT", "cl_slopetilting", "OnOff"
|
||||
Option "$DSPLYMNU_SLOPETILT", "cl_slopetilting", "OnOff"
|
||||
Option "$GLPREFMNU_ENVIRONMENTMAPMIRROR", gl_mirror_envmap, "OnOff"
|
||||
ifnotgame(Blood, Exhumed)
|
||||
{
|
||||
|
@ -1096,14 +1098,14 @@ OptionMenu "VideoOptions" protected
|
|||
Option "$DSPLYMNU_VIEWBOB", "cl_viewvbob", "OnOff"
|
||||
Option "$DSPLYMNU_VIEWSWAY", "cl_viewhbob", "OnOff"
|
||||
}
|
||||
StaticText ""
|
||||
Slider "$DSPLYMNU_FOV", "r_fov", 60, 130, 10, 1
|
||||
Option "$GLPREFMNU_RENDERQUALITY", gl_seamless, "Precision"
|
||||
Option "$VID_RENDERER", testnewrenderer, "Video Renderers"
|
||||
Slider "$DSPLYMNU_FOV", "r_fov", 60, 130, 10, 1
|
||||
|
||||
StaticText ""
|
||||
Option "$GLTEXMNU_TEXFILTER", gl_texture_filter, "FilterModes"
|
||||
Option "$GLTEXMNU_ANISOTROPIC", gl_texture_filter_anisotropic, "Anisotropy"
|
||||
Option "$GLPREFMNU_RENDERQUALITY", gl_seamless, "Precision"
|
||||
|
||||
StaticText ""
|
||||
Option "$GLTEXMNU_TEXFILTER", gl_texture_filter, "FilterModes"
|
||||
Option "$GLTEXMNU_ANISOTROPIC", gl_texture_filter_anisotropic, "Anisotropy"
|
||||
StaticText " "
|
||||
Option "$GLPREFMNU_MULTISAMPLE", gl_multisample, "Multisample"
|
||||
|
||||
|
|
Loading…
Reference in a new issue