huge CVS merge, see ChangeLog for details.
[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 typedef struct text_type
20   {
21    texture_type* chars;
22    texture_type* shadow_chars;
23    int kind;
24    int w;
25    int h;
26   }  
27 text_type;
28
29 /* Kinds of texts. */
30 enum {
31    TEXT_TEXT,
32    TEXT_NUM
33 };
34
35 enum {
36    A_LEFT,
37    A_HMIDDLE,
38    A_RIGHT,
39    A_TOP,
40    A_VMIDDLE,
41    A_BOTTOM,
42    A_NONE
43 };
44
45 void text_load(text_type* ptext, char* file, int kind, int w, int h);
46 void text_draw(text_type* ptext, char* text, int x, int y, int shadowsize, int update);
47 void text_draw_chars(text_type* ptext, texture_type* pchars, char* text, int x, int y, int update);
48 void text_drawf(text_type* ptext, char* text, int x, int y, int halign, int valign, int shadowsize, int update);
49 void text_free(text_type* ptext);
50
51 #endif /*SUPERTUX_TEXT_H*/
52