2007-05-30 21:56:52 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
2006-02-22 22:40:53 +00:00
|
|
|
*
|
2007-05-30 21:56:52 +00:00
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
2006-02-22 22:40:53 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2006-12-03 18:29:58 +00:00
|
|
|
#ifndef CINE_TEXTE_H
|
|
|
|
#define CINE_TEXTE_H
|
2006-02-22 22:40:53 +00:00
|
|
|
|
2007-09-19 08:40:12 +00:00
|
|
|
|
2006-02-25 01:18:01 +00:00
|
|
|
#include "common/scummsys.h"
|
|
|
|
|
2006-02-25 00:26:14 +00:00
|
|
|
namespace Cine {
|
|
|
|
|
2007-12-14 19:21:19 +00:00
|
|
|
typedef char CommandeType[20];
|
2006-11-11 15:37:03 +00:00
|
|
|
|
2008-08-11 22:26:25 +00:00
|
|
|
// Number of characters in a font
|
|
|
|
#define NUM_FONT_CHARS 256
|
|
|
|
|
2008-08-20 17:31:35 +00:00
|
|
|
#define FONT_WIDTH 16
|
|
|
|
#define FONT_HEIGHT 8
|
|
|
|
|
|
|
|
// Used for choosing between font's data and font's mask
|
|
|
|
#define FONT_DATA 0
|
|
|
|
#define FONT_MASK 1
|
|
|
|
|
2008-08-11 22:26:25 +00:00
|
|
|
struct CharacterEntry {
|
|
|
|
byte characterIdx;
|
|
|
|
byte characterWidth;
|
|
|
|
};
|
|
|
|
|
2008-07-17 07:13:41 +00:00
|
|
|
struct TextHandler {
|
2008-08-20 17:31:35 +00:00
|
|
|
byte textTable[NUM_FONT_CHARS][2][FONT_WIDTH * FONT_HEIGHT];
|
2008-08-11 22:26:25 +00:00
|
|
|
CharacterEntry fontParamTable[NUM_FONT_CHARS];
|
2008-07-17 07:13:41 +00:00
|
|
|
};
|
2006-02-22 22:40:53 +00:00
|
|
|
|
2011-09-08 17:51:05 +00:00
|
|
|
extern const char *const *failureMessages;
|
2007-12-14 19:21:19 +00:00
|
|
|
extern const CommandeType *defaultActionCommand;
|
|
|
|
extern const CommandeType *systemMenu;
|
|
|
|
extern const CommandeType *confirmMenu;
|
2011-09-08 17:51:05 +00:00
|
|
|
extern const char *const *otherMessages;
|
2008-08-12 19:33:17 +00:00
|
|
|
extern const char *defaultCommandPreposition;
|
2011-09-08 17:51:05 +00:00
|
|
|
extern const char *const *commandPrepositionTable;
|
2006-11-11 15:37:03 +00:00
|
|
|
|
2008-08-11 21:26:41 +00:00
|
|
|
void loadTextData(const char *filename);
|
2006-11-13 21:16:50 +00:00
|
|
|
void loadErrmessDat(const char *fname);
|
2009-11-02 21:54:57 +00:00
|
|
|
void freeErrmessDat();
|
2006-11-13 21:16:50 +00:00
|
|
|
void loadPoldatDat(const char *fname);
|
2006-02-22 22:40:53 +00:00
|
|
|
|
2008-05-24 22:11:41 +00:00
|
|
|
int fitLine(const char *ptr, int maxWidth, int &words, int &width);
|
2006-11-18 15:16:44 +00:00
|
|
|
|
2006-02-25 00:26:14 +00:00
|
|
|
} // End of namespace Cine
|
|
|
|
|
2006-02-22 22:40:53 +00:00
|
|
|
#endif
|