From 0df2b60b86e639e1f241579a7e0a051d2d84a6a3 Mon Sep 17 00:00:00 2001 From: jpaana <> Date: Thu, 20 Nov 2003 00:43:28 +0000 Subject: [PATCH] Move font struct definitions to header --- draw.h | 20 +++++++++++++++++++- gl_draw.c | 17 ----------------- xmlmenu.h | 2 +- 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/draw.h b/draw.h index 54bf253..0b29305 100644 --- a/draw.h +++ b/draw.h @@ -21,7 +21,25 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // draw.h -- these are the only functions outside the refresh allowed // to touch the vid buffer -typedef struct drawfont_s drawfont_t ; +#include "gl_model.h" // for shader_t + +typedef struct { + int ofsx; //x offset into the texture + int ofsy; //y offset into the texture + int A; //Width of whitespace to the left of the char + int B; //Width of the char's pixels + int C; //Width of the whiretspace to the right of the char +} drawchar_t; + +typedef struct drawfont_s { + char name[64]; + drawchar_t metrics[256]; + shader_t *shader; + int width; //width of the font texture + int height; //height of the font texture + int charHeight; //height of a single character +} drawfont_t; + void Draw_Init (void); void Draw_Character (int x, int y, int num); diff --git a/gl_draw.c b/gl_draw.c index 189c0e3..dc717bf 100644 --- a/gl_draw.c +++ b/gl_draw.c @@ -242,23 +242,6 @@ void Draw_String (int x, int y, char *str) } } -typedef struct { - int ofsx; //x offset into the texture - int ofsy; //y offset into the texture - int A; //Width of whitespace to the left of the char - int B; //Width of the char's pixels - int C; //Width of the whiretspace to the right of the char -} drawchar_t; - -typedef struct drawfont_s { - char name[64]; - drawchar_t metrics[256]; - shader_t *shader; - int width; //width of the font texture - int height; //height of the font texture - int charHeight; //height of a single character -} drawfont_t; - #define MAX_FONT_CACHE 128 static drawfont_t fontCache[MAX_FONT_CACHE]; static int numFonts = 0; diff --git a/xmlmenu.h b/xmlmenu.h index ef6c7cf..5b56a7f 100644 --- a/xmlmenu.h +++ b/xmlmenu.h @@ -89,7 +89,7 @@ typedef struct qmelement_s typedef qwidget_t qmelement_t; -typedef struct drawfont_s drawfont_t; + struct qwidget_s { qmtable_t *mtable;