From bc8517a05648054df17e556d4116e63a20fef75a Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Tue, 25 Mar 2014 22:38:11 -0400 Subject: config: Add API to get/set config variables. It is useful to be able to set variables through an API provided by the config module; this means that it is possible for one module to set config variables of another in a more loosely-coupled way. --- src/m_config.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/m_config.h') diff --git a/src/m_config.h b/src/m_config.h index 999b50ae..7de6e995 100644 --- a/src/m_config.h +++ b/src/m_config.h @@ -28,11 +28,17 @@ #ifndef __M_CONFIG__ #define __M_CONFIG__ +#include "doomtype.h" + void M_LoadDefaults(void); void M_SaveDefaults(void); void M_SaveDefaultsAlternate(char *main, char *extra); void M_SetConfigDir(char *dir); void M_BindVariable(char *name, void *variable); +boolean M_SetVariable(char *name, char *value); +int M_GetIntVariable(char *name); +const char *M_GetStrVariable(char *name); +float M_GetFloatVariable(char *name); void M_SetConfigFilenames(char *main_config, char *extra_config); char *M_GetSaveGameDir(char *iwadname); -- cgit v1.2.3