1 #pragma once 2 #include "../vdrift/configfile.h" 3 4 enum eShadowType { Sh_None=0, Sh_Depth, Sh_Soft }; 5 6 7 class SETcom 8 { 9 public: 10 //------------------------------------------ 11 12 // misc 13 std::string language; 14 bool isMain; int inMenu; // last menu id 15 16 // startup, other 17 bool autostart, escquit, startInMain; 18 bool ogre_dialog, mouse_capture, screen_png; 19 20 // screen 21 int windowx, windowy, fsaa; 22 bool fullscreen, vsync; 23 std::string buffer, rendersystem; 24 // limit 25 bool limit_fps; float limit_fps_val; int limit_sleep; 26 27 // hud 28 bool show_fps; 29 30 31 // graphics ---- 32 int anisotropy, tex_filt, tex_size; // textures 33 int ter_mtr, ter_tripl; // terrain 34 float view_distance, terdetail, terdist, road_dist; // detail 35 36 bool water_reflect, water_refract; int water_rttsize; // water 37 float shadow_dist; int shadow_size, lightmap_size, shadow_count, shadow_type; //eShadowType 38 39 bool use_imposters, imposters_only; // veget 40 float grass, trees_dist, grass_dist; // trees in gui. 41 42 // graphics other 43 int preset; // last set, info only 44 bool horizon; 45 std::string shader_mode; 46 47 48 // track 49 int tracks_view, tracks_sort; 50 bool tracks_sortup, tracks_filter; 51 52 #define COL_VIS 18 53 #define COL_FIL 13 54 55 bool col_vis[2][COL_VIS]; // visible columns for track views 56 int col_fil[2][COL_FIL]; // filtering range for columns 0min-1max 57 58 const static bool colVis[2][COL_VIS]; 59 const static char colFil[2][COL_FIL]; 60 61 62 //------------------------------------------ 63 SETcom(); 64 65 template <typename T> Param(CONFIGFILE & conf,bool write,std::string pname,T & value)66 bool Param(CONFIGFILE & conf, bool write, std::string pname, T & value) 67 { 68 if (write) 69 { conf.SetParam(pname, value); 70 return true; 71 }else 72 return conf.GetParam(pname, value); 73 } 74 void SerializeCommon(bool write, CONFIGFILE & config); 75 }; 76