]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - draw.h
implemented uint16 element array support, and use of it for all the
[xonotic/darkplaces.git] / draw.h
diff --git a/draw.h b/draw.h
index a94d79ca9260fda11ee8c3f9fe462a46d8ae793a..17c366bc8d975f8d7ed34e591c52c0f68ee9af33 100644 (file)
--- a/draw.h
+++ b/draw.h
@@ -38,8 +38,17 @@ typedef struct cachepic_s
 }
 cachepic_t;
 
+typedef enum cachepicflags_e
+{
+       CACHEPICFLAG_NOTPERSISTENT = 1,
+       CACHEPICFLAG_QUIET = 2,
+       CACHEPICFLAG_NOCOMPRESSION = 4,
+}
+cachepicflags_t;
+
 void Draw_Init (void);
-cachepic_t *Draw_CachePic (const char *path, qboolean persistent);
+cachepic_t *Draw_CachePic_Flags (const char *path, unsigned int cachepicflags);
+cachepic_t *Draw_CachePic (const char *path); // standard function with no options, used throughout engine
 // create or update a pic's image
 cachepic_t *Draw_NewPic(const char *picname, int width, int height, int alpha, unsigned char *pixels);
 // free the texture memory used by a pic
@@ -54,7 +63,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;
@@ -110,8 +119,9 @@ void DrawQ_Fill(float x, float y, float width, float height, float red, float gr
 // if r_textshadow is not zero, an additional instance of the text is drawn first at an offset with an inverted shade of gray (black text produces a white shadow, brightly colored text produces a black shadow)
 float DrawQ_String(float x, float y, const char *text, size_t maxlen, float scalex, float scaley, float basered, float basegreen, float baseblue, float basealpha, int flags, int *outcolor, qboolean ignorecolorcodes);
 float DrawQ_String_Font(float x, float y, const char *text, size_t maxlen, float scalex, float scaley, float basered, float basegreen, float baseblue, float basealpha, int flags, int *outcolor, qboolean ignorecolorcodes, const dp_font_t *fnt);
-float DrawQ_TextWidth_Font(const char *text, size_t maxlen, float scalex, float scaley, qboolean ignorecolorcodes, const dp_font_t *fnt);
-float DrawQ_TextWidth_Font_UntilWidth(const char *text, size_t *maxlen, float scalex, float scaley, qboolean ignorecolorcodes, const dp_font_t *fnt, float maxWidth);
+float DrawQ_TextWidth_Font(const char *text, size_t maxlen, qboolean ignorecolorcodes, const dp_font_t *fnt);
+float DrawQ_TextWidth_Font_UntilWidth(const char *text, size_t *maxlen, qboolean ignorecolorcodes, const dp_font_t *fnt, float maxWidth);
+float DrawQ_TextWidth_Font_UntilWidth_TrackColors(const char *text, size_t *maxlen, int *outcolor, qboolean ignorecolorcodes, const dp_font_t *fnt, float maxwidth);
 // draw a very fancy pic (per corner texcoord/color control), the order is tl, tr, bl, br
 void DrawQ_SuperPic(float x, float y, cachepic_t *pic, 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);
 // draw a triangle mesh