Kohi Game Engine
application_config.h
Go to the documentation of this file.
1 #ifndef _KOHI_APPLICATION_CONFIG_H_
2 #define _KOHI_APPLICATION_CONFIG_H_
3 
4 #include "strings/kname.h"
5 #include <defines.h>
6 #include <math/math_types.h>
7 
8 struct kwindow_config;
9 
13 typedef struct application_plugin_config {
15  const char* name;
20  const char* configuration_str;
22 
28 typedef struct application_system_config {
30  const char* name;
32  const char* configuration_str;
34 
37  const char* name;
39  const char* configuration_str;
41 
46 typedef struct application_config {
47 
49  const char* name;
50 
52  const char* audio_plugin_name;
53 
54  // darray of window configurations for the application.
56 
57  // darray of configurations for core engine systems.
59 
60  // darray of rendergraph configurations.
62 
65 
68 
70  const char* manifest_file_path;
71 
74 
78 
87 KAPI b8 application_config_parse_file_content(const char* file_content, application_config* out_config);
88 
97 KAPI b8 application_config_system_config_get(const application_config* config, const char* system_name, application_system_config* out_sys_config);
98 
99 #endif
struct application_config application_config
Represents configuration for the application. The application config is fed to the engine on creation...
struct application_rendergraph_config application_rendergraph_config
struct application_system_config application_system_config
Represents the top-level configuration for a core engine system. Each system is responsible for parsi...
KAPI b8 application_config_parse_file_content(const char *file_content, application_config *out_config)
Attempt to parse the application config file's content into the actual application config structure.
struct application_plugin_config application_plugin_config
Configuration for an application runtime plugin.
KAPI b8 application_config_system_config_get(const application_config *config, const char *system_name, application_system_config *out_sys_config)
Attempts to get the generic-level configuration for the system with the provided name.
This file contains global type definitions which are used throughout the entire engine and applicatio...
#define KAPI
Import/export qualifier.
Definition: defines.h:205
_Bool b8
8-bit boolean type
Definition: defines.h:58
unsigned long long u64
Unsigned 64-bit integer.
Definition: defines.h:28
This files contains an implementation of knames.
u64 kname
A kname is a string hash made for quick comparisons versus traditional string comparisons.
Definition: kname.h:36
Contains various math types required for the engine.
Represents configuration for the application. The application config is fed to the engine on creation...
Definition: application_config.h:46
kname default_package_name
The name of the default package to be used when loading assets, if one is not provided.
Definition: application_config.h:76
application_rendergraph_config * rendergraphs
Definition: application_config.h:61
u64 frame_allocator_size
The size of the engine's frame allocator.
Definition: application_config.h:64
const char * name
The application name used in windowing, if applicable.
Definition: application_config.h:49
struct kwindow_config * windows
Definition: application_config.h:55
const char * default_package_name_str
The name of the default package to be used when loading assets, if one is not provided.
Definition: application_config.h:73
const char * manifest_file_path
The asset manifest file path.
Definition: application_config.h:70
u64 app_frame_data_size
The size of the application-specific frame data. Set to 0 if not used.
Definition: application_config.h:67
const char * audio_plugin_name
The name of the audio plugin. Must match one of the plugins in the supplied list.
Definition: application_config.h:52
application_system_config * systems
Definition: application_config.h:58
Configuration for an application runtime plugin.
Definition: application_config.h:13
const char * name
The name of the plugin.
Definition: application_config.h:15
const char * configuration_str
The configuration of the plugin in string format, to be parsed by the plugin itself....
Definition: application_config.h:20
Definition: application_config.h:35
const char * name
The name of the rendergraph.
Definition: application_config.h:37
const char * configuration_str
The configuration of the rendergraph in string format, to be parsed by the rendergraph system.
Definition: application_config.h:39
Represents the top-level configuration for a core engine system. Each system is responsible for parsi...
Definition: application_config.h:28
const char * name
Definition: application_config.h:30
const char * configuration_str
The configuration of the system in string format, to be parsed by the system iteself.
Definition: application_config.h:32
A configuration structure used to create new windows.
Definition: platform.h:54