|
|
/* $Id$ */
|
|
|
|
|
|
/*
|
|
|
* This file is part of OpenTTD.
|
|
|
* 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.
|
|
|
* 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.
|
|
|
* 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 <http://www.gnu.org/licenses/>.
|
|
|
*/
|
|
|
|
|
|
/** @file strgen.h Structures related to strgen. */
|
|
|
|
|
|
#ifndef STRGEN_H
|
|
|
#define STRGEN_H
|
|
|
|
|
|
#include "../language.h"
|
|
|
|
|
|
/** Container for the different cases of a string. */
|
|
|
struct Case {
|
|
|
int caseidx; ///< The index of the case.
|
|
|
char *string; ///< The translation of the case.
|
|
|
Case *next; ///< The next, chained, case.
|
|
|
|
|
|
Case(int caseidx, const char *string, Case *next);
|
|
|
~Case();
|
|
|
};
|
|
|
|
|
|
/** Information about a single string. */
|
|
|
struct LangString {
|
|
|
char *name; ///< Name of the string.
|
|
|
char *english; ///< English text.
|
|
|
char *translated; ///< Translated text.
|
|
|
uint16 hash_next; ///< Next hash entry.
|
|
|
uint16 index; ///< The index in the language file.
|
|
|
int line; ///< Line of string in source-file.
|
|
|
Case *translated_case; ///< Cases of the translation.
|
|
|
|
|
|
LangString(const char *name, const char *english, int index, int line);
|
|
|
~LangString();
|
|
|
void FreeTranslation();
|
|
|
};
|