]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - draw.h
physics: fix and refactor unsticking
[xonotic/darkplaces.git] / draw.h
diff --git a/draw.h b/draw.h
index e06f19aab7ed03b6a0d7c536fa89526405dfcc39..8496bb73a1cf1e1dd67a15e0972419c55cf7d7f3 100644 (file)
--- a/draw.h
+++ b/draw.h
@@ -1,5 +1,6 @@
 /*
 Copyright (C) 1996-1997 Id Software, Inc.
+Copyright (C) 2000-2021 DarkPlaces contributors
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
@@ -92,10 +93,12 @@ typedef struct ft2_settings_s
 
 #define MAX_FONT_SIZES 16
 #define MAX_FONT_FALLBACKS 3
+#define MAX_FONT_CMDLINE MAX_QPATH * (MAX_FONT_FALLBACKS + 1)
 typedef struct dp_font_s
 {
        cachepic_t *pic;
        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 width_of_ft2[MAX_FONT_SIZES][256];
        float maxwidth; // precalculated max width of the font (includes scale)
        char texpath[MAX_QPATH];
        char title[MAX_QPATH];
@@ -107,6 +110,8 @@ typedef struct dp_font_s
        struct ft2_font_s *ft2;
 
        ft2_settings_t settings;
+
+       char cmdline[MAX_FONT_CMDLINE];
 }
 dp_font_t;
 
@@ -174,7 +179,7 @@ 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, qbool fast);
+void DrawQ_Line(float width, float x1, float y1, float x2, float y2, float r, float g, float b, float alpha, int flags);
 
 const char *Draw_GetPicName(cachepic_t *pic);
 int Draw_GetPicWidth(cachepic_t *pic);