mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-19 04:34:51 -04:00
add steam and achivements, improve console
This commit is contained in:
parent
9bfb0f1d5d
commit
f49a7490c1
13 changed files with 360 additions and 258 deletions
36
platform/achievements.h
Normal file
36
platform/achievements.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
#pragma once
|
||||
#include <stdint.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// Initialize Steam (if available). Optional to call.
|
||||
// If not called manually, will auto-init on first achievement set.
|
||||
void achievements_init();
|
||||
void achievements_shutdown();
|
||||
|
||||
/// Set an achievement by its API name (if Steam available, otherwise ignored)
|
||||
/**
|
||||
* @param id The API name of the achievement to set.
|
||||
* @return 0 on success, -1 steam is not running (for diagnostic only)
|
||||
*/
|
||||
int8_t set_achievement(const char* id);
|
||||
|
||||
// Clear an achievement by its API name (if Steam available, otherwise ignored)
|
||||
/**
|
||||
* @param id The API name of the achievement to set.
|
||||
* @return 0 on success, -1 steam is not running (for diagnostic only)
|
||||
*/
|
||||
int8_t clear_achievement(const char* id);
|
||||
|
||||
/// returns whether steam is available
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
char is_steam_available();
|
||||
|
||||
char *get_steam_status();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue