2010-07-10 08:20:50 +00:00
|
|
|
/* ZZ Open GL graphics plugin
|
|
|
|
* Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com
|
|
|
|
* Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008
|
2010-07-08 16:51:56 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
2010-03-19 00:31:15 +00:00
|
|
|
#ifndef RasterFont_Header
|
|
|
|
#define RasterFont_Header
|
|
|
|
|
2010-05-01 22:54:23 +00:00
|
|
|
class RasterFont
|
|
|
|
{
|
2010-04-25 00:31:27 +00:00
|
|
|
|
2010-05-01 22:54:23 +00:00
|
|
|
protected:
|
|
|
|
int fontOffset;
|
2010-04-25 00:31:27 +00:00
|
|
|
|
2010-05-01 22:54:23 +00:00
|
|
|
public:
|
|
|
|
RasterFont();
|
|
|
|
~RasterFont(void);
|
|
|
|
static int debug;
|
2010-04-25 00:31:27 +00:00
|
|
|
|
2010-05-01 22:54:23 +00:00
|
|
|
// some useful constants
|
|
|
|
enum {char_width = 10};
|
|
|
|
enum {char_height = 15};
|
|
|
|
|
|
|
|
// and the happy helper functions
|
|
|
|
void printString(const char *s, double x, double y, double z = 0.0);
|
|
|
|
void printCenteredString(const char *s, double y, int screen_width, double z = 0.0);
|
2010-03-19 00:31:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|