3 * Daniel Nelson - 8/24/0
5 * Copyright (C) 2000 Daniel Nelson
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 * Daniel Nelson - aluminumangel.org
31 #include "Displayer.h"
33 /* static */ class String
{
35 static int mapCharToCode ( char c
);
36 static int stringWidth ( const char *string
, int max_width
);
37 static void readyLetterTextures ( );
38 static void freeLetterTextures ( );
39 static void fillStringTexture ( const char *string
, GLubyte
*texture
,
40 int width
, bool use_alpha
= false, int texture_width
= 0 );
43 static const char *letter_texture_files
[DC_FONT_NUMBER
][DC_LETTER_NUMBER
];
44 static const char letter_mapping
[DC_LETTER_NUMBER
];
45 static const int letter_widths
[DC_FONT_NUMBER
][DC_LETTER_NUMBER
];
46 static const float colors
[DC_FONT_COLOR_NUMBER
][3];
47 static GLubyte
*letter_textures
[DC_FONT_NUMBER
][DC_LETTER_NUMBER
];