]> de.git.xonotic.org Git - xonotic/darkplaces.git/blob - cl_screen.h
Elric added deflated file support for pk3 archives (in other words: compressed pk3...
[xonotic/darkplaces.git] / cl_screen.h
1
2 #ifndef CL_SCREEN_H
3 #define CL_SCREEN_H
4
5 // drawqueue stuff for use by client to feed 2D art to renderer
6 #define DRAWQUEUE_PIC 0
7 #define DRAWQUEUE_STRING 1
8 #define DRAWQUEUE_MESH 2
9
10 typedef struct drawqueue_s
11 {
12         unsigned short size;
13         qbyte command, flags;
14         unsigned int color;
15         float x, y, scalex, scaley;
16 }
17 drawqueue_t;
18
19 // a triangle mesh... embedded in the drawqueue
20 // each vertex is 4 floats (3 are used)
21 // each texcoord is 4 floats (3 are used)
22 // each color is 4 floats (4 are used)
23 typedef struct drawqueuemesh_s
24 {
25         rtexture_t *texture;
26         int numtriangles;
27         int numvertices;
28         int *element3i;
29         float *vertex3f;
30         float *texcoord2f;
31         float *color4f;
32 }
33 drawqueuemesh_t;
34
35 #define DRAWFLAG_ADDITIVE 1
36
37 // clear the draw queue
38 void DrawQ_Clear(void);
39 // draw an image
40 void DrawQ_Pic(float x, float y, char *picname, float width, float height, float red, float green, float blue, float alpha, int flags);
41 // draw a text string
42 void DrawQ_String(float x, float y, const char *string, int maxlen, float scalex, float scaley, float red, float green, float blue, float alpha, int flags);
43 // draw a filled rectangle
44 void DrawQ_Fill(float x, float y, float w, float h, float red, float green, float blue, float alpha, int flags);
45 // draw a very fancy pic (per corner texcoord/color control), the order is tl, tr, bl, br
46 void DrawQ_SuperPic(float x, float y, char *picname, float width, float height, float s1, float t1, float r1, float g1, float b1, float a1, float s2, float t2, float r2, float g2, float b2, float a2, float s3, float t3, float r3, float g3, float b3, float a3, float s4, float t4, float r4, float g4, float b4, float a4, int flags);
47 // draw a triangle mesh
48 void DrawQ_Mesh(drawqueuemesh_t *mesh, int flags);
49
50 void SHOWLMP_decodehide(void);
51 void SHOWLMP_decodeshow(void);
52 void SHOWLMP_drawall(void);
53 void SHOWLMP_clear(void);
54
55 extern cvar_t scr_2dresolution;
56
57 void CL_Screen_NewMap(void);
58 void CL_Screen_Init(void);
59 void CL_UpdateScreen(void);
60
61 #endif
62