Debian Codegraph @

Descent3/config.h

raw symbols SCIP
1 /*
2 * Descent 3
3 * Copyright (C) 2024 Parallax Software
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 --- HISTORICAL COMMENTS FOLLOW ---
19
20 * $Logfile: /DescentIII/Main/config.h $
21 * $Revision: 28 $
22 * $Date: 10/22/99 10:42a $
23 * $Author: Matt $
24 *
25 * Header file for configuration functions (video, sound, etc)
26 *
27 * $Log: /DescentIII/Main/config.h $
28 *
29 * 28 10/22/99 10:42a Matt
30 * Mac merge
31 *
32 * 27 6/08/99 1:00p Jason
33 * changes for bumpmapping
34 *
35 * 26 4/24/99 8:39p Samir
36 * added ship sounds toggle.
37 *
38 * 25 3/22/99 4:26p Samir
39 * added toggles for guided missile view and reticle.
40 *
41 * 24 2/28/99 3:22a Samir
42 * reformatted video menu.
43 *
44 * 23 2/16/99 12:05p Samir
45 * revamped ui for config menus.
46 *
47 * 22 1/31/99 7:25p Matt
48 * Renamed a bunch of functions to have HUD capitalized
49 *
50 * 21 12/09/98 5:28p Jason
51 * added more options
52 *
53 * 20 11/10/98 5:14p Jeff
54 * added Force Feedback configuration
55 *
56 * 19 10/19/98 7:08p Jeff
57 * moved preset detail defines to config.cpp and updated them
58 *
59 * 18 10/19/98 6:30p Jeff
60 * changes made for detail variables. Put in preset values. Preset
61 * options. Removed terrain_cast from detail. Put new callbacks in
62 * UIListBox and UISlider
63 *
64 * 17 10/15/98 1:33p Jeff
65 * removed amount of debris detail level. Added powerup halo detail
66 * level. Added predef detail level settings
67 *
68 * 16 10/12/98 3:01p Jeff
69 * added vsync and more detail level settings
70 *
71 * 15 8/27/98 6:23p Jeff
72 * changed autoleveling in config so it is a slider...had to convert
73 * global from bool->uint8_t. Added fast headlight and mirrored surfaces to
74 * config menu
75 *
76 * 14 8/19/98 2:19p Jeff
77 * moved detail globals to a struct
78 *
79 * 13 6/19/98 5:40p Samir
80 * added hud configuration.
81 *
82 * 12 5/23/98 6:34p Jeff
83 * All options menus are up-to-date, added Detail Level menu
84 *
85 * 11 5/06/98 4:32p Samir
86 * screen res mode changes.
87 *
88 * 10 5/06/98 3:29p Jeff
89 * changed whats needed for screen resolution change
90 *
91 * 9 4/06/98 4:57p Jeff
92 * Added a dynamic lighting box in video config
93 *
94 * 8 3/05/98 11:32a Jeff
95 *
96 * 7 3/02/98 7:19p Jeff
97 * Added Gamma slider support
98 *
99 * 6 3/02/98 3:29p Jeff
100 * Convert d3.cfg from a binary to a text file
101 *
102 * 5 2/27/98 5:35p Jeff
103 * Added in loading and saving of a game configuration file
104 *
105 * 4 2/24/98 3:44p Jeff
106 * Basic structure, including some components added
107 *
108 * 3 2/23/98 5:35p Jeff
109 * General shell created
110 *
111 * 2 2/23/98 5:16p Jeff
112 * Initial creation
113 *
114 * $NoKeywords: $
115 */
116
117 #ifndef CONFIG_H_
118 #define CONFIG_H_
119
120 #include <cstdint>
121
122 // Main menu configuration functions
123
124 // General option toggles
125 struct tGameToggles {
126 bool show_reticle;
127 bool guided_mainview;
128 bool ship_noises;
129 };
130
131 extern tGameToggles Game_toggles;
132
133 // this list should match the list in config.cpp to work.
134 #define N_SUPPORTED_VIDRES 8
135
136 #define RES_512X384 0
137 #define RES_640X480 1
138 #define RES_800X600 2
139 #define RES_960X720 3
140 #define RES_1024X768 4
141 #define RES_1280X960 5
142 #define RES_1600X1200 6
143 // stored resolution list and desired game resolution
144 struct tVideoResolution {
145 uint16_t width;
146 uint16_t height;
147 };
148
149 extern tVideoResolution Video_res_list[];
150 extern int Game_video_resolution;
151
152 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
153 // KEEP THESE MEMBERS IN THE SAME ORDER, IF YOU ADD,REMOVE, OR CHANGE ANYTHING IN THIS STRUCT, MAKE SURE YOU
154 // UPDATE DetailPresetLow,DetailPresetMed,DetailPresetHigh AND DetailPresetVHi IN CONFIG.CPP
155 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
156 struct tDetailSettings {
157 float Terrain_render_distance; // VisibleTerrainDistance
158 float Pixel_error; // PixelErrorTolerance
159 bool Specular_lighting; // DoSpecularPass
160 bool Dynamic_lighting; // Enable_dynamic_lighting
161 bool Fast_headlight_on;
162 bool Mirrored_surfaces;
163 bool Fog_enabled;
164 bool Coronas_enabled;
165 bool Procedurals_enabled;
166 bool Powerup_halos;
167 bool Scorches_enabled;
168 bool Weapon_coronas_enabled;
169 bool Bumpmapping_enabled;
170 uint8_t Specular_mapping_type;
171 uint8_t Object_complexity; // 0 = low, 1 = medium, 2=high
172 };
173
174 // Call this with one of the above defines to set the detail level to a predefined set (custom level is ignored)
175 void ConfigSetDetailLevel(int level);
176 // returns the current detail level that the given tDetailSettings is at
177 int ConfigGetDetailLevel(tDetailSettings *ds);
178
179 #define DETAIL_LEVEL_LOW 0
180 #define DETAIL_LEVEL_MED 1
181 #define DETAIL_LEVEL_HIGH 2
182 #define DETAIL_LEVEL_VERY_HIGH 3
183 #define DETAIL_LEVEL_CUSTOM 4
184
185 extern tDetailSettings Detail_settings;
186 extern int Default_detail_level;
187
188 // displays new options menu
189 extern void OptionsMenu();
190 #endif