vrheights

view src/game_var.h @ 15:ffb62c8db542

added missing makefile
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 30 Oct 2015 05:40:22 +0200
parents 537db3079134
children
line source
1 #ifndef GAME_VAR_H_
2 #define GAME_VAR_H_
4 #include <string>
5 #include <list>
7 struct GameVariable {
8 enum { NUMBER, BOOL, STR } type;
9 std::string name, val;
10 float num_val;
11 bool bool_val;
13 GameVariable();
14 std::string to_str() const;
15 };
17 void set_gvar(const GameVariable &var);
18 void set_gvar_str(const char *name, const char *val);
19 void set_gvar_num(const char *name, float val);
20 void set_gvar_bool(const char *name, bool val);
21 int set_gvar_parse(const char *name, const char *val);
23 GameVariable &get_gvar(const char *name);
24 const char *get_gvar_str(const char *name);
25 float get_gvar_num(const char *name);
26 bool get_gvar_bool(const char *name);
28 bool have_gvar(const char *name);
30 std::list<std::string> get_gvar_list();
32 #endif // GAME_VAR_H_