]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_screen.h
added description string to all cvars and commands
[xonotic/darkplaces.git] / cl_screen.h
index d914bfaa821e969c6b7bff2073c6e5fa7267c0fd..b1663a15e98dfe19d328493c06e9fef0596adc20 100644 (file)
@@ -7,11 +7,13 @@
 #define DRAWQUEUE_MESH 1
 #define DRAWQUEUE_SETCLIP 2
 #define DRAWQUEUE_RESETCLIP 3
+#define DRAWQUEUE_LINEWIDTH 4
+#define DRAWQUEUE_LINES 5
 
 typedef struct drawqueue_s
 {
        unsigned short size;
-       qbyte command, flags;
+       unsigned char command, flags;
        unsigned int color;
        float x, y, scalex, scaley;
 }
@@ -41,12 +43,19 @@ DRAWFLAG_2XMODULATE,
 DRAWFLAG_NUMFLAGS
 };
 
+// shared color tag printing constants
+#define STRING_COLOR_TAG                       '^'
+#define STRING_COLOR_DEFAULT           7
+#define STRING_COLOR_DEFAULT_STR       "^7"
+
 // clear the draw queue
 void DrawQ_Clear(void);
 // draw an image
 void DrawQ_Pic(float x, float y, const char *picname, float width, float height, float red, float green, float blue, float alpha, int flags);
 // draw a text string
 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);
+// draw a text string that supports color tags (colorindex can either be NULL, -1 to make it choose the default color or valid index to start with)
+void DrawQ_ColoredString( float x, float y, const char *text, int maxlen, float scalex, float scaley, float basered, float basegreen, float baseblue, float basealpha, int flags, int *outcolor );
 // draw a filled rectangle
 void DrawQ_Fill(float x, float y, float w, float h, float red, float green, float blue, float alpha, int flags);
 // draw a very fancy pic (per corner texcoord/color control), the order is tl, tr, bl, br
@@ -57,6 +66,10 @@ void DrawQ_Mesh(drawqueuemesh_t *mesh, int flags);
 void DrawQ_SetClipArea(float x, float y, float width, float height);
 // reset the clipping area
 void DrawQ_ResetClipArea(void);
+// draw a line
+void DrawQ_Line(float width, float x1, float y1, float x2, float y2, float r, float g, float b, float alpha, int flags);
+// draw a line loop
+void DrawQ_LineLoop(drawqueuemesh_t *mesh, int flags);
 
 void SHOWLMP_decodehide(void);
 void SHOWLMP_decodeshow(void);
@@ -65,7 +78,7 @@ void SHOWLMP_clear(void);
 
 extern cvar_t vid_conwidth;
 extern cvar_t vid_conheight;
-extern cvar_t vid_pixelaspect;
+extern cvar_t vid_pixelheight;
 extern cvar_t scr_screenshot_jpeg;
 extern cvar_t scr_screenshot_jpeg_quality;
 extern cvar_t scr_screenshot_gamma;