mod_base_settings.hh

Go to the documentation of this file.
00001 /*
00014  * LEGAL:   COPYRIGHT (C) 2007 JIM E. BROOKS
00015  *          THIS SOURCE CODE IS RELEASED UNDER THE TERMS
00016  *          OF THE GNU GENERAL PUBLIC LICENSE VERSION 2 (GPL 2).
00017  *****************************************************************************/
00018 
00019 #if COMPILING_MODULE
00020 #ifndef MOD_BASE_SETTINGS_HH
00021 #define MOD_BASE_SETTINGS_HH 1
00022 
00023 namespace mod_base {
00024 
00030 class Settings
00031 {
00032 private:
00040     class SettingsConfReader : public ConfReader
00041     {
00042     public:
00043         void ProcessField( string& field, ifstream& conf );
00044     };
00045 
00046 public:
00047     Settings( void );
00048 
00049     SettingsConfReader  mSettingsConfReader;
00050 
00051     // Cmd-line args:
00052     bool    mJoy;
00053     bool    mJoyAxis3;
00054     bool    mJoyCalibration;
00055     bool    mLight;
00056     bool    mDisableLighting;
00057     bool    mMaterial;
00058 
00059     // settings.conf: Control:
00060     fp      mEyeStep;
00061     fp      mCraftStep;
00062     fp      mAbsStep;
00063     fp      mAbsStepShift;
00064     fp      mChaseZoomStep;
00065     fp      mChaseDistanceMin, mChaseDistanceDefault, mChaseDistanceMax;
00066 
00067     // settings.conf: Physics:
00068     fp      mAccelerationWeight;
00069     fp      mAccelerationThrust;
00070     fp      mMaxSpeedMach;
00071     fp      mStallSpeedMach;
00072     fp      mCraftStallDeg;
00073     fp      mEyeStallDeg;
00074 
00075     // settings.conf: Control Response:
00076     // The base factors may in turn by multiplied by ~/.palomino.cfg
00077     // if the user adjusts the RESPONSE gui buttons.
00078     TinyArray<3,Degree> mKeyboardResponse;          // base factor
00079     TinyArray<3,Degree> mKeyboardResponseEye;
00080     TinyArray<3,Degree> mKeyboardResponseCraft;
00081     TinyArray<3,Degree> mKeyboardResponseChase;
00082     TinyArray<3,Degree> mJoystickResponse;          // base factor
00083     TinyArray<3,Degree> mJoystickResponseEye;
00084     TinyArray<3,Degree> mJoystickResponseCraft;
00085     TinyArray<3,Degree> mJoystickResponseChase;
00086 };
00087 
00088 ostream& operator<<( ostream& strm, const Settings& settings );
00089 
00090 #if MOD_BASE_SETTINGS_CC
00091 Settings gSettings;
00092 #else
00093 extern Settings gSettings;
00094 #endif
00095 
00096 } // namespace mod_base
00097 
00098 #endif // MOD_BASE_SETTINGS_HH
00099 #endif // COMPILING_MODULE
Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:12 2007