-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathcamera.h
executable file
·95 lines (72 loc) · 1.33 KB
/
camera.h
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
84
85
86
87
88
89
90
91
92
93
#ifndef CAMERA_INCLUDED
#define CAMERA_INCLUDED
#include "main.h"
/*
* Defines
*/
#define CAMRENDERING_None 0
#define CAMRENDERING_Main 2
#define CAMRENDERING_Rear 3
#define CAMRENDERING_Missile 4
#define CAMRENDERING_Pip 5
/*
* structures
*/
typedef struct
{
VECTOR min;
VECTOR max;
} EXTENT;
typedef struct _VISGROUP VISGROUP;
struct _VISGROUP
{
int group;
int visible;
EXTENT extent;
render_viewport_t viewport;
RENDERMATRIX projection;
VISGROUP *next_visible;
};
typedef struct
{
int groups;
VISGROUP group[ MAXGROUPS ];
VISGROUP *first_visible;
VISGROUP *last_visible;
render_viewport_t *viewport;
RENDERMATRIX viewproj;
} VISLIST;
typedef struct CAMERA{
bool enable;
bool UseLowestLOD;
int Type;
u_int16_t TypeNum;
int16_t GroupImIn;
VECTOR Pos;
MATRIX Mat;
MATRIX InvMat;
RENDERMATRIX Proj;
render_viewport_t Viewport;
void * CurrentOwner;
VISLIST visible;
RENDERMATRIX View;
}CAMERA;
typedef struct _REMOTECAMERA{
bool enable;
int16_t Group;
VECTOR Pos;
VECTOR Dir;
VECTOR Up;
MATRIX Mat;
MATRIX InvMat;
}REMOTECAMERA;
/*
* fn prototypes
*/
void CameraRelease( void);
bool Cameraload( char * Filename );
void EnableRemoteCamera( u_int16_t * Data );
void DisableRemoteCamera( u_int16_t * Data );
FILE * SaveRemoteCameras( FILE * fp );
FILE * LoadRemoteCameras( FILE * fp );
#endif