1 /*
2  * Copyright (C) Volition, Inc. 1999.  All rights reserved.
3  *
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 the
6  * source.
7  *
8 */
9 
10 
11 
12 #ifndef HUD_BRACKETS
13 #define HUD_BRACKETS
14 
15 #include "hud/hud.h"
16 #include "graphics/line_draw_list.h"
17 
18 void hud_init_brackets();
19 void draw_brackets_square(graphics::line_draw_list* draw_list, int x1, int y1, int x2, int y2, int resize_mode = GR_RESIZE_FULL);
20 void draw_brackets_square_quick(graphics::line_draw_list* draw_list, int x1, int y1, int x2, int y2, int thick=0);
21 void draw_brackets_diamond_quick(graphics::line_draw_list* draw_list, int x1, int y1, int x2, int y2);
22 
23 int draw_subsys_brackets(graphics::line_draw_list* draw_list, ship_subsys* subsys, int min_width, int min_height, bool draw = true, bool set_color = true, int* draw_coords = NULL);
24 
25 class HudGaugeBrackets: public HudGauge
26 {
27 protected:
28 	int attacking_dot;
29 
30 	int Min_target_box_width;
31 	int Min_target_box_height;
32 	int Min_subtarget_box_width;
33 	int Min_subtarget_box_height;
34 
35 	graphics::line_draw_list line_draw_list;
36 public:
37 	HudGaugeBrackets();
38 	void initMinTargetBoxSizes(int w, int h);
39 	void initMinSubTargetBoxSizes(int w, int h);
40 	void initBitmaps(char *fname);
41 	void render(float frametime) override;
42 	void renderObjectBrackets(object *targetp, color *clr, int w_correction, int h_correction, int flags);
43 	void renderNavBrackets(vec3d* nav_pos, vertex* nav_point, color* clr, char* string);
44 	void renderBoundingBrackets(int x1, int y1, int x2, int y2, int w_correction, int h_correction, float distance, int target_objnum, int flags);
45 	void renderBoundingBracketsSubobject();
46 };
47 
48 #endif
49