OpenTTD Source: src/newgrf/newgrf_stringmapping.h Source File

OpenTTD Source 15.0-RC2

newgrf_stringmapping.h
Go to the documentation of this file.
1/*
2 * This file is part of OpenTTD.
3 * OpenTTD 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, version 2.
4 * OpenTTD 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.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
6 */
7
10#ifndef NEWGRF_STRINGMAPPING_H
11#define NEWGRF_STRINGMAPPING_H
12
13#include "../strings_type.h"
14#include "../newgrf_text_type.h"
15
16void AddStringForMapping(GRFStringID source, std::function<void(StringID)> &&func);
17void AddStringForMapping(GRFStringID source, StringID *target);
18void FinaliseStringMapping();
19
20#endif /* NEWGRF_STRINGMAPPING_H */
AddStringForMapping
void AddStringForMapping(GRFStringID source, std::function< void(StringID)> &&func)
Record a static StringID for getting translated later.
Definition newgrf_stringmapping.cpp:42
FinaliseStringMapping
void FinaliseStringMapping()
Finalise all string mappings.
Definition newgrf_stringmapping.cpp:159
StringID
uint32_t StringID
Numeric value that represents a string, independent of the selected language.
Definition strings_type.h:19
StrongType::Typedef< uint32_t, struct GRFStringIDTag, StrongType::Compare, StrongType::Integer >