44 static matrix view_perturb = { { { { { { 1.0f, 0.0f, 0.0f } } },
45 { { { 0.0f, -1.0f, 0.0f } } },
46 { { { 0.0f, 0.0f, -1.0f } } } } } };
48 static vec3d Orb_eye_position = { { { 0.0f, 0.0f, -3.0f } } };
56 memset(orb_ring_xy, 0,
sizeof(orb_ring_xy));
57 memset(orb_ring_xz, 0,
sizeof(orb_ring_xz));
58 memset(orb_ring_yz, 0,
sizeof(orb_ring_yz));
62 s=sinf(
float(i*
PI2)/NUM_ORB_RING_SLICES);
63 c=cosf(
float(i*PI2)/NUM_ORB_RING_SLICES);
65 orb_ring_xy[
i].
xyz.x =
c;
66 orb_ring_xy[
i].
xyz.y =
s;
68 orb_ring_yz[
i].
xyz.y =
c;
69 orb_ring_yz[
i].
xyz.z =
s;
71 orb_ring_xz[
i].
xyz.x =
c;
72 orb_ring_xz[
i].
xyz.z =
s;
83 Radar_center_offsets[0] =
x;
84 Radar_center_offsets[1] =
y;
106 if (scale > 1.25
f) scale = 1.25f;
107 if (scale < .75
f) scale = .75f;
127 if (size <
i2fl(rad)) size =
i2fl(rad);
150 if (size <
i2fl(rad)) size =
i2fl(rad);
178 float distortion_angle=20;
186 if (dist > 1.25
f) dist = 1.25f;
187 if (dist < 0.75
f) dist = 0.75f;
210 float distortion_angle=10;
212 if ( (b-
Blips) & 1 ) {
232 if (dist > 1.25
f) dist = 1.25f;
233 if (dist < 0.75
f) dist = 0.75f;
253 blip *blip_head = NULL;
280 target_position =
pos;
320 for (
int is_bright = 0; is_bright < 2; is_bright++)
392 g3_draw_line(&proj_orb_lines_xy[i-1],&proj_orb_lines_xy[i]);
393 g3_draw_line(&proj_orb_lines_xz[i-1],&proj_orb_lines_xz[i]);
397 g3_draw_line(&proj_orb_lines_yz[i-1],&proj_orb_lines_yz[i]);
409 vec3d fvec = { { { 0.0f, 0.0f, 1.0f } } };
415 float angle = fabs(acosf(dot));
459 int ok_to_blit_radar;
466 ok_to_blit_radar = 1;
493 ok_to_blit_radar = 0;
522 if ( ok_to_blit_radar ) {
623 if ( clr_idx >= 0 ) {
631 vec3d pnt_end, pnt_start;
635 for(i = 0; i < 2; i++) {
637 pnt_end = pnt_start = pnt;
642 for(j = 0; j < 2; j++) {
644 pnt_end = pnt_start = pnt;
void blipDrawDistorted(blip *b, vec3d *pos)
void drawCrosshairs(vec3d pnt)
int timestamp(int delta_ms)
#define BLIP_TYPE_JUMP_NODE
vec3d orb_ring_xy[NUM_ORB_RING_SLICES]
GLfloat GLfloat GLfloat GLfloat h
void hud_save_restore_camera_data(int)
Called to save and restore the 3D camera settings.
float frand_range(float min, float max)
Return a floating point number in the range min..max.
SCP_vector< game_snd > Snds
#define gr_end_view_matrix
blip Blip_bright_list[MAX_BLIP_TYPES]
void setGaugeColor(int bright_index=-4)
void _cdecl void void _cdecl void _cdecl Warning(char *filename, int line, SCP_FORMAT_STRING const char *format,...) SCP_FORMAT_STRING_ARGS(3
#define SENSOR_STR_RADAR_NO_EFFECTS
void gr_init_alphacolor(color *clr, int r, int g, int b, int alpha, int type)
float radar_projection_size
int bm_get_info(int handle, int *w, int *h, ubyte *flags, int *nframes, int *fps)
Gets info on the bitmap indexed by handle.
int g3_draw_polygon(const vec3d *pos, const matrix *ori, float width, float height, int tmap_flags=TMAP_FLAG_TEXTURED)
struct vec3d::@225::@227 xyz
#define TMAP_HTL_3D_UNLIT
int radar_target_id_flags
#define END_OF_LIST(head)
#define gr_set_line_width
void vm_vec_random_cone(vec3d *out, const vec3d *in, float max_angle, const matrix *orient)
#define HUD_OBJECT_RADAR_ORB
void gr_set_color_fast(color *dst)
int g3_draw_line(vertex *p0, vertex *p1)
GLenum GLenum GLenum GLenum GLenum scale
void gr_set_bitmap(int bitmap_num, int alphablend_mode, int bitblt_mode, float alpha)
void g3_draw_htl_sphere(const vec3d *position, float radius)
#define TMAP_FLAG_BW_TEXTURE
void setClip(int x, int y, int w, int h)
#define gr_end_proj_matrix
int bm_load_animation(const char *real_filename, int *nframes, int *fps, int *keyframe, int can_drop_frames, int dir_type)
Loads a bitmap sequance so we can draw with it.
#define IS_VEC_NULL_SQ_SAFE(v)
void g3_done_instance(bool set_api=false)
void gr_set_color(int r, int g, int b)
#define gr_set_view_matrix
#define MIN_SENSOR_STR_TO_RADAR
typedef int(SCP_EXT_CALLCONV *SCPDLL_PFVERSION)(SCPDLL_Version *)
void initBitmaps(char *fname)
void drawContactImage(vec3d *pnt, int rad, int idx, int clr_idx, float mult)
float ship_get_subsystem_strength(ship *shipp, int type)
#define gr_set_proj_matrix
#define BLIP_DRAW_DISTORTED
#define BLIP_TYPE_NORMAL_SHIP
void vm_vec_scale(vec3d *dest, float s)
int g3_draw_sphere(vertex *pnt, float rad)
void blipDrawFlicker(blip *b, vec3d *pos)
int Radar_blip_radius_target
int ship_subsys_disrupted(ship_subsys *ss)
void g3_set_view_matrix(const vec3d *view_pos, const matrix *view_matrix, float zoom)
int GLOWMAP
References a map that is a fully lit version of its index -Bobboau.
#define NUM_ORB_RING_SLICES
float emp_current_intensity()
vec3d orb_ring_xz[NUM_ORB_RING_SLICES]
rcol Radar_color_rgb[MAX_RADAR_COLORS][MAX_RADAR_LEVELS]
ubyte g3_rotate_vertex(vertex *dest, const vec3d *src)
float vm_vec_dist(const vec3d *v0, const vec3d *v1)
int Radar_flicker_timer[NUM_FLICKER_TIMERS]
void drawContact(vec3d *pnt, int rad)
int g3_project_vertex(vertex *point)
vec3d * vm_vec_unrotate(vec3d *dest, const vec3d *src, const matrix *m)
int Radar_blip_radius_normal
GLint GLint GLint GLint GLint x
#define vm_vec_make(v, _x, _y, _z)
void drawContactHtl(vec3d *pnt, int rad)
void drawBlips(int blip_type, int bright, int distort)
#define BLIP_TYPE_WARPING_SHIP
GLboolean GLboolean GLboolean b
void drawBlipsSorted(int distort)
typedef float(SCP_EXT_CALLCONV *SCPTRACKIR_PFFLOATVOID)()
#define BLIP_TYPE_NAVBUOY_CARGO
void render(float frametime)
void bm_page_in_aabitmap(int bitmapnum, int nframes)
Marks a texture as being used for this level, and is anti-aliased.
#define SUBSYSTEM_SENSORS
void initCenterOffsets(float x, float y)
blip Blip_dim_list[MAX_BLIP_TYPES]
int snd_play_looping(game_snd *gs, float pan, int start_loop, int stop_loop, float vol_scale, int scriptingUpdateVolume)
void g3_start_instance_matrix(const vec3d *pos, const matrix *orient, bool set_api=true)
#define TMAP_FLAG_TEXTURED
#define timestamp_elapsed(stamp)
float vm_vec_dot(const vec3d *v0, const vec3d *v1)
#define BLIP_TYPE_TAGGED_SHIP
#define timestamp_rand(a, b)
#define GR_BITBLT_MODE_NORMAL
int SPECMAP
References a map that is for specular mapping -Bobboau.
int Radar_avail_prev_frame
int Radar_flicker_on[NUM_FLICKER_TIMERS]
#define GR_ALPHABLEND_NONE
void plotBlip(blip *b, vec3d *scaled_pos)
void gr_set_font(int fontnum)
GLclampf GLclampf GLclampf alpha
matrix vmd_identity_matrix
#define g3_start_frame(zbuffer_flag)
float vm_vec_normalize(vec3d *v)
#define BLIP_CURRENT_TARGET
void renderBitmap(int x, int y)
void g3_draw_htl_line(const vec3d *start, const vec3d *end)
vec3d orb_ring_yz[NUM_ORB_RING_SLICES]