ScummVM API documentation
fantranslations_detection.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
23#ifndef SNATCHER_FANTRANSLATIONS_DETECTION_H
24#define SNATCHER_FANTRANSLATIONS_DETECTION_H
25
26#include "common/language.h"
27#include "common/list.h"
28#include "common/platform.h"
29#include "common/str-enc.h"
30#include "common/str.h"
31
32namespace Snatcher {
33
35public:
36 enum TranslatorMode {
37 kDetect = 0,
38 kTranslate = 1,
39 kCollect = 2
40 };
41
43 FontProperties() : codepage(Common::kCodePageInvalid), rtl(false) {}
44 Common::CodePage codepage;
45 Common::String fontfile;
46 bool rtl;
47 };
48
49 static Common::List<Common::Language> listTranslations(Common::Platform platform, Common::Language *defaultLang = nullptr);
50
51protected:
55 stringTable.clear();
56 addressTable.clear();
57 }
58
60 Common::List<uint32> addressTable;
61 };
62
63 static void updateDataTable(uint32 addr, const uint8 *data, PerFileTranslateableData **table, TranslatorMode mode, uint dataSize = 256, int file = -1);
64 static void parseTranslations(Common::Platform platform, Common::Language lang, TranslatorMode mode, int fileNumber = -1,
65 PerFileTranslateableData **table = nullptr, Common::List<Common::Language> *langList = nullptr, Common::Language *defaultLang = nullptr, uint32 *fileOffsetList = nullptr, FontProperties *fontProperties = nullptr);
66};
67
68} // End of namespace Snatcher
69
70#endif // SNATCHER_FANTRANSLATIONS_H
71
Definition: list.h:44
void clear()
Definition: list.h:245
Definition: str.h:59
Definition: fantranslations_detection.h:34
Language
Definition: language.h:45
Platform
Definition: platform.h:93
Definition: fantranslations_detection.h:42