From ce864655e3f813f712b545c211863bfe7f9b9852 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Sat, 31 Dec 2016 12:59:43 +0100 Subject: [PATCH] Remove wallshade global from R_RenderDecals --- src/swrenderer/scene/r_segs.cpp | 2 +- src/swrenderer/things/r_decal.cpp | 6 +++--- src/swrenderer/things/r_decal.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/swrenderer/scene/r_segs.cpp b/src/swrenderer/scene/r_segs.cpp index 0ebfaa084..30f4e9033 100644 --- a/src/swrenderer/scene/r_segs.cpp +++ b/src/swrenderer/scene/r_segs.cpp @@ -1811,7 +1811,7 @@ bool R_StoreWallRange (int start, int stop) // [ZZ] Only if not an active mirror if (!rw_markportal) { - R_RenderDecals(curline->sidedef, draw_segment); + R_RenderDecals(curline->sidedef, draw_segment, wallshade); } if (rw_markportal) diff --git a/src/swrenderer/things/r_decal.cpp b/src/swrenderer/things/r_decal.cpp index a49e90cfb..857e3bc36 100644 --- a/src/swrenderer/things/r_decal.cpp +++ b/src/swrenderer/things/r_decal.cpp @@ -33,11 +33,11 @@ namespace swrenderer { - void R_RenderDecals(side_t *sidedef, drawseg_t *draw_segment) + void R_RenderDecals(side_t *sidedef, drawseg_t *draw_segment, int wallshade) { for (DBaseDecal *decal = sidedef->AttachedDecals; decal != NULL; decal = decal->WallNext) { - R_RenderDecal(sidedef, decal, draw_segment, 0); + R_RenderDecal(sidedef, decal, draw_segment, wallshade, 0); } } @@ -45,7 +45,7 @@ namespace swrenderer // = 1: drawing masked textures (including sprites) // Currently, only pass = 0 is done or used - void R_RenderDecal(side_t *wall, DBaseDecal *decal, drawseg_t *clipper, int pass) + void R_RenderDecal(side_t *wall, DBaseDecal *decal, drawseg_t *clipper, int wallshade, int pass) { DVector2 decal_left, decal_right, decal_pos; int x1, x2; diff --git a/src/swrenderer/things/r_decal.h b/src/swrenderer/things/r_decal.h index 8eeadb77e..a006e2fee 100644 --- a/src/swrenderer/things/r_decal.h +++ b/src/swrenderer/things/r_decal.h @@ -8,6 +8,6 @@ namespace swrenderer { struct drawseg_t; - void R_RenderDecals(side_t *wall, drawseg_t *draw_segment); - void R_RenderDecal(side_t *wall, DBaseDecal *first, drawseg_t *clipper, int pass); + void R_RenderDecals(side_t *wall, drawseg_t *draw_segment, int wallshade); + void R_RenderDecal(side_t *wall, DBaseDecal *first, drawseg_t *clipper, int wallshade, int pass); }