1 #pragma once
2 
3 //********************************************************************************************
4 //*
5 //*    This file is part of Egoboo.
6 //*
7 //*    Egoboo is free software: you can redistribute it and/or modify it
8 //*    under the terms of the GNU General Public License as published by
9 //*    the Free Software Foundation, either version 3 of the License, or
10 //*    (at your option) any later version.
11 //*
12 //*    Egoboo is distributed in the hope that it will be useful, but
13 //*    WITHOUT ANY WARRANTY; without even the implied warranty of
14 //*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 //*    General Public License for more details.
16 //*
17 //*    You should have received a copy of the GNU General Public License
18 //*    along with Egoboo.  If not, see <http://www.gnu.org/licenses/>.
19 //*
20 //********************************************************************************************
21 
22 /// @file font_bmp.h
23 /// @details bitmapped font stuff
24 
25 #include "egoboo_typedef.h"
26 
27 //--------------------------------------------------------------------------------------------
28 //--------------------------------------------------------------------------------------------
29 #define NUMFONTX            16          ///< Number of fonts in the bitmap
30 #define NUMFONTY            6
31 #define NUMFONT             (NUMFONTX*NUMFONTY)
32 #define FONTADD             4               ///< Gap between letters
33 
34 #define TABADD              (1<<5)
35 #define TABAND              (~(TABADD-1))                      ///< Tab size
36 
37 //--------------------------------------------------------------------------------------------
38 //--------------------------------------------------------------------------------------------
39 extern int      fontoffset;                 ///< Line up fonts from top of screen
40 extern SDL_Rect fontrect[NUMFONT];          ///< The font rectangles
41 extern Uint8    fontxspacing[NUMFONT];      ///< The spacing stuff
42 extern Uint8    fontyspacing;
43 
44 extern Uint8    asciitofont[256];           ///< Conversion table
45 
46 //--------------------------------------------------------------------------------------------
47 //--------------------------------------------------------------------------------------------
48 void font_bmp_init();
49 void font_bmp_load_vfs( const char* szBitmap, const char* szSpacing );
50 int  font_bmp_length_of_word( const char *szText );
51