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
30namespace Scumm {
31
32class ScummEngine;
33class NutRenderer;
34
36 enum {
37 kMaxFonts = 5
38 };
39
40 NutRenderer *fonts[kMaxFonts];
41 int numFonts;
42 int defaultFont;
43 bool useCJK;
44
45 Rebel2FontSet(bool useCJKMode = false);
46 NutRenderer *getFont(int id) const;
47};
48
49NutRenderer *makeRebel2Font(ScummEngine *vm, const char *filename);
50NutRenderer *makeRebel2SpriteFromData(ScummEngine *vm, const byte *data, int32 dataSize);
51bool drawRebel2Codec23Sprite(NutRenderer *sprite, byte *buffer, int pitch, int width, int height,
52 const Common::Rect &clipRect, int x, int y, int spriteIdx, int scale);
53bool drawRebel2Codec45Sprite(NutRenderer *sprite, byte *buffer, int pitch, int width, int height,
54 const Common::Rect &clipRect, int x, int y, int spriteIdx, int scale);
55uint16 decodeRebel2Char(const char *str, uint len, uint &charLen, bool useCJK);
56int drawRebel2Char(NutRenderer *font, byte *buffer, Common::Rect &clipRect, int x, int y,
57 int pitch, int16 col, uint16 chr);
58int getRebel2StringWidth(const Rebel2FontSet &fontSet, const char *str, uint len);
59int getRebel2StringHeight(const Rebel2FontSet &fontSet, const char *str, uint len);
60void drawRebel2String(const Rebel2FontSet &fontSet, const char *str, uint len, byte *buffer,
61 Common::Rect &clipRect, int x, int y, int pitch, int16 col, TextStyleFlags flags);
62void drawRebel2StringWrap(const Rebel2FontSet &fontSet, const char *str, uint len, byte *buffer,
63 Common::Rect &clipRect, int x, int y, int pitch, int16 col, TextStyleFlags flags);
64
65} // End of namespace Scumm
66
67#endif
Definition: scumm.h:536
Definition: actor.h:30
Definition: rect.h:536
Definition: font_rebel2.h:35