1 #pragma once
2 #include "../vdrift/configfile.h"
3 #include "../ogre/common/settings_com.h"
4 
5 
6 #define SET_VER  2600  // 2.6
7 
8 
9 class SETTINGS : public SETcom
10 {
11 public:
12 ///  params
13 //------------------------------------------
14 	int version;  // file version
15 
16 	//  show
17 	bool trackmap, brush_prv;  int num_mini;
18 	float size_minimap;
19 
20 	class GameSet
21 	{
22 	public:
23 		std::string track;  bool track_user;
24 		float trees;  // common
25 	} gui;
26 
27 	//  misc
28 	bool allow_save, inputBar, camPos;
29 	bool check_load, check_save;
30 
31 	//  settings
32 	bool bFog, bTrees, bWeather;
33 	int ter_skip, mini_skip;  float road_sphr;
34 	float cam_speed, cam_inert, cam_x,cam_y,cam_z, cam_dx,cam_dy,cam_dz;
35 
36 	//  ter generate
37 	float gen_scale, gen_ofsx,gen_ofsy, gen_freq, gen_persist, gen_pow;  int gen_oct;
38 	float gen_mul, gen_ofsh, gen_roadsm;
39 	float gen_terMinA,gen_terMaxA,gen_terSmA, gen_terMinH,gen_terMaxH,gen_terSmH;
40 
41 	//  align ter
42 	float al_w_mul, al_w_add, al_smooth;
43 
44 	//  pacenotes
45 	int pace_show;  float pace_dist, pace_size, pace_near, pace_alpha;
46 	bool trk_reverse, show_mph;
47 
48 	//  tweak
49 	std::string tweak_mtr;
50 	//  pick
51 	bool pick_setpar;
52 
53 
54 //------------------------------------------
55 	SETTINGS();
56 
57 	template <typename T>
Param(CONFIGFILE & conf,bool write,std::string pname,T & value)58 	bool Param(CONFIGFILE & conf, bool write, std::string pname, T & value)
59 	{
60 		if (write)
61 		{	conf.SetParam(pname, value);
62 			return true;
63 		}else
64 			return conf.GetParam(pname, value);
65 	}
66 	void Serialize(bool write, CONFIGFILE & config);
67 	void Load(std::string sfile), Save(std::string sfile);
68 };
69