ScummVM API documentation
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 TINSEL_FONT_H // prevent multiple includes
23#define TINSEL_FONT_H
24
25#include "tinsel/dw.h"
26
27namespace Tinsel {
28
29// A temporary buffer for extracting text into is defined in font.c
30// Accessed using TextBufferAddr(), this is how big it is:
31#define TBUFSZ 512
32
33class Font {
34public:
35 Font() : _hTagFont(0), _hTalkFont(0), _hRegularTalkFont(0), _hRegularTagFont(0) {
36 }
37
41 char* TextBufferAddr() { return _tBuffer; }
42
46 SCNHANDLE GetTagFontHandle() { return _hTagFont; }
47
52
57
63 _hTalkFont = _hRegularTalkFont = hFont;
64 }
65
70 _hTagFont = hFont;
71 }
72
77 _hTalkFont = hFont;
78 }
79
80 void ResetFontHandles() {
81 _hTagFont = _hRegularTagFont;
82 _hTalkFont = _hRegularTalkFont;
83 }
84
88 void FettleFontPal(SCNHANDLE fontPal);
89
90private:
91 char _tBuffer[TBUFSZ];
92
93 SCNHANDLE _hTagFont, _hTalkFont;
94 SCNHANDLE _hRegularTalkFont, _hRegularTagFont;
95};
96
97} // End of namespace Tinsel
98
99#endif // TINSEL_FONT_H
Definition: font.h:33
void SetTagFontHandle(SCNHANDLE hFont)
SCNHANDLE GetTagFontHandle()
Definition: font.h:46
void SetTalkFontHandle(SCNHANDLE hFont)
Definition: font.h:62
void SetTempTagFontHandle(SCNHANDLE hFont)
Definition: font.h:69
SCNHANDLE GetTalkFontHandle()
void SetTempTalkFontHandle(SCNHANDLE hFont)
Definition: font.h:76
void FettleFontPal(SCNHANDLE fontPal)
char * TextBufferAddr()
Definition: font.h:41
Definition: actors.h:36
uint32 SCNHANDLE
Definition: dw.h:31