ScummVM API documentation
font_rebel2.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 SCUMM_SMUSH_REBEL_FONT_REBEL2_H
23 #define SCUMM_SMUSH_REBEL_FONT_REBEL2_H
24 
25 #include "common/scummsys.h"
26 #include "common/rect.h"
27 
28 #include "scumm/charset_v7.h"
29 
30 namespace Scumm {
31 
32 class ScummEngine;
33 class NutRenderer;
34 
35 struct Rebel2FontSet {
36  enum {
37  kMaxFonts = 5
38  };
39 
40  NutRenderer *fonts[kMaxFonts];
41  int numFonts;
42  int defaultFont;
43 
44  Rebel2FontSet();
45  NutRenderer *getFont(int id) const;
46 };
47 
48 NutRenderer *makeRebel2Font(ScummEngine *vm, const char *filename);
49 NutRenderer *makeRebel2SpriteFromData(ScummEngine *vm, const byte *data, int32 dataSize);
50 int drawRebel2Char(NutRenderer *font, byte *buffer, Common::Rect &clipRect, int x, int y,
51  int pitch, int16 col, byte chr);
52 int getRebel2StringWidth(const Rebel2FontSet &fontSet, const char *str, uint len);
53 int getRebel2StringHeight(const Rebel2FontSet &fontSet, const char *str, uint len);
54 void drawRebel2String(const Rebel2FontSet &fontSet, const char *str, uint len, byte *buffer,
55  Common::Rect &clipRect, int x, int y, int pitch, int16 col, TextStyleFlags flags);
56 void drawRebel2StringWrap(const Rebel2FontSet &fontSet, const char *str, uint len, byte *buffer,
57  Common::Rect &clipRect, int x, int y, int pitch, int16 col, TextStyleFlags flags);
58 
59 } // End of namespace Scumm
60 
61 #endif
Definition: rect.h:524
Definition: scumm.h:524
Definition: font_rebel2.h:35
Definition: actor.h:30