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

Last change on this file since 682 was 682, checked in by Sam Hocevar, 8 years ago

core: rename vec2i to ivec2 and update matrix.h from Lol Engine.

  • Property svn:keywords set to Id
File size: 754 bytes
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, by
8 *  Jonathan Clark, or by Sam Hocevar.
9 */
10
11#ifndef __FONTS_HPP_
12#define __FONTS_HPP_
13
14#include "image.h"
15#include "transimage.h"
16
17class JCFont
18{
19public:
20    JCFont(image *letters);
21    ~JCFont();
22
23    void PutChar(image *screen, ivec2 pos, char ch, int color = -1);
24    void PutString(image *screen, ivec2 pos, char const *st, int color = -1);
25    ivec2 Size() const { return m_size; }
26
27private:
28    ivec2 m_size;
29    TransImage *m_data[256];
30};
31
32#endif
33
Note: See TracBrowser for help on using the repository browser.