mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r14617) -Change: unduplicate the languagepack(header).
This commit is contained in:
parent
f28992719d
commit
6878b181c7
|
@ -7,6 +7,7 @@
|
||||||
#include "../core/endian_func.hpp"
|
#include "../core/endian_func.hpp"
|
||||||
#include "../string_func.h"
|
#include "../string_func.h"
|
||||||
#include "../strings_type.h"
|
#include "../strings_type.h"
|
||||||
|
#include "strgen.h"
|
||||||
#include "../table/control_codes.h"
|
#include "../table/control_codes.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -35,18 +36,6 @@
|
||||||
|
|
||||||
typedef void (*ParseCmdProc)(char *buf, int value);
|
typedef void (*ParseCmdProc)(char *buf, int value);
|
||||||
|
|
||||||
struct LanguagePackHeader {
|
|
||||||
uint32 ident; // 32-bits identifier
|
|
||||||
uint32 version; // 32-bits of auto generated version info which is basically a hash of strings.h
|
|
||||||
char name[32]; // the international name of this language
|
|
||||||
char own_name[32]; // the localized name of this language
|
|
||||||
char isocode[16]; // the ISO code for the language (not country code)
|
|
||||||
uint16 offsets[32]; // the offsets
|
|
||||||
byte plural_form; // plural form index
|
|
||||||
byte text_dir; // default direction of the text
|
|
||||||
byte pad[2]; // pad header to be a multiple of 4
|
|
||||||
};
|
|
||||||
|
|
||||||
struct CmdStruct {
|
struct CmdStruct {
|
||||||
const char *cmd;
|
const char *cmd;
|
||||||
ParseCmdProc proc;
|
ParseCmdProc proc;
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/** @file strgen.h Language pack header for strgen (needs to match). */
|
||||||
|
|
||||||
|
#ifndef STRGEN_H
|
||||||
|
#define STRGEN_H
|
||||||
|
|
||||||
|
struct LanguagePackHeader {
|
||||||
|
uint32 ident; // 32-bits identifier
|
||||||
|
uint32 version; // 32-bits of auto generated version info which is basically a hash of strings.h
|
||||||
|
char name[32]; // the international name of this language
|
||||||
|
char own_name[32]; // the localized name of this language
|
||||||
|
char isocode[16]; // the ISO code for the language (not country code)
|
||||||
|
uint16 offsets[32]; // the offsets
|
||||||
|
byte plural_form; // plural form index
|
||||||
|
byte text_dir; // default direction of the text
|
||||||
|
byte pad[2]; // pad header to be a multiple of 4
|
||||||
|
};
|
||||||
|
|
||||||
|
assert_compile(sizeof(LanguagePackHeader) % 4 == 0);
|
||||||
|
|
||||||
|
#endif /* STRGEN_H */
|
|
@ -40,6 +40,7 @@
|
||||||
#include "engine_func.h"
|
#include "engine_func.h"
|
||||||
#include "engine_base.h"
|
#include "engine_base.h"
|
||||||
#include "saveload.h"
|
#include "saveload.h"
|
||||||
|
#include "strgen/strgen.h"
|
||||||
|
|
||||||
#include "table/strings.h"
|
#include "table/strings.h"
|
||||||
#include "table/control_codes.h"
|
#include "table/control_codes.h"
|
||||||
|
@ -53,16 +54,7 @@ static char *GetSpecialNameString(char *buff, int ind, const int64 *argv, const
|
||||||
|
|
||||||
static char *FormatString(char *buff, const char *str, const int64 *argv, uint casei, const char* last);
|
static char *FormatString(char *buff, const char *str, const int64 *argv, uint casei, const char* last);
|
||||||
|
|
||||||
struct LanguagePack {
|
struct LanguagePack : public LanguagePackHeader {
|
||||||
uint32 ident; // 32-bits identifier
|
|
||||||
uint32 version; // 32-bits of auto generated version info which is basically a hash of strings.h
|
|
||||||
char name[32]; // the international name of this language
|
|
||||||
char own_name[32]; // the localized name of this language
|
|
||||||
char isocode[16]; // the ISO code for the language (not country code)
|
|
||||||
uint16 offsets[32]; // the offsets
|
|
||||||
byte plural_form; // how to compute plural forms
|
|
||||||
byte text_dir; // default direction of the text
|
|
||||||
byte pad[2]; // pad header to be a multiple of 4
|
|
||||||
char data[VARARRAY_SIZE]; // list of strings
|
char data[VARARRAY_SIZE]; // list of strings
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue