From a50bc1c6efe5a54419cf6746b0a9552af50cd6b3 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 1 Aug 2023 23:26:26 +0900 Subject: [PATCH] [scene] Make light style unsigned Not that it really matters for only 64 styles, but it feels more consistent. --- include/QF/scene/light.h | 3 ++- libs/scene/light.c | 2 +- libs/scene/scene.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/QF/scene/light.h b/include/QF/scene/light.h index 63fc8f869..5e38304c4 100644 --- a/include/QF/scene/light.h +++ b/include/QF/scene/light.h @@ -65,7 +65,8 @@ typedef struct lightingdata_s { lightingdata_t *Light_CreateLightingData (struct scene_s *scene); void Light_DestroyLightingData (lightingdata_t *ldata); void Light_ClearLights (lightingdata_t *ldata); -void Light_AddLight (lightingdata_t *ldata, const light_t *light, int style); +void Light_AddLight (lightingdata_t *ldata, const light_t *light, + uint32_t style); void Light_EnableSun (lightingdata_t *ldata); #endif//__QF_scene_light_h diff --git a/libs/scene/light.c b/libs/scene/light.c index 09c6b3c21..ddf800ae0 100644 --- a/libs/scene/light.c +++ b/libs/scene/light.c @@ -85,7 +85,7 @@ test_light_leaf (const light_t *light, const mleaf_t *leaf) } void -Light_AddLight (lightingdata_t *ldata, const light_t *light, int style) +Light_AddLight (lightingdata_t *ldata, const light_t *light, uint32_t style) { scene_t *scene = ldata->scene; model_t *model = scene->worldmodel; diff --git a/libs/scene/scene.c b/libs/scene/scene.c index 47eb27e1b..2ae04aa74 100644 --- a/libs/scene/scene.c +++ b/libs/scene/scene.c @@ -163,7 +163,7 @@ static const component_t scene_components[scene_comp_count] = { .name = "efrags", }, [scene_lightstyle] = { - .size = sizeof (int), + .size = sizeof (uint32_t), .name = "lightstyle", }, [scene_lightleaf] = {