File: font.h

package info (click to toggle)
bomberclone 0.11.9-7.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,228 kB
  • sloc: ansic: 14,256; sh: 3,800; makefile: 337
file content (43 lines) | stat: -rw-r--r-- 819 bytes parent folder | download | duplicates (8)
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
#ifndef _FONT_H_

#define _FONT_H_

#include "basic.h"

enum _color {
	COLOR_white = 0,
	COLOR_red,
	COLOR_green,
	COLOR_blue,
	COLOR_yellow,
	COLOR_brown,
	COLOR_gray,
	COLOR_black,
	
	COLOR_max
};


struct __font {
	SDL_Surface *image[COLOR_max];
	_point size;
} typedef _font;


struct _key_codes { 
		int code; 
		char *text;
};

extern _point font_lastsize;
extern _font font[3];
extern char *color_map[COLOR_max];

extern void font_draw (int x, int y, char *text, int size, int color);
extern void font_drawbold (int x, int y, char *text, int size, int color, int bold);
extern void font_load ();
extern void font_free ();
extern void font_gfxdraw (int x, int y, char *text, int size, int color, int ypos);
extern void font_gfxdrawbold (int x, int y, char *text, int size, int color, int bold, int ypos);

#endif