source: abuse/trunk/src/imlib/fonts.h @ 494

Last change on this file since 494 was 494, checked in by Sam Hocevar, 12 years ago

style: remove trailing spaces, fix copyright statements.

  • Property svn:keywords set to Id
File size: 1.2 KB
Line 
1/*
2 *  Abuse - dark 2D side-scrolling platform game
3 *  Copyright (c) 1995 Crack dot Com
4 *  Copyright (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
5 *
6 *  This software was released into the Public Domain. As with most public
7 *  domain software, no warranty is made or implied by Crack dot Com or
8 *  Jonathan Clark.
9 */
10
11#ifndef __FONTS_HPP_
12#define __FONTS_HPP_
13#include "image.h"
14#include "timage.h"
15
16
17
18class texture_font
19{
20  int tl,th;
21  image *let,*fntpat;
22public:
23  texture_font(image *letters, image *font_pattern=NULL);
24  void put_char(image *screen,  int x, int y, char ch);
25  void put_string(image *screen, int x, int y, char const *st);
26  int height() { return th; }
27  int length() { return tl; }
28  int width() { return tl; }
29  image *font_image() { return let; }
30  image *font_patter() { return fntpat; }
31  ~texture_font() { if (let) delete let; if (fntpat) delete fntpat; }
32} ;
33
34class JCFont
35{
36  int tl,th;
37  trans_image *let[256];
38public:
39  JCFont(image *letters);
40  void put_char(image *screen,  int x, int y, char ch, int color=-1);
41  void put_string(image *screen, int x, int y, char const *st, int color=-1);
42  int height() { return th; }
43  int length() { return tl; }
44  int width() { return tl; }
45  ~JCFont();
46} ;
47
48#endif
49
50
Note: See TracBrowser for help on using the repository browser.