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/Hud/HUDshield.cpp $
15 * C file for the display and management of the HUD shield
18 * Revision 1.4 2002/07/13 06:46:48 theoddone33
21 * Revision 1.3 2002/06/09 04:41:21 relnev
22 * added copyright header
24 * Revision 1.2 2002/05/07 03:16:45 theoddone33
25 * The Great Newline Fix
27 * Revision 1.1.1.1 2002/05/03 03:28:09 root
31 * 12 8/27/99 10:36a Dave
32 * Impose a 2% penalty for hitting the shield balance key.
34 * 11 8/23/99 11:34a Dave
35 * Fixed shield intensity rendering problems.
37 * 10 8/01/99 12:39p Dave
38 * Added HUD contrast control key (for nebula).
40 * 9 7/22/99 4:00p Dave
41 * Fixed beam weapon muzzle glow rendering. Externalized hud shield info.
43 * 8 6/10/99 3:43p Dave
44 * Do a better job of syncing text colors to HUD gauges.
46 * 7 1/07/99 9:06a Jasen
49 * 6 12/30/98 8:57a Jasen
50 * updated coords for hi res
52 * 5 12/28/98 3:17p Dave
53 * Support for multiple hud bitmap filenames for hi-res mode.
55 * 4 12/21/98 5:02p Dave
56 * Modified all hud elements to be multi-resolution friendly.
58 * 3 12/14/98 1:15p Jasen
59 * added new HUD shield gauges
61 * 2 10/07/98 10:53a Dave
64 * 1 10/07/98 10:49a Dave
66 * 35 9/19/98 3:11p Adam
67 * Added new hardcoded values for Hud_shield_filenames
69 * 34 8/25/98 1:48p Dave
70 * First rev of EMP effect. Player side stuff basically done. Next comes
73 * 33 5/17/98 3:32p Lawrance
74 * Make shield gauge more readable when flashing
76 * 32 4/25/98 5:39p Dave
77 * Removed an unneeded assert.
79 * 31 4/25/98 3:56p Mike
80 * Make player's shield icon flash when Fred tells it to.
82 * 30 4/25/98 2:00p Dave
83 * Installed a bunch of multiplayer context help screens. Reworked ingame
84 * join ship select screen. Fix places where network timestamps get hosed.
86 * 29 4/21/98 12:19a Allender
87 * only play equalize shield sound if player equalizes shields
89 * 28 3/26/98 5:26p John
90 * added new paging code. nonfunctional.
92 * 27 3/21/98 3:35p Lawrance
93 * Tweak position of numeric integrity for target
95 * 26 3/14/98 4:59p Lawrance
96 * Flash shield/ship icons when ships are hit
98 * 25 3/02/98 5:42p John
99 * Removed WinAVI stuff from Freespace. Made all HUD gauges wriggle from
100 * afterburner. Made gr_set_clip work good with negative x &y. Made
101 * model_caching be on by default. Made each cached model have it's own
102 * bitmap id. Made asteroids not rotate when model_caching is on.
104 * 24 2/22/98 12:19p John
105 * Externalized some strings
107 * 23 2/12/98 4:58p Lawrance
108 * Change to new flashing method.
110 * 22 1/12/98 11:16p Lawrance
111 * Wonderful HUD config.
113 * 21 1/08/98 4:36p Lawrance
114 * Fix bug in shield drawing code.
116 * 20 1/05/98 9:38p Lawrance
117 * Implement flashing HUD gauges.
119 * 19 1/02/98 9:10p Lawrance
120 * Big changes to how colors get set on the HUD.
122 * 18 12/29/97 9:48p Mike
123 * Prevent indexing before array start when quadrant_num = -1.
125 * 17 12/01/97 12:27a Lawrance
126 * redo default alpha color for HUD, make it easy to modify in the future
128 * 16 11/18/97 5:58p Lawrance
129 * flash escort view info when that ship is taking hits
131 * 15 11/18/97 1:21p Mitri
132 * ALAN: be sure to only draw shield icons for targets that are ships
134 * 14 11/17/97 6:37p Lawrance
135 * new gauges: extended target view, new lock triangles, support ship view
137 * 13 11/13/97 10:46p Lawrance
138 * implemented new escort view, damage view and weapons
140 * 12 11/12/97 9:42a Lawrance
141 * show player ship integrity above shield icon
143 * 11 11/11/97 5:06p Lawrance
144 * fix bug with flashing frequency of hull
146 * 10 11/09/97 11:27p Lawrance
147 * move target shield icon closer to center
149 * 9 11/09/97 4:39p Lawrance
150 * don't draw mini ship icon anymore
152 * 8 11/08/97 11:08p Lawrance
153 * implement new "mini-shield" view that sits near bottom of reticle
155 * 7 11/05/97 11:21p Lawrance
156 * implement dynamic alpha on the shields
158 * 6 11/04/97 8:34p Lawrance
159 * fix warning: remove unused variable
161 * 5 11/04/97 7:49p Lawrance
162 * integrating new HUD reticle and shield icons
164 * 4 10/24/97 5:51p Lawrance
165 * don't show shield % if ship has no shields
167 * 3 9/03/97 4:32p John
168 * changed bmpman to only accept ani and pcx's. made passing .pcx or .ani
169 * to bm_load functions not needed. Made bmpman keep track of palettes
170 * for bitmaps not mapped into game palettes.
172 * 2 8/25/97 12:24a Lawrance
173 * implemented HUD shield management
175 * 1 8/24/97 10:31p Lawrance
183 #include "hudtarget.h"
184 #include "hudtargetbox.h"
188 #include "freespace.h"
191 #include "hudshield.h"
192 #include "hudescort.h"
196 #define NUM_SHIELD_LEVELS 8
198 #define SHIELD_TRANSFER_PERCENT 0.083f // 1/12 total shield strength
200 #define SHIELD_HIT_DURATION_SHORT 300 // time a shield quadrant flashes after being hit
201 #define SHIELD_FLASH_INTERVAL_FAST 200 // time between shield quadrant flashes
203 // now read in from hud.tbl
204 #define MAX_SHIELD_ICONS 40
205 int Hud_shield_filename_count = 0;
206 char Hud_shield_filenames[MAX_SHIELD_ICONS][MAX_FILENAME_LEN];
208 char Shield_mini_fname[GR_NUM_RESOLUTIONS][MAX_FILENAME_LEN] = {
213 hud_frames Shield_gauges[MAX_SHIELD_ICONS];
215 static int Player_shield_coords[GR_NUM_RESOLUTIONS][2] =
225 static int Target_shield_coords[GR_NUM_RESOLUTIONS][2] =
235 static int Hud_shield_inited = 0;
237 int Shield_mini_coords[GR_NUM_RESOLUTIONS][2] = {
246 // draw on the mini shield icon what the ship integrity is
247 int Hud_mini_3digit[GR_NUM_RESOLUTIONS][3] = {
255 int Hud_mini_2digit[GR_NUM_RESOLUTIONS][3] = {
263 int Hud_mini_1digit[GR_NUM_RESOLUTIONS][3] = {
271 int Hud_mini_base[GR_NUM_RESOLUTIONS][2] = {
280 int Shield_mini_loaded = 0;
281 hud_frames Shield_mini_gauge;
283 #define SHIELD_HIT_PLAYER 0
284 #define SHIELD_HIT_TARGET 1
285 static shield_hit_info Shield_hit_data[2];
287 // translate between clockwise-from-top shield quadrant ordering to way quadrants are numbered in the game
288 ubyte Quadrant_xlate[4] = {1,0,2,3};
290 void hud_shield_game_init()
292 char name[MAX_FILENAME_LEN+1] = "";
295 read_file_text("hud.tbl");
298 Hud_shield_filename_count = 0;
299 required_string("#Shield Icons Begin");
300 while(!optional_string("#End")){
301 required_string("$Shield:");
303 stuff_string(name, F_NAME, NULL);
306 Assert(Hud_shield_filename_count < MAX_SHIELD_ICONS);
307 if(Hud_shield_filename_count < MAX_SHIELD_ICONS){
308 strcpy(Hud_shield_filenames[Hud_shield_filename_count++], name);
313 // called at the start of each level from HUD_init. Use Hud_shield_init so we only init Shield_gauges[] once.
314 void hud_shield_level_init()
318 hud_shield_hit_reset(1); // reset for the player
320 if ( Hud_shield_inited ) {
324 for ( i = 0; i < MAX_SHIELD_ICONS; i++ ) {
325 Shield_gauges[i].first_frame = -1;
326 Shield_gauges[i].num_frames = 0;
329 Hud_shield_inited = 1;
331 if ( !Shield_mini_loaded ) {
332 Shield_mini_gauge.first_frame = bm_load_animation(Shield_mini_fname[gr_screen.res], &Shield_mini_gauge.num_frames);
333 if ( Shield_mini_gauge.first_frame == -1 ) {
334 Warning(LOCATION, "Could not load in the HUD shield ani: Shield_mini_fname[gr_screen.res]\n");
337 Shield_mini_loaded = 1;
341 int hud_shield_maybe_flash(int gauge, int target_index, int shield_offset)
344 shield_hit_info *shi;
346 shi = &Shield_hit_data[target_index];
348 if ( !timestamp_elapsed(shi->shield_hit_timers[shield_offset]) ) {
349 if ( timestamp_elapsed(shi->shield_hit_next_flash[shield_offset]) ) {
350 shi->shield_hit_next_flash[shield_offset] = timestamp(SHIELD_FLASH_INTERVAL_FAST);
351 shi->shield_show_bright ^= (1<<shield_offset); // toggle between default and bright frames
354 if ( shi->shield_show_bright & (1<<shield_offset) ) {
355 // hud_set_bright_color();
356 hud_set_gauge_color(gauge, HUD_C_BRIGHT);
359 hud_set_gauge_color(gauge, HUD_C_NORMAL);
360 // hud_set_default_color();
367 // ------------------------------------------------------------------
370 // Show the players shield strength and integrity
372 void hud_shield_show(object *objp)
375 int hud_color_index, range;
381 if ( objp->type != OBJ_SHIP )
384 sp = &Ships[objp->instance];
385 sip = &Ship_info[sp->ship_info_index];
387 if ( sip->shield_icon_index == 255 ) {
391 if (objp == Player_obj) {
392 hud_set_gauge_color(HUD_PLAYER_SHIELD_ICON);
394 hud_set_gauge_color(HUD_TARGET_SHIELD_ICON);
397 // load in shield frames if not already loaded
398 // DDOI - shield_icon_index is unsigned
399 // Assert(sip->shield_icon_index >= 0 && sip->shield_icon_index < Hud_shield_filename_count);
400 Assert(sip->shield_icon_index < Hud_shield_filename_count);
402 sgp = &Shield_gauges[sip->shield_icon_index];
404 if ( sgp->first_frame == -1 ) {
405 sgp->first_frame = bm_load_animation(Hud_shield_filenames[sip->shield_icon_index], &sgp->num_frames);
406 if ( sgp->first_frame == -1 ) {
407 Warning(LOCATION, "Could not load in the HUD shield ani: %s\n", Hud_shield_filenames[sip->shield_icon_index]);
412 if ( objp == Player_obj ) {
413 sx = Player_shield_coords[gr_screen.res][0];
414 sy = Player_shield_coords[gr_screen.res][1];
416 sx = Target_shield_coords[gr_screen.res][0];
417 sy = Target_shield_coords[gr_screen.res][1];
420 sx += fl2i(HUD_offset_x);
421 sy += fl2i(HUD_offset_y);
423 // draw the ship first
424 if ( objp == Player_obj ) {
425 hud_shield_maybe_flash(HUD_PLAYER_SHIELD_ICON, SHIELD_HIT_PLAYER, HULL_HIT_OFFSET);
427 hud_shield_maybe_flash(HUD_TARGET_SHIELD_ICON, SHIELD_HIT_TARGET, HULL_HIT_OFFSET);
430 GR_AABITMAP(sgp->first_frame, sx, sy);
432 // draw the four quadrants
434 // Draw shield quadrants at one of NUM_SHIELD_LEVELS
435 max_shield = sip->shields/4.0f;
437 for ( i = 0; i < 4; i++ ) {
439 if ( objp->flags & OF_NO_SHIELDS ) {
443 if ( objp->shields[Quadrant_xlate[i]] < 0.1f ) {
447 range = max(HUD_COLOR_ALPHA_MAX, HUD_color_alpha + 4);
448 hud_color_index = fl2i( (objp->shields[Quadrant_xlate[i]] / max_shield) * range + 0.5);
449 Assert(hud_color_index >= 0 && hud_color_index <= range);
451 if ( hud_color_index < 0 ) {
454 if ( hud_color_index >= HUD_NUM_COLOR_LEVELS ) {
455 hud_color_index = HUD_NUM_COLOR_LEVELS - 1;
459 if ( objp == Player_obj ) {
460 flash = hud_shield_maybe_flash(HUD_PLAYER_SHIELD_ICON, SHIELD_HIT_PLAYER, i);
462 flash = hud_shield_maybe_flash(HUD_TARGET_SHIELD_ICON, SHIELD_HIT_TARGET, i);
466 // gr_set_color_fast(&HUD_color_defaults[hud_color_index]);
467 if ( objp == Player_obj ) {
468 hud_set_gauge_color(HUD_PLAYER_SHIELD_ICON, hud_color_index);
470 hud_set_gauge_color(HUD_TARGET_SHIELD_ICON, hud_color_index);
473 GR_AABITMAP(sgp->first_frame+i+1, sx, sy);
477 // hud_set_default_color();
480 // called at beginning of level to page in all ship icons
481 // used in this level
482 void hud_ship_icon_page_in(ship_info *sip)
486 if ( sip->shield_icon_index == 255 ) {
490 // load in shield frames if not already loaded
491 // DDOI - shield_icon_index is unsigned
492 // Assert(sip->shield_icon_index >= 0 && sip->shield_icon_index < Hud_shield_filename_count);
493 Assert(sip->shield_icon_index < Hud_shield_filename_count);
494 sgp = &Shield_gauges[sip->shield_icon_index];
496 if ( sgp->first_frame == -1 ) {
497 sgp->first_frame = bm_load_animation(Hud_shield_filenames[sip->shield_icon_index], &sgp->num_frames);
498 if ( sgp->first_frame == -1 ) {
499 Warning(LOCATION, "Could not load in the HUD shield ani: %s\n", Hud_shield_filenames[sip->shield_icon_index]);
505 for (i=0; i<sgp->num_frames; i++ ) {
506 bm_page_in_aabitmap(sgp->first_frame+i);
511 // ------------------------------------------------------------------
512 // hud_shield_equalize()
514 // Equalize the four shield quadrants for an object
516 void hud_shield_equalize(object *objp, player *pl)
522 Assert(objp != NULL);
530 Assert(objp->type == OBJ_SHIP);
531 if(objp->type != OBJ_SHIP){
535 // are all quadrants equal?
536 for(idx=0; idx<MAX_SHIELD_SECTIONS-1; idx++){
537 if(objp->shields[idx] != objp->shields[idx+1]){
545 strength = get_shield_strength(objp);
546 if ( strength != 0 ) {
547 // maybe impose a 2% penalty - server side and single player only
548 if(!MULTIPLAYER_CLIENT && (pl->shield_penalty_stamp < 0) || timestamp_elapsed_safe(pl->shield_penalty_stamp, 1000) ){
551 // reset the penalty timestamp
552 pl->shield_penalty_stamp = timestamp(1000);
555 set_shield_strength(objp, strength);
560 if ( objp == Player_obj ){
561 snd_play( &Snds[SND_SHIELD_XFER_OK] );
565 // ------------------------------------------------------------------
566 // hud_augment_shield_quadrant()
568 // Transfer shield energy to a shield quadrant from the three other
569 // quadrants. Works by trying to transfer a fixed amount of shield
570 // energy from the other three quadrants, taking the same percentage
571 // from each quadrant.
573 // input: objp => object to perform shield transfer on
574 // direction => which quadrant to augment:
580 void hud_augment_shield_quadrant(object *objp, int direction)
582 float full_shields, xfer_amount, energy_avail, percent_to_take, delta;
583 float max_quadrant_val;
586 Assert(direction >= 0 && direction < 4);
587 Assert(objp->type == OBJ_SHIP);
588 full_shields = Ship_info[Ships[objp->instance].ship_info_index].shields;
590 xfer_amount = full_shields * SHIELD_TRANSFER_PERCENT;
591 max_quadrant_val = full_shields/4.0f;
593 if ( (objp->shields[direction] + xfer_amount) > max_quadrant_val )
594 xfer_amount = max_quadrant_val - objp->shields[direction];
596 Assert(xfer_amount >= 0);
597 if ( xfer_amount == 0 ) {
598 // TODO: provide a feedback sound
602 snd_play( &Snds[SND_SHIELD_XFER_OK] );
606 for ( i = 0; i < MAX_SHIELD_SECTIONS; i++ ) {
607 if ( i == direction )
609 energy_avail += objp->shields[i];
612 percent_to_take = xfer_amount/energy_avail;
613 if ( percent_to_take > 1.0f )
614 percent_to_take = 1.0f;
616 for ( i = 0; i < MAX_SHIELD_SECTIONS; i++ ) {
617 if ( i == direction )
619 delta = percent_to_take * objp->shields[i];
620 objp->shields[i] -= delta;
621 Assert(objp->shields[i] >= 0 );
622 objp->shields[direction] += delta;
623 if ( objp->shields[direction] > max_quadrant_val )
624 objp->shields[direction] = max_quadrant_val;
628 // Try to find a match between filename and the names inside
629 // of Hud_shield_filenames. This will provide us with an
630 // association of ship class to shield icon information.
631 void hud_shield_assign_info(ship_info *sip, char *filename)
635 for ( i = 0; i < Hud_shield_filename_count; i++ ) {
636 if ( !stricmp(filename, Hud_shield_filenames[i]) ) {
637 sip->shield_icon_index = i;
642 void hud_show_mini_ship_integrity(object *objp, int x_force, int y_force)
644 char text_integrity[64];
645 int numeric_integrity;
646 float p_target_integrity,initial_hull;
649 initial_hull = Ship_info[Ships[objp->instance].ship_info_index].initial_hull_strength;
650 if ( initial_hull <= 0 ) {
651 Int3(); // illegal initial hull strength
652 p_target_integrity = 0.0f;
654 p_target_integrity = objp->hull_strength / initial_hull;
655 if (p_target_integrity < 0){
656 p_target_integrity = 0.0f;
660 numeric_integrity = fl2i(p_target_integrity*100 + 0.5f);
661 if(numeric_integrity > 100){
662 numeric_integrity = 100;
664 // Assert(numeric_integrity <= 100);
667 nx = (x_force == -1) ? Hud_mini_base[gr_screen.res][0] : x_force;
668 ny = (y_force == -1) ? Hud_mini_base[gr_screen.res][1] : y_force;
670 // 3 digit hull strength
671 if ( numeric_integrity == 100 ) {
672 nx += Hud_mini_3digit[gr_screen.res][2];
674 // 2 digit hull strength
675 else if ( numeric_integrity < 10 ) {
676 nx += Hud_mini_1digit[gr_screen.res][2];
678 // 1 digit hull strength
680 nx += Hud_mini_2digit[gr_screen.res][2];
683 if ( numeric_integrity == 0 ) {
684 if ( p_target_integrity > 0 ) {
685 numeric_integrity = 1;
689 nx += fl2i( HUD_offset_x );
690 ny += fl2i( HUD_offset_y );
692 sprintf(text_integrity, "%d", numeric_integrity);
693 if ( numeric_integrity < 100 ) {
694 hud_num_make_mono(text_integrity);
697 gr_string(nx, ny, text_integrity);
700 // Draw the miniature shield icon that is drawn near the reticle
701 void hud_shield_show_mini(object *objp, int x_force, int y_force, int x_hull_offset, int y_hull_offset)
704 int hud_color_index, range, frame_offset;
708 shield_hit_info *shi;
710 shi = &Shield_hit_data[SHIELD_HIT_TARGET];
712 if ( objp->type != OBJ_SHIP ) {
716 sp = &Ships[objp->instance];
717 sip = &Ship_info[sp->ship_info_index];
719 hud_set_gauge_color(HUD_TARGET_MINI_ICON);
721 if (!Shield_mini_loaded)
724 sx = (x_force == -1) ? Shield_mini_coords[gr_screen.res][0]+fl2i(HUD_offset_x) : x_force;
725 sy = (y_force == -1) ? Shield_mini_coords[gr_screen.res][1]+fl2i(HUD_offset_y) : y_force;
727 // draw the ship first
728 hud_shield_maybe_flash(HUD_TARGET_MINI_ICON, SHIELD_HIT_TARGET, HULL_HIT_OFFSET);
729 hud_show_mini_ship_integrity(objp,x_force + x_hull_offset,y_force + y_hull_offset);
731 // draw the four quadrants
732 // Draw shield quadrants at one of NUM_SHIELD_LEVELS
733 max_shield = sip->shields/4.0f;
735 for ( i = 0; i < 4; i++ ) {
737 if ( objp->flags & OF_NO_SHIELDS ) {
741 if ( objp->shields[Quadrant_xlate[i]] < 0.1f ) {
745 if ( hud_shield_maybe_flash(HUD_TARGET_MINI_ICON, SHIELD_HIT_TARGET, i) ) {
751 range = HUD_color_alpha;
752 hud_color_index = fl2i( (objp->shields[Quadrant_xlate[i]] / max_shield) * range + 0.5);
753 Assert(hud_color_index >= 0 && hud_color_index <= range);
755 if ( hud_color_index < 0 ) {
758 if ( hud_color_index >= HUD_NUM_COLOR_LEVELS ) {
759 hud_color_index = HUD_NUM_COLOR_LEVELS - 1;
762 if ( hud_gauge_maybe_flash(HUD_TARGET_MINI_ICON) == 1) {
763 // hud_set_bright_color();
764 hud_set_gauge_color(HUD_TARGET_MINI_ICON, HUD_C_BRIGHT);
766 // gr_set_color_fast(&HUD_color_defaults[hud_color_index]);
767 hud_set_gauge_color(HUD_TARGET_MINI_ICON, hud_color_index);
770 GR_AABITMAP(Shield_mini_gauge.first_frame + frame_offset, sx, sy);
773 // hud_set_default_color();
776 // reset the shield_hit_info data structure
777 void shield_info_reset(shield_hit_info *shi)
781 shi->shield_hit_status = 0;
782 shi->shield_show_bright = 0;
783 for ( i = 0; i < NUM_SHIELD_HIT_MEMBERS; i++ ) {
784 shi->shield_hit_timers[i] = 1;
785 shi->shield_hit_next_flash[i] = 1;
789 // reset the timers and hit flags for the shield gauges
791 // This needs to be called whenever the player selects a new target
793 // input: player => optional parameter (default value 0). This is to indicate that player shield hit
794 // info should be reset. This is normally not the case.
795 // is for the player's current target
796 void hud_shield_hit_reset(int player)
798 shield_hit_info *shi;
801 shi = &Shield_hit_data[SHIELD_HIT_PLAYER];
803 shi = &Shield_hit_data[SHIELD_HIT_TARGET];
806 shield_info_reset(shi);
809 // called once per frame to update the state of Shield_hit_status based on the Shield_hit_timers[]
810 void hud_shield_hit_update()
815 if ( Player_ai->target_objnum >= 0 ) {
819 for ( i = 0; i < limit; i++ ) {
820 for ( j = 0; j < NUM_SHIELD_HIT_MEMBERS; j++ ) {
821 if ( timestamp_elapsed(Shield_hit_data[i].shield_hit_timers[j]) ) {
822 Shield_hit_data[i].shield_hit_status &= ~(1<<j);
823 Shield_hit_data[i].shield_show_bright &= ~(1<<j);
829 // called when a shield quadrant is struct, so we can update the timer that will draw the quadrant
833 // objp => object pointer for ship that has been hit
834 // quadrant => quadrant of shield getting hit (-1 if no shield is present)
835 void hud_shield_quadrant_hit(object *objp, int quadrant)
837 shield_hit_info *shi;
840 if ( objp->type != OBJ_SHIP )
843 hud_escort_ship_hit(objp, quadrant);
844 hud_gauge_popup_start(HUD_TARGET_MINI_ICON);
846 if ( OBJ_INDEX(objp) == Player_ai->target_objnum ) {
847 shi = &Shield_hit_data[SHIELD_HIT_TARGET];
848 } else if ( objp == Player_obj ) {
849 shi = &Shield_hit_data[SHIELD_HIT_PLAYER];
854 if ( quadrant >= 0 ) {
855 num = Quadrant_xlate[quadrant];
856 shi->shield_hit_timers[num] = timestamp(300);
858 shi->shield_hit_timers[HULL_HIT_OFFSET] = timestamp(SHIELD_HIT_DURATION_SHORT);
859 hud_targetbox_start_flash(TBOX_FLASH_HULL);
864 void hudshield_page_in()
866 bm_page_in_aabitmap( Shield_mini_gauge.first_frame, Shield_mini_gauge.num_frames );