]> git.mxchange.org Git - flightgear.git/blob - Main/options.hxx
Added an enable/disable splash screen option.
[flightgear.git] / Main / options.hxx
1 //
2 // options.hxx -- class to handle command line options
3 //
4 // Written by Curtis Olson, started April 1998.
5 //
6 // Copyright (C) 1998  Curtis L. Olson  - curt@me.umn.edu
7 //
8 // This program is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU General Public License as
10 // published by the Free Software Foundation; either version 2 of the
11 // License, or (at your option) any later version.
12 //
13 // This program is distributed in the hope that it will be useful, but
14 // WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 // General Public License for more details.
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 //
22 // $Id$
23 // (Log is kept at end of this file)
24
25
26 #ifndef _OPTIONS_HXX
27 #define _OPTIONS_HXX
28
29
30 #ifndef __cplusplus                                                          
31 # error This library requires C++
32 #endif                                   
33
34
35 #define FG_OPTIONS_OK 0
36 #define FG_OPTIONS_HELP 1
37 #define FG_OPTIONS_ERROR 2
38
39
40 class fgOPTIONS {
41
42 public:
43     // The flight gear "root" directory
44     char fg_root[256];
45
46     // ID of initial starting airport
47     char airport_id[5];
48
49     // Miscellaneous
50     int splash_screen; // show splash screen
51     int intro_music;   // play introductory music
52     int mouse_pointer; // show mouse pointer
53
54     // Features
55     int hud_status;    // HUD on/off
56     int panel_status;  // Panel on/off
57
58     // Rendering options
59     int fog;           // Fog enabled/disabled
60     double fov;        // Field of View
61     int fullscreen;    // Full screen mode enabled/disabled
62     int shading;       // shading method, 0 = Flat, 1 = Smooth
63     int skyblend;      // Blend sky to haze (using polygons) or just clear
64     int textures;      // Textures enabled/disabled
65     int wireframe;     // Wireframe mode enabled/disabled
66
67     // Scenery options
68     int tile_radius;   // Square radius of rendered tiles (around center 
69                        // square.)
70     int tile_diameter; // Diameter of rendered tiles.  for instance
71                        // if tile_diameter = 3 then a 3 x 3 grid of tiles will 
72                        // be drawn.  Increase this to see terrain that is 
73                        // further away.
74
75     // Time options
76     int time_offset;   // Offset true time by this many seconds
77
78     // Constructor
79     fgOPTIONS( void );
80
81     // Parse a single option
82     int parse_option( char *arg );
83
84     // Parse the command line options
85     int parse_command_line( int argc, char **argv );
86
87     // Parse the command line options
88     int parse_config_file( char *path );
89
90     // Print usage message
91     void usage ( void );
92
93     // Destructor
94     ~fgOPTIONS( void );
95
96 };
97
98
99 extern fgOPTIONS current_options;
100
101
102 #endif /* _OPTIONS_HXX */
103
104
105 // $Log$
106 // Revision 1.10  1998/07/06 21:34:20  curt
107 // Added an enable/disable splash screen option.
108 // Added an enable/disable intro music option.
109 // Added an enable/disable instrument panel option.
110 // Added an enable/disable mouse pointer option.
111 // Added using namespace std for compilers that support this.
112 //
113 // Revision 1.9  1998/06/27 16:54:34  curt
114 // Replaced "extern displayInstruments" with a entry in fgOPTIONS.
115 // Don't change the view port when displaying the panel.
116 //
117 // Revision 1.8  1998/05/16 13:08:36  curt
118 // C++ - ified views.[ch]xx
119 // Shuffled some additional view parameters into the fgVIEW class.
120 // Changed tile-radius to tile-diameter because it is a much better
121 //   name.
122 // Added a WORLD_TO_EYE transformation to views.cxx.  This allows us
123 //  to transform world space to eye space for view frustum culling.
124 //
125 // Revision 1.7  1998/05/13 18:29:59  curt
126 // Added a keyboard binding to dynamically adjust field of view.
127 // Added a command line option to specify fov.
128 // Adjusted terrain color.
129 // Root path info moved to fgOPTIONS.
130 // Added ability to parse options out of a config file.
131 //
132 // Revision 1.6  1998/05/06 03:16:26  curt
133 // Added an averaged global frame rate counter.
134 // Added an option to control tile radius.
135 //
136 // Revision 1.5  1998/05/03 00:47:32  curt
137 // Added an option to enable/disable full-screen mode.
138 //
139 // Revision 1.4  1998/04/30 12:34:19  curt
140 // Added command line rendering options:
141 //   enable/disable fog/haze
142 //   specify smooth/flat shading
143 //   disable sky blending and just use a solid color
144 //   enable wireframe drawing mode
145 //
146 // Revision 1.3  1998/04/28 01:20:23  curt
147 // Type-ified fgTIME and fgVIEW.
148 // Added a command line option to disable textures.
149 //
150 // Revision 1.2  1998/04/25 15:11:13  curt
151 // Added an command line option to set starting position based on airport ID.
152 //
153 // Revision 1.1  1998/04/24 00:49:21  curt
154 // Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H"
155 // Trying out some different option parsing code.
156 // Some code reorganization.
157 //
158 //