diff options
Diffstat (limited to 'cfg/cfgparse.h')
-rw-r--r-- | cfg/cfgparse.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cfg/cfgparse.h b/cfg/cfgparse.h index 4865b48..a585de6 100644 --- a/cfg/cfgparse.h +++ b/cfg/cfgparse.h @@ -5,6 +5,7 @@ typedef enum { cfg_type_int, + cfg_type_float, cfg_type_string, cfg_type_data, cfg_type_none @@ -19,6 +20,7 @@ typedef struct cfg_Prop { char name[28]; cfg_Type type; union { + float flt; int num; cfg_Data data; char* str; @@ -53,10 +55,25 @@ int find_int_default( const char* name, int def ); +float find_float_default( + const cfg_Object* obj, + const char* name, + float def +); +float find_num_default( + const cfg_Object* obj, + const char* name, + float def +); const char* find_string_default( const cfg_Object* obj, const char* name, const char* def ); +unsigned find_colour_default( + const cfg_Object* obj, + const char* name, + const char* def +); #endif |