]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/client/waypointsprites.qh
Merge branch 'master' into Mario/ons_updates
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / waypointsprites.qh
1 #ifndef WAYPOINTSPRITES_H
2 #define WAYPOINTSPRITES_H
3
4
5 float waypointsprite_initialized;
6 float waypointsprite_fadedistance;
7 float waypointsprite_normdistance;
8 float waypointsprite_minscale;
9 float waypointsprite_minalpha;
10 float waypointsprite_distancealphaexponent;
11 float waypointsprite_timealphaexponent;
12 float waypointsprite_scale;
13 float waypointsprite_fontsize;
14 float waypointsprite_edgefadealpha;
15 float waypointsprite_edgefadescale;
16 float waypointsprite_edgefadedistance;
17 float waypointsprite_edgeoffset_bottom;
18 float waypointsprite_edgeoffset_left;
19 float waypointsprite_edgeoffset_right;
20 float waypointsprite_edgeoffset_top;
21 float waypointsprite_crosshairfadealpha;
22 float waypointsprite_crosshairfadescale;
23 float waypointsprite_crosshairfadedistance;
24 float waypointsprite_distancefadealpha;
25 float waypointsprite_distancefadescale;
26 float waypointsprite_distancefadedistance;
27 float waypointsprite_alpha;
28
29 .float helpme;
30 .float rule;
31 .string netname; // primary picture
32 .string netname2; // secondary picture
33 .string netname3; // tertiary picture
34 .float team; // team that gets netname2
35 .float lifetime;
36 .float fadetime;
37 .float maxdistance;
38 .int hideflags;
39 .float spawntime;
40 .float health;
41 .float build_started;
42 .float build_starthealth;
43 .float build_finished;
44
45 const float SPRITE_HEALTHBAR_WIDTH = 144;
46 const float SPRITE_HEALTHBAR_HEIGHT = 9;
47 const float SPRITE_HEALTHBAR_MARGIN = 6;
48 const float SPRITE_HEALTHBAR_BORDER = 2;
49 const float SPRITE_HEALTHBAR_BORDERALPHA = 1;
50 const float SPRITE_HEALTHBAR_HEALTHALPHA = 0.5;
51 const float SPRITE_ARROW_SCALE = 1.0;
52 const float SPRITE_HELPME_BLINK = 2;
53
54 float waypointsprite_count, waypointsprite_newcount;
55
56 void drawrotpic(vector org, float rot, string pic, vector sz, vector hotspot, vector rgb, float a, float f);
57
58 void drawquad(vector o, vector ri, vector up, string pic, vector rgb, float a, float f);
59
60 void drawhealthbar(vector org, float rot, float h, vector sz, vector hotspot, float width, float height, float margin, float border, float align, vector rgb, float a, vector hrgb, float ha, float f);
61
62 // returns location of sprite text
63 vector drawspritearrow(vector o, float ang, vector rgb, float a, float t);
64
65 // returns location of sprite healthbar
66 vector drawspritetext(vector o, float ang, float minwidth, vector rgb, float a, vector fontsize, string s);
67
68 float spritelookupblinkvalue(string s);
69 vector spritelookupcolor(string s, vector def);
70 string spritelookuptext(string s);
71
72 vector fixrgbexcess_move(vector rgb, vector src, vector dst);
73 vector fixrgbexcess(vector rgb);
74
75 void Draw_WaypointSprite();
76
77 // they are drawn using a .draw function
78
79 void Ent_RemoveWaypointSprite();
80
81 void Ent_WaypointSprite();
82
83 void WaypointSprite_Load_Frames(string ext);
84
85 void WaypointSprite_Load();
86
87 #endif