Kohi Game Engine
|
A file that contains the KVar system. KVars are global variables that are dynamically created and set/used within the engine and/or application, and are accessible from anywhere. More...
#include "defines.h"
Go to the source code of this file.
Functions | |
b8 | kvar_initialize (u64 *memory_requirement, void *memory, void *config) |
Initializes the KVar system. KVars are global variables that are dynamically created and set/used within the engine and/or application, and are accessible from anywhere. Like any other system, this should be called twice, once to obtain the memory requirement (where memory = 0), and a second time with an allocated block of memory. More... | |
void | kvar_shutdown (void *state) |
Shuts down the KVar system. More... | |
KAPI b8 | kvar_int_create (const char *name, i32 value) |
Creates an integer variable type. More... | |
KAPI b8 | kvar_int_get (const char *name, i32 *out_value) |
Attempts to obtain a variable value with the given name. Returns false if not found. More... | |
KAPI b8 | kvar_int_set (const char *name, i32 value) |
Attempts to set the value of an existing variable with the given name. Returns false if the variable was not found. More... | |
A file that contains the KVar system. KVars are global variables that are dynamically created and set/used within the engine and/or application, and are accessible from anywhere.
Initializes the KVar system. KVars are global variables that are dynamically created and set/used within the engine and/or application, and are accessible from anywhere. Like any other system, this should be called twice, once to obtain the memory requirement (where memory = 0), and a second time with an allocated block of memory.
memory_requirement | A pointer to hold the memory requirement for this system. |
memory | An allocated block of memory the size of memory_requirement. |
config | A pointer to config, if required. |
Creates an integer variable type.
name | The name of the variable. |
value | The value of the variable. |
Attempts to obtain a variable value with the given name. Returns false if not found.
name | The name of the variable. |
out_value | A pointer to hold the variable. |
Attempts to set the value of an existing variable with the given name. Returns false if the variable was not found.
name | The name of the variable. |
value | The value to be set. |
void kvar_shutdown | ( | void * | state | ) |
Shuts down the KVar system.
state | The system state. |