From 5daa12fed0449a7811fc25ec62236bc060a56fa7 Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Tue, 9 Sep 2025 16:05:14 -0400 Subject: pke: first-pass promote pke_level over pke_scene Major runtime ownership overhaul (scene -> level). Major ecs 'marked for removal' overhaul, ensuring that entities and their components are actually being removed when levels are unloaded. --- src/level-types.hpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/level-types.hpp') diff --git a/src/level-types.hpp b/src/level-types.hpp index ce0d060..46cbad2 100644 --- a/src/level-types.hpp +++ b/src/level-types.hpp @@ -1,8 +1,12 @@ #ifndef PKE_LEVEL_TYPES_HPP #define PKE_LEVEL_TYPES_HPP +#include "camera.hpp" #include "components.hpp" +#include "player-input.hpp" +#include "static-ui.hpp" #include "vendor-glm-include.hpp" + #include "pk.h" struct scene_instance { @@ -16,11 +20,17 @@ const uint8_t LEVEL_NAME_MAX_LEN = 16; #define pke_level_name_printf_format "%16s" struct pke_level : public Entity_Base { - char *file_path = nullptr; + pk_cstr file_path = {}; struct pk_membucket *bkt = nullptr; char name[LEVEL_NAME_MAX_LEN] = {'\0'}; LevelHandle levelHandle = LevelHandle_MAX; pk_arr_t scene_instances; + pk_arr_t cameras; + pk_arr_t root_ui_boxes; + pk_arr_t input_handles; + PkeCallback pke_cb_tick = {}; + PkeCallback pke_cb_spinup = {}; + PkeCallback pke_cb_teardown = {}; }; #endif /* PKE_LEVEL_TYPES_HPP */ -- cgit v1.2.3