X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=draw.h;h=f0af80c681ea45f94268de39a2ca798bfddbd72d;hb=bbfa10a406fd3f7ae77aa2d3ec8bfba1da795f88;hp=992fc3d70500c69efefe107faec1f19d8847bbd0;hpb=8d376b57de94bafd3bae224088b469649c853028;p=xonotic%2Fdarkplaces.git diff --git a/draw.h b/draw.h index 992fc3d7..f0af80c6 100644 --- a/draw.h +++ b/draw.h @@ -43,6 +43,7 @@ typedef enum cachepicflags_e CACHEPICFLAG_NOTPERSISTENT = 1, CACHEPICFLAG_QUIET = 2, CACHEPICFLAG_NOCOMPRESSION = 4, + CACHEPICFLAG_NOCLAMP = 8, } cachepicflags_t; @@ -63,7 +64,7 @@ typedef struct drawqueuemesh_s rtexture_t *texture; int num_triangles; int num_vertices; - int *data_element3i; + unsigned short *data_element3s; float *data_vertex3f; float *data_texcoord2f; float *data_color4f; @@ -75,13 +76,18 @@ DRAWFLAG_NORMAL, DRAWFLAG_ADDITIVE, DRAWFLAG_MODULATE, DRAWFLAG_2XMODULATE, -DRAWFLAG_NUMFLAGS +DRAWFLAG_SCREEN, +DRAWFLAG_NUMFLAGS, +DRAWFLAG_MASK = 0xFF, // ONLY R_BeginPolygon() +DRAWFLAG_MIPMAP = 0x100 // ONLY R_BeginPolygon() }; typedef struct dp_font_s { rtexture_t *tex; - float width_of[256]; // width_of[0] == max width of any char; 1.0f is base width (1/16 of texture width); therefore, all widths have to be <= 1 + float width_of[256]; // width_of[0] == max width of any char; 1.0f is base width (1/16 of texture width); therefore, all widths have to be <= 1 (does not include scale) + float maxwidth; // precalculated max width of the font (includes scale) + float scale; // scales the font (without changing line height!) char texpath[MAX_QPATH]; char title[MAX_QPATH]; } @@ -104,11 +110,15 @@ extern dp_font_t dp_fonts[MAX_FONTS]; #define STRING_COLOR_TAG '^' #define STRING_COLOR_DEFAULT 7 #define STRING_COLOR_DEFAULT_STR "^7" +#define STRING_COLOR_RGB_TAG_CHAR 'x' +#define STRING_COLOR_RGB_TAG "^x" // all of these functions will set r_defdef.draw2dstage if not in 2D rendering mode (and of course prepare for 2D rendering in that case) // draw an image (or a filled rectangle if pic == NULL) void DrawQ_Pic(float x, float y, cachepic_t *pic, float width, float height, float red, float green, float blue, float alpha, int flags); +// draw a rotated image +void DrawQ_RotPic(float x, float y, cachepic_t *pic, float width, float height, float org_x, float org_y, float angle, float red, float green, float blue, float alpha, int flags); // draw a filled rectangle (slightly faster than DrawQ_Pic with pic = NULL) void DrawQ_Fill(float x, float y, float width, float height, float red, float green, float blue, float alpha, int flags); // draw a text string,