File: hudbrackets.h

package info (click to toggle)
freespace2 3.7.4%2Brepack-1.1
  • links: PTS, VCS
  • area: non-free
  • in suites: bullseye
  • size: 22,268 kB
  • sloc: cpp: 393,535; ansic: 4,106; makefile: 1,091; xml: 181; sh: 137
file content (53 lines) | stat: -rw-r--r-- 1,907 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
 * Copyright (C) Volition, Inc. 1999.  All rights reserved.
 *
 * All source code herein is the property of Volition, Inc. You may not sell 
 * or otherwise commercially exploit the source or things you created based on the 
 * source.
 *
*/ 



#ifndef HUD_BRACKETS
#define HUD_BRACKETS

#include "hud/hud.h"

void hud_init_brackets();
// two unused functions, candidates for removal?
#if 0
void draw_bounding_brackets(int x1, int y1, int x2, int y2, int w_correction, int h_correction, float distance=0.0f, int target_objnum=-1);
void draw_bounding_brackets_subobject();
#endif
void draw_brackets_square(int x1, int y1, int x2, int y2, int resize_mode = GR_RESIZE_FULL);
void draw_brackets_diamond(int x1, int y1, int x2, int y2);
void draw_brackets_square_quick(int x1, int y1, int x2, int y2, int thick=0);
void draw_brackets_diamond_quick(int x1, int y1, int x2, int y2);
void draw_brackets_dashed_square_quick(int x1, int y1, int x2, int y2);

int draw_subsys_brackets(ship_subsys* subsys, int min_width, int min_height, bool draw = true, bool set_color = true, int* draw_coords = NULL);

class HudGaugeBrackets: public HudGauge
{
protected:
	int attacking_dot;

	int Min_target_box_width;
	int Min_target_box_height;
	int Min_subtarget_box_width;
	int Min_subtarget_box_height;
public:
	HudGaugeBrackets();
	void initMinTargetBoxSizes(int w, int h);
	void initMinSubTargetBoxSizes(int w, int h);
	void initBitmaps(char *fname);
	void render(float frametime);
	void renderObjectBrackets(object *targetp, color *clr, int w_correction, int h_correction, int flags);
	void renderNavBrackets(vec3d* nav_pos, vertex* nav_point, color* clr, char* string);
	void renderBoundingBrackets(int x1, int y1, int x2, int y2, int w_correction, int h_correction, float distance, int target_objnum, int flags);
	void renderBoundingBracketsSubobject();
	void renderDistance(int x, int y, float distance);
};

#endif