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.h $
15 * Header file for the display and management of the HUD shield
18 * Revision 1.2 2002/06/09 04:41:13 relnev
19 * added copyright header
21 * Revision 1.1.1.1 2002/05/03 03:28:12 root
25 * 4 8/27/99 10:36a Dave
26 * Impose a 2% penalty for hitting the shield balance key.
28 * 3 7/22/99 4:00p Dave
29 * Fixed beam weapon muzzle glow rendering. Externalized hud shield info.
31 * 2 10/07/98 10:53a Dave
34 * 1 10/07/98 10:49a Dave
36 * 7 4/25/98 2:00p Dave
37 * Installed a bunch of multiplayer context help screens. Reworked ingame
38 * join ship select screen. Fix places where network timestamps get hosed.
40 * 6 2/12/98 4:58p Lawrance
41 * Change to new flashing method.
43 * 5 11/18/97 5:58p Lawrance
44 * flash escort view info when that ship is taking hits
46 * 4 11/08/97 11:08p Lawrance
47 * implement new "mini-shield" view that sits near bottom of reticle
49 * 3 11/04/97 7:49p Lawrance
50 * integrating new HUD reticle and shield icons
52 * 2 8/25/97 12:24a Lawrance
53 * implemented HUD shield management
55 * 1 8/24/97 10:31p Lawrance
60 #ifndef __FREESPACE_HUDSHIELD_H__
61 #define __FREESPACE_HUDSHIELD_H__
63 #define SHIELD_HIT_DURATION 1400 // time a shield quadrant flashes after being hit
64 #define SHIELD_FLASH_INTERVAL 200 // time between shield quadrant flashes
66 #define NUM_SHIELD_HIT_MEMBERS 5
67 #define HULL_HIT_OFFSET 4 // used to access the members in shield_hit_info that pertain to the hull
68 typedef struct shield_hit_info
70 int shield_hit_status; // bitfield, if offset for shield quadrant is set, that means shield is being hit
71 int shield_show_bright; // bitfield, if offset for shield quadrant is set, that means play bright frame
72 int shield_hit_timers[NUM_SHIELD_HIT_MEMBERS]; // timestamps that get set for SHIELD_FLASH_TIME when a quadrant is hit
73 int shield_hit_next_flash[NUM_SHIELD_HIT_MEMBERS];
76 extern ubyte Quadrant_xlate[4];
80 void hud_shield_game_init();
81 void hud_shield_level_init();
82 void hud_shield_show(object *objp);
83 void hud_shield_equalize(object *objp, player *pl);
84 void hud_augment_shield_quadrant(object *objp, int direction);
85 void hud_shield_assign_info(ship_info *sip, char *filename);
86 void hud_show_mini_ship_integrity(object *objp, int force_x = -1, int force_y = -1);
87 void hud_shield_show_mini(object *objp, int x_force = -1, int y_force = -1, int x_hull_offset = 0, int y_hull_offset = 0);
88 void hud_shield_hit_update();
89 void hud_shield_quadrant_hit(object *objp, int quadrant);
90 void hud_shield_hit_reset(int player=0);
92 void shield_info_reset(shield_hit_info *shi);
94 #endif /* __FREESPACE_HUDSHIELDBOX_H__ */