File: font.h

package info (click to toggle)
ale-clone 1.15pre16.3-1
  • links: PTS
  • area: contrib
  • in suites: potato
  • size: 2,432 kB
  • ctags: 3,217
  • sloc: ansic: 37,483; sh: 1,105; makefile: 343
file content (62 lines) | stat: -rw-r--r-- 1,488 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
**	A clone of a famous game.
*/
/**@name font.h		-	The font headerfile. */
/*
**	(c) Copyright 1998,1999 by Lutz Sammer
**
**	$Id: font.h,v 1.4 1999/07/08 21:09:19 root Exp $
*/

#ifndef __FONT_H__
#define __FONT_H__

//@{

/*----------------------------------------------------------------------------
--	Definitions
----------------------------------------------------------------------------*/

/// FIXME: Docu
typedef struct _color_font_ {
    char*	File;			/// file containing font data

    int		Width;
    int		Height;

    char	CharWidth[208];

// --- FILLED UP ---

    Sprite	Sprite;
} ColorFont;

/// FIXME: Docu
enum _game_font_ {
    SMALL_FONT,
    GAME_FONT,
    LARGE_FONT,
};

/*----------------------------------------------------------------------------
--	Variables
----------------------------------------------------------------------------*/

    /// FIXME: docu
extern ColorFont Fonts[];
extern int DefaultReverseText;		/// default reverse state

/*----------------------------------------------------------------------------
--	Functions
----------------------------------------------------------------------------*/

    /// FIXME: docu
extern void DrawText(int x,int y,int font,const unsigned char* text);
extern int TextLength(int font,const unsigned char* text);
extern void DrawTextCentered(int x,int y,int font,const unsigned char* text);
extern void DrawNumber(int x,int y,int font,int number);
extern void LoadFonts(void);

//@}

#endif	// !__FONT_H__