From 3ffe9f522e02e2f5f0c31f032299b7087958f148 Mon Sep 17 00:00:00 2001 From: Denis Pauk Date: Fri, 25 Aug 2023 14:34:58 +0300 Subject: [PATCH] soft: use same full light as gl* version if none Use fullbright if not lights provided, same logic used by default for gl renders and way to show something for ReRelease version while real support is not implemented yet. --- src/client/refresh/soft/sw_light.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/client/refresh/soft/sw_light.c b/src/client/refresh/soft/sw_light.c index 82298f20..caf1a715 100644 --- a/src/client/refresh/soft/sw_light.c +++ b/src/client/refresh/soft/sw_light.c @@ -450,6 +450,29 @@ R_BuildLightMap (drawsurf_t* drawsurf) } } } + else + { + int maps; + + for (maps = 0 ; maps < MAXLIGHTMAPS && surf->styles[maps] != 255 ; + maps++) + { + unsigned scale; + light_t *curr_light, *max_light; + + curr_light = blocklights; + max_light = blocklights + size; + + scale = drawsurf->lightadj[maps]; // 8.8 fraction + + do + { + *curr_light += 255 * scale; + curr_light++; + } + while(curr_light < max_light); + } + } // add all the dynamic lights if (surf->dlightframe == r_framecount)