Debian Codegraph @

Descent3/gauges.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/gauges.h $
21 * $Revision: 16 $
22 * $Date: 10/20/98 12:42p $
23 * $Author: Matt $
24 *
25 * Gauge interface
26 *
27 * $Log: /DescentIII/main/gauges.h $
28 *
29 * 16 10/20/98 12:42p Matt
30 * Made the small views work on the cockpit.
31 *
32 * 15 5/26/98 5:05p Samir
33 * shield frames now contained in hud structure and share common graphics
34 * between gauges and hud.
35 *
36 * 14 5/18/98 4:52p Samir
37 * fixed hud image for weapons.
38 *
39 * 13 3/20/98 8:23p Samir
40 * Started implementing images.
41 *
42 * 12 3/18/98 6:24p Samir
43 * Implemented monitor system.
44 *
45 * 11 3/17/98 2:37p Samir
46 * reorg of hud/gauge/cockpit dependencies.
47 *
48 * 10 1/23/98 12:07p Jason
49 * made framerate display toggleable
50 *
51 * 9 12/29/97 5:47p Samir
52 * Uses new text system and took out references to Game_viewport.
53 *
54 * 8 11/16/97 6:55p Samir
55 * Added init flag for gauge structure.
56 *
57 * 7 11/14/97 5:29p Samir
58 * Now we pass four world coordinates of the 4 vertex monitor to a gauge
59 * rendering function.
60 *
61 * 6 11/11/97 1:25p Samir
62 * Added modified flag to tGauge and cleaned up gauge renderering a
63 * little.
64 *
65 * 5 11/04/97 6:23p Samir
66 * New Gauge interface.
67 *
68 * 4 10/29/97 12:33p Samir
69 * Framework for RenderHudGauges
70 *
71 * 3 10/28/97 6:36p Samir
72 * Gauge system for text controls functioning.
73 *
74 * 2 10/28/97 12:47p Samir
75 * Gauges are drawn once per frame from GameLoop to a call to gauges.cpp
76 *
77 * 1 10/28/97 12:27p Samir
78 * Initial revision
79 *
80 * $NoKeywords: $
81 */
82
83 #ifndef GAUGES_H
84 #define GAUGES_H
85
86 #include "pstypes.h"
87 #include "vecmat.h"
88 #include "hud.h"
89
90 // Hack vars for turning off the monitors
91 extern bool Disable_primary_monitor, Disable_secondary_monitor;
92
93 // number of gauges
94 #define NUM_GAUGES 16
95
96 // initializes cockpit gauges
97 void InitGauges(tStatMask gauge_mask);
98
99 // deinitializes cockpit gauges
100 void CloseGauges();
101
102 // renders gauges
103 void RenderGauges(vector *cockpit_pos, matrix *cockpit_mat, float *normalized_times, bool moving, bool reset = false);
104
105 // flags certain gauges to be modified next frame.
106 void FlagGaugesModified(tStatMask mask_modified);
107
108 // sets gauges as functional
109 void FlagGaugesFunctional(tStatMask mask);
110
111 // sets gauges as gauges nonfunctional
112 void FlagGaugesNonfunctional(tStatMask mask);
113
114 // Returns the coordinates of the specified cockpit monitor
115 // Parameter: window - 0 means primary monitor, 1 means secondary
116 // x0,y0,x1,y1 - these are filled in with the coordinates of the montiro
117 // Returns: true if got coords, false if the monitor was animating
118 bool GetCockpitWindowCoords(int window, int *left, int *top, int *right, int *bot);
119
120 #endif