]> icculus.org git repositories - divverent/darkplaces.git/blob - cl_screen.h
changed linux/soundcard.h to sys/soundcard.h for more portability - doesn't work...
[divverent/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 MAX_DRAWQUEUE 262144
7
8 #define DRAWQUEUE_PIC 0
9 #define DRAWQUEUE_STRING 1
10 #define DRAWQUEUE_MESH 2
11
12 typedef struct drawqueue_s
13 {
14         unsigned short size;
15         qbyte command, flags;
16         unsigned int color;
17         float x, y, scalex, scaley;
18 }
19 drawqueue_t;
20
21 // a triangle mesh... embedded in the drawqueue
22 typedef struct drawqueuemesh_s
23 {
24         rtexture_t *texture;
25         int numindices;
26         int numvertices;
27         int *indices;
28         float *vertices;
29         float *texcoords;
30         qbyte *colors;
31 }
32 drawqueuemesh_t;
33
34 #define DRAWFLAG_ADDITIVE 1
35
36 // clear the draw queue
37 void DrawQ_Clear(void);
38 // draw an image
39 void DrawQ_Pic(float x, float y, char *picname, float width, float height, float red, float green, float blue, float alpha, int flags);
40 // draw a text string
41 void DrawQ_String(float x, float y, char *string, int maxlen, float scalex, float scaley, float red, float green, float blue, float alpha, int flags);
42 // draw a filled rectangle
43 void DrawQ_Fill (float x, float y, float w, float h, float red, float green, float blue, float alpha, int flags);
44 // draw a triangle mesh
45 void DrawQ_Mesh (drawqueuemesh_t *mesh, int flags);
46
47 void SHOWLMP_decodehide(void);
48 void SHOWLMP_decodeshow(void);
49 void SHOWLMP_drawall(void);
50 void SHOWLMP_clear(void);
51
52 extern cvar_t scr_2dresolution;
53
54 void CL_Screen_NewMap(void);
55 void CL_Screen_Init(void);
56 void CL_UpdateScreen(void);
57
58 #endif
59