1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149
|
#include "SDL.h"
#include "SDL_ttf.h"
// Lots of SDL_ttf's render functions accept an SDL_Color directly. We send in
// a pointer instead, which we dereference here. Is there a way to avoid this?
// Note the "_p" added to the function names.
extern DECLSPEC SDL_Surface * SDLCALL
TTF_RenderUNICODE_Solid_p(
TTF_Font *font,
uint16_t *text,
SDL_Color *fg) {
return TTF_RenderUNICODE_Solid(font, text, *fg);
}
extern DECLSPEC SDL_Surface * SDLCALL
TTF_RenderUNICODE_Shaded_p(
TTF_Font *font,
uint16_t *text,
SDL_Color *fg,
SDL_Color *bg) {
return TTF_RenderUNICODE_Shaded(font, text, *fg, *bg);
}
extern DECLSPEC SDL_Surface * SDLCALL
TTF_RenderUNICODE_Blended_p(
TTF_Font *font,
uint16_t *text,
SDL_Color *fg) {
return TTF_RenderUNICODE_Blended(font, text, *fg);
}
extern DECLSPEC SDL_Surface * SDLCALL
TTF_RenderUTF8_Solid_p(
TTF_Font *font,
const char *text,
SDL_Color *fg) {
return TTF_RenderUTF8_Solid(font, text, *fg);
}
extern DECLSPEC SDL_Surface * SDLCALL
TTF_RenderUTF8_Shaded_p(
TTF_Font *font,
const char *text,
SDL_Color *fg,
SDL_Color *bg) {
return TTF_RenderUTF8_Shaded(font, text, *fg, *bg);
}
extern DECLSPEC SDL_Surface * SDLCALL
TTF_RenderUTF8_Blended_p(
TTF_Font *font,
const char *text,
SDL_Color *fg) {
return TTF_RenderUTF8_Blended(font, text, *fg);
}
extern DECLSPEC SDL_Surface * SDLCALL
TTF_RenderText_Solid_p(
TTF_Font *font,
const char *text,
SDL_Color *fg) {
return TTF_RenderText_Solid(font, text, *fg);
}
extern DECLSPEC SDL_Surface * SDLCALL
TTF_RenderText_Shaded_p(
TTF_Font *font,
const char *text,
SDL_Color *fg,
SDL_Color *bg) {
return TTF_RenderText_Shaded(font, text, *fg, *bg);
}
extern DECLSPEC SDL_Surface * SDLCALL
TTF_RenderText_Blended_p(
TTF_Font *font,
const char *text,
SDL_Color *fg) {
return TTF_RenderText_Blended(font, text, *fg);
}
extern DECLSPEC SDL_Surface * SDLCALL
TTF_RenderGlyph_Solid_p(
TTF_Font *font,
uint16_t glyph,
SDL_Color *fg) {
return TTF_RenderGlyph_Solid(font, glyph, *fg);
}
extern DECLSPEC SDL_Surface * SDLCALL
TTF_RenderGlyph_Shaded_p(
TTF_Font *font,
uint16_t glyph,
SDL_Color *fg,
SDL_Color *bg) {
return TTF_RenderGlyph_Shaded(font, glyph, *fg, *bg);
}
extern DECLSPEC SDL_Surface * SDLCALL
TTF_RenderGlyph_Blended_p(
TTF_Font *font,
uint16_t glyph,
SDL_Color *fg) {
return TTF_RenderGlyph_Blended(font, glyph, *fg);
}
extern DECLSPEC SDL_Surface * SDLCALL
TTF_RenderUTF8_Blended_Wrapped_p(
TTF_Font *font,
const char *text,
SDL_Color *fg,
uint32_t wrapLength) {
return TTF_RenderUTF8_Blended_Wrapped(font, text, *fg, wrapLength);
}
extern DECLSPEC SDL_Surface * SDLCALL
TTF_RenderUNICODE_Blended_Wrapped_p(
TTF_Font *font,
uint16_t *text,
SDL_Color *fg,
uint32_t wrapLength) {
return TTF_RenderUNICODE_Blended_Wrapped(font, text, *fg, wrapLength);
}
extern DECLSPEC SDL_Surface * SDLCALL
TTF_RenderText_Blended_Wrapped_p(
TTF_Font *font,
const char *text,
SDL_Color *fg,
uint32_t wrapLength) {
return TTF_RenderText_Blended_Wrapped(font, text, *fg, wrapLength);
}
|