ScummVM API documentation
texte.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 CINE_TEXTE_H
23 #define CINE_TEXTE_H
24 
25 
26 #include "common/scummsys.h"
27 
28 namespace Cine {
29 
30 typedef char CommandeType[20];
31 
32 // Number of characters in a font
33 #define NUM_FONT_CHARS 256
34 
35 #define FONT_WIDTH 16
36 #define FONT_HEIGHT 8
37 
38 // Used for choosing between font's data and font's mask
39 #define FONT_DATA 0
40 #define FONT_MASK 1
41 
43  byte characterIdx;
44  byte characterWidth;
45 };
46 
47 struct TextHandler {
48  byte textTable[NUM_FONT_CHARS][2][FONT_WIDTH *FONT_HEIGHT];
49  CharacterEntry fontParamTable[NUM_FONT_CHARS];
50 };
51 
52 extern const char *const *failureMessages;
53 extern const CommandeType *defaultActionCommand;
54 extern const CommandeType *systemMenu;
55 extern const CommandeType *confirmMenu;
56 extern const char *const *otherMessages;
57 extern const char *defaultCommandPreposition;
58 extern const char *const *commandPrepositionTable;
59 
60 void loadTextData(const char *filename);
61 void loadErrmessDat(const char *fname);
62 void setFailureMessages(const char *const *messages, bool allocated);
63 void freeErrmessDat();
64 void loadPoldatDat(const char *fname);
65 
66 int fitLine(const char *ptr, int maxWidth, int &words, int &width);
67 
68 } // End of namespace Cine
69 
70 #endif
Definition: texte.h:42
Definition: texte.h:47
Definition: anim.h:29