Kohi Game Engine
game_state.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <application_types.h>
4 #include <defines.h>
5 #include <math/math_types.h>
6 #include <renderer/rendergraph.h>
8 
9 #include "audio/audio_types.h"
10 #include "editor/editor_gizmo.h"
11 #include "renderer/viewport.h"
12 #include "resources/simple_scene.h"
13 
14 // TODO: temp
15 #include <core/clock.h>
16 #include <core/keymap.h>
17 #include <resources/skybox.h>
18 #include <resources/ui_text.h>
19 #include <systems/light_system.h>
20 
21 #include "debug_console.h"
22 struct debug_line3d;
23 struct debug_box3d;
24 struct transform;
25 
26 typedef struct selected_object {
28  struct transform* xform;
30 
31 typedef struct testbed_game_state {
34 
35  // TODO: temp
37 
39 
41 
47 
48  // TODO: temp
51 
52  mesh meshes[10];
53 
55 
59 
61 
62  // The unique identifier of the currently hovered-over object.
64 
66 
69 
72 
74 
75  // Used for visualization of our casts/collisions.
78 
81 
83 
89 
92 
94 
99 
100  // TODO: end temp
102 
This file contains types to be consumed by the application library.
The camera system is responsible for managing cameras throughout the engine.
This file contains structures and functions for the engine's clock.
This file contains global type definitions which are used throughout the entire engine and applicatio...
unsigned int u32
Unsigned 32-bit integer.
Definition: defines.h:25
_Bool b8
8-bit boolean type
Definition: defines.h:58
float f32
32-bit floating point number
Definition: defines.h:47
double f64
64-bit floating point number
Definition: defines.h:50
signed int i32
Signed 32-bit integer.
Definition: defines.h:39
unsigned short u16
Unsigned 16-bit integer.
Definition: defines.h:22
unsigned long long u64
Unsigned 64-bit integer.
Definition: defines.h:28
struct testbed_game_state testbed_game_state
struct selected_object selected_object
struct testbed_application_frame_data testbed_application_frame_data
This file contains the structures and functions required to implement keymaps and keybindings,...
This file contains the implementation of the light system, which manages all lighting objects within ...
Contains various math types required for the engine.
Definition: audio_types.h:41
Definition: audio_types.h:20
Represents a camera that can be used for a variety of things, especially rendering....
Definition: camera.h:21
Represents a basic clock, which can be used to track time deltas in the system.
Definition: clock.h:20
Definition: debug_box3d.h:5
Definition: debug_console.h:12
Definition: debug_line3d.h:7
Definition: editor_gizmo.h:61
Definition: math_types.h:244
A keymap, which holds a list of keymap entries, each with a list of bindings. These are held in an in...
Definition: keymap.h:103
Definition: resource_types.h:354
A point light, the most common light source, which radiates out from the given position.
Definition: light_system.h:56
Definition: rendergraph.h:44
Definition: rendergraph.h:64
Definition: game_state.h:26
struct transform * xform
Definition: game_state.h:28
u32 unique_id
Definition: game_state.h:27
Definition: simple_scene.h:47
Definition: game_state.h:103
i32 dummy
Definition: game_state.h:104
Definition: game_state.h:31
rendergraph_pass scene_pass
Definition: game_state.h:86
f32 forward_move_speed
Definition: game_state.h:70
rendergraph_pass editor_pass
Definition: game_state.h:87
editor_gizmo gizmo
Definition: game_state.h:73
b8 using_gizmo
Definition: game_state.h:91
f32 backward_move_speed
Definition: game_state.h:71
camera * world_camera_2
Definition: game_state.h:36
viewport ui_viewport
Definition: game_state.h:80
u16 height
Definition: game_state.h:38
simple_scene main_scene
Definition: game_state.h:49
u16 width
Definition: game_state.h:38
keymap console_keymap
Definition: game_state.h:65
debug_console_state debug_console
Definition: game_state.h:60
viewport world_viewport
Definition: game_state.h:79
b8 main_scene_unload_triggered
Definition: game_state.h:50
point_light * p_light_1
Definition: game_state.h:54
ui_text test_sys_text
Definition: game_state.h:58
camera * world_camera
Definition: game_state.h:33
clock update_clock
Definition: game_state.h:42
u64 prev_alloc_count
Definition: game_state.h:68
struct audio_file * test_loop_audio_file
Definition: game_state.h:96
audio_emitter test_emitter
Definition: game_state.h:98
viewport world_viewport2
Definition: game_state.h:82
clock present_clock
Definition: game_state.h:45
struct debug_line3d * test_lines
Definition: game_state.h:76
rendergraph_pass ui_pass
Definition: game_state.h:88
b8 running
Definition: game_state.h:32
f64 last_update_elapsed
Definition: game_state.h:46
u32 render_mode
Definition: game_state.h:93
u32 hovered_object_id
Definition: game_state.h:63
mesh ui_meshes[10]
Definition: game_state.h:56
frustum camera_frustum
Definition: game_state.h:40
struct audio_file * test_audio_file
Definition: game_state.h:95
struct audio_file * test_music
Definition: game_state.h:97
u64 alloc_count
Definition: game_state.h:67
clock render_clock
Definition: game_state.h:44
clock prepare_clock
Definition: game_state.h:43
struct debug_box3d * test_boxes
Definition: game_state.h:77
rendergraph_pass skybox_pass
Definition: game_state.h:85
selected_object selection
Definition: game_state.h:90
mesh meshes[10]
Definition: game_state.h:52
rendergraph frame_graph
Definition: game_state.h:84
ui_text test_text
Definition: game_state.h:57
Represents the transform of an object in the world. Transforms can have a parent whose own transform ...
Definition: math_types.h:215
Definition: ui_text.h:14
Definition: viewport.h:6