Kohi Game Engine
entry.h
Go to the documentation of this file.
1 
38 #pragma once
39 
41 #include "core/engine.h"
42 #include "logger.h"
43 
49 extern const char* application_config_path_get(void);
50 extern const char* application_klib_name_get(void);
51 
56 int main(void) {
57 
58  application app_inst = {0};
59 
60  // Initialization.
62  KFATAL("Engine failed to create!.");
63  return 1;
64  }
65 
66  // Begin the engine loop.
67  if (!engine_run(&app_inst)) {
68  KINFO("Application did not shutdown gracefully.");
69  return 2;
70  }
71 
72  return 0;
73 }
This file contains types to be consumed by the application library.
This file contains structures and logic pertaining to the overall engine itself. The engine is respon...
KAPI b8 engine_create(struct application *app, const char *app_config_path, const char *game_lib_name)
Creates the engine, standing up the platform layer and all underlying subsystems.
KAPI b8 engine_run(struct application *app)
Starts the main engine loop.
const char * application_klib_name_get(void)
const char * application_config_path_get(void)
Gets the application config path from the application.
int main(void)
The main entry point of the application.
Definition: entry.h:56
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