1 /* NetHack may be freely redistributed. See license for details. */ 2 3 #ifndef _vulture_txt_h_ 4 #define _vulture_txt_h_ 5 6 #include <string> 7 #include "SDL_ttf.h" 8 9 10 /* Font indices. Currently, there're only 2 fonts (large & small). */ 11 #define V_FONT_SMALL 0 12 #define V_FONT_LARGE 1 13 #define V_FONT_INTRO V_FONT_LARGE 14 #define V_FONT_MENU V_FONT_SMALL 15 #define V_FONT_HEADLINE V_FONT_LARGE 16 #define V_FONT_BUTTON V_FONT_LARGE 17 #define V_FONT_TOOLTIP V_FONT_SMALL 18 #define V_FONT_STATUS V_FONT_SMALL 19 #define V_FONT_MESSAGE V_FONT_SMALL 20 #define V_FONT_INPUT V_FONT_SMALL 21 22 /* 23 * colors used to draw text 24 */ 25 #define V_COLOR_TEXT 0xffffffff 26 #define V_COLOR_INTRO_TEXT 0xffffffff 27 28 /*--------------------------------------------------------------------------- 29 Text displaying 30 ---------------------------------------------------------------------------*/ 31 32 /* load a font from a ttf file */ 33 extern int vulture_load_font (int font_id, const char *ttf_filename, 34 int fontindex, int pointsize); 35 36 extern int vulture_put_text (int font_id, std::string str, SDL_Surface *dest, 37 int x, int y, Uint32 color); 38 39 extern int vulture_put_text_shadow (int font_id, std::string str, SDL_Surface *dest, 40 int x, int y, Uint32 textcolor, Uint32 shadowcolor); 41 extern void vulture_put_text_multiline(int font_id, std::string str, SDL_Surface *dest, 42 int x, int y, Uint32 color, Uint32 shadowcolor, int maxlen); 43 44 extern int vulture_text_length (int font_id, std::string str); 45 46 extern int vulture_text_height (int font_id, std::string str); 47 48 extern int vulture_get_lineheight(int font_id); 49 50 extern void vulture_free_fonts(); 51 52 #endif 53