2 * $Logfile: /Freespace2/code/Hud/HUDreticle.cpp $
7 * C module to draw and manage the recticle
10 * Revision 1.1 2002/05/03 03:28:09 root
14 * 14 10/27/99 10:04p Jefff
15 * changed german match speed indicator
17 * 13 10/14/99 2:50p Jefff
20 * 12 8/28/99 4:54p Dave
21 * Fixed directives display for multiplayer clients for wings with
22 * multiple waves. Fixed hud threat indicator rendering color.
24 * 11 8/09/99 3:14p Dave
25 * Make "launch" warning gauge draw in code.
27 * 10 6/10/99 3:43p Dave
28 * Do a better job of syncing text colors to HUD gauges.
30 * 9 6/08/99 10:48a Jasenw
31 * new coords for new HUD stuff
33 * 8 6/03/99 2:31p Jasenw
34 * changed coords and removed weapon indicators.
36 * 7 1/07/99 2:21p Jasen
39 * 6 1/07/99 9:07a Jasen
42 * 5 12/28/98 3:17p Dave
43 * Support for multiple hud bitmap filenames for hi-res mode.
45 * 4 12/21/98 5:02p Dave
46 * Modified all hud elements to be multi-resolution friendly.
48 * 3 11/05/98 4:18p Dave
49 * First run nebula support. Beefed up localization a bit. Removed all
50 * conditional compiles for foreign versions. Modified mission file
53 * 2 10/07/98 10:53a Dave
56 * 1 10/07/98 10:49a Dave
58 * 69 8/28/98 3:28p Dave
59 * EMP effect done. AI effects may need some tweaking as required.
61 * 68 8/25/98 1:48p Dave
62 * First rev of EMP effect. Player side stuff basically done. Next comes
65 * 67 6/12/98 4:52p Hoffoss
66 * Added support for special characters in in forgeign languages.
68 * 66 6/09/98 5:17p Lawrance
69 * French/German localization
71 * 65 6/09/98 10:31a Hoffoss
72 * Created index numbers for all xstr() references. Any new xstr() stuff
73 * added from here on out should be added to the end if the list. The
74 * current list count can be found in FreeSpace.cpp (search for
77 * 64 5/21/98 7:18p Lawrance
78 * Don't flash 'launch' for attempted lock
80 * 63 5/13/98 1:53p Lawrance
81 * If no secondary banks on a ship, show correct reticle gauge
83 * 62 5/06/98 8:05p Dave
84 * Made standalone reset properly under weird conditions. Tweak
85 * optionsmulti screen. Upped MAX_WEAPONS to 350. Put in new launch
86 * countdown anim. Minro ui fixes/tweaks.
88 * 61 5/05/98 5:51p Lawrance
89 * Draw HUD center crosshair with bright alpha index
91 * 60 5/04/98 6:12p Lawrance
92 * fix progblems with weapon gauges in situation when weapons are on ship
94 * 59 5/01/98 4:22p Lawrance
95 * Use ship->weapons instead of sip when displaying weapon linking gauge
97 * 58 4/13/98 11:19a Lawrance
98 * fix launch threat indicator
100 * 57 4/08/98 10:34p Allender
101 * make threat indicators work in multiplayer. Fix socket problem (once
104 * 56 3/26/98 5:26p John
105 * added new paging code. nonfunctional.
107 * 55 2/23/98 6:49p Lawrance
108 * Use gr_aabitmap_ex() instead of clipping regions
110 * 54 2/22/98 4:17p John
111 * More string externalization classification... 190 left to go!
113 * 53 2/22/98 12:19p John
114 * Externalized some strings
116 * 52 2/12/98 4:58p Lawrance
117 * Change to new flashing method.
119 * 51 2/09/98 9:07p Lawrance
120 * Ensure 'evaded' popup has precedence over 'launch' popup
122 * 50 1/25/98 10:31p Lawrance
123 * Don't draw most hud gauges when viewing from another ship.
125 * 49 1/19/98 11:37p Lawrance
126 * Fixing Optimization build warnings
128 * 48 1/14/98 10:21a Lawrance
129 * Draw reticle correctly when gauges are disabled.
131 * 47 1/08/98 3:20p Johnson
132 * ALAN: Ensure entire throttle gauge flashes
134 * 46 1/05/98 9:38p Lawrance
135 * Implement flashing HUD gauges.
137 * 45 1/02/98 9:10p Lawrance
138 * Big changes to how colors get set on the HUD.
140 * 44 12/16/97 9:13p Lawrance
141 * Integrate new gauges into HUD config.
143 * 43 12/10/97 10:02p Lawrance
144 * Change weapon linking to use flags.
146 * 42 12/08/97 1:49p Lawrance
147 * only play threat lock sound when a lock is being attempted
149 * 41 11/17/97 6:37p Lawrance
150 * new gauges: extended target view, new lock triangles, support ship view
152 * 40 11/11/97 10:25p Lawrance
153 * add sound hook for when missile threat flashes
155 * 39 11/11/97 5:05p Lawrance
156 * get threat indicator working more reliably
158 * 38 11/05/97 11:20p Lawrance
159 * add speed numbers to the reticle
161 * 37 11/04/97 7:49p Lawrance
162 * integrating new HUD reticle and shield icons
164 * 36 11/03/97 5:38p Dave
165 * Cleaned up more multiplayer sequencing. Added OBJ_OBSERVER module/type.
166 * Restructured HUD_config structs/flags.
174 #include "hudreticle.h"
180 #include "freespace.h"
187 #include "hudtargetbox.h"
190 #include "localize.h"
192 static int Reticle_inited = 0;
194 #define NUM_RETICLE_ANIS 6 // keep up to date when modifying the number of reticle ani files
196 #define RETICLE_TOP_ARC 0
197 #define RETICLE_LASER_WARN 1
198 #define RETICLE_LOCK_WARN 2
199 #define RETICLE_LEFT_ARC 3
200 #define RETICLE_RIGHT_ARC 4
201 //#define RETICLE_ONE_PRIMARY 5
202 //#define RETICLE_TWO_PRIMARY 6
203 //#define RETICLE_ONE_SECONDARY 7
204 //#define RETICLE_TWO_SECONDARY 8
205 //#define RETICLE_THREE_SECONDARY 9
206 // #define RETICLE_LAUNCH_LABEL 5
207 #define RETICLE_CENTER 5
209 int Hud_throttle_frame_h[GR_NUM_RESOLUTIONS] = {
213 int Hud_throttle_frame_w[GR_NUM_RESOLUTIONS] = {
217 int Hud_throttle_frame_bottom_y[GR_NUM_RESOLUTIONS] = {
221 int Hud_throttle_h[GR_NUM_RESOLUTIONS] = {
225 int Hud_throttle_bottom_y[GR_NUM_RESOLUTIONS] = {
229 int Hud_throttle_aburn_h[GR_NUM_RESOLUTIONS] = {
233 int Hud_throttle_aburn_button[GR_NUM_RESOLUTIONS] = {
238 int Outer_circle_radius[GR_NUM_RESOLUTIONS] = {
243 int Hud_reticle_center[GR_NUM_RESOLUTIONS][2] = {
252 char Reticle_frame_names[GR_NUM_RESOLUTIONS][NUM_RETICLE_ANIS][MAX_FILENAME_LEN] =
286 // reticle frame coords
287 int Reticle_frame_coords[GR_NUM_RESOLUTIONS][NUM_RETICLE_ANIS][2] = {
318 // "launch" gauge coords
319 int Reticle_launch_coords[GR_NUM_RESOLUTIONS][2] = {
328 hud_frames Reticle_gauges[NUM_RETICLE_ANIS];
330 #define THREAT_DUMBFIRE (1<<0)
331 #define THREAT_ATTEMPT_LOCK (1<<1)
332 #define THREAT_LOCK (1<<2)
334 #define THREAT_UPDATE_DUMBFIRE_TIME 1000 // time between checking for dumbfire threats
335 #define THREAT_UPDATE_LOCK_TIME 500 // time between checking for lock threats
337 #define THREAT_DUMBFIRE_FLASH 180
338 #define THREAT_LOCK_FLASH 180
339 static int Threat_dumbfire_timer; // timestamp for when to show next flashing frame for dumbfire threat
340 static int Threat_lock_timer; // timestamp for when to show next flashing frame for lock threat
342 static int Threat_dumbfire_frame; // frame offset of current dumbfire flashing warning
343 static int Threat_lock_frame; // frame offset of current lock flashing warning
346 static int Max_speed_coords[GR_NUM_RESOLUTIONS][2] =
355 static int Zero_speed_coords[GR_NUM_RESOLUTIONS][2] = {
364 // Called at the start of each level.. use Reticle_inited so we only load frames once
365 void hud_init_reticle()
370 Threat_dumbfire_timer = timestamp(0);
371 Threat_lock_timer = timestamp(0);
372 Threat_dumbfire_frame = 1;
373 Threat_lock_frame = 1;
374 Player->threat_flags = 0;
375 Player->update_dumbfire_time = timestamp(0);
376 Player->update_lock_time = timestamp(0);
378 if ( Reticle_inited ) {
382 for ( i = 0; i < NUM_RETICLE_ANIS; i++ ) {
383 hfp = &Reticle_gauges[i];
384 hfp->first_frame = bm_load_animation(Reticle_frame_names[gr_screen.res][i], &hfp->num_frames);
385 if ( hfp->first_frame < 0 ) {
386 Warning(LOCATION,"Cannot load hud ani: %s\n", Reticle_frame_names[gr_screen.res][i]);
393 // called once per frame to update the reticle gauges. Makes calls to
394 // ship_dumbfire_threat() and ship_lock_threat() and updates Threat_flags.
395 void hud_update_reticle( player *pp )
400 // multiplayer clients won't call this routine
401 if ( MULTIPLAYER_CLIENT || MULTI_OBSERVER(Net_players[MY_NET_PLAYER_NUM]))
404 shipp = &Ships[Objects[pp->objnum].instance];
406 if ( ship_dumbfire_threat(shipp) ) {
407 pp->threat_flags |= THREAT_DUMBFIRE;
408 pp->update_dumbfire_time = timestamp(THREAT_UPDATE_DUMBFIRE_TIME);
411 if ( timestamp_elapsed(pp->update_dumbfire_time) ) {
412 pp->update_dumbfire_time = timestamp(THREAT_UPDATE_DUMBFIRE_TIME);
413 pp->threat_flags &= ~THREAT_DUMBFIRE;
416 if ( timestamp_elapsed(pp->update_lock_time) ) {
417 pp->threat_flags &= ~(THREAT_LOCK | THREAT_ATTEMPT_LOCK);
418 pp->update_lock_time = timestamp(THREAT_UPDATE_LOCK_TIME);
419 rval = ship_lock_threat(shipp);
421 pp->threat_flags |= THREAT_ATTEMPT_LOCK;
422 } else if ( rval == 2 ) {
423 pp->threat_flags |= THREAT_LOCK;
428 // draw left arc (the dark portion of the throttle gauge)
429 void hud_render_throttle_background(int y_end)
433 hud_set_gauge_color(HUD_THROTTLE_GAUGE);
435 x = Reticle_frame_coords[gr_screen.res][RETICLE_LEFT_ARC][0];
436 y = Reticle_frame_coords[gr_screen.res][RETICLE_LEFT_ARC][1];
438 bm_get_info( Reticle_gauges[RETICLE_LEFT_ARC].first_frame+1,&w,&h);
441 GR_AABITMAP_EX(Reticle_gauges[RETICLE_LEFT_ARC].first_frame+1, x, y, w, y_end-y+1, 0, 0);
445 // draw left arc (the bright portion of the throttle gauge)
446 void hud_render_throttle_foreground(int y_end)
450 hud_set_gauge_color(HUD_THROTTLE_GAUGE);
452 x = Reticle_frame_coords[gr_screen.res][RETICLE_LEFT_ARC][0];
453 y = Reticle_frame_coords[gr_screen.res][RETICLE_LEFT_ARC][1];
455 bm_get_info( Reticle_gauges[RETICLE_LEFT_ARC].first_frame+1,&w,&h);
457 if ( y_end < Hud_throttle_frame_bottom_y[gr_screen.res] ) {
458 GR_AABITMAP_EX(Reticle_gauges[RETICLE_LEFT_ARC].first_frame+2, x, y_end, w, h-(y_end-y), 0, y_end-y);
462 // Draw the throttle speed number
463 void hud_render_throttle_speed(float current_speed, int y_end)
466 int sx, sy, x_pos, y_pos, w, h;
468 hud_set_gauge_color(HUD_THROTTLE_GAUGE);
470 // y_end is the y-coordinate of the current throttle setting, calc x-coordinate for edge of
471 // circle (x^2 + y^2 = r^2)
472 y_pos = Hud_reticle_center[gr_screen.res][1] - y_end;
473 x_pos = (int)sqrt(double(Outer_circle_radius[gr_screen.res] * Outer_circle_radius[gr_screen.res] - y_pos * y_pos) );
474 x_pos = Hud_reticle_center[gr_screen.res][0] - x_pos;
476 // draw current speed at (x_pos, y_end);
477 sprintf(buf, "%d", fl2i(current_speed+0.5f));
478 hud_num_make_mono(buf);
479 gr_get_string_size(&w, &h, buf);
481 sy = fl2i(y_end - h/2.0f + 1.5);
482 gr_printf(sx, sy, buf);
484 if ( Players[Player_num].flags & PLAYER_FLAGS_MATCH_TARGET ) {
486 if ( current_speed <= 9.5 ) {
491 #if defined(GERMAN_BUILD)
492 // print an m, cuz the voice says its an m.
493 // its a normal m cuz the german font has no special m (its an a)
494 gr_string(sx+offset, sy + h, "m");
496 gr_printf(sx+offset, sy + h, "%c", Lcl_special_chars + 3);
501 // draw the "desired speed" bar on the throttle
502 void hud_render_throttle_line(int y)
504 // hud_set_bright_color();
505 hud_set_gauge_color(HUD_THROTTLE_GAUGE, HUD_C_BRIGHT);
507 GR_AABITMAP_EX(Reticle_gauges[RETICLE_LEFT_ARC].first_frame+3, Reticle_frame_coords[gr_screen.res][RETICLE_LEFT_ARC][0], y, Hud_throttle_frame_w[gr_screen.res], 1, 0, y-Reticle_frame_coords[gr_screen.res][RETICLE_LEFT_ARC][1]);
510 // Draw the throttle gauge along the left arc of the reticle
511 void hud_show_throttle()
513 float desired_speed, max_speed, current_speed, percent_max, percent_aburn_max;
514 int desired_y_pos, y_end;
517 sip = &Ship_info[Player_ship->ship_info_index];
519 current_speed = Player_obj->phys_info.fspeed;
520 if ( current_speed < 0.0f){
521 current_speed = 0.0f;
524 max_speed = Ships[Player_obj->instance].current_max_speed;
525 if ( max_speed <= 0 ) {
526 max_speed = sip->max_vel.z;
529 desired_speed = Player->ci.forward * max_speed;
530 if ( desired_speed < 0.0f ){ // so ships that go backwards don't force the indicators below where they can go
531 desired_speed = 0.0f;
534 desired_y_pos = Hud_throttle_bottom_y[gr_screen.res] - fl2i(Hud_throttle_h[gr_screen.res]*desired_speed/max_speed+0.5f) - 1;
536 Assert(max_speed != 0);
537 percent_max = current_speed / max_speed;
539 percent_aburn_max = 0.0f;
540 if ( percent_max > 1 ) {
542 percent_aburn_max = (current_speed - max_speed) / (sip->afterburner_max_vel.z - max_speed);
543 if ( percent_aburn_max > 1.0f ) {
544 percent_aburn_max = 1.0f;
546 if ( percent_aburn_max < 0 ) {
547 percent_aburn_max = 0.0f;
551 y_end = Hud_throttle_bottom_y[gr_screen.res] - fl2i(Hud_throttle_h[gr_screen.res]*percent_max+0.5f);
552 if ( percent_aburn_max > 0 ) {
553 y_end -= fl2i(percent_aburn_max * Hud_throttle_aburn_h[gr_screen.res] + 0.5f);
556 if ( Player_obj->phys_info.flags & PF_AFTERBURNER_ON ) {
560 // draw left arc (the dark portion of the throttle gauge)
561 // hud_render_throttle_background(y_end);
563 // draw throttle speed number
564 hud_render_throttle_speed(current_speed, y_end);
566 // draw the "desired speed" bar on the throttle
567 hud_render_throttle_line(desired_y_pos);
569 // draw left arc (the bright portion of the throttle gauge)
570 hud_render_throttle_foreground(y_end);
572 gr_printf(Max_speed_coords[gr_screen.res][0], Max_speed_coords[gr_screen.res][1], "%d",fl2i(max_speed));
573 gr_printf(Zero_speed_coords[gr_screen.res][0], Zero_speed_coords[gr_screen.res][1], XSTR( "0", 292));
577 // Draw the primary and secondary weapon indicators along the right arc of the reticle
578 void hud_show_reticle_weapons()
580 int gauge_index=0, frame_offset=0;
583 swp = &Player_ship->weapons;
585 switch( swp->num_primary_banks ) {
591 gauge_index = RETICLE_ONE_PRIMARY;
592 if ( Player_ship->weapons.current_primary_bank == -1 ) {
600 gauge_index = RETICLE_TWO_PRIMARY;
601 if ( swp->current_primary_bank == -1 ) {
604 if ( Player_ship->flags & SF_PRIMARY_LINKED ) {
607 if ( swp->current_primary_bank == 0 ) {
617 Int3(); // shouldn't happen (get Alan if it does)
622 if ( gauge_index != -1 ) {
623 GR_AABITMAP(Reticle_gauges[gauge_index].first_frame+frame_offset, Reticle_frame_coords[gr_screen.res][gauge_index][0], Reticle_frame_coords[gr_screen.res][gauge_index][1]);
626 int num_banks = swp->num_secondary_banks;
627 if ( num_banks <= 0 ) {
628 num_banks = Ship_info[Player_ship->ship_info_index].num_secondary_banks;
631 switch( num_banks ) {
638 gauge_index = RETICLE_ONE_SECONDARY;
642 gauge_index = RETICLE_TWO_SECONDARY;
646 gauge_index = RETICLE_THREE_SECONDARY;
650 Int3(); // shouldn't happen (get Alan if it does)
655 if ( gauge_index != -1 ) {
656 if ( swp->num_secondary_banks <= 0 ) {
659 frame_offset = swp->current_secondary_bank+1;
662 GR_AABITMAP(Reticle_gauges[gauge_index].first_frame+frame_offset, Reticle_frame_coords[gr_screen.res][gauge_index][0], Reticle_frame_coords[gr_screen.res][gauge_index][1]);
667 // Draw the lock threat gauge on the HUD. Use Threat_flags to determine if a
668 // threat exists, and draw flashing frames.
669 void hud_show_lock_threat()
673 if ( Player->threat_flags & (THREAT_LOCK | THREAT_ATTEMPT_LOCK) ) {
674 if ( timestamp_elapsed(Threat_lock_timer) ) {
675 if ( Player->threat_flags & THREAT_LOCK ) {
676 Threat_lock_timer = timestamp(fl2i(THREAT_LOCK_FLASH/2.0f));
678 Threat_lock_timer = timestamp(THREAT_LOCK_FLASH);
681 if ( Threat_lock_frame > 2 ) {
682 Threat_lock_frame = 1;
684 if ( (Threat_lock_frame == 2) && (Player->threat_flags & THREAT_ATTEMPT_LOCK ) ) {
685 snd_play( &Snds[SND_THREAT_FLASH]);
688 frame_offset = Threat_lock_frame;
693 hud_set_gauge_color(HUD_THREAT_GAUGE);
695 GR_AABITMAP(Reticle_gauges[RETICLE_LOCK_WARN].first_frame+frame_offset, Reticle_frame_coords[gr_screen.res][RETICLE_LOCK_WARN][0], Reticle_frame_coords[gr_screen.res][RETICLE_LOCK_WARN][1]);
698 if ( (frame_offset > 0) && (Player->threat_flags & THREAT_LOCK) ) {
699 if ( hud_targetbox_flash_expired(TBOX_FLASH_CMEASURE) ) {
702 if(frame_offset % 2){
707 // GR_AABITMAP(Reticle_gauges[RETICLE_LAUNCH_LABEL].first_frame+frame_offset%2, Reticle_frame_coords[gr_screen.res][RETICLE_LAUNCH_LABEL][0], Reticle_frame_coords[gr_screen.res][RETICLE_LAUNCH_LABEL][1]);
709 // use hud text flash gauge code
710 hud_show_text_flash_icon(XSTR("Launch", 1507), Reticle_launch_coords[gr_screen.res][1], bright);
715 // Draw the dumbfire threat gauge on the HUD. Use Threat_flags to determine if a
716 // threat exists, and draw flashing frames.
717 void hud_show_dumbfire_threat()
721 if ( Player->threat_flags & THREAT_DUMBFIRE ) {
722 if ( timestamp_elapsed(Threat_dumbfire_timer) ) {
723 Threat_dumbfire_timer = timestamp(THREAT_DUMBFIRE_FLASH);
724 Threat_dumbfire_frame++;
725 if ( Threat_dumbfire_frame > 2 ) {
726 Threat_dumbfire_frame = 1;
729 frame_offset = Threat_dumbfire_frame;
734 hud_set_gauge_color(HUD_THREAT_GAUGE);
736 GR_AABITMAP(Reticle_gauges[RETICLE_LASER_WARN].first_frame + frame_offset, Reticle_frame_coords[gr_screen.res][RETICLE_LASER_WARN][0], Reticle_frame_coords[gr_screen.res][RETICLE_LASER_WARN][1]);
739 // Draw the center of the reticle
740 void hud_show_center_reticle()
742 Assert(Reticle_gauges[RETICLE_CENTER].first_frame != -1 );
744 // hud_set_default_color();
745 // hud_set_bright_color();
746 hud_set_gauge_color(HUD_CENTER_RETICLE, HUD_C_BRIGHT);
748 GR_AABITMAP(Reticle_gauges[RETICLE_CENTER].first_frame, Reticle_frame_coords[gr_screen.res][RETICLE_CENTER][0], Reticle_frame_coords[gr_screen.res][RETICLE_CENTER][1]);
751 // Draw top portion of reticle
752 void hud_show_top_arc()
754 hud_set_gauge_color(HUD_CENTER_RETICLE);
756 // hud_set_default_color();
757 if ( hud_gauge_active(HUD_THREAT_GAUGE) ) {
759 GR_AABITMAP(Reticle_gauges[RETICLE_TOP_ARC].first_frame+1, Reticle_frame_coords[gr_screen.res][RETICLE_TOP_ARC][0], Reticle_frame_coords[gr_screen.res][RETICLE_TOP_ARC][1]);
761 // draw dumbfire threat
762 hud_show_dumbfire_threat();
765 hud_show_lock_threat();
767 // draw top arc without any holes
768 GR_AABITMAP(Reticle_gauges[RETICLE_TOP_ARC].first_frame, Reticle_frame_coords[gr_screen.res][RETICLE_TOP_ARC][0], Reticle_frame_coords[gr_screen.res][RETICLE_TOP_ARC][1]);
772 // Draw right portion of reticle
773 void hud_show_right_arc()
775 hud_set_gauge_color(HUD_CENTER_RETICLE);
777 GR_AABITMAP(Reticle_gauges[RETICLE_RIGHT_ARC].first_frame+1, Reticle_frame_coords[gr_screen.res][RETICLE_RIGHT_ARC][0], Reticle_frame_coords[gr_screen.res][RETICLE_RIGHT_ARC][1]);
779 // draw the weapons indicators in the holes along the right arc
781 if ( hud_gauge_active(HUD_WEAPON_LINKING_GAUGE) ) {
782 // draw right arc with holes in it
783 GR_AABITMAP(Reticle_gauges[RETICLE_RIGHT_ARC].first_frame+1, Reticle_frame_coords[gr_screen.res][RETICLE_RIGHT_ARC][0], Reticle_frame_coords[gr_screen.res][RETICLE_RIGHT_ARC][1]);
785 // the following line was removed by Jasen to get rid of "undeclared identifier"
787 // hud_show_reticle_weapons();
789 // draw right arc without any holes
790 GR_AABITMAP(Reticle_gauges[RETICLE_RIGHT_ARC].first_frame, Reticle_frame_coords[gr_screen.res][RETICLE_RIGHT_ARC][0], Reticle_frame_coords[gr_screen.res][RETICLE_RIGHT_ARC][1]);
795 // Draw the left portion of the reticle
796 void hud_show_left_arc()
798 // draw left arc (the dark portion of the throttle gauge)
799 hud_set_gauge_color(HUD_CENTER_RETICLE);
800 GR_AABITMAP(Reticle_gauges[RETICLE_LEFT_ARC].first_frame, Reticle_frame_coords[gr_screen.res][RETICLE_LEFT_ARC][0], Reticle_frame_coords[gr_screen.res][RETICLE_LEFT_ARC][1]);
803 if ( hud_gauge_active(HUD_THROTTLE_GAUGE) ) {
804 hud_set_gauge_color(HUD_THROTTLE_GAUGE);
809 // called once per frame from HUD_render_2d() to draw the reticle gauges
810 void hud_show_reticle()
812 if ( !(Viewer_mode & VM_OTHER_SHIP) ) {
814 hud_show_right_arc();
818 // draw the center of the reticle
819 if ( hud_gauge_active(HUD_CENTER_RETICLE) ) {
820 hud_show_center_reticle();
824 void hudreticle_page_in()
829 for ( i = 0; i < NUM_RETICLE_ANIS; i++ ) {
830 hfp = &Reticle_gauges[i];
831 bm_page_in_aabitmap( hfp->first_frame, hfp->num_frames);