mirror of
https://github.com/perfect-dark-pc-port/perfect_dark.git
synced 2026-10-24 00:02:43 +02:00
21 lines
665 B
C
21 lines
665 B
C
#pragma once
|
|
|
|
#include <PR/ultratypes.h>
|
|
|
|
#define CONFIG_FNAME "pd.ini"
|
|
#define CONFIG_PATH "$S/" CONFIG_FNAME
|
|
|
|
void configInit(void);
|
|
|
|
// loads config from file (path extensions such as ! apply)
|
|
s32 configLoad(const char *fname);
|
|
|
|
// saves config to file (path extensions such as ! apply)
|
|
s32 configSave(const char *fname);
|
|
|
|
// registers a variable in the config file
|
|
// this should be done before configInit() is called, preferably in a module constructor
|
|
void configRegisterInt(const char *key, s32 *var, s32 min, s32 max);
|
|
void configRegisterFloat(const char *key, f32 *var, f32 min, f32 max);
|
|
void configRegisterString(const char *key, char *var, u32 maxstr);
|