ScummVM API documentation
strres.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 * String resource management routines
21 */
22
23#ifndef TINSEL_STRRES_H
24#define TINSEL_STRRES_H
25
26#include "common/scummsys.h"
27#include "tinsel/dw.h"
28
29namespace Tinsel {
30
31#define STRINGS_PER_CHUNK 64 // number of strings per chunk in the language text files
32#define FIRST_STR_ID 1 // id number of first string in string table
33#define MAX_STRING_SIZE 255 // maximum size of a string in the resource table
34#define MAX_STRRES_SIZE 300000 // maximum size of string resource file
35
36// Set if we're handling 2-byte characters.
37extern bool g_bMultiByte;
38
39/*----------------------------------------------------------------------*\
40|* Function Prototypes *|
41\*----------------------------------------------------------------------*/
42
47void ChangeLanguage(LANGUAGE newLang);
48
55int LoadStringRes(int id, char *pBuffer, int bufferMax);
56
64int LoadSubString(int id, int sub, char *pBuffer, int bufferMax);
65
66int SubStringCount(int id); // identifier of string to be tested
67
72
77void LanguageFacts(int language, SCNHANDLE hDescription, SCNHANDLE hFlagFilm);
78
82LANGUAGE TextLanguage();
83
87LANGUAGE SampleLanguage();
88
89int NumberOfLanguages();
90SCNHANDLE LanguageDesc(LANGUAGE thisOne);
91SCNHANDLE LanguageFlag(LANGUAGE thisOne);
92
93} // End of namespace Tinsel
94
95#endif
Definition: actors.h:36
void LanguageFacts(int language, SCNHANDLE hDescription, SCNHANDLE hFlagFilm)
void ChangeLanguage(LANGUAGE newLang)
uint32 SCNHANDLE
Definition: dw.h:31
void FreeTextBuffer()
int LoadStringRes(int id, char *pBuffer, int bufferMax)
int LoadSubString(int id, int sub, char *pBuffer, int bufferMax)
LANGUAGE SampleLanguage()
LANGUAGE TextLanguage()