You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
510 B
30 lines
510 B
|
5 years ago
|
#pragma once
|
||
|
|
|
||
|
|
#include <SDL_ttf.h>
|
||
|
|
#include <SDL.h>
|
||
|
|
#ifdef USE_SDL1
|
||
|
|
#include "utils/sdl2_to_1_2_backports.h"
|
||
|
|
#else
|
||
|
|
#include "utils/sdl2_backports.h"
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#include "appfat.h"
|
||
|
|
#include "utils/sdl_ptrs.h"
|
||
|
|
|
||
|
|
namespace devilution {
|
||
|
|
|
||
|
|
namespace TTFWrap {
|
||
|
|
|
||
|
|
inline SDLSurfaceUniquePtr RenderText_Solid(TTF_Font *font, const char *text, SDL_Color fg)
|
||
|
|
{
|
||
|
|
SDLSurfaceUniquePtr ret { TTF_RenderText_Solid(font, text, fg) };
|
||
|
|
if (ret == nullptr)
|
||
|
|
ErrTtf();
|
||
|
|
|
||
|
|
return ret;
|
||
|
|
}
|
||
|
|
|
||
|
|
} //namespace TTFWrap
|
||
|
|
|
||
|
|
} //namespace devilution
|