- RefPtr<Light> lgt = new Light;
- load_sub(*lgt);
- get_collection().add(format("%s/%d.light", FS::basename(get_source()), obj.lights.size()), lgt.get());
- obj.attach(*lgt.release());
-}
-
-void Lighting::Loader::light_inline_index(unsigned)
-{
- light_inline();
-}
-
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-void Lighting::Loader::sky_color(float r, float g, float b)
-{
- obj.set_sky_color(Color(r, g, b));
-}
-
-void Lighting::Loader::zenith_direction(float x, float y, float z)
-{
- obj.set_zenith_direction(Vector3(x, y, z));
+ Light::GenericLoader ldr(get_collection());
+ load_sub_with(ldr);
+ Light *lgt = ldr.store_object(get_collection(), format("%s/%d.light", FS::basename(get_source()), obj.lights.size()));
+ obj.attach(*lgt);