]> git.mxchange.org Git - flightgear.git/blob - Main/options.hxx
Added a keyboard binding to dynamically adjust field of view.
[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     // Features
50     int hud_status;    // HUD on/off
51
52     // Rendering options
53     int fog;           // Fog enabled/disabled
54     double fov;        // Field of View
55     int fullscreen;    // Full screen mode enabled/disabled
56     int shading;       // shading method, 0 = Flat, 1 = Smooth
57     int skyblend;      // Blend sky to haze (using polygons) or just clear
58     int textures;      // Textures enabled/disabled
59     int wireframe;     // Wireframe mode enabled/disabled
60
61     // Scenery options
62     int tile_radius;   // Square radius of rendered tiles.  for instance
63                        // if tile_radius = 3 then a 3 x 3 grid of tiles will 
64                        // be drawn.  Increase this to see terrain that is 
65                        // further away.
66
67     // Time options
68     int time_offset;   // Offset true time by this many seconds
69
70     // Constructor
71     fgOPTIONS( void );
72
73     // Parse a single option
74     int parse_option( char *arg );
75
76     // Parse the command line options
77     int parse_command_line( int argc, char **argv );
78
79     // Parse the command line options
80     int parse_config_file( char *path );
81
82     // Print usage message
83     void usage ( void );
84
85     // Destructor
86     ~fgOPTIONS( void );
87
88 };
89
90
91 extern fgOPTIONS current_options;
92
93
94 #endif /* _OPTIONS_HXX */
95
96
97 // $Log$
98 // Revision 1.7  1998/05/13 18:29:59  curt
99 // Added a keyboard binding to dynamically adjust field of view.
100 // Added a command line option to specify fov.
101 // Adjusted terrain color.
102 // Root path info moved to fgOPTIONS.
103 // Added ability to parse options out of a config file.
104 //
105 // Revision 1.6  1998/05/06 03:16:26  curt
106 // Added an averaged global frame rate counter.
107 // Added an option to control tile radius.
108 //
109 // Revision 1.5  1998/05/03 00:47:32  curt
110 // Added an option to enable/disable full-screen mode.
111 //
112 // Revision 1.4  1998/04/30 12:34:19  curt
113 // Added command line rendering options:
114 //   enable/disable fog/haze
115 //   specify smooth/flat shading
116 //   disable sky blending and just use a solid color
117 //   enable wireframe drawing mode
118 //
119 // Revision 1.3  1998/04/28 01:20:23  curt
120 // Type-ified fgTIME and fgVIEW.
121 // Added a command line option to disable textures.
122 //
123 // Revision 1.2  1998/04/25 15:11:13  curt
124 // Added an command line option to set starting position based on airport ID.
125 //
126 // Revision 1.1  1998/04/24 00:49:21  curt
127 // Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H"
128 // Trying out some different option parsing code.
129 // Some code reorganization.
130 //
131 //