ScummVM API documentation
noctropolis_font.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it 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  * 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.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef ACCESS_NOCTROPOLIS_NOCTROPOLIS_FONT_H
23 #define ACCESS_NOCTROPOLIS_NOCTROPOLIS_FONT_H
24 
25 #include "access/font.h"
26 
27 namespace Access {
28 
29 namespace Noctropolis {
30 
31 const extern uint16 CHALETEU_OFFSETS[];
32 const extern byte CHALETEU_DATA[];
33 const extern uint16 SYSTEMEU_OFFSETS[];
34 const extern byte SYSTEMEU_DATA[];
35 const extern uint16 SML3X5_OFFSETS[];
36 const extern byte SML3X5_DATA[];
37 const extern uint16 NAPLES12_OFFSETS[];
38 const extern byte NAPLES12_DATA[];
39 const extern uint16 GOTHICEU_OFFSETS[];
40 const extern byte GOTHICEU_DATA[];
41 const extern uint16 CHALETSE_OFFSETS[];
42 const extern byte CHALETSE_DATA[];
43 const extern uint16 COMICSEU_OFFSETS[];
44 const extern byte COMICSEU_DATA[];
45 
46 class NoctropolisFont : public Font {
47 public:
48  NoctropolisFont(uint16 bytes, int16 height, byte firstchar, byte lastchar, const uint16 *offsets, const byte *data);
49 
50 private:
51  void load(const uint16 *offsets, const byte *data);
52  const byte *getCharDataPtr(byte ch, const uint16 *offsets, const byte *data) const;
53  uint getCharBitOffset(byte ch, const uint16 *offsets) const;
54  uint getCharWidth(byte ch, const uint16 *offsets) const;
55  void makeCharSurface(Graphics::Surface &surface, byte ch, const uint16 *offsets, const byte *data) const;
56 
57  byte _lastChar;
58  uint16 _bytes;
59 };
60 
61 } // end namespace Noctropolis
62 
63 } // end namespace Access
64 
65 #endif // ACCESS_NOCTROPOLIS_NOCTROPOLIS_FONT_H
Definition: surface.h:67
Definition: noctropolis_font.h:46
Definition: font.h:40
Definition: access.h:62