From ac7a564f6f9c77b13856592b7f71c8a6f4a373d0 Mon Sep 17 00:00:00 2001 From: Daniel Bross Date: Thu, 26 Jun 2025 23:25:31 +0200 Subject: [PATCH] Custom scene fields module parameter --- core/entity.jai | 1 - core/scene.jai | 2 ++ module.jai | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/entity.jai b/core/entity.jai index 5f9eb86..725441f 100644 --- a/core/entity.jai +++ b/core/entity.jai @@ -61,7 +61,6 @@ Entity :: struct { enabled: bool = true; - parent: *Entity; @DontSerialize children: [MAX_CHILDREN] *Entity; @DontSerialize num_children: s64; @DontSerialize diff --git a/core/scene.jai b/core/scene.jai index 6ea4e83..8e3f0ee 100644 --- a/core/scene.jai +++ b/core/scene.jai @@ -21,6 +21,8 @@ Scene :: struct { directional_light : Directional_Light; mode: Engine_Mode; + + using custom_fields: Custom_Scene_Fields; } Entity_File_Info :: struct { diff --git a/module.jai b/module.jai index 05b2e79..fef51b6 100644 --- a/module.jai +++ b/module.jai @@ -1,6 +1,9 @@ -#module_parameters(WITH_EDITOR := true, WITH_NETWORKING := false, action_type : Type, entity_fields: Type); +#module_parameters(WITH_EDITOR := true, WITH_NETWORKING := false, action_type : Type, entity_fields: Type, scene_fields: Type); +// TODO: Add a fallback, if none we're specified Custom_Entity_Fields :: entity_fields; +Custom_Scene_Fields :: scene_fields; + Action :: action_type; EDITOR :: WITH_EDITOR; DEBUG :: true;