summaryrefslogtreecommitdiff
path: root/src/level-types.hpp
blob: 46cbad2beaadf8bf01e332e057d40a04c54e8786 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#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 {
	glm::vec3 pos; // TODO
	glm::vec3 rot; // TODO
	glm::vec3 scale; // TODO
	SceneHandle scene_handle;
};

const uint8_t LEVEL_NAME_MAX_LEN = 16;
#define pke_level_name_printf_format "%16s"

struct pke_level : public Entity_Base {
	pk_cstr file_path = {};
	struct pk_membucket *bkt = nullptr;
	char name[LEVEL_NAME_MAX_LEN] = {'\0'};
	LevelHandle levelHandle = LevelHandle_MAX;
	pk_arr_t<scene_instance> scene_instances;
	pk_arr_t<PkeCamera *> cameras;
	pk_arr_t<pke_ui_box *> root_ui_boxes;
	pk_arr_t<pke_input_action_set_handle> input_handles;
	PkeCallback pke_cb_tick = {};
	PkeCallback pke_cb_spinup = {};
	PkeCallback pke_cb_teardown = {};
};

#endif /* PKE_LEVEL_TYPES_HPP */