1 #pragma once 2 #include "configfile.h" 3 #include "../ogre/common/settings_com.h" 4 5 6 #define SET_VER 2600 // 2.6 7 8 9 enum eGraphType { 10 Gh_Fps=0, Gh_CarAccelG, 11 Gh_CamBounce, Gh_BulletHit, 12 Gh_Sound, 13 Gh_Checks, 14 Gh_Suspension, 15 Gh_TireSlips, 16 Gh_TireEdit, Gh_Tires4Edit, 17 Gh_Diffs, 18 Gh_TorqueCurve, Gh_Engine, 19 Gh_Clutch, 20 Gh_ALL }; // total count 21 const static std::string csGraphNames[Gh_ALL] = { 22 "Fps graphics perf.", "Car Accel G's", 23 "Camera bounce", "Car Hit chassis", 24 "Sound info, sources", 25 "Checkpoints", 26 "Suspension pos & vel", 27 "Tires slip| & slide-", 28 "Tire Edit (Pacejka coeffs)*", "All Tires Pacejka vis and edit*", 29 "Differentials", 30 "Torque Curve, gears", "Engine torque & power", 31 "Clutch, Rpm, Gear" }; 32 33 34 class SETTINGS : public SETcom 35 { 36 public: 37 //------------------------------------------ 38 int version; // file version 39 40 // show 41 bool show_gauges, show_digits, 42 trackmap, mini_zoomed, mini_rotated, mini_terrain, mini_border, 43 check_beam, check_arrow, 44 show_times, show_opponents, opplist_sort, 45 show_cam, cam_tilt, 46 car_dbgbars, car_dbgtxt, car_dbgsurf, 47 car_tirevis, show_graphs; 48 49 float size_gauges, size_minimap, size_minipos, size_arrow, zoom_minimap; 50 int gauges_type, gauges_layout; 51 // cam 52 float fov_min, fov_max, fov_smooth; 53 bool cam_loop_chng; int cam_in_loop; 54 bool cam_bounce; float cam_bnc_mul; 55 // pacenotes 56 bool pace_show; int pace_next; 57 float pace_dist, pace_size, pace_near, pace_alpha; 58 59 eGraphType graphs_type; 60 int car_dbgtxtclr, car_dbgtxtcnt; 61 bool sounds_info; 62 // gui 63 bool cars_sortup; int cars_view, cars_sort; 64 int tut_type, champ_type, chall_type; 65 bool champ_info; 66 int car_ed_tab, tweak_tab; 67 68 69 // graphics 70 bool bFog; 71 int refl_skip, refl_faces, refl_size; float refl_dist; 72 int refl_mode; // 0 static, 1 single, 2 full 73 74 bool particles, trails; 75 float particles_len, trails_len; 76 bool boost_fov; 77 78 79 //--------------- car setup 80 bool abs[2], tcs[2], // [2] = 0 gravel 1 asphalt 81 autoshift, autorear, rear_inv, show_mph; 82 float sss_effect[2], sss_velfactor[2]; 83 // steering range multipliers 84 float steer_range[2], // gravel/asphalt 85 steer_sim[2]; // simulation modes 0 easy 1 normal 86 std::vector<int> cam_view; //[4] 87 88 //--------------- game config 89 class GameSet 90 { 91 public: 92 std::string track; bool track_user; 93 float trees; // common 94 95 bool trackreverse; 96 std::vector<std::string> car; //[4] local players 97 std::vector<float> car_hue, car_sat, car_val, car_gloss, car_refl; //[6] also for ghosts 98 99 int local_players, num_laps; // split 100 // game setup 101 std::string sim_mode; 102 bool collis_veget, collis_cars, collis_roadw, dyn_objects; 103 int boost_type, flip_type, damage_type, rewind_type; 104 float damage_dec; 105 106 float boost_power, boost_max, boost_min, boost_per_km, boost_add_sec; 107 void BoostDefault(); 108 109 bool rpl_rec; 110 // champ 111 int champ_num, chall_num; // -1 none 112 bool champ_rev; 113 114 float pre_time; int start_order; 115 116 GameSet(); 117 } game, // current game, changed only on new game start 118 gui; // gui only config 119 //--------------- 120 121 122 // misc 123 bool dev_keys, dev_no_prvs; // dev 124 bool split_vertically; 125 126 // startup, other 127 bool bltDebug, bltLines, bltProfilerTxt, profilerTxt; 128 bool loadingbackground, show_welcome; 129 130 // sound 131 float vol_master, vol_hud, 132 vol_engine, vol_tires, vol_susp, vol_env, 133 vol_fl_splash,vol_fl_cont, vol_car_crash,vol_car_scrap; 134 bool snd_chk, snd_chkwr; // play hud 135 bool snd_reverb; std::string snd_device; 136 137 // sim freq (1/interval timestep) 138 float game_fq, blt_fq, perf_speed; 139 int blt_iter, dyn_iter, multi_thr, thread_sleep, gui_sleep; 140 141 // graphs vis 142 float tc_r, tc_xr; // tire circles max 143 float te_yf, te_xfx, te_xfy, te_xf_pow; // tire edit max 144 bool te_reference, te_common; 145 146 147 // effects 148 bool all_effects, bloom, blur, hdr; 149 float bloom_int, bloom_orig, blur_int; // intensity 150 float dof_focus, dof_far; 151 bool softparticles, ssao, godrays, dof, filmgrain; 152 // hdr 153 float hdrBloomint, hdrBloomorig; 154 float hdrParam1, hdrParam2, hdrParam3; 155 float hdrAdaptationScale; 156 float vignRadius, vignDarkness; 157 158 // replay 159 bool rpl_rec, rpl_ghost, rpl_bestonly; 160 bool rpl_ghostother, rpl_trackghost; 161 bool rpl_ghostpar, rpl_ghostrewind, rpl_listghosts; 162 int rpl_listview, rpl_numViews; 163 float ghoHideDist, ghoHideDistTrk; // ghost hide dist, when close 164 165 // network 166 std::string nickname, netGameName; 167 std::string master_server_address; 168 int master_server_port, local_port; 169 170 // not in gui 171 bool boostFromExhaust; int net_local_plr; 172 173 174 //------------------------------------------ 175 SETTINGS(); 176 177 template <typename T> Param(CONFIGFILE & conf,bool write,std::string pname,T & value)178 bool Param(CONFIGFILE & conf, bool write, std::string pname, T & value) 179 { 180 if (write) 181 { conf.SetParam(pname, value); 182 return true; 183 }else 184 return conf.GetParam(pname, value); 185 } 186 void Serialize(bool write, CONFIGFILE & config); 187 void Load(std::string sfile), Save(std::string sfile); 188 }; 189