SuperTuxKart
user_config.hpp
1 //
2 // SuperTuxKart - a fun racing game with go-kart
3 // Copyright (C) 2006-2015 SuperTuxKart-Team
4 // Modelled after Supertux's configfile.h
5 //
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 3
9 // of the License, or (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 
20 #ifndef HEADER_USER_CONFIG_HPP
21 #define HEADER_USER_CONFIG_HPP
22 
23 /* The following config versions are currently used:
24  0: the 0.2 release config file, without config-version number
25  (so that defaults to 0)
26  1: Removed singleWindowMenu, newKeyboardStyle, oldStatusDisplay,
27  added config-version number
28  Version 1 can read version 0 without any problems, so
29  SUPPORTED_CONFIG_VERSION is 0.
30  2: Changed to SDL keyboard bindings
31  3: Added username (userid was used for ALL players)
32  4: Added username per player
33  5: Enabled jumping, which might cause a problem with old
34  config files (which have an unused entry for jump defined
35  --> if a kart control for (say) player 2 uses the same key as
36  jump for player 1, this problem is not noticed in 0.3, but will
37  cause an undefined game action now
38  6: Added stick configurations.
39 */
40 #include <array>
41 #include <iterator>
42 #include <string>
43 #include <map>
44 #include <vector>
45 #include <sstream>
46 
47 #include <irrString.h>
48 #include <IrrCompileConfig.h>
49 
50 using irr::core::stringc;
51 using irr::core::stringw;
52 
53 #include "utils/constants.hpp"
54 #include "utils/no_copy.hpp"
55 #include "utils/ptr_vector.hpp"
56 #include "utils/time.hpp"
57 
58 class PlayerProfile;
59 class SavedGrandPrix;
60 class XMLNode;
61 class UTFWriter;
62 
68 {
69  friend class GroupUserConfigParam;
70 protected:
71  bool m_can_be_deleted = true;
72  std::string m_param_name;
73  std::string m_comment;
74 public:
75  virtual ~UserConfigParam();
76  virtual void write(std::stringstream & stream) const = 0;
77  virtual void writeInner(std::stringstream & stream, int level = 0) const;
78  virtual void findYourDataInAChildOf(const XMLNode* node) = 0;
79  virtual void findYourDataInAnAttributeOf(const XMLNode* node) = 0;
80  virtual irr::core::stringc toString() const = 0;
81 }; // UserConfigParam
82 
83 // ============================================================================
85 {
86  std::vector<UserConfigParam*> m_attributes;
87  std::vector<GroupUserConfigParam*> m_children;
88 public:
89  GroupUserConfigParam(const char* name, const char* comment=NULL);
90  GroupUserConfigParam(const char* param_name,
91  GroupUserConfigParam* group,
92  const char* comment = NULL);
93  void write(std::stringstream& stream) const;
94  void writeInner(std::stringstream& stream, int level = 0) const;
95  void findYourDataInAChildOf(const XMLNode* node);
96  void findYourDataInAnAttributeOf(const XMLNode* node);
97 
98  void addChild(UserConfigParam* child);
99  void addChild(GroupUserConfigParam* child);
100  void clearChildren();
101 
102  irr::core::stringc toString() const;
103 }; // GroupUserConfigParam
104 
105 // ============================================================================
108 template<typename T, typename U>
110 {
111 protected:
112  std::array<std::string, 3> m_key_names;
113  std::map<T, U> m_elements;
114  MapUserConfigParam(const char* param_name,
115  const char* comment)
116  {
117  m_param_name = param_name;
118  if (comment != NULL)
119  m_comment = comment;
120  }
121 
122 public:
123  MapUserConfigParam(const char* param_name,
124  const char* comment,
125  std::array<std::string, 3> key_names,
126  std::map<T, U> default_value);
127  MapUserConfigParam(const char* param_name,
128  GroupUserConfigParam* group,
129  const char* comment = NULL);
130  MapUserConfigParam(const char* param_name,
131  GroupUserConfigParam* group,
132  const char* comment, std::array<std::string, 3> key_names,
133  std::map<T, U> default_value);
134 
135  void write(std::stringstream& stream) const;
136  void findYourDataInAChildOf(const XMLNode* node);
137  void findYourDataInAnAttributeOf(const XMLNode* node);
138 
139  void addElement(T element, U value);
140 
141  irr::core::stringc toString() const;
142 
143  operator std::map<T, U>&()
144  {
145  return m_elements;
146  }
147  typename std::map<T, U>::iterator begin()
148  {
149  return m_elements.begin();
150  }
151  typename std::map<T, U>::iterator end()
152  {
153  return m_elements.end();
154  }
155  typename std::map<T, U>::iterator find(const T& key)
156  {
157  return m_elements.find(key);
158  }
159  size_t erase(const T& key)
160  {
161  return m_elements.erase(key);
162  }
163  bool empty() const
164  {
165  return m_elements.empty();
166  }
167  std::map<T, U>& operator=(const std::map<T, U>& v)
168  {
169  m_elements = std::map<T, U>(v);
170  return m_elements;
171  }
172  std::map<T, U>& operator=(const MapUserConfigParam& v)
173  {
174  m_elements = std::map<T,U>(v);
175  return m_elements;
176  }
177  size_t size() const
178  {
179  return m_elements.size();
180  }
181  U& operator[] (const T key)
182  {
183  return m_elements[key];
184  }
185  U& at(const T key)
186  {
187  return m_elements.at(key);
188  }
189 }; // MapUserConfigParam
192 // ============================================================================
194 {
195 protected:
196  int m_value;
197  int m_default_value;
198  IntUserConfigParam(const char* param_name, const char* comment)
199  {
200  m_param_name = param_name;
201  if (comment != NULL)
202  m_comment = comment;
203  }
204 
205 public:
206 
207  IntUserConfigParam(int default_value, const char* param_name,
208  const char* comment = NULL);
209  IntUserConfigParam(int default_value, const char* param_name,
210  GroupUserConfigParam* group,
211  const char* comment = NULL);
212 
213  void write(std::stringstream& stream) const;
214  void findYourDataInAChildOf(const XMLNode* node);
215  void findYourDataInAnAttributeOf(const XMLNode* node);
216 
217  irr::core::stringc toString() const;
218  void setDefaultValue(int v) { m_value = m_default_value = v; }
219  void revertToDefaults() { m_value = m_default_value; }
220  int getDefaultValue() { return m_default_value; }
221  operator int() const { return m_value; }
222  int& operator++(int dummy) { m_value++; return m_value; }
223  int& operator=(const int& v) { m_value = v; return m_value; }
224  int& operator=(const IntUserConfigParam& v)
225  { m_value = (int)v; return m_value; }
226 }; // IntUserConfigParam
227 
228 // ============================================================================
230 {
231  StkTime::TimeType m_value;
232  StkTime::TimeType m_default_value;
233 
234 public:
235 
236  TimeUserConfigParam(StkTime::TimeType default_value, const char* param_name,
237  const char* comment = NULL);
238  TimeUserConfigParam(StkTime::TimeType default_value, const char* param_name,
239  GroupUserConfigParam* group, const char* comment=NULL);
240 
241  void write(std::stringstream& stream) const;
242  void findYourDataInAChildOf(const XMLNode* node);
243  void findYourDataInAnAttributeOf(const XMLNode* node);
244 
245  irr::core::stringc toString() const;
246  void revertToDefaults() { m_value = m_default_value; }
247  operator StkTime::TimeType() const { return m_value; }
248  StkTime::TimeType& operator=(const StkTime::TimeType& v)
249  { m_value = v; return m_value; }
250  StkTime::TimeType& operator=(const TimeUserConfigParam& v)
251  { m_value = (int)v; return m_value; }
252 }; // TimeUserConfigParam
253 
254 // ============================================================================
256 {
257 protected:
258  std::string m_value;
259  std::string m_default_value;
260  StringUserConfigParam(const char* param_name, const char* comment)
261  {
262  m_param_name = param_name;
263  if (comment != NULL)
264  m_comment = comment;
265  }
266 
267 public:
268 
269  StringUserConfigParam(const char* default_value, const char* param_name,
270  const char* comment);
271  StringUserConfigParam(const char* default_value, const char* param_name,
272  GroupUserConfigParam* group,
273  const char* comment = NULL);
274 
275  void write(std::stringstream& stream) const;
276  void findYourDataInAChildOf(const XMLNode* node);
277  void findYourDataInAnAttributeOf(const XMLNode* node);
278 
279  void revertToDefaults() { m_value = m_default_value; }
280 
281  std::string getDefaultValue() const { return m_default_value; }
282 
283  irr::core::stringc toString() const { return m_value.c_str(); }
284 
285  operator std::string() const { return m_value; }
286  std::string& operator=(const std::string& v)
287  { m_value = v; return m_value; }
288  std::string& operator=(const StringUserConfigParam& v)
289  { m_value = (std::string)v; return m_value; }
290 
291  const char* c_str() const { return m_value.c_str(); }
292 }; // StringUserConfigParam
293 
294 // ============================================================================
296 {
297 protected:
298  bool m_value;
299  bool m_default_value;
300  BoolUserConfigParam(const char* param_name, const char* comment)
301  {
302  m_param_name = param_name;
303  if (comment != NULL)
304  m_comment = comment;
305  }
306 
307 public:
308  BoolUserConfigParam(bool default_value, const char* param_name,
309  const char* comment = NULL);
310  BoolUserConfigParam(bool default_value, const char* param_name,
311  GroupUserConfigParam* group,
312  const char* comment = NULL);
313  void write(std::stringstream& stream) const;
314  void findYourDataInAChildOf(const XMLNode* node);
315  void findYourDataInAnAttributeOf(const XMLNode* node);
316 
317  irr::core::stringc toString() const;
318  void revertToDefaults() { m_value = m_default_value; }
319  void setDefaultValue(bool v) { m_value = m_default_value = v; }
320 
321  operator bool() const { return m_value; }
322  bool& operator=(const bool& v) { m_value = v; return m_value; }
323  bool& operator=(const BoolUserConfigParam& v)
324  { m_value = (bool)v; return m_value; }
325 }; // BoolUserConfigParam
326 
327 // ============================================================================
329 {
330 protected:
331  float m_value;
332  float m_default_value;
333  FloatUserConfigParam(const char* param_name, const char* comment)
334  {
335  m_param_name = param_name;
336  if (comment != NULL)
337  m_comment = comment;
338  }
339 
340 public:
341  FloatUserConfigParam(float default_value, const char* param_name,
342  const char* comment = NULL);
343  FloatUserConfigParam(float default_value, const char* param_name,
344  GroupUserConfigParam* group,
345  const char* comment = NULL);
346 
347  void write(std::stringstream& stream) const;
348  void findYourDataInAChildOf(const XMLNode* node);
349  void findYourDataInAnAttributeOf(const XMLNode* node);
350 
351  irr::core::stringc toString() const;
352  void revertToDefaults() { m_value = m_default_value; }
353  void setDefaultValue(float v) { m_value = m_default_value = v; }
354 
355  operator float() const { return m_value; }
356  float& operator=(const float& v) { m_value = v; return m_value; }
357  float& operator=(const FloatUserConfigParam& v)
358  { m_value = (float)v; return m_value; }
359 }; // FloatUserConfigParam
360 
361 // ============================================================================
362 enum AnimType {ANIMS_NONE = 0,
363  ANIMS_PLAYERS_ONLY = 1,
364  ANIMS_ALL = 2 };
365 
366 enum MultitouchControls
367 {
368  MULTITOUCH_CONTROLS_UNDEFINED = 0,
369  MULTITOUCH_CONTROLS_STEERING_WHEEL = 1,
370  MULTITOUCH_CONTROLS_ACCELEROMETER = 2,
371  MULTITOUCH_CONTROLS_GYROSCOPE = 3,
372 };
373 
381 #ifndef PARAM_PREFIX
382 #define PARAM_PREFIX extern
383 #endif
384 
385 #ifndef PARAM_DEFAULT
386 #define PARAM_DEFAULT(X)
387 #endif
388 
389 // ============================================================================
394 {
395 
396  // ---- Audio
397  PARAM_PREFIX GroupUserConfigParam m_audio_group
398  PARAM_DEFAULT( GroupUserConfigParam("Audio", "Audio Settings") );
399 
400  PARAM_PREFIX BoolUserConfigParam m_sfx
401  PARAM_DEFAULT( BoolUserConfigParam(true, "sfx_on", &m_audio_group,
402  "Whether sound effects are enabled or not (true or false)") );
403  PARAM_PREFIX BoolUserConfigParam m_music
404  PARAM_DEFAULT( BoolUserConfigParam(true, "music_on",
405  &m_audio_group,
406  "Whether musics are enabled or not (true or false)") );
407  PARAM_PREFIX IntUserConfigParam m_sfx_numerator
408  PARAM_DEFAULT( IntUserConfigParam(10, "sfx_numerator",
409  &m_audio_group, "The value in the audio options SFX spinner") );
410  PARAM_PREFIX FloatUserConfigParam m_sfx_volume
411  PARAM_DEFAULT( FloatUserConfigParam(0.2678f, "sfx_volume",
412  &m_audio_group, "Volume for sound effects, see openal AL_GAIN "
413  "for interpretation") );
414  PARAM_PREFIX IntUserConfigParam m_music_numerator
415  PARAM_DEFAULT( IntUserConfigParam(10, "music_numerator",
416  &m_audio_group, "The value in the audio options music spinner") );
417  PARAM_PREFIX FloatUserConfigParam m_music_volume
418  PARAM_DEFAULT( FloatUserConfigParam(0.2678f, "music_volume",
419  &m_audio_group, "Music volume from 0.0 to 1.0") );
420 
421  PARAM_PREFIX IntUserConfigParam m_volume_denominator
422  PARAM_DEFAULT( IntUserConfigParam(15, "volume_denominator",
423  &m_audio_group,
424  "Number of steps for volume adjustment") );
425 
426  // ---- Race setup
427  PARAM_PREFIX GroupUserConfigParam m_race_setup_group
428  PARAM_DEFAULT( GroupUserConfigParam("RaceSetup",
429  "Race Setup Settings") );
430 
431  PARAM_PREFIX IntUserConfigParam m_default_num_karts
432  PARAM_DEFAULT( IntUserConfigParam(4, "numkarts",
433  &m_race_setup_group,
434  "Default number of karts. -1 means use all") );
435  PARAM_PREFIX IntUserConfigParam m_num_laps
436  PARAM_DEFAULT( IntUserConfigParam(4, "numlaps",
437  &m_race_setup_group, "Default number of laps.") );
438  PARAM_PREFIX IntUserConfigParam m_gp_reverse
439  PARAM_DEFAULT( IntUserConfigParam(0, "gp-reverse",
440  &m_race_setup_group, "Default direction of GP tracks. 0=default, 1=no reverse, 2=all reverse, 3=Random") );
441  PARAM_PREFIX IntUserConfigParam m_rand_gp_num_tracks
442  PARAM_DEFAULT( IntUserConfigParam(1, "random-gp-num-tracks",
443  &m_race_setup_group, "Default number of tracks for random GP.") );
444  PARAM_PREFIX IntUserConfigParam m_ffa_time_limit
445  PARAM_DEFAULT(IntUserConfigParam(3, "ffa-time-limit",
446  &m_race_setup_group, "Time limit in ffa mode."));
447  PARAM_PREFIX BoolUserConfigParam m_use_ffa_mode
448  PARAM_DEFAULT(BoolUserConfigParam(false, "use-ffa-mode",
449  &m_race_setup_group, "Use ffa mode instead of 3 strikes battle."));
450  PARAM_PREFIX IntUserConfigParam m_lap_trial_time_limit
451  PARAM_DEFAULT(IntUserConfigParam(3, "lap-trial-time-limit",
452  &m_race_setup_group, "Time limit in lap trial mode."));
453  PARAM_PREFIX IntUserConfigParam m_num_goals
454  PARAM_DEFAULT( IntUserConfigParam(3, "numgoals",
455  &m_race_setup_group, "Default number of goals in soccer mode.") );
456  PARAM_PREFIX IntUserConfigParam m_soccer_default_team
457  PARAM_DEFAULT( IntUserConfigParam(0, "soccer-default-team",
458  &m_race_setup_group, "Default team in soccer mode for single player.") );
459  PARAM_PREFIX IntUserConfigParam m_soccer_time_limit
460  PARAM_DEFAULT( IntUserConfigParam(3, "soccer-time-limit",
461  &m_race_setup_group, "Time limit in soccer mode.") );
462  PARAM_PREFIX BoolUserConfigParam m_soccer_use_time_limit
463  PARAM_DEFAULT( BoolUserConfigParam(false, "soccer-use-time-limit",
464  &m_race_setup_group, "Enable time limit in soccer mode.") );
465  PARAM_PREFIX BoolUserConfigParam m_random_arena_item
466  PARAM_DEFAULT( BoolUserConfigParam(false, "random-arena-item",
467  &m_race_setup_group, "Enable random location of items in an arena.") );
468  PARAM_PREFIX IntUserConfigParam m_difficulty
469  PARAM_DEFAULT( IntUserConfigParam(0, "difficulty",
470  &m_race_setup_group,
471  "Default race difficulty. 0=easy, 1=medium, 2=hard, 3=supertux") );
472  PARAM_PREFIX IntUserConfigParam m_game_mode
473  PARAM_DEFAULT( IntUserConfigParam(0, "game_mode",
474  &m_race_setup_group,
475  "Game mode. 0=standard, 1=time trial, 2=follow "
476  "the leader, 3=3 strikes, 4=easter egg hunt, "
477  "5=soccer, 6=ghost replay") );
478  PARAM_PREFIX StringUserConfigParam m_default_kart
479  PARAM_DEFAULT( StringUserConfigParam("tux", "kart",
480  "Kart to select by default (the last used kart)") );
481  PARAM_PREFIX StringUserConfigParam m_last_used_kart_group
482  PARAM_DEFAULT( StringUserConfigParam("all", "last_kart_group",
483  "Last selected kart group") );
484  PARAM_PREFIX IntUserConfigParam m_soccer_red_ai_num
485  PARAM_DEFAULT( IntUserConfigParam(0, "soccer-red-ai-num",
486  &m_race_setup_group, "Number of red AI karts in soccer mode.") );
487  PARAM_PREFIX IntUserConfigParam m_soccer_blue_ai_num
488  PARAM_DEFAULT( IntUserConfigParam(0, "soccer-blue-ai-num",
489  &m_race_setup_group, "Number of blue AI karts in soccer mode.") );
490  PARAM_PREFIX BoolUserConfigParam m_karts_powerup_gui
491  PARAM_DEFAULT( BoolUserConfigParam(false, "karts-powerup-gui",
492  &m_race_setup_group, "Show other karts' held powerups in race gui.") );
493  PARAM_PREFIX BoolUserConfigParam m_soccer_player_list
494  PARAM_DEFAULT( BoolUserConfigParam(false, "soccer-player-list",
495  &m_race_setup_group, "Show player list icon in soccer mode.") );
496  PARAM_PREFIX BoolUserConfigParam m_addon_tux_online
497  PARAM_DEFAULT( BoolUserConfigParam(false, "addon-tux-online",
498  &m_race_setup_group, "Always show online addon karts as tux when live join is on.") );
499  PARAM_PREFIX BoolUserConfigParam m_random_player_pos
500  PARAM_DEFAULT( BoolUserConfigParam(false, "random-player-pos",
501  &m_race_setup_group, "Randomize the position of the players at the start of a race. Doesn't apply to story mode.") );
502 
503  // ---- Wiimote data
504  PARAM_PREFIX GroupUserConfigParam m_wiimote_group
505  PARAM_DEFAULT( GroupUserConfigParam("WiiMote",
506  "Settings for the wiimote") );
507  PARAM_PREFIX FloatUserConfigParam m_wiimote_raw_max
508  PARAM_DEFAULT( FloatUserConfigParam(20.0f, "wiimote-raw-max",
509  &m_wiimote_group,
510  "At what raw input value maximum steering is reached (between 1 and 25).") );
511 
512  PARAM_PREFIX FloatUserConfigParam m_wiimote_weight_linear
513  PARAM_DEFAULT( FloatUserConfigParam(1.0f, "wiimote-weight-linear",
514  &m_wiimote_group,
515  "A weight applied to the linear component of mapping wiimote angle to steering angle"));
516 
517  PARAM_PREFIX FloatUserConfigParam m_wiimote_weight_square
518  PARAM_DEFAULT( FloatUserConfigParam(0.0f, "wiimote-weight-square",
519  &m_wiimote_group,
520  "A weight applied to the square component of mapping wiimote angle to steering angle"));
521 
522  PARAM_PREFIX FloatUserConfigParam m_wiimote_weight_asin
523  PARAM_DEFAULT( FloatUserConfigParam(0.0f, "wiimote-weight-asin",
524  &m_wiimote_group,
525  "A weight applied to the asin component of mapping wiimote angle to steering angle"));
526 
527  PARAM_PREFIX FloatUserConfigParam m_wiimote_weight_sin
528  PARAM_DEFAULT( FloatUserConfigParam(0.0f, "wiimote-weight-sin",
529  &m_wiimote_group,
530  "A weight applied to the sin component of mapping wiimote angle to steering angle"));
531 
532  // ---- Multitouch device
533  PARAM_PREFIX GroupUserConfigParam m_multitouch_group
534  PARAM_DEFAULT( GroupUserConfigParam("Multitouch",
535  "Settings for the multitouch device") );
536 
537  PARAM_PREFIX IntUserConfigParam m_multitouch_active
538  PARAM_DEFAULT( IntUserConfigParam(1, "multitouch_active",
539  &m_multitouch_group,
540  "Enable multitouch support: 0 = disabled, 1 = if available, 2 = enabled") );
541 
542  PARAM_PREFIX BoolUserConfigParam m_multitouch_draw_gui
543  PARAM_DEFAULT( BoolUserConfigParam(false, "multitouch_draw_gui",
544  &m_multitouch_group,
545  "Enable multitouch race GUI"));
546 
547  PARAM_PREFIX BoolUserConfigParam m_multitouch_inverted
548  PARAM_DEFAULT( BoolUserConfigParam(false, "multitouch_inverted",
549  &m_multitouch_group,
550  "Draw steering wheel on right side.") );
551 
552  PARAM_PREFIX BoolUserConfigParam m_multitouch_auto_acceleration
553  PARAM_DEFAULT( BoolUserConfigParam(false, "multitouch_auto_acceleration",
554  &m_multitouch_group,
555  "Auto acceleration for multitouch controls.") );
556 
557  PARAM_PREFIX IntUserConfigParam m_multitouch_controls
558  PARAM_DEFAULT( IntUserConfigParam(0, "multitouch_controls",
559  &m_multitouch_group,
560  "Multitouch mode: 0 = undefined, 1 = steering wheel, 2 = accelerometer, 3 = gyroscope"));
561 
562  PARAM_PREFIX FloatUserConfigParam m_multitouch_deadzone
563  PARAM_DEFAULT( FloatUserConfigParam(0.1f, "multitouch_deadzone",
564  &m_multitouch_group,
565  "A parameter in range [0, 0.5] that determines the zone that is "
566  "considered as centered in steering button."));
567 
568  PARAM_PREFIX FloatUserConfigParam m_multitouch_sensitivity_x
569  PARAM_DEFAULT( FloatUserConfigParam(0.2f, "multitouch_sensitivity_x",
570  &m_multitouch_group,
571  "A parameter in range [0, 1.0] that determines the sensitivity for x axis."));
572 
573  PARAM_PREFIX FloatUserConfigParam m_multitouch_sensitivity_y
574  PARAM_DEFAULT( FloatUserConfigParam(0.65f, "multitouch_sensitivity_y",
575  &m_multitouch_group,
576  "A parameter in range [0, 1.0] that determines the sensitivity for y axis."));
577 
578  PARAM_PREFIX FloatUserConfigParam m_multitouch_tilt_factor
579  PARAM_DEFAULT( FloatUserConfigParam(4.0f, "multitouch_tilt_factor",
580  &m_multitouch_group,
581  "A parameter that determines general accelerometer sensitivity."));
582 
583  PARAM_PREFIX FloatUserConfigParam m_multitouch_scale
584  PARAM_DEFAULT( FloatUserConfigParam(1.2f, "multitouch_scale",
585  &m_multitouch_group,
586  "A parameter in range [0.5, 1.5] that determines the scale of the "
587  "multitouch interface."));
588 
589  PARAM_PREFIX IntUserConfigParam m_screen_keyboard
590  PARAM_DEFAULT( IntUserConfigParam(0, "screen_keyboard_status",
591  &m_multitouch_group,
592  "STK screen keyboard status: 0 = disabled, 1 = enabled") );
593 
594  // ---- GP start order
595  PARAM_PREFIX GroupUserConfigParam m_gp_start_order
596  PARAM_DEFAULT( GroupUserConfigParam("GpStartOrder",
597  "Order karts start in GP") );
598  PARAM_PREFIX BoolUserConfigParam m_gp_most_points_first
599  PARAM_DEFAULT( BoolUserConfigParam(true, "most_points_first",
600  &m_gp_start_order,
601  "Starting order from most to least points (true) or other "
602  "way around (false)") );
603  PARAM_PREFIX BoolUserConfigParam m_gp_player_last
604  PARAM_DEFAULT( BoolUserConfigParam(false, "player_last",
605  &m_gp_start_order,
606  "Always put the player at the back or not (Bully mode).") );
607  PARAM_PREFIX StringUserConfigParam m_additional_gp_directory
608  PARAM_DEFAULT( StringUserConfigParam("", "additional_gp_directory",
609  "Directory with additional GP's."));
610 
611  // ---- Video
612  PARAM_PREFIX GroupUserConfigParam m_video_group
613  PARAM_DEFAULT( GroupUserConfigParam("Video", "Video Settings") );
614 
615  PARAM_PREFIX IntUserConfigParam m_real_width
616  PARAM_DEFAULT( IntUserConfigParam(1024, "real_width", &m_video_group,
617  "Screen/window real width in pixels before high dpi is applied") );
618  PARAM_PREFIX IntUserConfigParam m_real_height
619  PARAM_DEFAULT( IntUserConfigParam(768, "real_height", &m_video_group,
620  "Screen/window real height in pixels before high dpi is applied") );
621  PARAM_PREFIX IntUserConfigParam m_width
622  PARAM_DEFAULT( IntUserConfigParam(1024, "width", &m_video_group,
623  "Screen/window width in pixels, this value should not be edited") );
624  PARAM_PREFIX IntUserConfigParam m_height
625  PARAM_DEFAULT( IntUserConfigParam(768, "height", &m_video_group,
626  "Screen/window height in pixels, this value should not be edited") );
627  PARAM_PREFIX BoolUserConfigParam m_fullscreen
628  PARAM_DEFAULT( BoolUserConfigParam(false, "fullscreen",
629  &m_video_group) );
630  PARAM_PREFIX IntUserConfigParam m_prev_real_width
631  PARAM_DEFAULT( IntUserConfigParam(1024, "prev_real_width",
632  &m_video_group, "Previous real screen/window width") );
633  PARAM_PREFIX IntUserConfigParam m_prev_real_height
634  PARAM_DEFAULT( IntUserConfigParam(768, "prev_real_height",
635  &m_video_group,"Previous real screen/window height") );
636  PARAM_PREFIX BoolUserConfigParam m_prev_fullscreen
637  PARAM_DEFAULT( BoolUserConfigParam(false, "prev_fullscreen",
638  &m_video_group) );
639 
640 
641  PARAM_PREFIX BoolUserConfigParam m_remember_window_location
642  PARAM_DEFAULT( BoolUserConfigParam(false, "remember_window_location",
643  &m_video_group) );
644  PARAM_PREFIX IntUserConfigParam m_window_x
645  PARAM_DEFAULT( IntUserConfigParam(-1, "window_x",
646  &m_video_group,"If remember_window_location is true") );
647  PARAM_PREFIX IntUserConfigParam m_window_y
648  PARAM_DEFAULT( IntUserConfigParam(-1, "window_y",
649  &m_video_group,"If remember_window_location is true") );
650 
651  PARAM_PREFIX BoolUserConfigParam m_display_fps
652  PARAM_DEFAULT( BoolUserConfigParam(false, "show_fps",
653  &m_video_group, "Display frame per seconds") );
654  PARAM_PREFIX BoolUserConfigParam m_display_story_mode_timer
655  PARAM_DEFAULT( BoolUserConfigParam(true, "show_story_mode_timer",
656  &m_video_group, "Display the story mode timer") );
657  PARAM_PREFIX BoolUserConfigParam m_speedrun_mode
658  PARAM_DEFAULT( BoolUserConfigParam(false, "show_speedrun_timer",
659  &m_video_group, "Display the speedrun timer") );
660  PARAM_PREFIX IntUserConfigParam m_max_fps
661  PARAM_DEFAULT( IntUserConfigParam(120, "max_fps",
662  &m_video_group, "Maximum fps, should be at least 60") );
663  PARAM_PREFIX BoolUserConfigParam m_force_legacy_device
664  PARAM_DEFAULT(BoolUserConfigParam(false, "force_legacy_device",
665  &m_video_group, "Force OpenGL 2 context, even if OpenGL 3 is available."));
666  PARAM_PREFIX BoolUserConfigParam m_split_screen_horizontally
667  PARAM_DEFAULT(BoolUserConfigParam(true, "split_screen_horizontally",
668  &m_video_group, "When playing a non-square amount of players (e.g. 2),"
669  " should it split horizontally (top/bottom)"));
670  PARAM_PREFIX BoolUserConfigParam m_texture_compression
671  PARAM_DEFAULT(BoolUserConfigParam(true, "enable_texture_compression",
672  &m_video_group, "Enable Texture Compression"));
677  PARAM_PREFIX IntUserConfigParam m_high_definition_textures
678  PARAM_DEFAULT(IntUserConfigParam(1, "enable_high_definition_textures",
679  &m_video_group, "Enable high definition textures. Bit flag: "
680  "bit 0 = enabled/disabled; bit 1 = set by user/set as default"));
681  PARAM_PREFIX BoolUserConfigParam m_glow
682  PARAM_DEFAULT(BoolUserConfigParam(false, "enable_glow",
683  &m_video_group, "Enable Glow"));
684  PARAM_PREFIX BoolUserConfigParam m_bloom
685  PARAM_DEFAULT(BoolUserConfigParam(false, "enable_bloom",
686  &m_video_group, "Enable Bloom"));
687  PARAM_PREFIX BoolUserConfigParam m_light_shaft
688  PARAM_DEFAULT(BoolUserConfigParam(false, "enable_light_shaft",
689  &m_video_group, "Enable Light Shafts"));
690  PARAM_PREFIX BoolUserConfigParam m_dynamic_lights
691  PARAM_DEFAULT(BoolUserConfigParam(true, "enable_dynamic_lights",
692  &m_video_group, "Enable Dynamic Lights"));
693  PARAM_PREFIX BoolUserConfigParam m_dof
694  PARAM_DEFAULT(BoolUserConfigParam(false, "enable_dof",
695  &m_video_group, "Enable Depth of Field"));
696  PARAM_PREFIX BoolUserConfigParam m_old_driver_popup
697  PARAM_DEFAULT(BoolUserConfigParam(true, "old_driver_popup",
698  &m_video_group, "Determines if popup message about too old drivers should be displayed."));
699  PARAM_PREFIX FloatUserConfigParam m_scale_rtts_factor
700  PARAM_DEFAULT(FloatUserConfigParam(1.0f, "scale_rtts_factor",
701  &m_video_group, "Custom value for RTTs resolution. "
702  "Value should be smaller or equal to 1.0"));
703  PARAM_PREFIX IntUserConfigParam m_max_texture_size
704  PARAM_DEFAULT(IntUserConfigParam(512, "max_texture_size",
705  &m_video_group, "Max texture size when high definition textures are "
706  "disabled"));
707  PARAM_PREFIX BoolUserConfigParam m_ssr
708  PARAM_DEFAULT(BoolUserConfigParam(false, "ssr",
709  &m_video_group, "Enable screen space reflection"));
710  PARAM_PREFIX BoolUserConfigParam m_hq_mipmap
711  PARAM_DEFAULT(BoolUserConfigParam(false, "hq_mipmap",
712  &m_video_group, "Generate mipmap for textures using "
713  "high quality method with SSE"));
714  PARAM_PREFIX FloatUserConfigParam m_font_size
715  PARAM_DEFAULT( FloatUserConfigParam(3, "font_size",
716  &m_video_group, "The size of fonts. 0 is the smallest and 6 is the biggest") );
717 
718 #if defined(_IRR_COMPILE_WITH_DIRECT3D_9_) && defined(_M_ARM)
719  PARAM_PREFIX StringUserConfigParam m_render_driver
720  PARAM_DEFAULT( StringUserConfigParam("directx9", "render_driver",
721  &m_video_group, "Render video driver to use, at the moment opengl, vulkan or directx9 is supported.") );
722 #else
723  PARAM_PREFIX StringUserConfigParam m_render_driver
724  PARAM_DEFAULT( StringUserConfigParam("opengl", "render_driver",
725  &m_video_group, "Render video driver to use, at the moment opengl, vulkan or directx9 is supported.") );
726 #endif
727 
728 #if defined(MOBILE_STK)
729  PARAM_PREFIX BoolUserConfigParam m_vulkan_fullscreen_desktop
730  PARAM_DEFAULT(BoolUserConfigParam(false, "vulkan_fullscreen_desktop",
731  &m_video_group, "Use SDL_WINDOW_FULLSCREEN_DESKTOP for vulkan device"));
732 #else
733  PARAM_PREFIX BoolUserConfigParam m_vulkan_fullscreen_desktop
734  PARAM_DEFAULT(BoolUserConfigParam(true, "vulkan_fullscreen_desktop",
735  &m_video_group, "Use SDL_WINDOW_FULLSCREEN_DESKTOP for vulkan device"));
736 #endif
737 
738  PARAM_PREFIX BoolUserConfigParam m_non_ge_fullscreen_desktop
739  PARAM_DEFAULT(BoolUserConfigParam(false, "non_ge_fullscreen_desktop",
740  &m_video_group, "Use SDL_WINDOW_FULLSCREEN_DESKTOP for non-ge device"));
741 
742  // ---- Recording
743  PARAM_PREFIX GroupUserConfigParam m_recording_group
744  PARAM_DEFAULT(GroupUserConfigParam("Recording",
745  "Recording Settings"));
746 
747  PARAM_PREFIX BoolUserConfigParam m_limit_game_fps
748  PARAM_DEFAULT(BoolUserConfigParam(true, "limit_game_fps",
749  &m_recording_group, "Limit game framerate not beyond the fps of"
750  " recording video."));
751  PARAM_PREFIX IntUserConfigParam m_video_format
752  PARAM_DEFAULT(IntUserConfigParam(0, "video_format",
753  &m_recording_group, "Specify the video for record, which is the enum"
754  " of VideoFormat in libopenglrecorder. It will"
755  " auto fallback to MJPEG if libopenglrecorder was"
756  " not compiled with such video encoder."));
757 
758  PARAM_PREFIX IntUserConfigParam m_audio_bitrate
759  PARAM_DEFAULT(IntUserConfigParam(112000, "audio_bitrate",
760  &m_recording_group, "Specify the bitrate for audio"));
761 
762  PARAM_PREFIX IntUserConfigParam m_video_bitrate
763  PARAM_DEFAULT(IntUserConfigParam(20000, "video_bitrate",
764  &m_recording_group, "Specify the bitrate for video"));
765 
766  PARAM_PREFIX IntUserConfigParam m_recorder_jpg_quality
767  PARAM_DEFAULT(IntUserConfigParam(90, "recorder_jpg_quality",
768  &m_recording_group, "Specify the jpg compression level of recorder"));
769 
770  PARAM_PREFIX IntUserConfigParam m_record_fps
771  PARAM_DEFAULT(IntUserConfigParam(30, "record_fps",
772  &m_recording_group, "Specify the fps of recording video"));
773 
774  // ---- Debug - not saved to config file
776  PARAM_PREFIX bool m_no_high_scores PARAM_DEFAULT(false);
777 
779  PARAM_PREFIX bool m_unit_testing PARAM_DEFAULT(false);
780 
782  PARAM_PREFIX bool m_gamepad_debug PARAM_DEFAULT( false );
783 
785  PARAM_PREFIX bool m_keyboard_debug PARAM_DEFAULT(false);
786 
788  PARAM_PREFIX bool m_wiimote_debug PARAM_DEFAULT( false );
789 
791  PARAM_PREFIX bool m_gamepad_visualisation PARAM_DEFAULT( false );
792 
795  PARAM_PREFIX bool m_material_debug PARAM_DEFAULT( false );
796 
798  PARAM_PREFIX int m_track_debug PARAM_DEFAULT( false );
799 
801  PARAM_PREFIX bool m_check_debug PARAM_DEFAULT( false );
802 
804  PARAM_PREFIX bool m_physics_debug PARAM_DEFAULT( false );
805 
807  PARAM_PREFIX bool m_fps_debug PARAM_DEFAULT(false);
808 
810  PARAM_PREFIX bool m_arena_ai_stats PARAM_DEFAULT(false);
811 
813  PARAM_PREFIX bool m_slipstream_debug PARAM_DEFAULT( false );
814 
816  PARAM_PREFIX bool m_ftl_debug PARAM_DEFAULT( false );
817 
819  PARAM_PREFIX bool m_tutorial_debug PARAM_DEFAULT( false );
820 
823  PARAM_PREFIX int m_verbosity PARAM_DEFAULT( 0 );
824 
825  PARAM_PREFIX bool m_no_start_screen PARAM_DEFAULT( false );
826 
827  PARAM_PREFIX bool m_race_now PARAM_DEFAULT( false );
828 
829  PARAM_PREFIX int m_default_keyboard PARAM_DEFAULT( -1 );
830 
831  PARAM_PREFIX int m_default_gamepad PARAM_DEFAULT( -1 );
832 
833  PARAM_PREFIX bool m_enforce_current_player PARAM_DEFAULT( false );
834 
835  PARAM_PREFIX bool m_enable_sound PARAM_DEFAULT( true );
836 
839  PARAM_PREFIX bool m_rendering_debug PARAM_DEFAULT( false );
840 
842  PARAM_PREFIX bool m_profiler_enabled PARAM_DEFAULT( false );
843 
844  PARAM_PREFIX bool m_disable_addon_karts PARAM_DEFAULT( false );
845 
846  PARAM_PREFIX bool m_disable_addon_tracks PARAM_DEFAULT( false );
847 
848  PARAM_PREFIX bool m_benchmark PARAM_DEFAULT( false );
849 
850  // ---- Networking
851  PARAM_PREFIX StringToUIntUserConfigParam m_server_bookmarks
852  PARAM_DEFAULT(StringToUIntUserConfigParam("server-bookmarks",
853  "Wan server bookmarks",
854  {{ "server-bookmarks", "server-name", "last-online" }}, {}));
855 
856  PARAM_PREFIX StringToUIntUserConfigParam m_server_bookmarks_order
857  PARAM_DEFAULT(StringToUIntUserConfigParam("server-bookmarks-order",
858  "Wan server bookmarks order",
859  {{ "server-bookmarks", "server-name", "id" }}, {}));
860 
861  PARAM_PREFIX StringToUIntUserConfigParam m_address_history
862  PARAM_DEFAULT(StringToUIntUserConfigParam("address-history",
863  "Last 5 IP addresses that user entered",
864  {{ "server-address", "address", "last-connection" }}, {}));
865 
866  // These stk domains have only a record to each ipv6 stun below,
867  // so we can use this to know ipv4 address of nat64 gateway (if any)
868  PARAM_PREFIX StringToUIntUserConfigParam m_stun_servers_v4
869  PARAM_DEFAULT(StringToUIntUserConfigParam("ipv4-stun-servers",
870  "The stun servers that will be used to know the public address "
871  "(ipv4 only) with port", {{ "stun-server", "address", "ping" }},
872  {
873  { "stunv4.linuxreviews.org:3478", 0u },
874  { "stunv4.7.supertuxkart.net:3478", 0u },
875  { "stunv4.8.supertuxkart.net:3478", 0u }
876  }
877  ));
878 
879  PARAM_PREFIX StringToUIntUserConfigParam m_stun_servers
880  PARAM_DEFAULT(StringToUIntUserConfigParam("ipv6-stun-servers",
881  "The stun servers that will be used to know the public address "
882  "(including ipv6) with port", {{ "stun-server", "address", "ping" }},
883  {
884  { "stun.linuxreviews.org:3478", 0u },
885  { "stun.supertuxkart.net:3478", 0u },
886  { "stun.stunprotocol.org:3478", 0u }
887  }
888  ));
889 
890  PARAM_PREFIX GroupUserConfigParam m_network_group
891  PARAM_DEFAULT(GroupUserConfigParam("Network", "Network Settings"));
892  PARAM_PREFIX BoolUserConfigParam m_enable_network_splitscreen
893  PARAM_DEFAULT(BoolUserConfigParam(false, "enable-network-splitscreen",
894  &m_network_group, "The default value of enable splitscreen checkbox "
895  "in online screen."));
896  PARAM_PREFIX BoolUserConfigParam m_log_packets
897  PARAM_DEFAULT(BoolUserConfigParam(false, "log-network-packets",
898  &m_network_group, "If all network packets should be logged"));
899  PARAM_PREFIX BoolUserConfigParam m_random_client_port
900  PARAM_DEFAULT(BoolUserConfigParam(true, "random-client-port",
901  &m_network_group, "Use random port for client connection "
902  "(check stk_config.xml for default value)"));
903  PARAM_PREFIX BoolUserConfigParam m_random_server_port
904  PARAM_DEFAULT(BoolUserConfigParam(false, "random-server-port",
905  &m_network_group, "Use random port for server connection "
906  "(check stk_config.xml for default value)"));
907  PARAM_PREFIX BoolUserConfigParam m_lobby_chat
908  PARAM_DEFAULT(BoolUserConfigParam(true, "lobby-chat",
909  &m_network_group, "Enable chatting in networking lobby, if off than "
910  "no chat message will be displayed from any players."));
911  PARAM_PREFIX BoolUserConfigParam m_race_chat
912  PARAM_DEFAULT(BoolUserConfigParam(true, "race-chat",
913  &m_network_group, "Enable chatting during races."));
914  PARAM_PREFIX BoolUserConfigParam m_ipv6_lan
915  PARAM_DEFAULT(BoolUserConfigParam(true, "ipv6-lan",
916  &m_network_group, "Enable IPv6 LAN server discovery."));
917  PARAM_PREFIX IntUserConfigParam m_max_players
918  PARAM_DEFAULT(IntUserConfigParam(8, "max-players",
919  &m_network_group, "Maximum number of players on the server "
920  "(for gui server creation."));
921  PARAM_PREFIX IntUserConfigParam m_timer_sync_difference_tolerance
922  PARAM_DEFAULT(IntUserConfigParam(5, "timer-sync-difference-tolerance",
923  &m_network_group, "Max time difference tolerance (in ms) to "
924  "synchronize timer with server."));
925  PARAM_PREFIX IntUserConfigParam m_default_ip_type
926  PARAM_DEFAULT(IntUserConfigParam(0, "default-ip-type",
927  &m_network_group, "Default IP type of this machine, "
928  "0 detect every time, 1 IPv4, 2 IPv6, 3 IPv6 NAT64, 4 Dual stack."));
929  PARAM_PREFIX BoolUserConfigParam m_lan_server_gp
930  PARAM_DEFAULT(BoolUserConfigParam(false, "lan-server-gp",
931  &m_network_group, "Show grand prix option in create LAN server "
932  "screen, false will show AI option."));
933  PARAM_PREFIX BoolUserConfigParam m_wan_server_gp
934  PARAM_DEFAULT(BoolUserConfigParam(true, "wan-server-gp",
935  &m_network_group, "Show grand prix option in create WAN server "
936  "screen, false will show AI option."));
937 
938  // ---- Gamemode setup
939  PARAM_PREFIX UIntToUIntUserConfigParam m_num_karts_per_gamemode
940  PARAM_DEFAULT(UIntToUIntUserConfigParam("num-karts-per-gamemode",
941  "The Number of karts per gamemode.",
942  {{ "gamemode-list", "gamemode", "num-karts" }},
943  {
944  { 0u, 4u },
945  { 1002u, 5u },
946  { 1100u, 4u },
947  { 1101u, 4u },
948  { 2000u, 4u },
949  { 2001u, 4u }
950  }
951  ));
952 
953  // ---- Graphic Quality
954  PARAM_PREFIX GroupUserConfigParam m_graphics_quality
955  PARAM_DEFAULT( GroupUserConfigParam("GFX",
956  "Graphics Quality Settings") );
957 
958  PARAM_PREFIX IntUserConfigParam m_particles_effects
959  PARAM_DEFAULT( IntUserConfigParam(2, "particles-effecs",
960  &m_graphics_quality, "Particles effects: 0 disabled, 1 only important, 2 enabled") );
961 
962  // This saves the actual user preference.
963  PARAM_PREFIX IntUserConfigParam m_xmas_mode
964  PARAM_DEFAULT( IntUserConfigParam(0, "christmas-mode",
965  &m_graphics_quality, "Christmas hats: 0 use current date, 1 always on, 2 always off") );
966 
967  // This saves the actual user preference.
968  PARAM_PREFIX IntUserConfigParam m_easter_ear_mode
969  PARAM_DEFAULT(IntUserConfigParam(0, "easter-ear-mode",
970  &m_graphics_quality, "Easter Bunny Ears: 0 use current date, 1 always on, 2 always off"));
971 
972  PARAM_PREFIX BoolUserConfigParam m_animated_characters
973  PARAM_DEFAULT( BoolUserConfigParam(true,
974  "animated-characters", &m_graphics_quality,
975  "Whether to display animated characters") );
976 
977  PARAM_PREFIX IntUserConfigParam m_geometry_level
978  PARAM_DEFAULT( IntUserConfigParam(2,
979  "geometry-level", &m_graphics_quality,
980  "Geometry quality 0=lowest level, no details; "
981  "5=everything is displayed") );
982 
983  PARAM_PREFIX IntUserConfigParam m_anisotropic
984  PARAM_DEFAULT( IntUserConfigParam(4, "anisotropic",
985  &m_graphics_quality,
986  "Quality of anisotropic filtering (usual values include 2-4-8-16; 0 to disable)") );
987 
988  PARAM_PREFIX IntUserConfigParam m_swap_interval
989  PARAM_DEFAULT( IntUserConfigParam(1, "swap-interval-vsync",
990  &m_graphics_quality,
991  "Swap interval for vsync: 0 = disabled, 1 = full") );
992  PARAM_PREFIX BoolUserConfigParam m_motionblur
993  PARAM_DEFAULT( BoolUserConfigParam(false,
994  "motionblur_enabled", &m_graphics_quality,
995  "Whether motion blur should be enabled") );
996  PARAM_PREFIX BoolUserConfigParam m_mlaa
997  PARAM_DEFAULT( BoolUserConfigParam(false,
998  "mlaa", &m_graphics_quality,
999  "Whether MLAA anti-aliasing should be enabled") );
1000  PARAM_PREFIX BoolUserConfigParam m_ssao
1001  PARAM_DEFAULT(BoolUserConfigParam(false,
1002  "ssao", &m_graphics_quality,
1003  "Enable Screen Space Ambient Occlusion") );
1004  PARAM_PREFIX BoolUserConfigParam m_light_scatter
1005  PARAM_DEFAULT(BoolUserConfigParam(false,
1006  "light_scatter", &m_graphics_quality,
1007  "Enable light scattering shaders") );
1008  PARAM_PREFIX IntUserConfigParam m_shadows_resolution
1009  PARAM_DEFAULT( IntUserConfigParam(0,
1010  "shadows_resolution", &m_graphics_quality,
1011  "Shadow resolution (0 = disabled") );
1012  PARAM_PREFIX BoolUserConfigParam m_pcss
1013  PARAM_DEFAULT( BoolUserConfigParam(false,
1014  "pcss", &m_graphics_quality,
1015  "Enable Percentage Closer Soft Shadows") );
1016  PARAM_PREFIX BoolUserConfigParam m_degraded_IBL
1017  PARAM_DEFAULT(BoolUserConfigParam(true,
1018  "Degraded_IBL", &m_graphics_quality,
1019  "Disable specular IBL"));
1020 
1021  // ---- Misc
1022  PARAM_PREFIX BoolUserConfigParam m_cache_overworld
1023  PARAM_DEFAULT( BoolUserConfigParam(true, "cache-overworld") );
1024 
1025  // TODO : is this used with new code? does it still work?
1026  PARAM_PREFIX BoolUserConfigParam m_crashed
1027  PARAM_DEFAULT( BoolUserConfigParam(false, "crashed") );
1028 
1029  // ---- Camera
1030  PARAM_PREFIX GroupUserConfigParam m_camera_normal
1031  PARAM_DEFAULT( GroupUserConfigParam(
1032  "camera-normal",
1033  "Camera settings for player.") );
1034 
1035  PARAM_PREFIX FloatUserConfigParam m_camera_distance
1036  PARAM_DEFAULT( FloatUserConfigParam(1.0, "distance",
1037  &m_camera_normal,
1038  "Distance between kart and camera"));
1039 
1040  PARAM_PREFIX FloatUserConfigParam m_camera_forward_up_angle
1041  PARAM_DEFAULT( FloatUserConfigParam(0, "forward-up-angle",
1042  &m_camera_normal,
1043  "Angle between camera and plane of kart (pitch) when the camera is pointing forward"));
1044 
1045  PARAM_PREFIX FloatUserConfigParam m_camera_forward_smooth_position
1046  PARAM_DEFAULT( FloatUserConfigParam(0.2, "forward-smooth-position",
1047  &m_camera_normal,
1048  "The strength of smoothness of the position of the camera"));
1049 
1050  PARAM_PREFIX FloatUserConfigParam m_camera_forward_smooth_rotation
1051  PARAM_DEFAULT( FloatUserConfigParam(0.125, "forward-smooth-rotation",
1052  &m_camera_normal,
1053  "The strength of smoothness of the rotation of the camera"));
1054 
1055  PARAM_PREFIX FloatUserConfigParam m_camera_backward_distance
1056  PARAM_DEFAULT( FloatUserConfigParam(2.0, "backward-distance",
1057  &m_camera_normal,
1058  "Distance between kart and camera (reverse)"));
1059 
1060  PARAM_PREFIX FloatUserConfigParam m_camera_backward_up_angle
1061  PARAM_DEFAULT( FloatUserConfigParam(5, "backward-up-angle",
1062  &m_camera_normal,
1063  "Angle between camera and plane of kart (pitch) when the camera is pointing backwards. This is usually larger than the forward-up-angle, since the kart itself otherwise obstricts too much of the view"));
1064 
1065  PARAM_PREFIX IntUserConfigParam m_camera_fov
1066  PARAM_DEFAULT( IntUserConfigParam(80, "fov",
1067  &m_camera_normal,
1068  "Focal distance (single player)"));
1069 
1070  PARAM_PREFIX BoolUserConfigParam m_reverse_look_use_soccer_cam
1071  PARAM_DEFAULT( BoolUserConfigParam(false, "reverse-look-use-soccer-cam",
1072  "Use ball camera in soccer mode, instead of reverse") );
1073 
1074  // ---- The present camera (default: Standard)
1075  PARAM_PREFIX IntUserConfigParam m_camera_present
1076  PARAM_DEFAULT( IntUserConfigParam(1, "camera-present",
1077  "The current used camera. 0=Custom; 1=Standard; 2=Drone chase") );
1078 
1079  // ---- Standard camera settings
1080  PARAM_PREFIX GroupUserConfigParam m_standard_camera_settings
1081  PARAM_DEFAULT( GroupUserConfigParam(
1082  "standard-camera-settings",
1083  "Standard camera settings for player.") );
1084 
1085  PARAM_PREFIX FloatUserConfigParam m_standard_camera_distance
1086  PARAM_DEFAULT( FloatUserConfigParam(1.0, "distance",
1087  &m_standard_camera_settings,
1088  "Distance between kart and camera"));
1089 
1090  PARAM_PREFIX FloatUserConfigParam m_standard_camera_forward_up_angle
1091  PARAM_DEFAULT( FloatUserConfigParam(0, "forward-up-angle",
1092  &m_standard_camera_settings,
1093  "Angle between camera and plane of kart (pitch) when the camera is pointing forward"));
1094 
1095  PARAM_PREFIX FloatUserConfigParam m_standard_camera_forward_smooth_position
1096  PARAM_DEFAULT( FloatUserConfigParam(0.2, "forward-smooth-position",
1097  &m_standard_camera_settings,
1098  "The strength of smoothness of the position of the camera"));
1099 
1100  PARAM_PREFIX FloatUserConfigParam m_standard_camera_forward_smooth_rotation
1101  PARAM_DEFAULT( FloatUserConfigParam(0.125, "forward-smooth-rotation",
1102  &m_standard_camera_settings,
1103  "The strength of smoothness of the rotation of the camera"));
1104 
1105  PARAM_PREFIX FloatUserConfigParam m_standard_camera_backward_distance
1106  PARAM_DEFAULT( FloatUserConfigParam(2.0, "backward-distance",
1107  &m_standard_camera_settings,
1108  "Distance between kart and camera (reverse)"));
1109 
1110  PARAM_PREFIX FloatUserConfigParam m_standard_camera_backward_up_angle
1111  PARAM_DEFAULT( FloatUserConfigParam(5, "backward-up-angle",
1112  &m_standard_camera_settings,
1113  "Angle between camera and plane of kart (pitch) when the camera is pointing backwards. This is usually larger than the forward-up-angle, since the kart itself otherwise obstricts too much of the view"));
1114 
1115  PARAM_PREFIX IntUserConfigParam m_standard_camera_fov
1116  PARAM_DEFAULT( IntUserConfigParam(80, "fov",
1117  &m_standard_camera_settings,
1118  "Focal distance (single player)"));
1119 
1120  PARAM_PREFIX BoolUserConfigParam m_standard_reverse_look_use_soccer_cam
1121  PARAM_DEFAULT( BoolUserConfigParam(false, "reverse-look-use-soccer-cam",
1122  &m_standard_camera_settings,
1123  "Use ball camera in soccer mode, instead of reverse"));
1124 
1125  // ---- Drone chase camera settings
1126  PARAM_PREFIX GroupUserConfigParam m_drone_camera_settings
1127  PARAM_DEFAULT( GroupUserConfigParam(
1128  "drone-camera-settings",
1129  "Drone chase camera settings for player.") );
1130 
1131  PARAM_PREFIX FloatUserConfigParam m_drone_camera_distance
1132  PARAM_DEFAULT( FloatUserConfigParam(2.6, "distance",
1133  &m_drone_camera_settings,
1134  "Distance between kart and camera"));
1135 
1136  PARAM_PREFIX FloatUserConfigParam m_drone_camera_forward_up_angle
1137  PARAM_DEFAULT( FloatUserConfigParam(33, "forward-up-angle",
1138  &m_drone_camera_settings,
1139  "Angle between camera and plane of kart (pitch) when the camera is pointing forward"));
1140 
1141  PARAM_PREFIX FloatUserConfigParam m_drone_camera_forward_smooth_position
1142  PARAM_DEFAULT( FloatUserConfigParam(0.0, "forward-smooth-position",
1143  &m_drone_camera_settings,
1144  "The strength of smoothness of the position of the camera"));
1145 
1146  PARAM_PREFIX FloatUserConfigParam m_drone_camera_forward_smooth_rotation
1147  PARAM_DEFAULT( FloatUserConfigParam(0.0, "forward-smooth-rotation",
1148  &m_drone_camera_settings,
1149  "The strength of smoothness of the rotation of the camera"));
1150 
1151  PARAM_PREFIX FloatUserConfigParam m_drone_camera_backward_distance
1152  PARAM_DEFAULT( FloatUserConfigParam(2.0, "backward-distance",
1153  &m_drone_camera_settings,
1154  "Distance between kart and camera (reverse)"));
1155 
1156  PARAM_PREFIX FloatUserConfigParam m_drone_camera_backward_up_angle
1157  PARAM_DEFAULT( FloatUserConfigParam(10, "backward-up-angle",
1158  &m_drone_camera_settings,
1159  "Angle between camera and plane of kart (pitch) when the camera is pointing backwards. This is usually larger than the forward-up-angle, since the kart itself otherwise obstricts too much of the view"));
1160 
1161  PARAM_PREFIX IntUserConfigParam m_drone_camera_fov
1162  PARAM_DEFAULT( IntUserConfigParam(100, "fov",
1163  &m_drone_camera_settings,
1164  "Focal distance (single player)"));
1165 
1166  PARAM_PREFIX BoolUserConfigParam m_drone_reverse_look_use_soccer_cam
1167  PARAM_DEFAULT( BoolUserConfigParam(false, "reverse-look-use-soccer-cam",
1168  &m_drone_camera_settings,
1169  "Use ball camera in soccer mode, instead of reverse"));
1170 
1171  // ---- Custom camera settings
1172  PARAM_PREFIX GroupUserConfigParam m_saved_camera_settings
1173  PARAM_DEFAULT( GroupUserConfigParam(
1174  "saved-camera-settings",
1175  "Saved custom camera settings for player.") );
1176 
1177  PARAM_PREFIX FloatUserConfigParam m_saved_camera_distance
1178  PARAM_DEFAULT( FloatUserConfigParam(1.8, "distance",
1179  &m_saved_camera_settings,
1180  "Distance between kart and camera"));
1181 
1182  PARAM_PREFIX FloatUserConfigParam m_saved_camera_forward_up_angle
1183  PARAM_DEFAULT( FloatUserConfigParam(20, "forward-up-angle",
1184  &m_saved_camera_settings,
1185  "Angle between camera and plane of kart (pitch) when the camera is pointing forward"));
1186 
1187  PARAM_PREFIX FloatUserConfigParam m_saved_camera_forward_smooth_position
1188  PARAM_DEFAULT( FloatUserConfigParam(0.1, "forward-smooth-position",
1189  &m_saved_camera_settings,
1190  "The strength of smoothness of the position of the camera"));
1191 
1192  PARAM_PREFIX FloatUserConfigParam m_saved_camera_forward_smooth_rotation
1193  PARAM_DEFAULT( FloatUserConfigParam(0.125, "forward-smooth-rotation",
1194  &m_saved_camera_settings,
1195  "The strength of smoothness of the rotation of the camera"));
1196 
1197  PARAM_PREFIX FloatUserConfigParam m_saved_camera_backward_distance
1198  PARAM_DEFAULT( FloatUserConfigParam(2.0, "backward-distance",
1199  &m_saved_camera_settings,
1200  "Distance between kart and camera (reverse)"));
1201 
1202  PARAM_PREFIX FloatUserConfigParam m_saved_camera_backward_up_angle
1203  PARAM_DEFAULT( FloatUserConfigParam(5, "backward-up-angle",
1204  &m_saved_camera_settings,
1205  "Angle between camera and plane of kart (pitch) when the camera is pointing backwards. This is usually larger than the forward-up-angle, since the kart itself otherwise obstricts too much of the view"));
1206 
1207  PARAM_PREFIX IntUserConfigParam m_saved_camera_fov
1208  PARAM_DEFAULT( IntUserConfigParam(85, "fov",
1209  &m_saved_camera_settings,
1210  "Focal distance (single player)"));
1211 
1212  PARAM_PREFIX BoolUserConfigParam m_saved_reverse_look_use_soccer_cam
1213  PARAM_DEFAULT( BoolUserConfigParam(false, "reverse-look-use-soccer-cam",
1214  &m_saved_camera_settings,
1215  "Use ball camera in soccer mode, instead of reverse"));
1216 
1217  // camera in artist mode
1218  PARAM_PREFIX GroupUserConfigParam m_camera
1219  PARAM_DEFAULT( GroupUserConfigParam("camera",
1220  "(Debug) camera settings.") );
1221 
1222  PARAM_PREFIX IntUserConfigParam m_reverse_look_threshold
1223  PARAM_DEFAULT( IntUserConfigParam(0, "reverse_look_threshold",
1224  &m_camera,
1225  "If the kart is driving backwards faster than this value,\n"
1226  "switch automatically to reverse camera (set to 0 to disable).") );
1227 
1228  PARAM_PREFIX FloatUserConfigParam m_fpscam_direction_speed
1229  PARAM_DEFAULT( FloatUserConfigParam(0.003f, "fpscam_rotation_speed",
1230  &m_camera,
1231  "How fast the first person camera's direction speed changes when\n"
1232  "moving the mouse (means acceleration).") );
1233 
1234  PARAM_PREFIX FloatUserConfigParam m_fpscam_smooth_direction_max_speed
1235  PARAM_DEFAULT( FloatUserConfigParam(0.04f, "fpscam_smooth_rotation_max_speed",
1236  &m_camera,
1237  "How fast the first person camera's direction can change.") );
1238 
1239  PARAM_PREFIX FloatUserConfigParam m_fpscam_angular_velocity
1240  PARAM_DEFAULT( FloatUserConfigParam(0.02f, "fpscam_angular_velocity",
1241  &m_camera,
1242  "How fast the first person camera's rotation speed changes.") );
1243 
1244  PARAM_PREFIX FloatUserConfigParam m_fpscam_max_angular_velocity
1245  PARAM_DEFAULT( FloatUserConfigParam(1.0f, "fpscam_max_angular_velocity",
1246  &m_camera,
1247  "How fast the first person camera can rotate.") );
1248 
1249  PARAM_PREFIX StringUserConfigParam m_item_style
1250  PARAM_DEFAULT( StringUserConfigParam("items", "item_style",
1251  "Name of the .items file to use.") );
1252 
1253  PARAM_PREFIX StringUserConfigParam m_last_track
1254  PARAM_DEFAULT( StringUserConfigParam("olivermath", "last_track",
1255  "Name of the last track used.") );
1256  PARAM_PREFIX StringUserConfigParam m_last_used_track_group
1257  PARAM_DEFAULT( StringUserConfigParam("all", "last_track_group",
1258  "Last selected track group") );
1259 
1260  PARAM_PREFIX StringUserConfigParam m_discord_client_id
1261  PARAM_DEFAULT( StringUserConfigParam("817760324983324753", "discord_client_id",
1262  "Discord Client ID (Set to -1 to disable)") );
1263 
1264  PARAM_PREFIX BoolUserConfigParam m_rich_presence_debug
1265  PARAM_DEFAULT( BoolUserConfigParam(false, "rich_presence_debug",
1266  "If debug logging should be enabled for rich presence") );
1267 
1268  PARAM_PREFIX StringUserConfigParam m_skin_file
1269  PARAM_DEFAULT( StringUserConfigParam("classic", "skin_name",
1270  "Name of the skin to use") );
1271 
1272  // ---- settings for minimap display
1273  PARAM_PREFIX GroupUserConfigParam m_minimap_setup_group
1274  PARAM_DEFAULT( GroupUserConfigParam("Minimap",
1275  "Minimap Setup Settings") );
1276 
1277  PARAM_PREFIX IntUserConfigParam m_minimap_display
1278  PARAM_DEFAULT(IntUserConfigParam(0, "display",
1279  &m_minimap_setup_group, "display: 0 bottom-left, 1 middle-right, 2 hidden, 3 center"));
1280 
1281  PARAM_PREFIX FloatUserConfigParam m_minimap_size
1282  PARAM_DEFAULT( FloatUserConfigParam(180.0f, "size",
1283  &m_minimap_setup_group, "Size of the the minimap (480 = full screen height; scaled afterwards)") );
1284 
1285  PARAM_PREFIX FloatUserConfigParam m_minimap_ai_icon_size
1286  PARAM_DEFAULT( FloatUserConfigParam(16.0f, "ai-icon",
1287  &m_minimap_setup_group, "The size of the icons for the AI karts on the minimap.") );
1288 
1289  PARAM_PREFIX FloatUserConfigParam m_minimap_player_icon_size
1290  PARAM_DEFAULT( FloatUserConfigParam(20.0f, "player-icon",
1291  &m_minimap_setup_group, "The size of the icons for the player kart.") );
1292 
1293  // ---- settings for powerup display
1294  PARAM_PREFIX GroupUserConfigParam m_powerup_setup_group
1295  PARAM_DEFAULT( GroupUserConfigParam("PowerUp",
1296  "PowerUp Setup Settings") );
1297 
1298  PARAM_PREFIX IntUserConfigParam m_powerup_display
1299  PARAM_DEFAULT(IntUserConfigParam(0, "display",
1300  &m_powerup_setup_group, "display: 0 center, 1 right side, 2 hidden (see karts' held powerups)"));
1301  PARAM_PREFIX FloatUserConfigParam m_powerup_size
1302  PARAM_DEFAULT( FloatUserConfigParam(64.0f, "powerup-icon-size",
1303  &m_powerup_setup_group, "Size of the powerup icon (scaled afterwards)") );
1304 
1305  // ---- Settings for spectator camera
1306  PARAM_PREFIX GroupUserConfigParam m_spectator
1307  PARAM_DEFAULT( GroupUserConfigParam("Spectator",
1308  "Everything related to spectator mode.") );
1309 
1310  PARAM_PREFIX FloatUserConfigParam m_spectator_camera_distance
1311  PARAM_DEFAULT( FloatUserConfigParam(6.75, "camera-distance", &m_spectator,
1312  "Distance between kart and camera.") );
1313  PARAM_PREFIX FloatUserConfigParam m_spectator_camera_angle
1314  PARAM_DEFAULT( FloatUserConfigParam(40.0, "camera-angle", &m_spectator,
1315  "Angle between ground, kart and camera.") );
1316 
1317  // ---- Handicap
1318  PARAM_PREFIX GroupUserConfigParam m_handicap
1319  PARAM_DEFAULT( GroupUserConfigParam("Handicap",
1320  "Everything related to handicaps.") );
1321 
1322  PARAM_PREFIX BoolUserConfigParam m_per_player_difficulty
1323  PARAM_DEFAULT( BoolUserConfigParam(false, "per_player_difficulty",
1324  &m_handicap,
1325  "If handicapped users can be selected") );
1326 
1327  // ---- Internet related
1328 
1329  PARAM_PREFIX IntUserConfigParam m_internet_status
1330  PARAM_DEFAULT( IntUserConfigParam(0, "enable_internet",
1331  "Status of internet: 0 user "
1332  "wasn't asked, 1: allowed, 2: "
1333  "not allowed") );
1334 
1335  PARAM_PREFIX GroupUserConfigParam m_hw_report_group
1336  PARAM_DEFAULT( GroupUserConfigParam("HWReport",
1337  "Everything related to hardware configuration.") );
1338 
1339  PARAM_PREFIX IntUserConfigParam m_last_hw_report_version
1340  PARAM_DEFAULT( IntUserConfigParam(0, "report-version", &m_hw_report_group,
1341  "Version of hardware report "
1342  "that was reported last") );
1343  PARAM_PREFIX IntUserConfigParam m_random_identifier
1344  PARAM_DEFAULT( IntUserConfigParam(0, "random-identifier", &m_hw_report_group,
1345  "A random number to avoid duplicated reports.") );
1346 
1347  PARAM_PREFIX BoolUserConfigParam m_hw_report_enable
1348  PARAM_DEFAULT( BoolUserConfigParam( false,
1349  "hw-report-enabled",
1350  &m_hw_report_group,
1351  "If HW reports are enabled."));
1352 
1353  // ---- User management
1354 
1355  PARAM_PREFIX BoolUserConfigParam m_always_show_login_screen
1356  PARAM_DEFAULT( BoolUserConfigParam(false, "always_show_login_screen",
1357  "Always show the login screen even if last player's session was saved."));
1358 
1359 
1360  // ---- Addon server related entries
1361  PARAM_PREFIX GroupUserConfigParam m_addon_group
1362  PARAM_DEFAULT( GroupUserConfigParam("AddonServer",
1363  "Addon and news related settings") );
1364 
1365  PARAM_PREFIX TimeUserConfigParam m_news_last_updated
1366  PARAM_DEFAULT( TimeUserConfigParam(0, "news_last_updated",
1367  &m_addon_group,
1368  "Time news was updated last.") );
1369 
1370  PARAM_PREFIX IntUserConfigParam m_news_frequency
1371  PARAM_DEFAULT( IntUserConfigParam(0, "news_frequency",
1372  &m_addon_group,
1373  "How often news should be updated.") );
1374 
1375  PARAM_PREFIX StringUserConfigParam m_display_count
1376  PARAM_DEFAULT( StringUserConfigParam("", "news_display_count",
1377  &m_addon_group,
1378  "How often all news messages "
1379  "have been displayed") );
1380 
1381  PARAM_PREFIX IntUserConfigParam m_last_important_message_id
1382  PARAM_DEFAULT( IntUserConfigParam(-1, "last_important_message_id",
1383  &m_addon_group,
1384  "Don't show important message "
1385  "with this or a lower id again") );
1386 
1387  PARAM_PREFIX IntUserConfigParam m_news_list_shown_id
1388  PARAM_DEFAULT( IntUserConfigParam(0, "news_list_shown_id",
1389  &m_addon_group,
1390  "News before this id has been "
1391  "shown once so no red dot") );
1392 
1393  PARAM_PREFIX TimeUserConfigParam m_addons_last_updated
1394  PARAM_DEFAULT( TimeUserConfigParam(0, "addon_last_updated",
1395  &m_addon_group,
1396  "Time addon-list was updated last.") );
1397 
1398  PARAM_PREFIX TimeUserConfigParam m_latest_addon_time
1399  PARAM_DEFAULT( TimeUserConfigParam(0, "latest_addon_time",
1400  &m_addon_group,
1401  "Latest approved addon time.") );
1402 
1403  PARAM_PREFIX StringUserConfigParam m_language
1404  PARAM_DEFAULT( StringUserConfigParam("system", "language",
1405  "Which language to use (language code or 'system')") );
1406 
1407  PARAM_PREFIX BoolUserConfigParam m_artist_debug_mode
1408  PARAM_DEFAULT( BoolUserConfigParam(false, "artist_debug_mode",
1409  "Whether to enable track debugging features") );
1410 
1411  PARAM_PREFIX BoolUserConfigParam m_hide_gui
1412  PARAM_DEFAULT(BoolUserConfigParam(false, "debug_hide_gui",
1413  "Whether to hide the GUI (artist debug mode)"));
1414 
1415  PARAM_PREFIX IntUserConfigParam m_unlock_everything
1416  PARAM_DEFAULT( IntUserConfigParam(0, "unlock_everything",
1417  "Enable all karts and tracks: 0 = disabled, "
1418  "1 = everything except final race, 2 = everything") );
1419 
1420  PARAM_PREFIX StringUserConfigParam m_commandline
1421  PARAM_DEFAULT( StringUserConfigParam("", "commandline",
1422  "Allows one to set commandline args in config file") );
1423 
1424  // TODO? implement blacklist for new irrlicht device and GUI
1425  PARAM_PREFIX std::vector<std::string> m_blacklist_res;
1426 
1429 
1431  enum { LOG_MEMORY = 0x0001,
1432  LOG_GUI = 0x0002,
1433  LOG_ADDONS = 0x0004,
1434  LOG_MISC = 0x0008,
1435  LOG_FLYABLE = 0x0010,
1436  LOG_ALL = 0xffff };
1437 
1439  bool logMemory();
1441  bool logGUI ();
1443  bool logAddons();
1445  bool logFlyable();
1447  bool logMisc ();
1448 
1449 
1450 }
1451 #undef PARAM_PREFIX
1452 #undef PARAM_SUFFIX
1453 
1454 // ============================================================================
1459 class UserConfig : public NoCopy
1460 {
1461 private:
1462 
1464  std::string m_filename;
1465  irr::core::stringw m_warning;
1466 
1467  static const int m_current_config_version;
1468 
1469 public:
1472  UserConfig();
1473  ~UserConfig();
1474 
1475  bool loadConfig();
1476  void saveConfig();
1477 
1478  const irr::core::stringw& getWarning() { return m_warning; }
1479  void resetWarning() { m_warning=""; }
1480  void setWarning(irr::core::stringw& warning) { m_warning=warning; }
1481 
1482 }; // UserConfig
1483 
1484 
1485 extern UserConfig *user_config;
1486 
1487 #endif
1488 
1489 /*EOF*/
Definition: user_config.hpp:296
Definition: user_config.hpp:329
Definition: user_config.hpp:85
void writeInner(std::stringstream &stream, int level=0) const
Writes an inner node.
Definition: user_config.cpp:129
Definition: user_config.hpp:194
ATM only map with 1 key and 1 value is supported.
Definition: user_config.hpp:110
Utility class, you can inherit from this class to disallow the assignment operator and copy construct...
Definition: no_copy.hpp:26
Class for managing player profiles (name, usage frequency, etc.).
Definition: player_profile.hpp:55
Definition: ptr_vector.hpp:44
Class for managing saved Grand-Prix's A list of all possible resumable GP's is stored in the user con...
Definition: saved_grand_prix.hpp:39
Definition: user_config.hpp:256
Definition: user_config.hpp:230
utility class used to write wide (UTF-16 or UTF-32, depending of size of wchar_t) XML files
Definition: utf_writer.hpp:35
The base of a set of small utilities to enable quickly adding/removing stuff to/from config painlessl...
Definition: user_config.hpp:68
virtual void writeInner(std::stringstream &stream, int level=0) const
Writes an inner node.
Definition: user_config.cpp:72
Class for managing general STK user configuration data.
Definition: user_config.hpp:1460
std::string m_filename
Filename of the user config file.
Definition: user_config.hpp:1464
void saveConfig()
Write settings to config file.
Definition: user_config.cpp:729
UserConfig()
Create the user config object; does not actually load it, UserConfig::loadConfig needs to be called.
Definition: user_config.cpp:653
bool loadConfig()
Load configuration values from file.
Definition: user_config.cpp:669
utility class used to parse XML files
Definition: xml_node.hpp:48
Contains all parameters that are stored in the user's config file.
Definition: user_config.hpp:394
bool logAddons()
Returns true if the user want additional messages related to addons.
Definition: user_config.cpp:770
bool logFlyable()
Returns true if the user want additional debug info for flyables.
Definition: user_config.cpp:774
bool logGUI()
Returns true if the user want additional messages related to GUI.
Definition: user_config.cpp:766
PARAM_PREFIX PtrVector< SavedGrandPrix > m_saved_grand_prix_list
List of all saved GPs.
Definition: user_config.hpp:1428
bool logMemory()
Returns true if the user want additional messages for memory usage.
Definition: user_config.cpp:762
bool logMisc()
Returns true if the user want additional messages for general items.
Definition: user_config.cpp:778