mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-10-07 22:28:01 +03:00
Change return type of font->get_glyph
This commit is contained in:
@@ -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))
|
||||
|
||||
+3
-1
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user