]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/preferences.h
- Updated Windows build doc, very slight revision. Changed 37 targets to 38.
[xonotic/netradiant.git] / radiant / preferences.h
index 7042aa1b41406d982d0f033b8a9eb90f3331d260..51c9ccb4e903247523be8038eff05af7d5390476 100644 (file)
@@ -26,6 +26,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include "gtkr_list.h"
 //#include "profile.h"
 
+#ifdef _WIN32
+#define NVIDIA_AERO_HACK
+#endif
+
 #define MAX_TEXTURE_QUALITY 3
 
 enum PrefTypes_t
@@ -50,7 +54,7 @@ public:
   PrefTypes_t mType;
   void *mVal;
 
-  CPrefAssignment(char *name, PrefTypes_t Type, void *Val)
+  CPrefAssignment(const char *name, PrefTypes_t Type, void *Val)
   {
     mName = name; mType = Type; mVal = Val;
   }
@@ -86,7 +90,7 @@ private:
   /*!
   store assignment in the property list if not already there
   */
-  void PushAssignment(char *name, PrefTypes_t type, void *pV);
+  void PushAssignment(const char *name, PrefTypes_t type, void *pV);
 
   /*!
   find the xmlnode relating to the epair name
@@ -95,7 +99,7 @@ private:
 
 public:
   CXMLPropertyBag();
-  virtual ~CXMLPropertyBag() 
+  virtual ~CXMLPropertyBag()
   {
     if (InUse())
       Clear();
@@ -110,12 +114,12 @@ public:
     (name, type and pointer to value)
     this is used in UpdatePrefTree
   */
-  void GetPref(char *name, Str *pV, char *V);
-  void GetPref(char *name, int *pV, int V);
-  void GetPref(char *name, bool *pV, bool V);
-  void GetPref(char *name, float *pV, float V);
-  void GetPref(char *name, float *pV, float* V);
-  void GetPref(char *name, window_position_t* pV, window_position_t V);
+  void GetPref(const char *name, Str *pV, const char *V);
+  void GetPref(const char *name, int *pV, int V);
+  void GetPref(const char *name, bool *pV, bool V);
+  void GetPref(const char *name, float *pV, float V);
+  void GetPref(const char *name, float *pV, float* V);
+  void GetPref(const char *name, window_position_t* pV, window_position_t V);
 
   /*!
   returns whether or not the property bag is already open
@@ -171,6 +175,7 @@ public:
   Str mBaseGame; ///< basegame directory
   Str mEnginePath; ///< path to the engine
   Str mEngine; ///< engine name
+  Str mMultiplayerEngine; ///< engine name
 #if defined (__linux__) || defined (__APPLE__)
   Str mUserPathPrefix; ///< prefix for ~/.q3a ~/.wolf init, only on *nix
 #endif
@@ -181,6 +186,7 @@ public:
   bool mNoPatch; ///< this game doesn't support patch technology
   Str mCaulkShader; ///< the shader to use for caulking
   bool quake2; ///< set this to true to get quake2
+  bool noMapsInHome; ///< set this if you want to open the engine path/base dir/maps dir for map open/save dialoges */
 
   CGameDescription() { mpDoc = NULL; }
   /*!
@@ -205,6 +211,9 @@ select games, copy editing assets and write out configuration files
 #define WARSOW_PACK "WarsowPack"
 #define NEXUIZ_PACK "NexuizPack"
 #define Q2_PACK "Q2Pack"
+#define TREMULOUS_PACK "TremulousPack"
+#define JA_PACK "JAPack"
+#define REACTION_PACK "ReactionPack"
 
 class CGameInstall : public Dialog {
 public:
@@ -225,6 +234,9 @@ public:
                GAME_WARSOW,
                GAME_NEXUIZ,
                GAME_Q2,
+               GAME_TREMULOUS,
+               GAME_JA,
+               GAME_REACTION,
                GAME_COUNT
        };
 
@@ -268,13 +280,13 @@ class CGameDialog : public Dialog
   CGameInstall mGameInstall;
 
 protected:
-  
+
   int m_nComboSelect; ///< intermediate int value for combo in dialog box
 
 public:
 
-  /*! 
-  those settings are saved in the global prefs file 
+  /*!
+  those settings are saved in the global prefs file
   I'm too lazy to wrap behind protected access, not sure this needs to be public
   NOTE: those are preference settings. if you change them it is likely that you would
   have to restart the editor for them to take effect
@@ -316,10 +328,10 @@ public:
          m_bDoGameInstall = true;      // go through DoModal at least once
          mGameCombo = NULL;
   }
-  virtual ~CGameDialog(); 
+  virtual ~CGameDialog();
 
   void AddPacksURL( Str &s );
-    
+
   /*!
   intialize the game dialog, called at CPrefsDlg::Init
   will scan for games, load prefs, and do game selection dialog if needed
@@ -332,7 +344,7 @@ public:
   void Reset();
 
   /*!
-  run the dialog UI for the list of games 
+  run the dialog UI for the list of games
   */
   void DoGameDialog();
 
