1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #include "client_config.h"
24 using namespace NLMISC
;
27 // ***************************************************************************
29 // ***************************************************************************
31 const CBitmapId BitmapId
[BitmapCount
] =
34 { IDB_DISPLAY_DETAILS
},
35 { IDB_DISPLAY_ADVANCED
},
45 // ***************************************************************************
47 // ***************************************************************************
51 // ***************************************************************************
53 CPage Pages
[PageCount
];
55 // ***************************************************************************
57 void CreateDataBase ()
59 Pages
[PageGeneral
].init (PageGeneral
, "uiConfigGeneral", true, BitmapGeneral
, IDD_GENERAL
, &Root
);
60 Pages
[PageDisplay
].init (PageDisplay
, "uiConfigDisplay", true, BitmapDisplay
, IDD_DISPLAY
, &Root
);
61 Pages
[PageDisplayDetails
].init (PageDisplayDetails
, "uiConfigDisplayDetails", false, BitmapDisplayDetails
, IDD_DISPLAY_DETAILS
, &Pages
[PageDisplay
]);
62 Pages
[PageDisplayAdvanced
].init (PageDisplayAdvanced
, "uiConfigDisplayAdvanced", false, BitmapDisplayAdvanced
, IDD_DISPLAY_ADVANCED
, &Pages
[PageDisplay
]);
63 Pages
[PageSound
].init (PageSound
, "uiConfigSound", true, BitmapSound
, IDD_SOUND
, &Root
);
64 Pages
[PageDisplaySysInfo
].init (PageDisplaySysInfo
, "uiConfigDisplaySysInfo", true, BitmapGeneral
, IDD_SYSTEM_INFO
, &Root
);
65 Pages
[PageDisplayOpenGLInfo
].init (PageDisplayOpenGLInfo
, "uiConfigDisplayOpenGLInfo", false, BitmapCard
, IDD_DISPLAY_INFO
, &Pages
[PageDisplaySysInfo
]);
66 Pages
[PageDisplayOpenD3DInfo
].init (PageDisplayOpenD3DInfo
, "uiConfigDisplayD3DInfo", false, BitmapCard
, IDD_DISPLAY_D3D
, &Pages
[PageDisplaySysInfo
]);
69 // ***************************************************************************
77 // ***************************************************************************
79 void CPage::init (uint id
, const char *name
, bool bold
, uint icon
, uint resid
, CPage
*parent
)
85 ChildId
= (uint
)parent
->Children
.size ();
87 parent
->Children
.push_back (this);
92 // ***************************************************************************
99 // ***************************************************************************
100 // Config File default
101 // ***************************************************************************
103 NLMISC::CConfigFile ConfigFileDefault
;
105 void LoadConfigFileDefault ()
109 ConfigFileDefault
.load (CONFIG_DEFAULT_FILE_NAME
);
113 theApp
.error (CI18N::get ("uiConfigErrorReadingTheFile")+" "CONFIG_FILE_NAME
" : "+string (e
.what ()));
117 // ***************************************************************************
119 // ***************************************************************************
121 struct CMergeDescriptor
127 // ***************************************************************************
129 static const CMergeDescriptor MergeDescriptor
[] =
131 { "DivideTextureSizeBy2", PreferSuperior
},
132 { "LandscapeThreshold", PreferInferior
},
133 { "MicroVeget", PreferFalse
},
134 { "HDEntityTexture", PreferFalse
},
135 { "Shadows", PreferFalse
},
136 { "DisableDXTC", PreferFalse
},
137 { "DisableVtxProgram", PreferTrue
},
138 { "DisableVtxAGP", PreferTrue
},
139 { "DisableTextureShdr", PreferTrue
},
140 { "SoundOn", PreferFalse
},
141 { "UseEax", PreferFalse
},
142 { "MaxTrack", PreferSuperior
},
145 // ***************************************************************************
147 TMergeMethod
GetMergeMethod (const char *varName
)
149 const uint count
= sizeof (MergeDescriptor
) / sizeof (CMergeDescriptor
);
151 for (i
=0; i
<count
; i
++)
153 if (strcmp (MergeDescriptor
[i
].Name
, varName
) == 0)
154 return MergeDescriptor
[i
].Method
;
156 return PreferInferior
;
159 // ***************************************************************************
161 const float QualityToLandscapeThreshold
[QUALITY_STEP
] =
169 // ***************************************************************************
171 const float QualityToZFar
[QUALITY_STEP
] =
179 // ***************************************************************************
181 const float QualityToLandscapeTileNear
[QUALITY_STEP
] =
189 // ***************************************************************************
191 const int QualityToSkinNbMaxPoly
[QUALITY_STEP
] =
199 // ***************************************************************************
200 const int QualityToNbMaxSkeletonNotCLod
[QUALITY_STEP
] =
209 // ***************************************************************************
211 const int QualityToFxNbMaxPoly
[QUALITY_STEP
] =
219 // ***************************************************************************