quick fix for bug introduced by the last commit
[supertux.git] / src / text.h
1 //
2 // C Interface: text
3 //
4 // Description: 
5 //
6 //
7 // Author: Tobias Glaesser <tobi.web@gmx.de>, (C) 2004
8 //
9 // Copyright: See COPYING file that comes with this distribution
10 //
11 //
12
13 #ifndef SUPERTUX_TEXT_H
14 #define SUPERTUX_TEXT_H
15
16 #include "texture.h"
17
18 /* Text type */
19 struct text_type
20 {
21   texture_type chars;
22   texture_type shadow_chars;
23   int kind;
24   int w;
25   int h;
26 };
27
28 /* Kinds of texts. */
29 enum {
30    TEXT_TEXT,
31    TEXT_NUM
32 };
33
34 enum TextHAlign {
35    A_LEFT,
36    A_HMIDDLE,
37    A_RIGHT,
38 };
39
40 enum TextVAlign {
41    A_TOP,
42    A_VMIDDLE,
43    A_BOTTOM,
44 };
45
46 void text_load(text_type* ptext, const std::string& file, int kind, int w, int h);
47 void text_draw(text_type* ptext, const char* text, int x, int y, int shadowsize, int update = NO_UPDATE);
48 void text_draw_chars(text_type* ptext, texture_type* pchars, const char* text, int x, int y, int update = NO_UPDATE);
49 void text_drawf(text_type* ptext, const char* text, int x, int y, TextHAlign halign, TextVAlign valign, int shadowsize, int update = NO_UPDATE);
50 void text_draw_align(text_type* ptext, const char* text, int x, int y, TextHAlign halign, TextVAlign valign, int shadowsize, int update = NO_UPDATE);
51 void text_free(text_type* ptext);
52 void erasetext(text_type* ptext, const char * text, int x, int y, texture_type * surf, int update, int shadowsize);
53 void erasecenteredtext(text_type* ptext, const char * text, int y, texture_type * surf, int update, int shadowsize);
54
55 #endif /*SUPERTUX_TEXT_H*/
56