]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/client/waypointsprites.qh
Fix typedefs
[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 entityclass(WaypointSprite);
30 class(WaypointSprite) .float helpme;
31 class(WaypointSprite) .float rule;
32 class(WaypointSprite) .string netname; // primary picture
33 class(WaypointSprite) .string netname2; // secondary picture
34 class(WaypointSprite) .string netname3; // tertiary picture
35 class(WaypointSprite) .int team; // team that gets netname2
36 class(WaypointSprite) .float lifetime;
37 class(WaypointSprite) .float fadetime;
38 class(WaypointSprite) .float maxdistance;
39 class(WaypointSprite) .int hideflags;
40 class(WaypointSprite) .float spawntime;
41 class(WaypointSprite) .float health;
42 class(WaypointSprite) .float build_started;
43 class(WaypointSprite) .float build_starthealth;
44 class(WaypointSprite) .float build_finished;
45
46 const float SPRITE_HEALTHBAR_WIDTH = 144;
47 const float SPRITE_HEALTHBAR_HEIGHT = 9;
48 const float SPRITE_HEALTHBAR_MARGIN = 6;
49 const float SPRITE_HEALTHBAR_BORDER = 2;
50 const float SPRITE_HEALTHBAR_BORDERALPHA = 1;
51 const float SPRITE_HEALTHBAR_HEALTHALPHA = 0.5;
52 const float SPRITE_ARROW_SCALE = 1.0;
53 const float SPRITE_HELPME_BLINK = 2;
54
55 float waypointsprite_count, waypointsprite_newcount;
56
57 void drawrotpic(vector org, float rot, string pic, vector sz, vector hotspot, vector rgb, float a, float f);
58
59 void drawquad(vector o, vector ri, vector up, string pic, vector rgb, float a, float f);
60
61 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);
62
63 // returns location of sprite text
64 vector drawspritearrow(vector o, float ang, vector rgb, float a, float t);
65
66 // returns location of sprite healthbar
67 vector drawspritetext(vector o, float ang, float minwidth, vector rgb, float a, vector fontsize, string s);
68
69 float spritelookupblinkvalue(string s);
70 vector spritelookupcolor(string s, vector def);
71 string spritelookuptext(string s);
72
73 vector fixrgbexcess_move(vector rgb, vector src, vector dst);
74 vector fixrgbexcess(vector rgb);
75
76 void Draw_WaypointSprite();
77
78 // they are drawn using a .draw function
79
80 void Ent_RemoveWaypointSprite();
81 void Ent_WaypointSprite();
82
83 void WaypointSprite_Load_Frames(string ext);
84
85 void WaypointSprite_Load();
86
87 #endif