]> icculus.org git repositories - divverent/darkplaces.git/blob - cl_screen.h
*** empty log message ***
[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 DRAWQUEUE_STRING 0
7 #define DRAWQUEUE_MESH 1
8 #define DRAWQUEUE_SETCLIP 2
9 #define DRAWQUEUE_RESETCLIP 3
10
11 typedef struct drawqueue_s
12 {
13         unsigned short size;
14         qbyte command, flags;
15         unsigned int color;
16         float x, y, scalex, scaley;
17 }
18 drawqueue_t;
19
20 // a triangle mesh... embedded in the drawqueue
21 // each vertex is 4 floats (3 are used)
22 // each texcoord is 4 floats (3 are used)
23 // each color is 4 floats (4 are used)
24 typedef struct drawqueuemesh_s
25 {
26         rtexture_t *texture;
27         int num_triangles;
28         int num_vertices;
29         int *data_element3i;
30         float *data_vertex3f;
31         float *data_texcoord2f;
32         float *data_color4f;
33 }
34 drawqueuemesh_t;
35
36 enum drawqueue_drawflag_e { 
37 DRAWFLAG_NORMAL,
38 DRAWFLAG_ADDITIVE,
39 DRAWFLAG_MODULATE,
40 DRAWFLAG_2XMODULATE,
41 DRAWFLAG_NUMFLAGS
42 };
43
44 // clear the draw queue
45 void DrawQ_Clear(void);
46 // draw an image
47 void DrawQ_Pic(float x, float y, char *picname, float width, float height, float red, float green, float blue, float alpha, int flags);
48 // draw a text string
49 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);
50 // draw a filled rectangle
51 void DrawQ_Fill(float x, float y, float w, float h, float red, float green, float blue, float alpha, int flags);
52 // draw a very fancy pic (per corner texcoord/color control), the order is tl, tr, bl, br
53 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);
54 // draw a triangle mesh
55 void DrawQ_Mesh(drawqueuemesh_t *mesh, int flags);
56 // set the clipping area
57 void DrawQ_SetClipArea(float x, float y, float width, float height);
58 // reset the clipping area
59 void DrawQ_ResetClipArea(void);
60
61 void SHOWLMP_decodehide(void);
62 void SHOWLMP_decodeshow(void);
63 void SHOWLMP_drawall(void);
64 void SHOWLMP_clear(void);
65
66 extern cvar_t vid_conwidth;
67 extern cvar_t vid_conheight;
68 extern cvar_t vid_pixelaspect;
69 extern cvar_t scr_screenshot_jpeg;
70 extern cvar_t scr_screenshot_jpeg_quality;
71 extern cvar_t scr_screenshot_name;
72
73 void CL_Screen_NewMap(void);
74 void CL_Screen_Init(void);
75 void CL_UpdateScreen(void);
76
77 #endif
78