diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2022-09-27 17:03:06 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2022-11-01 16:26:16 +0100 |
| commit | 980858186149651df5543b6fc99a4f7db0cdd089 (patch) | |
| tree | d347200b0a562d84df505097651ad0642f207fdd /src/settings/inc | |
| parent | 39f50e601d395bbd2d78d0147ac530b756da2fff (diff) | |
| download | jancity-980858186149651df5543b6fc99a4f7db0cdd089.tar.gz | |
WIP
Diffstat (limited to 'src/settings/inc')
| -rw-r--r-- | src/settings/inc/settings.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/settings/inc/settings.h b/src/settings/inc/settings.h new file mode 100644 index 0000000..25e73b9 --- /dev/null +++ b/src/settings/inc/settings.h @@ -0,0 +1,36 @@ +#ifndef SETTINGS_H +#define SETTINGS_H + +#include <settings/port.h> +#include <game.h> +#include <peripheral.h> +#include <stdbool.h> + +#ifdef __cplusplus +extern "C" +{ +#endif + +struct settings +{ + short screen_w, screen_h; + bool fullscreen; + enum peripheral_type periph_type; + int pad_i; + char name[GAME_PLAYER_NAME_LEN]; +}; + +struct settings_rt +{ + union peripheral *p; +}; + +int settings_load_ex(const char *path, struct settings *s); +int settings_apply(const struct settings *s, const struct settings_rt *r); +int settings_save_ex(const char *path, const struct settings *s); + +#ifdef __cplusplus +} +#endif + +#endif /* SETTINGS_H */ |
