This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
decal_t *decals;
int currentdecal; // wraps around in decal array, replacing old ones when a new one is needed
-cvar_t r_drawdecals = {"r_drawdecals", "1"};
-cvar_t r_decals_lighting = {"r_decals_lighting", "1"};
+cvar_t r_drawdecals = {0, "r_drawdecals", "1"};
+cvar_t r_decals_lighting = {0, "r_decals_lighting", "1"};
-void r_decals_start()
+void r_decals_start(void)
{
decals = (decal_t *) qmalloc(MAX_DECALS * sizeof(decal_t));
memset(decals, 0, MAX_DECALS * sizeof(decal_t));
currentdecal = 0;
}
-void r_decals_shutdown()
+void r_decals_shutdown(void)
{
qfree(decals);
}
-void r_decals_newmap()
+void r_decals_newmap(void)
{
memset(decals, 0, MAX_DECALS * sizeof(decal_t));
currentdecal = 0;
}
-void R_Decals_Init()
+void R_Decals_Init(void)
{
Cvar_RegisterVariable (&r_drawdecals);
Cvar_RegisterVariable (&r_decals_lighting);
dynamiclight = (int) r_dynamic.value != 0 && (int) r_decals_lighting.value != 0;
- mindist = DotProduct(r_refdef.vieworg, vpn) + 4.0f;
+ mindist = DotProduct(r_origin, vpn) + 4.0f;
if (r_render.value)
{
continue;
// do not render if the view origin is behind the decal
- VectorSubtract(p->org, r_refdef.vieworg, v);
+ VectorSubtract(p->org, r_origin, v);
if (DotProduct(p->direction, v) < 0)
continue;