Last change
on this file since 481 was
481,
checked in by Sam Hocevar, 12 years ago
|
Fuck the history, I'm renaming all .hpp files to .h for my own sanity.
|
-
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 | * |
---|
5 | * This software was released into the Public Domain. As with most public |
---|
6 | * domain software, no warranty is made or implied by Crack dot Com or |
---|
7 | * Jonathan Clark. |
---|
8 | */ |
---|
9 | |
---|
10 | #ifndef __FONTS_HPP_ |
---|
11 | #define __FONTS_HPP_ |
---|
12 | #include "image.h" |
---|
13 | #include "timage.h" |
---|
14 | |
---|
15 | |
---|
16 | |
---|
17 | class texture_font |
---|
18 | { |
---|
19 | int tl,th; |
---|
20 | image *let,*fntpat; |
---|
21 | public: |
---|
22 | texture_font(image *letters, image *font_pattern=NULL); |
---|
23 | void put_char(image *screen, int x, int y, char ch); |
---|
24 | void put_string(image *screen, int x, int y, char const *st); |
---|
25 | int height() { return th; } |
---|
26 | int length() { return tl; } |
---|
27 | int width() { return tl; } |
---|
28 | image *font_image() { return let; } |
---|
29 | image *font_patter() { return fntpat; } |
---|
30 | ~texture_font() { if (let) delete let; if (fntpat) delete fntpat; } |
---|
31 | } ; |
---|
32 | |
---|
33 | class JCFont |
---|
34 | { |
---|
35 | int tl,th; |
---|
36 | trans_image *let[256]; |
---|
37 | public: |
---|
38 | JCFont(image *letters); |
---|
39 | void put_char(image *screen, int x, int y, char ch, int color=-1); |
---|
40 | void put_string(image *screen, int x, int y, char const *st, int color=-1); |
---|
41 | int height() { return th; } |
---|
42 | int length() { return tl; } |
---|
43 | int width() { return tl; } |
---|
44 | ~JCFont(); |
---|
45 | } ; |
---|
46 | |
---|
47 | #endif |
---|
48 | |
---|
49 | |
---|
Note: See
TracBrowser
for help on using the repository browser.