LDKGame
typedef struct LDKGame{
bool initialized;
void *user_data;
LDKLibrary *lib;
LDKGameInitializeFunc initialize;
LDKGameStartFunc start;
LDKGameUpdateFunc update;
LDKGameStopFunc stop;
LDKGameTerminateFunc terminate;
LDKGameComponentMetadataCountFunc metadata_count;
LDKGameComponentMetadataGetFunc metadata_get;
LDKGameSystemMetadataCountFunc system_metadata_count;
LDKGameSystemMetadataGetFunc system_metadata_get;
}LDKGame;
LDKGameABIVersionFunc
Game-module entry point reporting the supported ABI version.
typedef u32(*LDKGameABIVersionFunc)(void);
Returns
The resulting numeric value.
LDKGameComponentMetadataCountFunc
Game-module entry point reporting the component metadata count.
typedef u32(*LDKGameComponentMetadataCountFunc)(void);
Returns
The resulting numeric value.
LDKGameComponentMetadataGetFunc
Game-module entry point retrieving component metadata by index.
typedef const LDKComponentMeta *(*LDKGameComponentMetadataGetFunc)(u32 index);
Parameters
index
- Zero-based index of the selected item.
Returns
Pointer to the requested object or data; NULL when unavailable.
LDKGameInitializeFunc
Game-module entry point called to initialize a game instance.
typedef bool(*LDKGameInitializeFunc)(struct LDKGame *game);
Parameters
game
- Game instance associated with this operation.
Returns
True if the operation succeeds; false otherwise.
LDKGameStartFunc
Game-module entry point called when gameplay starts.
typedef bool(*LDKGameStartFunc)(struct LDKGame *game);
Parameters
game
- Game instance associated with this operation.
Returns
True if the operation succeeds; false otherwise.
LDKGameStopFunc
Game-module entry point called when gameplay stops.
typedef void(*LDKGameStopFunc)(struct LDKGame *game);
Parameters
game
- Game instance associated with this operation.
LDKGameSystemMetadataCountFunc
Game-module entry point reporting the system metadata count.
typedef u32(*LDKGameSystemMetadataCountFunc)(void);
Returns
The resulting numeric value.
LDKGameSystemMetadataGetFunc
Game-module entry point retrieving system metadata by index.
typedef const LDKSystemMeta *(*LDKGameSystemMetadataGetFunc)(u32 index);
Parameters
index
- Zero-based index of the selected item.
Returns
Pointer to the requested object or data; NULL when unavailable.
LDKGameTerminateFunc
Game-module entry point called when the game instance is terminated.
typedef void(*LDKGameTerminateFunc)(struct LDKGame *game);
Parameters
game
- Game instance associated with this operation.
LDKGameUpdateFunc
Game-module entry point called for a gameplay update.
typedef void(*LDKGameUpdateFunc)(struct LDKGame *game, float delta_time);
Parameters
game
- Game instance associated with this operation.
delta_time
- Elapsed time since the preceding update, in seconds.
LDK_GAME_ABI_VERSION
#define LDK_GAME_ABI_VERSION 6u
LDK_GAME_ABI_VERSION_NAME
#define LDK_GAME_ABI_VERSION_NAME "game_abi_version"
LDK_GAME_COMPONENT_METADATA_COUNT_NAME
#define LDK_GAME_COMPONENT_METADATA_COUNT_NAME "game_component_metadata_count"
LDK_GAME_COMPONENT_METADATA_GET_NAME
#define LDK_GAME_COMPONENT_METADATA_GET_NAME "game_component_metadata_get"
LDK_GAME_INITIALIZE_FUNC_NAME
#define LDK_GAME_INITIALIZE_FUNC_NAME "game_initialize"
LDK_GAME_START_FUNC_NAME
#define LDK_GAME_START_FUNC_NAME "game_start"
LDK_GAME_STOP_FUNC_NAME
#define LDK_GAME_STOP_FUNC_NAME "game_stop"
LDK_GAME_SYSTEM_METADATA_COUNT_NAME
#define LDK_GAME_SYSTEM_METADATA_COUNT_NAME "game_system_metadata_count"
LDK_GAME_SYSTEM_METADATA_GET_NAME
#define LDK_GAME_SYSTEM_METADATA_GET_NAME "game_system_metadata_get"
LDK_GAME_TERMINATE_FUNC_NAME
#define LDK_GAME_TERMINATE_FUNC_NAME "game_terminate"
LDK_GAME_UPDATE_FUNC_NAME
#define LDK_GAME_UPDATE_FUNC_NAME "game_update"