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
27namespace Access {
28
29namespace Noctropolis {
30
31const extern uint16 CHALETEU_OFFSETS[];
32const extern byte CHALETEU_DATA[];
33const extern uint16 SYSTEMEU_OFFSETS[];
34const extern byte SYSTEMEU_DATA[];
35const extern uint16 SML3X5_OFFSETS[];
36const extern byte SML3X5_DATA[];
37const extern uint16 NAPLES12_OFFSETS[];
38const extern byte NAPLES12_DATA[];
39const extern uint16 GOTHICEU_OFFSETS[];
40const extern byte GOTHICEU_DATA[];
41const extern uint16 CHALETSE_OFFSETS[];
42const extern byte CHALETSE_DATA[];
43const extern uint16 COMICSEU_OFFSETS[];
44const extern byte COMICSEU_DATA[];
45
46class NoctropolisFont : public Font {
47public:
48 NoctropolisFont(uint16 bytes, int16 height, byte firstchar, byte lastchar, const uint16 *offsets, const byte *data);
49
50private:
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: font.h:40
Definition: noctropolis_font.h:46
Definition: access.h:62
Definition: surface.h:67