2 * Copyright (C) Volition, Inc. 1999. All rights reserved.
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
10 * $Logfile: /Freespace2/code/Radar/Radar.cpp $
15 * C module containg functions to display and manage the radar
18 * Revision 1.6 2004/09/20 01:31:44 theoddone33
21 * Revision 1.5 2002/06/17 06:33:10 relnev
22 * ryan's struct patch for gcc 2.95
24 * Revision 1.4 2002/06/09 04:41:25 relnev
25 * added copyright header
27 * Revision 1.3 2002/06/02 04:26:34 relnev
30 * Revision 1.2 2002/05/07 03:16:51 theoddone33
31 * The Great Newline Fix
33 * Revision 1.1.1.1 2002/05/03 03:28:10 root
37 * 14 8/23/99 8:38p Andsager
38 * Added see_all debug console command for turning radar range infinite in
39 * nebula (but not targeting).
41 * 13 6/10/99 3:43p Dave
42 * Do a better job of syncing text colors to HUD gauges.
44 * 12 6/07/99 4:21p Andsager
45 * Add HUD color for tagged object. Apply to target and radar.
47 * 11 6/02/99 12:52p Andsager
48 * Added team-wide ship visibility. Implemented for player.
50 * 10 1/25/99 5:03a Dave
51 * First run of stealth, AWACS and TAG missile support. New mission type
54 * 9 1/12/99 5:45p Dave
55 * Moved weapon pipeline in multiplayer to almost exclusively client side.
56 * Very good results. Bandwidth goes down, playability goes up for crappy
57 * connections. Fixed object update problem for ship subsystems.
59 * 8 12/30/98 9:34a Jasen
60 * updated coords for hi res
62 * 7 12/29/98 7:29p Dave
63 * Added some missing hi-res hud coord globalizations.
65 * 6 12/29/98 2:30p Jasen
66 * added some new coords for 1024 HUD stuff
68 * 5 12/28/98 3:17p Dave
69 * Support for multiple hud bitmap filenames for hi-res mode.
71 * 4 11/05/98 4:18p Dave
72 * First run nebula support. Beefed up localization a bit. Removed all
73 * conditional compiles for foreign versions. Modified mission file
76 * 3 10/13/98 9:29a Dave
77 * Started neatening up freespace.h. Many variables renamed and
78 * reorganized. Added AlphaColors.[h,cpp]
80 * 2 10/07/98 10:53a Dave
83 * 1 10/07/98 10:51a Dave
85 * 90 8/28/98 3:29p Dave
86 * EMP effect done. AI effects may need some tweaking as required.
88 * 89 8/25/98 1:48p Dave
89 * First rev of EMP effect. Player side stuff basically done. Next comes
92 * 88 6/12/98 4:52p Hoffoss
93 * Added support for special characters in in forgeign languages.
95 * 87 6/09/98 10:31a Hoffoss
96 * Created index numbers for all xstr() references. Any new xstr() stuff
97 * added from here on out should be added to the end if the list. The
98 * current list count can be found in FreeSpace.cpp (search for
101 * 86 5/19/98 10:26a John
102 * Fixed bug with radar blips not drawing in hardware.
104 * 85 5/19/98 9:12a John
105 * Made radar blips render as font characters 132 and 133. Needs a new
106 * font01.vf in the data tree.
108 * 84 5/08/98 11:22a Allender
109 * fix ingame join trouble. Small messaging fix. Enable collisions for
112 * 83 5/01/98 12:24p Jim
113 * don't process radar_plot_obj on the standalone server
115 * 82 4/07/98 4:05p Lawrance
116 * Only show hostile bombs on radar.
118 * 81 3/26/98 5:26p John
119 * added new paging code. nonfunctional.
121 * 80 3/15/98 3:11p Lawrance
122 * Always draw target radar blip bright.
124 * 79 3/11/98 5:33p Lawrance
125 * Support rendering and targeting of jump nodes
127 * 78 3/03/98 8:12p Lawrance
128 * Draw cargo as gray dots
130 * 77 2/22/98 4:30p John
131 * More string externalization classification
133 * 76 2/22/98 2:48p John
134 * More String Externalization Classification
136 * 75 2/21/98 3:26p Lawrance
137 * Improve how blips get drawn for ships immune to sensors.
139 * 74 2/16/98 11:58p Lawrance
140 * Add support for SF_HIDDEN_FROM_SENSORS flag.
142 * 73 2/13/98 4:08p Lawrance
143 * Use more accurate distance formula when plotting radar dots... fixes
144 * "dead zone" black spot.
146 * 72 2/12/98 4:58p Lawrance
147 * Change to new flashing method.
149 * 71 2/11/98 12:04a Lawrance
150 * Only show bombs on radar, change code to use much less data.
152 * 70 2/10/98 11:46a Lawrance
153 * Ensure TEAM_TRAITOR views other TEAM_TRAITOR ships as hostile.
163 #include "floating.h"
177 #include "hudtarget.h"
178 #include "hudconfig.h"
179 #include "subsysdamage.h"
182 #include "linklist.h"
185 #include "freespace.h"
186 #include "localize.h"
189 int Radar_radius[GR_NUM_RESOLUTIONS][2] = {
198 float Radar_center[GR_NUM_RESOLUTIONS][2] = {
207 int Radar_coords[GR_NUM_RESOLUTIONS][2] = {
215 char Radar_fname[GR_NUM_RESOLUTIONS][MAX_FILENAME_LEN] = {
220 int Radar_blip_radius_normal[GR_NUM_RESOLUTIONS] = {
224 int Radar_blip_radius_target[GR_NUM_RESOLUTIONS] = {
229 #define BLIP_MUTATE_TIME 100
233 #define MAX_RADAR_LEVELS 2 // bright and dim radar dots are allowed
235 #define BLIP_CURRENT_TARGET (1<<0)
236 #define BLIP_DRAW_DIM (1<<1) // object is farther than Radar_dim_range units away
237 #define BLIP_DRAW_DISTORTED (1<<2) // object is resistant to sensors, so draw distorted
239 typedef struct blip {
242 int flags; // BLIP_ flags defined above
245 #define MAX_BLIPS 150
246 typedef struct rcol {
250 #define MAX_RADAR_COLORS 9
252 #define RCOL_HOSTILE 0
253 #define RCOL_FRIENDLY 1
254 #define RCOL_UNKNOWN 2
255 #define RCOL_NEUTRAL 3
257 #define RCOL_NAVBUOYS 5
258 #define RCOL_WARPING_SHIP 6
259 #define RCOL_JUMP_NODE 7
260 #define RCOL_TAGGED 8
262 static float Radar_dim_range; // range at which we start dimming the radar blips
263 static int Radar_calc_dim_dist_timer; // timestamp at which we recalc Radar_dim_range
265 #define NUM_FLICKER_TIMERS 2
266 static int Radar_flicker_timer[NUM_FLICKER_TIMERS]; // timestamp used to flicker blips on and off
267 static int Radar_flicker_on[NUM_FLICKER_TIMERS]; // status of flickering
269 #define RADAR_BLIP_BRIGHT 0
270 #define RADAR_BLIP_DIM 1
272 rcol Radar_color_rgb[MAX_RADAR_LEVELS][MAX_RADAR_COLORS] = {
273 {{ 0xff, 0x00, 0x00}, // hostile (red)
274 { 0x00, 0xff, 0x00}, // friendly (green)
275 { 0xff, 0x00, 0xff}, // unknown (purple)
276 { 0xff, 0x00, 0x00}, // neutral (red)
277 { 0x7f, 0x7f, 0x00}, // homing missile (yellow)
278 { 0x7f, 0x7f, 0x7f}, // navbuoy or cargo (gray)
279 { 0x00, 0x00, 0xff}, // warp ship (blue)
280 { 0x7f, 0x7f, 0x7f}, // jump node (gray)
281 { 0xff, 0xff, 0x00}}, // tagged (yellow)
283 // 1/3 intensity of above colors
284 {{ 0x7f, 0x00, 0x00}, // hostile (red)
285 { 0x00, 0x7f, 0x00}, // friendly (green)
286 { 0x7f, 0x00, 0x7f}, // unknown (purple)
287 { 0x7f, 0x00, 0x00}, // neutral (red)
288 { 0x40, 0x40, 0x00}, // homing missile (yellow)
289 { 0x40, 0x40, 0x40}, // navbuoy or cargo (gray)
290 { 0x00, 0x00, 0x7f}, // warp ship (blue)
291 { 0x40, 0x40, 0x40}, // jump node (gray)
292 { 0x7f, 0x7f, 0x00}}, // tagged (yellow)
295 color Radar_colors[MAX_RADAR_LEVELS][MAX_RADAR_COLORS];
297 blip Blip_bright_list[MAX_RADAR_COLORS]; // linked list of bright blips
298 blip Blip_dim_list[MAX_RADAR_COLORS]; // linked list of dim blips
299 blip Blips[MAX_BLIPS]; // blips pool
300 int N_blips; // next blip index to take from pool
302 float Radar_farthest_dist = 1000.0f;
303 static int Blip_mutate_id;
305 static int Radar_static_playing; // is static currently playing on the radar?
306 static int Radar_static_next; // next time to toggle static on radar
307 static int Radar_avail_prev_frame; // was radar active last frame?
308 static int Radar_death_timer; // timestamp used to play static on radar
309 int Radar_static_looping; // id for looping radar static sound
311 static hud_frames Radar_gauge;
313 int Radar_dist_coords[GR_NUM_RESOLUTIONS][RR_MAX_RANGES][2] =
318 {368, 461} // infinity
323 {596, 741} // infinity
327 // forward declarations
328 void draw_radar_blips(int desired_color, int is_dim, int distort=0);
334 Radar_gauge.first_frame = bm_load_animation(Radar_fname[gr_screen.res], &Radar_gauge.num_frames);
335 if ( Radar_gauge.first_frame < 0 ) {
336 Warning(LOCATION,"Cannot load hud ani: %s\n", Radar_fname[gr_screen.res]);
339 for (i=0; i<MAX_RADAR_LEVELS; i++ ) {
340 for (j=0; j<MAX_RADAR_COLORS; j++ ) {
341 gr_init_alphacolor( &Radar_colors[i][j], Radar_color_rgb[i][j].r, Radar_color_rgb[i][j].g, Radar_color_rgb[i][j].b, 255, AC_TYPE_HUD);
348 // determine what color the object blip should be drawn as
349 int radar_blip_color(object *objp)
356 shipp = &Ships[objp->instance];
357 if ( shipp->flags & SF_ARRIVING_STAGE_1 ) {
358 color = RCOL_WARPING_SHIP;
359 } else if ( ship_is_tagged(objp) ) {
361 } else if ( Ship_info[shipp->ship_info_index].flags & (SIF_NAVBUOY|SIF_CARGO) ) {
362 color = RCOL_NAVBUOYS;
364 if ( (Player_ship->team == shipp->team) && (Player_ship->team != TEAM_TRAITOR) ) {
365 color = RCOL_FRIENDLY;
367 switch (shipp->team) {
371 color = RCOL_HOSTILE;
374 color = RCOL_NEUTRAL;
377 color = RCOL_UNKNOWN;
380 color = RCOL_HOSTILE;
381 Int3(); // Bogus team id in shipp->team
391 color = RCOL_JUMP_NODE;
394 Error(LOCATION, "Illegal ship type in radar.");
402 DCF_BOOL(see_all, See_all)
404 void radar_plot_object( object *objp )
407 float dist, rscale, zdist, max_radar_dist;
408 int xpos, ypos, color=0;
409 vector *world_pos = &objp->pos;
412 // don't process anything here. Somehow, a jumpnode object caused this function
413 // to get entered on server side.
414 if( Game_mode & GM_STANDALONE_SERVER ){
418 // multiplayer clients ingame joining should skip this function
419 if ( MULTIPLAYER_CLIENT && (Net_player->flags & NETINFO_FLAG_INGAME_JOIN) ){
423 // get team-wide awacs level for the object if not ship
424 int ship_is_visible = 0;
425 if (objp->type == OBJ_SHIP) {
426 if (Player_ship != NULL) {
427 if (ship_is_visible_by_team(objp->instance, Player_ship->team)) {
433 // only check awacs level if ship is not visible by team
435 if (Player_ship != NULL && !ship_is_visible) {
436 awacs_level = awacs_get_level(objp, Player_ship);
439 // if the awacs level is unviewable - bail
440 if(awacs_level < 0.0f && !See_all){
444 // Apply object type filters
445 switch ( objp->type ) {
447 // Place to cull ships, such as NavBuoys
451 // filter jump nodes here if required
455 // if not a bomb, return
456 if ( !(Weapon_info[Weapons[objp->instance].weapon_info_index].wi_flags & WIF_BOMB) ) {
460 // if bomb is on same team as player, return
461 if ( (obj_team(objp) == Player_ship->team) && (Player_ship->team != TEAM_TRAITOR) ) {
468 return; // if any other kind of object, don't want to show on radar
473 // JAS -- new way of getting the rotated point that doesn't require this to be
474 // in a g3_start_frame/end_frame block.
475 vm_vec_sub(&tempv,world_pos,&Player_obj->pos);
476 vm_vec_rotate( &pos, &tempv, &Player_obj->orient );
478 // Apply range filter
479 dist = vm_vec_dist(world_pos, &Player_obj->pos);
480 max_radar_dist = Radar_ranges[HUD_config.rp_dist];
481 if ( dist > max_radar_dist ){
485 if ( dist < pos.xyz.z ) {
488 rscale = (float) acos( pos.xyz.z/dist ) / 3.14159f; //2.0f;
491 zdist = fl_sqrt( (pos.xyz.x*pos.xyz.x)+(pos.xyz.y*pos.xyz.y) );
493 float new_x_dist, clipped_x_dist;
494 float new_y_dist, clipped_y_dist;
496 if (zdist < 0.01f ) {
501 new_x_dist = (pos.xyz.x/zdist) * rscale * radx;
502 new_y_dist = (pos.xyz.y/zdist) * rscale * rady;
504 // force new_x_dist and new_y_dist to be inside the radar
509 hypotenuse = hypotf(new_x_dist, new_y_dist);
510 max_radius = i2fl(Radar_radius[gr_screen.res][0] - 5);
512 if (hypotenuse >= (max_radius) ) {
513 clipped_x_dist = max_radius * (new_x_dist / hypotenuse);
514 clipped_y_dist = max_radius * (new_y_dist / hypotenuse);
515 new_x_dist = clipped_x_dist;
516 new_y_dist = clipped_y_dist;
520 xpos = fl2i( Radar_center[gr_screen.res][0] + new_x_dist );
521 ypos = fl2i( Radar_center[gr_screen.res][1] - new_y_dist );
523 color = radar_blip_color(objp);
525 // Determine the distance at which we will dim the radar blip
526 if ( timestamp_elapsed(Radar_calc_dim_dist_timer) ) {
527 Radar_calc_dim_dist_timer=timestamp(1000);
528 Radar_dim_range = player_farthest_weapon_range();
529 if ( Radar_dim_range <= 0 ) {
530 Radar_dim_range=1500.0f;
537 if ( dist > Radar_dim_range ) {
541 if ( N_blips >= MAX_BLIPS ) {
542 // out of blips, don't plot
550 // flag the blip as a current target if it is
551 if (OBJ_INDEX(objp) == Player_ai->target_objnum) {
552 b->flags |= BLIP_CURRENT_TARGET;
557 list_append( &Blip_dim_list[color], b );
559 list_append( &Blip_bright_list[color], b );
565 // see if blip should be drawn distorted
566 if (objp->type == OBJ_SHIP) {
567 // ships specifically hidden from sensors
568 if ( Ships[objp->instance].flags & SF_HIDDEN_FROM_SENSORS ) {
569 b->flags |= BLIP_DRAW_DISTORTED;
572 // determine if its AWACS distorted
573 if ( awacs_level < 1.0f ){
574 b->flags |= BLIP_DRAW_DISTORTED;
581 // set N_blips for each color/brightness level to zero
582 void radar_null_nblips()
588 for (i=0; i<MAX_RADAR_COLORS; i++) {
589 list_init(&Blip_bright_list[i]);
590 list_init(&Blip_dim_list[i]);
594 // radar_mission_init() is called at the start of each mission.
595 void radar_mission_init()
600 Radar_death_timer = 0;
601 Radar_static_playing = 0;
602 Radar_static_next = 0;
603 Radar_avail_prev_frame = 1;
604 Radar_calc_dim_dist_timer = timestamp(0);
606 for ( i=0; i<NUM_FLICKER_TIMERS; i++ ) {
607 Radar_flicker_timer[i]=timestamp(0);
608 Radar_flicker_on[i]=0;
612 #define SMALL_BLIP_CHAR (Lcl_special_chars + 5)
613 #define LARGE_BLIP_CHAR (Lcl_special_chars + 6)
615 int Small_blip_offset_x = 0;
616 int Small_blip_offset_y = 0;
617 int Large_blip_offset_x = 0;
618 int Large_blip_offset_y = 0;
620 char Small_blip_string[2];
621 char Large_blip_string[2];
623 void radar_frame_init()
626 radx = i2fl(Radar_radius[gr_screen.res][0])/2.0f;
627 rady = i2fl(Radar_radius[gr_screen.res][1])/2.0f;
632 Small_blip_string[0] = ubyte(SMALL_BLIP_CHAR);
633 Small_blip_string[1] = 0;
634 gr_get_string_size( &w, &h, Small_blip_string );
635 Small_blip_offset_x = -w/2;
636 Small_blip_offset_y = -h/2;
638 Large_blip_string[0] = ubyte(LARGE_BLIP_CHAR);
639 Large_blip_string[1] = 0;
640 gr_get_string_size( &w, &h, Large_blip_string );
641 Large_blip_offset_x = -w/2;
642 Large_blip_offset_y = -h/2;
645 void radar_draw_circle( int x, int y, int rad )
647 if ( rad == Radar_blip_radius_target[gr_screen.res] ) {
648 gr_string( Large_blip_offset_x+x, Large_blip_offset_y+y, Large_blip_string );
650 // rad = RADAR_BLIP_RADIUS_NORMAL;
651 gr_string( Small_blip_offset_x+x, Small_blip_offset_y+y, Small_blip_string );
655 // radar is damaged, so make blips dance around
656 void radar_blip_draw_distorted(blip *b)
660 xdiff = -10 + rand()%20;
661 ydiff = -10 + rand()%20;
663 // maybe scale the effect if EMP is active
664 if(emp_active_local()){
665 scale = emp_current_intensity();
667 xdiff = (int)((float)xdiff * scale);
668 ydiff = (int)((float)ydiff * scale);
671 radar_draw_circle( b->x+xdiff, b->y+ydiff, b->rad );
674 // blip is for a target immune to sensors, so cause to flicker in/out with mild distortion
675 void radar_blip_draw_flicker(blip *b)
677 int xdiff=0, ydiff=0, flicker_index;
679 if ( (b-Blips) & 1 ) {
685 if ( timestamp_elapsed(Radar_flicker_timer[flicker_index]) ) {
686 Radar_flicker_timer[flicker_index] = timestamp_rand(50,1000);
687 Radar_flicker_on[flicker_index] ^= 1;
690 if ( !Radar_flicker_on[flicker_index] ) {
695 xdiff = -2 + rand()%4;
696 ydiff = -2 + rand()%4;
699 radar_draw_circle( b->x+xdiff, b->y+ydiff, b->rad );
702 // Draw all the active radar blips
703 void draw_radar_blips(int rcol, int is_dim, int distort)
706 blip *blip_head=NULL;
712 blip_head = &Blip_dim_list[rcol];
714 blip_head = &Blip_bright_list[rcol];
717 for ( b = GET_FIRST(blip_head); b !=END_OF_LIST(blip_head); b = GET_NEXT(b) ) {
719 SDL_assert((rcol >= 0) && (rcol < MAX_RADAR_COLORS));
722 gr_set_color_fast( &Radar_colors[RADAR_BLIP_DIM][rcol] );
724 gr_set_color_fast( &Radar_colors[RADAR_BLIP_BRIGHT][rcol] );
727 if (b->flags & BLIP_CURRENT_TARGET) {
728 // draw cool blip to indicate current target
729 b->rad = Radar_blip_radius_target[gr_screen.res];
731 b->rad = Radar_blip_radius_normal[gr_screen.res];
735 radar_blip_draw_distorted(b);
736 } else if ( b->flags & BLIP_DRAW_DISTORTED ) {
737 radar_blip_draw_flicker(b);
739 radar_draw_circle( b->x, b->y, b->rad );
744 // Draw the radar blips
745 // input: distorted => 0 (default) to draw normal, 1 to draw distorted
746 void radar_draw_blips_sorted(int distort)
748 // draw dim blips first
749 draw_radar_blips(RCOL_JUMP_NODE, 1, distort);
750 draw_radar_blips(RCOL_WARPING_SHIP, 1, distort);
751 draw_radar_blips(RCOL_NAVBUOYS, 1, distort);
752 draw_radar_blips(RCOL_FRIENDLY, 1, distort);
753 draw_radar_blips(RCOL_UNKNOWN, 1, distort);
754 draw_radar_blips(RCOL_BOMB, 1, distort);
755 draw_radar_blips(RCOL_NEUTRAL, 1, distort);
756 draw_radar_blips(RCOL_HOSTILE, 1, distort);
757 draw_radar_blips(RCOL_TAGGED, 1, distort);
760 draw_radar_blips(RCOL_JUMP_NODE, 0, distort);
761 draw_radar_blips(RCOL_WARPING_SHIP, 0, distort);
762 draw_radar_blips(RCOL_NAVBUOYS, 0, distort);
763 draw_radar_blips(RCOL_FRIENDLY, 0, distort);
764 draw_radar_blips(RCOL_UNKNOWN, 0, distort);
765 draw_radar_blips(RCOL_BOMB, 0, distort);
766 draw_radar_blips(RCOL_NEUTRAL, 0, distort);
767 draw_radar_blips(RCOL_HOSTILE, 0, distort);
768 draw_radar_blips(RCOL_TAGGED, 0, distort);
771 void radar_draw_range()
775 // hud_set_bright_color();
776 hud_set_gauge_color(HUD_RADAR, HUD_C_BRIGHT);
778 switch ( HUD_config.rp_dist ) {
781 gr_printf(Radar_dist_coords[gr_screen.res][RR_SHORT][0], Radar_dist_coords[gr_screen.res][RR_SHORT][1], XSTR( "2k", 467));
785 gr_printf(Radar_dist_coords[gr_screen.res][RR_LONG][0], Radar_dist_coords[gr_screen.res][RR_LONG][1], XSTR( "10k", 468));
789 SDL_snprintf(buf, SDL_arraysize(buf), NOX("%c"), Lcl_special_chars);
790 gr_printf(Radar_dist_coords[gr_screen.res][RR_INFINITY][0], Radar_dist_coords[gr_screen.res][RR_INFINITY][1], buf);
794 Int3(); // can't happen (get Alan if it does)
798 hud_set_default_color();
801 void radar_frame_render(float frametime)
804 int ok_to_blit_radar;
806 ok_to_blit_radar = 1;
808 sensors_str = ship_get_subsystem_strength( Player_ship, SUBSYSTEM_SENSORS );
810 if ( ship_subsys_disrupted(Player_ship, SUBSYSTEM_SENSORS) ) {
811 sensors_str = MIN_SENSOR_STR_TO_RADAR-1;
814 // note that on lowest skill level, there is no radar effects due to sensors damage
815 if ( (Game_skill_level == 0) || (sensors_str > SENSOR_STR_RADAR_NO_EFFECTS) ) {
816 Radar_static_playing = 0;
817 Radar_static_next = 0;
818 Radar_death_timer = 0;
819 Radar_avail_prev_frame = 1;
820 } else if ( sensors_str < MIN_SENSOR_STR_TO_RADAR ) {
821 if ( Radar_avail_prev_frame ) {
822 Radar_death_timer = timestamp(2000);
823 Radar_static_next = 1;
825 Radar_avail_prev_frame = 0;
827 Radar_death_timer = 0;
828 if ( Radar_static_next == 0 )
829 Radar_static_next = 1;
832 if ( timestamp_elapsed(Radar_death_timer) ) {
833 ok_to_blit_radar = 0;
836 hud_set_gauge_color(HUD_RADAR);
840 if ( timestamp_elapsed(Radar_static_next) ) {
841 Radar_static_playing ^= 1;
842 Radar_static_next = timestamp_rand(50, 750);
845 // if the emp effect is active, always draw the radar wackily
846 if(emp_active_local()){
847 Radar_static_playing = 1;
850 if ( ok_to_blit_radar ) {
851 if ( Radar_static_playing ) {
852 radar_draw_blips_sorted(1); // passing 1 means to draw distorted
853 if ( Radar_static_looping == -1 ) {
854 Radar_static_looping = snd_play_looping(&Snds[SND_STATIC]);
857 radar_draw_blips_sorted();
858 if ( Radar_static_looping != -1 ) {
859 snd_stop(Radar_static_looping);
860 Radar_static_looping = -1;
864 if ( Radar_static_looping != -1 ) {
865 snd_stop(Radar_static_looping);
866 Radar_static_looping = -1;
871 void radar_blit_gauge()
873 gr_set_bitmap(Radar_gauge.first_frame+1, GR_ALPHABLEND_NONE, GR_BITBLT_MODE_NORMAL, 1.0f, -1, -1);
874 gr_aabitmap( Radar_coords[gr_screen.res][0], Radar_coords[gr_screen.res][1] );
879 bm_page_in_aabitmap( Radar_gauge.first_frame, Radar_gauge.num_frames );