@@ -371,7 +383,7 @@ public:
 
   /*!
   read or set netrun (check file)
-  \param retrieve 
+  \param retrieve
     if false, will check if netrun file is present and will set m_bNetRun
     if true, will create/erase the netrun file depending on m_bNetRun
     NOTE: this is not backwards, 'retrieve' means 'retrieve from settings dialog' - in terms of UI
@@ -409,7 +421,7 @@ private:
 typedef struct {
   int nEntitySplit1;
   int nEntitySplit2;
-  
+
   window_position_t position;
 
   window_position_t posEntityWnd;
@@ -434,7 +446,7 @@ typedef struct {
 
 class PrefsDlg : public Dialog
 {
-  
+
 public:
   /*!
   local prefs file
@@ -444,10 +456,10 @@ public:
   // will enable/disable stuff according to the situation
   void DoSensitivity();
   void PreModal() { DoSensitivity(); }
-  
+
   // enable/disable custom editor entry
   void DoEditorSensitivity();
-  
+
   /*!
   this holds global level preferences
   */
@@ -456,7 +468,7 @@ protected:
   // warning about old project files
   bool m_bWarn;
   list<CGameDescription *> mGames;
-  
+
 public:
   // last light intensity used in the CLightPrompt dialog, stored in registry
   int m_iLastLightIntensity;
@@ -467,16 +479,20 @@ public:
   // Gef: updated preferences dialog
   /*! Preference notebook page numbers */
   enum {PTAB_FRONT = 0, PTAB_GAME_SETTINGS, PTAB_2D, PTAB_CAMERA, PTAB_TEXTURE, PTAB_LAYOUT, PTAB_MOUSE,
-        PTAB_EDITING, PTAB_STARTUP, PTAB_PATHS, PTAB_MISC, PTAB_BSPMONITOR} pref_tabs;
-  
+        PTAB_EDITING, PTAB_STARTUP, PTAB_PATHS, PTAB_BRUSH, PTAB_MISC, PTAB_BSPMONITOR} pref_tabs;
+
   GtkWidget *notebook;
-       
+
   void UpdateTextureCompression();
 
 #ifdef ATIHACK_812
   void UpdateATIHack();
 #endif
-        
+
+#ifdef NVIDIA_AERO_HACK
+  void UpdateNvidiaAeroHack();
+#endif
+
   void LoadPrefs();
   void SavePrefs();
   void LoadTexdefPref(texdef_t* pTexdef, char* pName);
@@ -533,7 +549,7 @@ public:
        // path to the project loaded at startup
        // if g_PrefsDlg can't find the information in the ini file
        // it will try to guess and eventually ask the user
-  Str   m_strLastProject;  
+  Str   m_strLastProject;
   /*!
   version of last loaded project file
   says -1 if there's no version loaded
@@ -575,6 +591,7 @@ public:
   bool  m_bPluginToolbar;
   bool  m_bNoClamp;
        //++timo this is most likely broken, I don't know what it's supposed to do
+  bool  m_bSnap;
   Str   m_strUserPath;
   int   m_nRotation;
   bool  m_bChaseMouse;
@@ -604,6 +621,7 @@ public:
   bool  m_bGLLighting;
   bool  m_bTexturesShaderlistOnly;
   int   m_nSubdivisions;
+  float m_fDefTextureScale;
   bool  m_bFloatingZ;
   bool  m_bLatchedFloatingZ;
   // Gef: Kyro GL_POINT workaround
@@ -624,7 +642,7 @@ public:
   bool  m_bRunQuake;
   // store prefs setting for automatic sleep mode activation
   bool  m_bDoSleep;
-  
+
   bool m_bClipCaulk;
 
   // make the texture increments match the grid changes
@@ -673,11 +691,16 @@ public:
   int m_nTextureCompressionFormat;
 
   int m_nLightRadiuses;
-  
+
   bool m_bQ3Map2Texturing;
 
 #ifdef ATIHACK_812
-       bool m_bGlATIHack;
+  bool m_bGlATIHack;
+#endif
+
+#ifdef NVIDIA_AERO_HACK
+  bool m_bGlNvidiaAeroHack;
+  int m_bGlNvidiaAeroHackPrevState;
 #endif
 
   void UpdateData (bool retrieve);