FS2_Open
Open source remastering of the Freespace 2 engine
radardradis.h
Go to the documentation of this file.
1 /*
2  * Created by Olivier "LuaPineapple" Hamel for the Freespace 2 Source Code Project.
3  * You may not sell or otherwise commercially exploit the source or things you
4  * create based on the source.
5  *
6  */
7 
8 
9 #ifndef _RADAR_DRADIS_H
10 #define _RADAR_DRADIS_H
11 
12 #include "globalincs/pstypes.h"
13 #include "radar/radarsetup.h"
14 
15 extern int Radar_static_looping;
16 
17 class object;
18 struct blip;
19 struct color;
20 
22 {
23  // bitmap IDs of the textures used to render DRADIS
24  int xy_plane;
25  int xz_yz_plane;
26  int sweep_plane;
27  int target_brackets;
28  int unknown_contact_icon;
29 
30  float sweep_duration; // in seconds
31  float sweep_percent;
32 
33  matrix view_perturb;
34  vec3d Orb_eye_position;
35 
36  vec3d fx_guides0_0;
37  vec3d fx_guides0_1;
38 
39  vec3d fx_guides1_0;
40  vec3d fx_guides1_1;
41 
42  vec3d fx_guides2_0;
43  vec3d fx_guides2_1;
44 
45  vec3d sweep_normal_x;
46  vec3d sweep_normal_y;
47  vec3d sweep_normal_z;
48 
49  float scale;
50 
51  bool sub_y_clip;
52 
53  int loop_sound_handle;
54  int m_loop_snd;
55  float loop_sound_volume;
56 
57  int arrival_beep_snd;
58  int departure_beep_snd;
59 
60  int m_stealth_arrival_snd;
61  int stealth_departure_snd;
62 
63  int arrival_beep_delay;
64  int departure_beep_delay;
65 
66  int arrival_beep_next_check;
67  int departure_beep_next_check;
68 protected:
69  bool shouldDoSounds();
70 public:
72  void initBitmaps(char* fname_xy, char* fname_xz_yz, char* fname_sweep, char* fname_target_brackets, char* fname_unknown);
73  void initSound(int loop_snd, float _loop_sound_volume, int arrival_snd, int departue_snd, int stealth_arrival_snd, int stealth_departue_snd, float arrival_delay, float departure_delay);
74 
75  void blipDrawDistorted(blip *b, vec3d *pos, float alpha);
76  void blipDrawFlicker(blip *b, vec3d *pos, float alpha);
77  void drawBlips(int blip_type, int bright, int distort);
78  void drawBlipsSorted(int distort);
79  void drawContact(vec3d *pnt, int idx, int clr_idx, float dist, float alpha, float scale_factor);
80  void drawContactImage(vec3d *pnt, int rad, int idx, int clr_idx, float mult);
81  void drawSweeps();
82  void drawCrosshairs( vec3d pnt );
83  void doneDrawing();
84  void doneDrawingHtl();
85  void drawOutlines();
86  void drawOutlinesHtl();
87  void setupViewHtl();
88  int calcAlpha(vec3d* pt);
89  void render(float frametime);
90  void pageIn();
91  void plotBlip(blip* b, vec3d *pos, float *alpha);
92 
93  virtual void onFrame(float frametime);
94  virtual void initialize();
95 
96  // Sound specific functions
97  void doLoopSnd();
98  void doBeeps();
99 };
100 
101 #endif
102 
void plotBlip(blip *b, vec3d *pos, float *alpha)
void render(float frametime)
void drawBlips(int blip_type, int bright, int distort)
Definition: pstypes.h:88
Definition: 2d.h:95
void drawContactImage(vec3d *pnt, int rad, int idx, int clr_idx, float mult)
void initSound(int loop_snd, float _loop_sound_volume, int arrival_snd, int departue_snd, int stealth_arrival_snd, int stealth_departue_snd, float arrival_delay, float departure_delay)
GLenum GLenum GLenum GLenum GLenum scale
Definition: Glext.h:8503
int Radar_static_looping
Definition: radarsetup.cpp:34
void initBitmaps(char *fname_xy, char *fname_xz_yz, char *fname_sweep, char *fname_target_brackets, char *fname_unknown)
Definition: radardradis.cpp:85
int idx
Definition: multiui.cpp:761
void blipDrawDistorted(blip *b, vec3d *pos, float alpha)
Definition: object.h:141
void blipDrawFlicker(blip *b, vec3d *pos, float alpha)
void drawContact(vec3d *pnt, int idx, int clr_idx, float dist, float alpha, float scale_factor)
GLboolean GLboolean GLboolean b
Definition: Glext.h:5781
int calcAlpha(vec3d *pt)
void drawBlipsSorted(int distort)
hull_check pos
Definition: lua.cpp:5050
virtual void initialize()
void drawCrosshairs(vec3d pnt)
virtual void onFrame(float frametime)
GLclampf GLclampf GLclampf alpha
Definition: Glext.h:5177