Put bundled font into its own translation unit
This commit is contained in:
		
							parent
							
								
									cbdd19e525
								
							
						
					
					
						commit
						4daff93e29
					
				
					 4 changed files with 10 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -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})
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										3
									
								
								mkxp.pro
									
										
									
									
									
								
							
							
						
						
									
										3
									
								
								mkxp.pro
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -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
									
								
							
							
						
						
									
										1
									
								
								src/bundledfont.cpp
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
#include "../liberation.ttf.xxd"
 | 
			
		||||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue