From 8db1f56a208a45283e312ba44da4d1663f998997 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Thu, 19 May 2016 02:35:17 -0600 Subject: [PATCH] light: add Lightmap_ClearAll util function --- light/ltface.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/light/ltface.c b/light/ltface.c index 2a2d705f..cda69b86 100644 --- a/light/ltface.c +++ b/light/ltface.c @@ -893,6 +893,18 @@ Lightmap_ForStyle(lightmap_t *lightmaps, const int style, const lightsurf_t *lig return lightmap; } +/* + * Lightmap_ClearAll + * + * Sets all styles to 255, doesn't actually clear the data. + */ +void Lightmap_ClearAll(lightmap_t *lightmaps) +{ + for (int i = 0; i <= MAXLIGHTMAPS; i++) { + lightmaps[i].style = 255; + } +} + /* * Lightmap_Save *