SDEngine
Game Engine
Loading...
Searching...
No Matches
game.h
Go to the documentation of this file.
1#pragma once
2
3#include <stddef.h>
4#include <stdint.h>
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10// Increment this when the GameAPI struct layout changes.
11// The hot reloader rejects plugins with a mismatched version.
12#define GAME_API_VERSION 1
13
15typedef struct SD_Scene SD_Scene;
17
23
27
35
36typedef GameAPI (*GetGameAPIFn)();
37
38#define GAME_GET_API_NAME "get_game_api"
39
40#ifdef __cplusplus
41}
42#endif
GameAPI(* GetGameAPIFn)()
Definition game.h:36
struct SD_Scene SD_Scene
Definition game.h:15
void(* Game_OnUnloadFn)(SD_Application *app, GameState *state)
Definition game.h:26
struct SD_RuntimeStateManager SD_RuntimeStateManager
Definition game.h:16
void(* Game_OnUpdateFn)(SD_Application *app, GameState *state, float dt)
Definition game.h:25
struct SD_Application SD_Application
Definition game.h:14
void(* Game_OnLoadFn)(SD_Application *app, GameState *state)
Definition game.h:24
Definition game.h:28
Game_OnUpdateFn on_update
Definition game.h:32
size_t struct_size
Definition game.h:30
Game_OnLoadFn on_load
Definition game.h:31
uint32_t api_version
Definition game.h:29
Game_OnUnloadFn on_unload
Definition game.h:33
Definition game.h:18
SD_Scene * shared_scene
Definition game.h:19
int version
Definition game.h:21
SD_Scene * another_scene
Definition game.h:20
constexpr T g_type_max
Definition types.hpp:21