73 if (!app_file_content) {
74 KFATAL(
"Failed to read app_config.kson file text. Application cannot start.");
79 KFATAL(
"Failed to parse application config. Cannot start.");
84 KFATAL(
"Could not create application!");
90 KFATAL(
"The application's function pointers must be assigned!");
96 KFATAL(
"Engine failed to create!.");
101 KFATAL(
"Could not initialize application!");
107 KINFO(
"Application did not shutdown gracefully.");
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.
This file contains types to be consumed by the application library.
_Bool b8
8-bit boolean type
Definition: defines.h:58
This file contains structures and logic pertaining to the overall engine itself. The engine is respon...
KAPI b8 engine_create(struct application *app)
Creates the engine, standing up the platform layer and all underlying subsystems.
KAPI b8 engine_run(struct application *app)
Starts the main engine loop.
b8 initialize_application(application *app)
const char * application_config_path_get(void)
Gets the application config path from the application.
b8 create_application(application *out_app)
Externally-defined function to create a application, provided by the consumer of this library.
int main(void)
The main entry point of the application.
Definition: entry.h:66
This file contains structures and functions for interacting with the file system.
KAPI const char * filesystem_read_entire_text_file(const char *filepath)
Opens and reads all text content of the file at the provided path. No file handle required....
This file contains structures and logic pertaining to the logging system.
#define KFATAL(message,...)
Logs a fatal-level message. Should be used to stop the application when hit.
Definition: logger.h:75
#define KINFO(message,...)
Logs an info-level message. Should be used for non-erronuous informational purposes.
Definition: logger.h:111
Represents the basic application state in a application. Called for creation by the application.
Definition: application_types.h:46
b8(* prepare_frame)(struct application *app_inst, struct frame_data *p_frame_data)
Function pointer to application's prepare_frame function.
Definition: application_types.h:79
application_config app_config
The application configuration.
Definition: application_types.h:48
b8(* initialize)(struct application *app_inst)
Function pointer to application's initialize function.
Definition: application_types.h:63
b8(* render_frame)(struct application *app_inst, struct frame_data *p_frame_data)
Function pointer to application's render_frame function.
Definition: application_types.h:87
b8(* update)(struct application *app_inst, struct frame_data *p_frame_data)
Function pointer to application's update function.
Definition: application_types.h:71