Fixes for datatype size on amd64.
[crack-attack.git] / src / String.h
blob8f9f29650d407eb93d4d059f1fa721d8746013f5
1 /*
2 * String.h
3 * Daniel Nelson - 8/24/0
5 * Copyright (C) 2000 Daniel Nelson
6 *
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
22 * 174 W. 18th Ave.
23 * Columbus, OH 43210
26 #ifndef STRING_H
27 #define STRING_H
30 #include "Displayer.h"
32 /* static */ class String {
33 public:
34 static int mapCharToCode ( char c );
35 static int stringWidth ( const char *string, int max_width );
36 static void readyLetterTextures ( );
37 static void freeLetterTextures ( );
38 static void fillStringTexture ( const char *string, GLubyte *texture,
39 int width, bool use_alpha = false, int texture_width = 0 );
41 private:
42 static const char *letter_texture_files[DC_FONT_NUMBER][DC_LETTER_NUMBER];
43 static const char letter_mapping[DC_LETTER_NUMBER];
44 static const int letter_widths[DC_FONT_NUMBER][DC_LETTER_NUMBER];
45 static const float colors[DC_FONT_COLOR_NUMBER][3];
46 static GLubyte *letter_textures[DC_FONT_NUMBER][DC_LETTER_NUMBER];
49 #endif