ref: 1d9c69e0ff3b386a33ed87da12286bbff3285caf
parent: 126bee7e131e05f58130d59a21a33b065fc8fe45
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Sat Oct 14 22:10:25 EDT 2023
make particles smaller by default, provide r_part_scale to customize
--- a/d_modech.c
+++ b/d_modech.c
@@ -13,16 +13,6 @@
/*
================
-D_Patch
-================
-*/
-void D_Patch (void)
-{
-}
-
-
-/*
-================
D_ViewChanged
================
*/
@@ -46,7 +36,7 @@
if (d_pix_min < 1)
d_pix_min = 1;
- d_pix_max = (int)((float)r_refdef.vrect.width / (320.0 / 4.0) + 0.5) * 90.0/r_refdef.fov_x;
+ d_pix_max = (int)(((float)r_refdef.vrect.width / (320.0 / 4.0) + 0.5) * r_part_scale.value * 90.0/r_refdef.fov_x);
d_pix_shift = 8 - (int)((float)r_refdef.vrect.width / 320.0 + 0.5);
if (d_pix_max < 1)
d_pix_max = 1;
@@ -71,7 +61,5 @@
zspantable[i] = d_pzbuffer + i*d_zwidth;
}
}
-
- D_Patch ();
}
--- a/r_local.h
+++ b/r_local.h
@@ -46,11 +46,10 @@
extern cvar_t r_drawflat;
extern cvar_t r_ambient;
extern cvar_t r_reportsurfout;
-extern cvar_t r_maxsurfs;
extern cvar_t r_numsurfs;
extern cvar_t r_reportedgeout;
-extern cvar_t r_maxedges;
extern cvar_t r_numedges;
+extern cvar_t r_part_scale;
#define XCENTERING (1.0 / 2.0)
#define YCENTERING (1.0 / 2.0)
--- a/r_main.c
+++ b/r_main.c
@@ -116,6 +116,7 @@
cvar_t r_numedges = {"r_numedges", "0"};
cvar_t r_aliastransbase = {"r_aliastransbase", "200"};
cvar_t r_aliastransadj = {"r_aliastransadj", "100"};
+cvar_t r_part_scale = {"r_part_scale", "0.75", true};
extern cvar_t scr_fov;
@@ -197,6 +198,7 @@
Cvar_RegisterVariable (&r_numedges);
Cvar_RegisterVariable (&r_aliastransbase);
Cvar_RegisterVariable (&r_aliastransadj);
+ Cvar_RegisterVariable (&r_part_scale);
view_clipplanes[0].leftedge = true;
view_clipplanes[1].rightedge = true;