- Fixed gui bug where unchecking extremely low undid low
[crack-attack.git] / src / String.h
blob1f9d7c6531201603bbb50deef77e4b6f9eb2f064
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
29 using namespace std;
31 #include "Displayer.h"
33 /* static */ class String {
34 public:
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 );
42 private:
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];
50 #endif