root/cafu/trunk/CaWE/Options.hpp

Revision 457, 5.1 KB (checked in by Carsten, 4 months ago)

Using UltraEdit's multi-line search-and-replace-in-files feature, replaced


^#ifndef _(CAFU|CF|CFS|CA)_(.*)_$
^#define _\1_\2_$

with

#ifndef CAFU_\2_INCLUDED
#define CAFU_\2_INCLUDED

and


^#ifndef _(.*)_HPP_$
^#define _\1_HPP_$

with

#ifndef CAFU_\1_HPP_INCLUDED
#define CAFU_\1_HPP_INCLUDED

Closes #91.

Line 
1/*
2=================================================================================
3This file is part of Cafu, the open-source game engine and graphics engine
4for multiplayer, cross-platform, real-time 3D action.
5Copyright (C) 2002-2012 Carsten Fuchs Software.
6
7Cafu is free software: you can redistribute it and/or modify it under the terms
8of the GNU General Public License as published by the Free Software Foundation,
9either version 3 of the License, or (at your option) any later version.
10
11Cafu is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
12without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13PURPOSE. See the GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with Cafu. If not, see <http://www.gnu.org/licenses/>.
17
18For support and more information about Cafu, visit us at <http://www.cafu.de>.
19=================================================================================
20*/
21
22#ifndef CAFU_OPTIONS_HPP_INCLUDED
23#define CAFU_OPTIONS_HPP_INCLUDED
24
25#include "Templates/Array.hpp"
26#include "wx/wx.h"
27
28
29class GameConfigT;
30
31
32class OptionsT
33{
34    public:
35
36    struct GeneralT
37    {
38        int      UndoLevels;
39        bool     LockingTextures;
40        bool     NewUVsFaceAligned;     ///< Whether the texture-space axes of newly created brush faces are initialized "face aligned" or "world aligned".
41
42        wxString EngineExe;
43        wxString BSPExe;
44        wxString LightExe;
45        wxString PVSExe;
46    };
47
48    struct View2DT
49    {
50        bool DrawVertices;
51        bool SelectByHandles;
52        bool ShowEntityInfo;
53        bool ShowEntityTargets;
54        bool UseGroupColors;
55    };
56
57    struct View3DT
58    {
59        bool  ReverseY;                 ///< Whether to reverse the mouse's Y axis when mouse looking.
60        int   BackPlane;                ///< Distance to far clipping plane in world units.
61        int   ModelDistance;            ///< Distance in world units within which models render.
62        bool  AnimateModels;            ///< Whether or not to animate models.
63        int   MaxCameraVelocity;        ///< Max forward speed in world units per second.
64        int   TimeToMaxSpeed;           ///< Time to max forward speed in milliseconds.
65        float MouseSensitivity;         ///< Mouse sensitivity for the angular (rotating and orbiting) modes of 3D views navigation, in degrees (of rotation) per pixel (of mouse movement).
66        int   SplitPlanesDepth;         ///< The depth up to which the split planes of the BSP tree should be rendered (for debugging/developers only).
67    };
68
69    struct GridT
70    {
71        int      InitialSpacing;        ///< The default spacing between grid lines, in world units (usually 4, 8 or 16).
72        int      MinPixelSpacing;       ///< The minimum pixel spacing between grid lines. The grid is hidden if it gets smaller than this.
73        bool     UseDottedGrid;         ///< When true, the grid is rendered with dots. Otherwise, it is rendered with lines.
74        bool     ShowHighlight1;        ///< Whether every n-th world unit should be highlighted.
75        int      SpacingHighlight1;     ///< The spacing number n that should be highlighted.
76        bool     ShowHighlight2;        ///< Whether every m-th world unit should be highlighted.
77        int      SpacingHighlight2;     ///< The spacing number m that should be highlighted.
78
79        wxColour ColorBackground;       ///< The background color.
80        wxColour ColorBaseGrid;         ///< The base grid color.
81        wxColour ColorHighlight1;       ///< The color for highlighting every n-th world unit, if enabled.
82        wxColour ColorHighlight2;       ///< The color for highlighting every m-th world unit, if enabled.
83        wxColour ColorAxes;             ///< The color for the major axes through the origin.
84    };
85
86    struct ColorsT
87    {
88        wxColour Entity;                ///< The default color of point entities & brush entities, can be overridden by the EntityClassDefs.lua file.
89        wxColour Selection;             ///< The color of selected objects.
90        wxColour SelectedFace;          ///< The color of a selected face.
91        wxColour SelectedEdge;          ///< The color of a selected edge.
92        wxColour Vertex;                ///< The color of vertices.
93        wxColour ToolHandle;            ///< The color of tool handles.
94        wxColour ToolSelection;         ///< The color of the selection tool.
95        wxColour ToolMorph;             ///< The color of the morph tool.
96        wxColour ToolDrag;              ///< The color of tool bounds while it is being dragged.
97    };
98
99
100    ~OptionsT();
101
102    void Init();
103    void Write() const;
104    void DeleteGameConfigs();
105
106    GeneralT             general;
107    View2DT              view2d;
108    View3DT              view3d;
109    GridT                Grid;
110    ColorsT              colors;
111    ArrayT<GameConfigT*> GameConfigs;
112    unsigned long        DaysSinceInstalled;
113};
114
115
116extern OptionsT Options;
117
118#endif
Note: See TracBrowser for help on using the browser.