ScummVM API documentation
text_translation.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 HOLLYWOOD_TEXT_TRANSLATION_H
23
#define HOLLYWOOD_TEXT_TRANSLATION_H
24
25
#include "common/array.h"
26
#include "common/hash-str.h"
27
#include "common/path.h"
28
#include "common/ptr.h"
29
#include "common/ustr.h"
30
31
namespace
Common
{
32
class
Archive;
33
class
TranslationManager;
34
}
35
36
namespace
Hollywood {
37
38
class
ImageTranslationArchive;
39
40
class
TextTranslation
{
41
public
:
42
struct
Language
{
43
Common::String
code;
44
Common::String
name;
45
};
46
47
TextTranslation
();
48
~TextTranslation
();
49
50
bool
load(
const
Common::Path
&fileName,
const
Common::Path
&originalArchive);
51
bool
setLanguage(
const
Common::String
&language);
52
const
Common::String
&language()
const
{
return
_language; }
53
const
Common::Array<Language>
&languages()
const
{
return
_languages; }
54
void
applyRows(
const
Common::String
§ion,
Common::Array<byte>
&rows,
55
uint rowSize, uint firstRow, uint firstRecord)
const
;
56
const
char
*interfaceText(
const
Common::String
&key,
const
char
*fallback)
const
;
57
58
private
:
59
const
Common::String
*findText(
const
Common::String
&key)
const
;
60
bool
decodeText(
const
Common::U32String
&value,
Common::String
&text)
const
;
61
62
#ifdef USE_TRANSLATION
63
Common::ScopedPtr<Common::Archive>
_archive;
64
Common::ScopedPtr<ImageTranslationArchive>
_graphics;
65
Common::ScopedPtr<Common::TranslationManager>
_catalog;
66
#endif
67
Common::String
_language;
68
Common::Array<Language>
_languages;
69
mutable
Common::StringMap
_text;
70
bool
_loaded;
71
};
72
73
}
// End of namespace Hollywood
74
75
#endif
// HOLLYWOOD_TEXT_TRANSLATION_H
Common::Array
Definition:
array.h:52
Common::HashMap< String, String, IgnoreCase_Hash, IgnoreCase_EqualTo >
Common::Path
Definition:
path.h:52
Common::ScopedPtr< Common::Archive >
Common::String
Definition:
str.h:59
Common::U32String
Definition:
ustr.h:57
Hollywood::TextTranslation
Definition:
text_translation.h:40
Common
Definition:
algorithm.h:29
Hollywood::TextTranslation::Language
Definition:
text_translation.h:42
engines
hollywood
text_translation.h
Generated on Sun Nov 22 2026 09:25:26 for ScummVM API documentation by
1.9.4