1 /***************************************************************************
2  *   Free Heroes of Might and Magic II: https://github.com/ihhub/fheroes2  *
3  *   Copyright (C) 2021                                                    *
4  *                                                                         *
5  *   This program is free software; you can redistribute it and/or modify  *
6  *   it under the terms of the GNU General Public License as published by  *
7  *   the Free Software Foundation; either version 2 of the License, or     *
8  *   (at your option) any later version.                                   *
9  *                                                                         *
10  *   This program is distributed in the hope that it will be useful,       *
11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13  *   GNU General Public License for more details.                          *
14  *                                                                         *
15  *   You should have received a copy of the GNU General Public License     *
16  *   along with this program; if not, write to the                         *
17  *   Free Software Foundation, Inc.,                                       *
18  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
19  ***************************************************************************/
20 
21 #pragma once
22 
23 #include <cstdint>
24 
25 namespace fheroes2
26 {
27     class Image;
28     class Sprite;
29     enum class FontSize : uint8_t;
30     struct FontType;
31     enum class SupportedLanguage : int;
32 
33     namespace AGG
34     {
35         const Sprite & GetICN( int icnId, uint32_t index );
36         uint32_t GetICNCount( int icnId );
37 
38         // shapeId could be 0, 1, 2 or 3 only
39         const Image & GetTIL( int tilId, uint32_t index, uint32_t shapeId );
40         const Sprite & GetLetter( uint32_t character, uint32_t fontType );
41 
42         // Returns the last supported ASCII character in existing font.
43         uint32_t ASCIILastSupportedCharacter( const uint32_t fontType );
44 
45         int32_t GetAbsoluteICNHeight( int icnId );
46 
47         uint32_t getCharacterLimit( const FontSize fontSize );
48         const Sprite & getChar( const uint8_t character, const FontType & fontType );
49 
50         // This function must be called only at the type of setting up a new language.
51         void updateAlphabet( const SupportedLanguage language, const bool loadOriginalAlphabet );
52 
53         bool isAlphabetSupported( const SupportedLanguage language );
54     }
55 }
56