File: cpvalues.h

package info (click to toggle)
searchandrescue 0.8.2-10
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 4,656 kB
  • ctags: 6,111
  • sloc: ansic: 89,072; cpp: 7,691; sh: 90; makefile: 80
file content (83 lines) | stat: -rw-r--r-- 1,749 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/*
                        Control Panel Values
 */

#ifndef CPVALUES_H
#define CPVALUES_H

#include <sys/types.h>
#include <GL/gl.h>


/*
 *      Color states:
 */
#define CP_COLOR_STATE_NORMAL   0       /* Day */
#define CP_COLOR_STATE_DIM      1       /* Dusk/dawn with no lights */
#define CP_COLOR_STATE_DARK     2       /* Night with no lights */
#define CP_COLOR_STATE_LIGHTED  3       /* Dusk/dawn/night with lights on */

#define CP_COLOR_STATES         4


/*
 *      Control Panel color structure:
 */
typedef struct {

        GLfloat r, g, b;

} CPColor;
#define CPCOLOR(p)      ((CPColor *)(p))

/*
 *	Control Panel rectangle structure:
 */
typedef struct {

	GLfloat x, y, width, height;

} CPRectangle;
#define CPRECTANGLE(p)	((CPRectangle *)(p))


/*
 *	Control Panel Values structure:
 *
 *	Contains current values of the aircraft.
 */
typedef struct _ControlPanelValues ControlPanelValues;
struct _ControlPanelValues {

	time_t	current_time;	/* Current time in milliseconds */
	float	time_compensation;	/* Coefficient 0.0 to 1000.0 */
	GLfloat	tod;		/* Current time of day in seconds */

#define CP_TOD_CODE_DAY		1
#define CP_TOD_CODE_DAWN	2
#define CP_TOD_CODE_NIGHT	3
#define CP_TOD_CODE_DUSK	4
	int	tod_code;

	/* If GL_TRUE then draw control panel full screen */
	GLboolean	fullscreen;

	int	color_state;	/* One of CP_COLOR_STATE_* */

	/* Velocity & speed (in miles per hour) */
	GLfloat vel_x, vel_y, vel_z, speed;

	/* Attitude */
	GLfloat	heading, pitch, bank;

	/* Altitude (in meters and feet) */
	GLfloat	alt, alt_feet;

	GLfloat	gear_coeff;	/* 0.0 is up and 1.0 is down */

};
/* This is already defined as something else in cp.h
#define CONTROL_PANEL_VALUES(p)	((ControlPanelValues *)(p))
*/

#endif	/* CPVALUES_H */