From 175c72557b21f356e295a6f8a4acd91b7e744bef Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Fri, 24 Oct 2025 15:40:40 -0700 Subject: Consolidate LLR into a single file. --- src/llr/light.c | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 src/llr/light.c (limited to 'src/llr/light.c') diff --git a/src/llr/light.c b/src/llr/light.c deleted file mode 100644 index 0fa1522..0000000 --- a/src/llr/light.c +++ /dev/null @@ -1,42 +0,0 @@ -#include "light_impl.h" - -#include "memory.h" -#include "scene/node_impl.h" - -#include - -static void make_environment_light( - Light* light, const EnvironmentLightDesc* desc) { - assert(light); - assert(desc); - light->type = EnvironmentLightType; - light->environment.environment_map = desc->environment_map; -} - -Light* gfx_make_light(const LightDesc* desc) { - assert(desc); - - Light* light = mem_alloc_light(); - - switch (desc->type) { - case EnvironmentLightType: - make_environment_light(light, &desc->light.environment); - break; - default: - log_error("Unhandled light type"); - gfx_destroy_light(&light); - return 0; - } - - return light; -} - -void gfx_destroy_light(Light** light) { - assert(light); - if (*light) { - if ((*light)->parent.val) { - gfx_del_node((*light)->parent); - } - mem_free_light(light); - } -} -- cgit v1.2.3