]> icculus.org git repositories - taylor/freespace2.git/blob - include/hudshield.h
Initial revision
[taylor/freespace2.git] / include / hudshield.h
1 /*
2  * $Logfile: /Freespace2/code/Hud/HUDshield.h $
3  * $Revision$
4  * $Date$
5  * $Author$
6  *
7  * Header file for the display and management of the HUD shield
8  *
9  * $Log$
10  * Revision 1.1  2002/05/03 03:28:12  root
11  * Initial revision
12  *
13  * 
14  * 4     8/27/99 10:36a Dave
15  * Impose a 2% penalty for hitting the shield balance key.
16  * 
17  * 3     7/22/99 4:00p Dave
18  * Fixed beam weapon muzzle glow rendering. Externalized hud shield info.
19  * 
20  * 2     10/07/98 10:53a Dave
21  * Initial checkin.
22  * 
23  * 1     10/07/98 10:49a Dave
24  * 
25  * 7     4/25/98 2:00p Dave
26  * Installed a bunch of multiplayer context help screens. Reworked ingame
27  * join ship select screen. Fix places where network timestamps get hosed.
28  * 
29  * 6     2/12/98 4:58p Lawrance
30  * Change to new flashing method.
31  * 
32  * 5     11/18/97 5:58p Lawrance
33  * flash escort view info when that ship is taking hits
34  * 
35  * 4     11/08/97 11:08p Lawrance
36  * implement new "mini-shield" view that sits near bottom of reticle
37  * 
38  * 3     11/04/97 7:49p Lawrance
39  * integrating new HUD reticle and shield icons
40  * 
41  * 2     8/25/97 12:24a Lawrance
42  * implemented HUD shield management
43  * 
44  * 1     8/24/97 10:31p Lawrance
45  *
46  * $NoKeywords: $
47  */
48
49 #ifndef __FREESPACE_HUDSHIELD_H__
50 #define __FREESPACE_HUDSHIELD_H__
51
52 #define SHIELD_HIT_DURATION     1400    // time a shield quadrant flashes after being hit
53 #define SHIELD_FLASH_INTERVAL   200     // time between shield quadrant flashes
54
55 #define NUM_SHIELD_HIT_MEMBERS  5
56 #define HULL_HIT_OFFSET                         4               // used to access the members in shield_hit_info that pertain to the hull
57 typedef struct shield_hit_info
58 {
59         int shield_hit_status;          // bitfield, if offset for shield quadrant is set, that means shield is being hit
60         int shield_show_bright;         // bitfield, if offset for shield quadrant is set, that means play bright frame
61         int shield_hit_timers[NUM_SHIELD_HIT_MEMBERS];  // timestamps that get set for SHIELD_FLASH_TIME when a quadrant is hit
62         int shield_hit_next_flash[NUM_SHIELD_HIT_MEMBERS];
63 } shield_hit_info;
64
65 extern ubyte Quadrant_xlate[4];
66
67 struct player;
68
69 void hud_shield_game_init();
70 void hud_shield_level_init();
71 void hud_shield_show(object *objp);
72 void hud_shield_equalize(object *objp, player *pl);
73 void hud_augment_shield_quadrant(object *objp, int direction);
74 void hud_shield_assign_info(ship_info *sip, char *filename);
75 void hud_show_mini_ship_integrity(object *objp, int force_x = -1, int force_y = -1);
76 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);
77 void hud_shield_hit_update();
78 void hud_shield_quadrant_hit(object *objp, int quadrant);
79 void hud_shield_hit_reset(int player=0);
80
81 void shield_info_reset(shield_hit_info *shi);
82
83 #endif /* __FREESPACE_HUDSHIELDBOX_H__ */
84