Put bundled font into its own translation unit

This commit is contained in:
Jonas Kulla 2014-08-16 23:20:33 +02:00
parent cbdd19e525
commit 4daff93e29
4 changed files with 10 additions and 3 deletions

View File

@ -184,6 +184,7 @@ set(MAIN_SOURCE
src/alstream.cpp
src/audiostream.cpp
src/rgssad.cpp
src/bundledfont.cpp
)
source_group("MKXP Source" FILES ${MAIN_SOURCE} ${MAIN_HEADERS})

View File

@ -176,7 +176,8 @@ SOURCES += \
src/sdlsoundsource.cpp \
src/alstream.cpp \
src/audiostream.cpp \
src/rgssad.cpp
src/rgssad.cpp \
src/bundledfont.cpp
EMBED = \
shader/transSimple.frag \

1
src/bundledfont.cpp Normal file
View File

@ -0,0 +1 @@
#include "../liberation.ttf.xxd"

View File

@ -31,12 +31,16 @@
#include <string>
#include <utility>
#include "../liberation.ttf.xxd"
#include <SDL_ttf.h>
#define BUNDLED_FONT liberation
#define BUNDLED_FONT_DECL(FONT) \
extern unsigned char assets_##FONT##_ttf[]; \
extern unsigned int assets_##FONT##_ttf_len;
BUNDLED_FONT_DECL(liberation)
#define BUNDLED_FONT_D(f) assets_## f ##_ttf
#define BUNDLED_FONT_L(f) assets_## f ##_ttf_len