]> icculus.org git repositories - taylor/freespace2.git/blob - include/missiongrid.h
fix issue with looping audio streams
[taylor/freespace2.git] / include / missiongrid.h
1 /*
2  * Copyright (C) Volition, Inc. 1999.  All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell 
5  * or otherwise commercially exploit the source or things you created based on
6  * the source.
7  */
8
9 /*
10  * $Logfile: /Freespace2/code/Mission/MissionGrid.h $
11  * $Revision$
12  * $Date$
13  * $Author$
14  *
15  * Type and defines for grids
16  *
17  * $Log$
18  * Revision 1.2  2002/06/09 04:41:13  relnev
19  * added copyright header
20  *
21  * Revision 1.1.1.1  2002/05/03 03:28:12  root
22  * Initial import.
23  *
24  * 
25  * 2     10/07/98 10:53a Dave
26  * Initial checkin.
27  * 
28  * 1     10/07/98 10:49a Dave
29  * 
30  * 6     10/03/97 8:55a John
31  * moved Fred's grid_render code out of MissionGrid and into Fred.   Added
32  * code to turn background under overlays grey.
33  * 
34  * 5     7/14/97 12:04a Lawrance
35  * added function that navmap calls to draw elevation lines
36  * 
37  * 4     6/18/97 11:36p Lawrance
38  * move grid rendering code to MissionGrid.cpp
39  * 
40  * 3     6/12/97 11:25a Lawrance
41  * added grid_read_camera_controls()
42  * 
43  * 2     6/12/97 9:58a Lawrance
44  * holds grid specific types and #defines
45  * 
46  * 1     6/12/97 9:51a Lawrance
47  *
48  * $NoKeywords: $
49  */
50
51
52 #ifndef __MISSIONGRID_H__
53 #define __MISSIONGRID_H__
54
55 #define MAX_GRIDLINE_POINTS     201
56 #define L_MAX_LINES                             128
57
58 typedef struct grid {
59         int             nrows, ncols;
60         vector  center;
61         matrix  gmatrix;
62         physics_info    physics;
63         float   square_size;
64         float   planeD;         //      D component of plane equation (A, B, C are uvec in gmatrix)
65         vector  gpoints1[MAX_GRIDLINE_POINTS];  // 1 -4 are edge gridpoints for small grid.
66         vector  gpoints2[MAX_GRIDLINE_POINTS];
67         vector  gpoints3[MAX_GRIDLINE_POINTS];
68         vector  gpoints4[MAX_GRIDLINE_POINTS];
69         vector  gpoints5[MAX_GRIDLINE_POINTS];  // 5-8 are edge gridpoints for large grid.
70         vector  gpoints6[MAX_GRIDLINE_POINTS];
71         vector  gpoints7[MAX_GRIDLINE_POINTS];
72         vector  gpoints8[MAX_GRIDLINE_POINTS];
73 } grid;
74
75 typedef struct tline {
76         int     istart, iend, color;
77 } tline;
78
79 extern grid Global_grid;
80 extern grid     *The_grid;
81 extern int      double_fine_gridlines;
82
83 void grid_read_camera_controls( control_info * ci, float frametime );
84 void maybe_create_new_grid(grid *gridp, vector *pos, matrix *orient, int force = 0);
85 grid *create_grid(grid *gridp, vector *forward, vector *right, vector *center, int nrows, int ncols, float square_size);
86 grid *create_default_grid(void);
87 void render_grid(grid *gridp);
88 void modify_grid(grid *gridp);
89 void rpd_line(vector *v0, vector *v1);
90 void grid_render_elevation_line(vector *pos, grid* gridp);
91
92 #endif
93