43 Radar_center_offsets[0] =
x;
44 Radar_center_offsets[1] =
y;
59 xdiff = -10 + rand()%20;
60 ydiff = -10 + rand()%20;
74 int xdiff=0, ydiff=0, flicker_index;
76 if ( (b-
Blips) & 1 ) {
92 xdiff = -2 + rand()%4;
93 ydiff = -2 + rand()%4;
105 blip *blip_head = NULL;
132 current_target_x =
x;
133 current_target_y =
y;
160 current_target_x = 0;
161 current_target_y = 0;
163 for (
int is_bright = 0; is_bright < 2; is_bright++)
195 int w,
h, old_bottom, old_bottom_unscaled, old_right, old_right_unscaled;
196 float scalef, wf, hf, xf, yf;
216 else if ((h == w) && (size ==
h))
219 scalef = ((
float) size) / hf;
221 scalef = ((
float) size) / wf;
240 blip_scaler.
xyz.x = scalef;
241 blip_scaler.
xyz.y = scalef;
242 blip_scaler.
xyz.z = 1.0f;
255 x = (
int) ((xf / scalef) - wf/2.0f);
256 y = (
int) ((yf / scalef) - hf/2.0f);
265 if ( clr_idx >= 0 ) {
288 int ok_to_blit_radar;
290 ok_to_blit_radar = 1;
317 ok_to_blit_radar = 0;
334 if ( ok_to_blit_radar ) {
375 float new_x_dist, clipped_x_dist;
376 float new_y_dist, clipped_y_dist;
393 hypotenuse = (
float)
_hypot(new_x_dist, new_y_dist);
396 if (hypotenuse >= max_radius)
398 clipped_x_dist = max_radius * (new_x_dist / hypotenuse);
399 clipped_y_dist = max_radius * (new_y_dist / hypotenuse);
400 new_x_dist = clipped_x_dist;
401 new_y_dist = clipped_y_dist;
405 *x =
fl2i(
position[0] + Radar_center_offsets[0] + new_x_dist);
406 *y =
fl2i(
position[1] + Radar_center_offsets[1] - new_y_dist);
415 for(i = 0; i < 2; i++) {
419 for(j = 0; j < 2; j++) {
int timestamp(int delta_ms)
void blipDrawFlicker(blip *b, int x, int y)
void render(float frametime)
#define BLIP_TYPE_JUMP_NODE
GLfloat GLfloat GLfloat GLfloat h
#define gr_pop_scale_matrix
SCP_vector< game_snd > Snds
void drawContactImage(int x, int y, int rad, int idx, int clr_idx, int size)
blip Blip_bright_list[MAX_BLIP_TYPES]
void initBitmaps(char *fname)
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)
int bm_get_info(int handle, int *w, int *h, ubyte *flags, int *nframes, int *fps)
Gets info on the bitmap indexed by handle.
struct vec3d::@225::@227 xyz
#define END_OF_LIST(head)
void gr_set_screen_scale(int w, int h, int zoom_w, int zoom_h, int max_w, int max_h, int center_w, int center_h, bool force_stretch)
void gr_set_color_fast(color *dst)
GLenum GLenum GLenum GLenum GLenum scale
void gr_set_bitmap(int bitmap_num, int alphablend_mode, int bitblt_mode, float alpha)
void renderGradientLine(int x1, int y1, int x2, int y2)
void drawContactCircle(int x, int y, int rad)
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 MIN_SENSOR_STR_TO_RADAR
typedef int(SCP_EXT_CALLCONV *SCPDLL_PFVERSION)(SCPDLL_Version *)
float ship_get_subsystem_strength(ship *shipp, int type)
#define HUD_OBJECT_RADAR_STD
#define BLIP_DRAW_DISTORTED
#define BLIP_TYPE_NORMAL_SHIP
int Radar_blip_radius_target
int ship_subsys_disrupted(ship_subsys *ss)
char Small_blip_string[2]
float emp_current_intensity()
int Radar_flicker_timer[NUM_FLICKER_TIMERS]
void renderString(int x, int y, const char *str)
int Radar_blip_radius_normal
GLint GLint GLint GLint GLint x
#define gr_push_scale_matrix
int radar_target_id_flags
void drawBlipsSorted(int distort)
void plotBlip(blip *b, int *x, int *y)
#define BLIP_TYPE_WARPING_SHIP
GLboolean GLboolean GLboolean b
typedef float(SCP_EXT_CALLCONV *SCPTRACKIR_PFFLOATVOID)()
#define BLIP_TYPE_NAVBUOY_CARGO
char Large_blip_string[2]
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 drawBlips(int blip_type, int bright, int distort)
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 gr_reset_screen_scale()
#define timestamp_elapsed(stamp)
#define BLIP_TYPE_TAGGED_SHIP
#define timestamp_rand(a, b)
void gr_bitmap(int _x, int _y, int resize_mode)
#define GR_BITBLT_MODE_NORMAL
void blipDrawDistorted(blip *b, int x, int y)
void initCenterOffsets(float x, float y)
int Radar_avail_prev_frame
int Radar_flicker_on[NUM_FLICKER_TIMERS]
#define GR_ALPHABLEND_NONE
void gr_set_font(int fontnum)
void drawCrosshairs(int x, int y)
#define g3_start_frame(zbuffer_flag)
#define BLIP_CURRENT_TARGET
void renderBitmap(int x, int y)