Even more conversion, lots of superfluous macro removal
This commit is contained in:
+8
-8
@@ -114,7 +114,7 @@ convar r_slimealpha{"r_slimealpha", "0"};
|
||||
|
||||
float map_wateralpha, map_lavaalpha, map_telealpha, map_slimealpha;
|
||||
|
||||
qboolean r_drawflat_cheatsafe, r_fullbright_cheatsafe, r_lightmap_cheatsafe, r_drawworld_cheatsafe; //johnfitz
|
||||
bool r_drawflat_cheatsafe, r_fullbright_cheatsafe, r_lightmap_cheatsafe, r_drawworld_cheatsafe; //johnfitz
|
||||
|
||||
convar r_scale{"r_scale", "1", {.archive = true}};
|
||||
|
||||
@@ -266,7 +266,7 @@ R_CullBox -- johnfitz -- replaced with new function from lordhavoc
|
||||
Returns true if the box is completely outside the frustum
|
||||
=================
|
||||
*/
|
||||
qboolean R_CullBox(vec3_t emins, vec3_t emaxs) {
|
||||
bool R_CullBox(vec3_t emins, vec3_t emaxs) {
|
||||
int i;
|
||||
mplane_t *p;
|
||||
byte signbits;
|
||||
@@ -289,7 +289,7 @@ qboolean R_CullBox(vec3_t emins, vec3_t emaxs) {
|
||||
R_CullModelForEntity -- johnfitz -- uses correct bounds based on rotation
|
||||
===============
|
||||
*/
|
||||
qboolean R_CullModelForEntity(entity_t *e) {
|
||||
bool R_CullModelForEntity(entity_t *e) {
|
||||
vec3_t mins, maxs;
|
||||
vec_t scalefactor, *minbounds, *maxbounds;
|
||||
|
||||
@@ -444,7 +444,7 @@ void R_SetupGL(void) {
|
||||
//johnfitz -- rewrote this section
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
scale = CLAMP(1, (int)r_scale.value, 4); // ericw -- see R_ScaleView
|
||||
scale = std::clamp((int)r_scale.value, 1, 4); // ericw -- see R_ScaleView
|
||||
glViewport(glx + r_refdef.vrect.x,
|
||||
gly + glheight - r_refdef.vrect.y - r_refdef.vrect.height,
|
||||
r_refdef.vrect.width / scale,
|
||||
@@ -573,7 +573,7 @@ void R_SetupView(void) {
|
||||
R_DrawEntitiesOnList
|
||||
=============
|
||||
*/
|
||||
void R_DrawEntitiesOnList(qboolean alphapass) //johnfitz -- added parameter
|
||||
void R_DrawEntitiesOnList(bool alphapass) //johnfitz -- added parameter
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -905,7 +905,7 @@ void R_ScaleView(void) {
|
||||
int srcx, srcy, srcw, srch;
|
||||
|
||||
// copied from R_SetupGL()
|
||||
scale = CLAMP(1, (int)r_scale.value, 4);
|
||||
scale = std::clamp((int)r_scale.value, 1, 4);
|
||||
srcx = glx + r_refdef.vrect.x;
|
||||
srcy = gly + glheight - r_refdef.vrect.y - r_refdef.vrect.height;
|
||||
srcw = r_refdef.vrect.width / scale;
|
||||
@@ -1008,8 +1008,8 @@ void R_RenderView(void) {
|
||||
|
||||
//johnfitz -- stereo rendering -- full of hacky goodness
|
||||
if (r_stereo.value) {
|
||||
float eyesep = CLAMP(-8.0f, r_stereo.value, 8.0f);
|
||||
float fdepth = CLAMP(32.0f, r_stereodepth.value, 1024.0f);
|
||||
float eyesep = std::clamp(r_stereo.value, -8.0f, 8.0f);
|
||||
float fdepth = std::clamp(r_stereodepth.value, 32.0f, 1024.0f);
|
||||
|
||||
AngleVectors(r_refdef.viewangles, vpn, vright, vup);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user