diff --git a/src/ags.h b/src/ags.h index 707f37f..5709a53 100644 --- a/src/ags.h +++ b/src/ags.h @@ -61,7 +61,7 @@ typedef enum { TO_24B } ALPHA_DIB_COPY_TYPE; -struct __surface { +struct agsurface { int no; /* surface number, primary DIB is 0 */ int width; /* width of surface */ @@ -78,7 +78,7 @@ struct __surface { boolean has_pixel; }; -typedef struct __surface agsurface_t; +typedef struct agsurface agsurface_t; #define GETOFFSET_PIXEL(suf, x, y) ((suf)->pixel + (y) * (suf)->bytes_per_line + (x) * (suf)->bytes_per_pixel) #define GETOFFSET_ALPHA(suf, x, y) ((suf)->alpha + (y) * (suf)->width + (x)) diff --git a/src/font.h b/src/font.h index d91c364..4eb2e7c 100644 --- a/src/font.h +++ b/src/font.h @@ -34,6 +34,8 @@ #define FONT_GOTHIC (0) #define FONT_MINCHO (1) +struct agsurface; + struct _FONT { boolean antialiase_on; @@ -44,7 +46,7 @@ struct _FONT { void (*sel_font)(int type, int size); - void *(*get_glyph)(unsigned char *str); + struct agsurface *(*get_glyph)(unsigned char *str); int (*draw_glyph)(int x, int y, unsigned char *str, int col); diff --git a/src/font_freetype2.c b/src/font_freetype2.c index 8c385de..9bb489e 100644 --- a/src/font_freetype2.c +++ b/src/font_freetype2.c @@ -231,7 +231,7 @@ static void clear_canvas(void) { memset(img_glyph.pixel, 0, GLYPH_PIXMAP_WIDTH * GLYPH_PIXMAP_HEIGHT); } -static void *font_ttf_get_glyph(unsigned char *_msg) { +static agsurface_t *font_ttf_get_glyph(unsigned char *_msg) { FT_GlyphSlot slot; FT_UShort code; FT_Error err; diff --git a/src/font_sdlttf.c b/src/font_sdlttf.c index 18b92fa..0d3f6fd 100644 --- a/src/font_sdlttf.c +++ b/src/font_sdlttf.c @@ -69,7 +69,7 @@ static void font_sdlttf_sel_font(int type, int size) { } } -static void *font_sdlttf_get_glyph(unsigned char *msg) { +static agsurface_t *font_sdlttf_get_glyph(unsigned char *msg) { static SDL_Surface *fs; static agsurface_t result; diff --git a/src/font_x11.c b/src/font_x11.c index 86f312d..d47113f 100644 --- a/src/font_x11.c +++ b/src/font_x11.c @@ -151,7 +151,7 @@ static agsurface_t *get_drawn_glyph(const char *str, int w) { return dst; } -static void *font_x11_get_glyph(unsigned char *str) { +static agsurface_t *font_x11_get_glyph(unsigned char *str) { agsurface_t *dst; int w; BYTE *conv;