add steam and achivements, improve console

This commit is contained in:
Ondrej Novak 2025-04-15 09:49:43 +02:00
parent 9bfb0f1d5d
commit f49a7490c1
13 changed files with 360 additions and 258 deletions

36
platform/achievements.h Normal file
View 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