diff options
Diffstat (limited to 'src/strgen')
-rw-r--r-- | src/strgen/strgen.cpp | 4 | ||||
-rw-r--r-- | src/strgen/strgen.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp index e950e5e99..6d6d1626c 100644 --- a/src/strgen/strgen.cpp +++ b/src/strgen/strgen.cpp @@ -946,7 +946,6 @@ static void WriteStringsH(const char *filename) fprintf(_output_file, "\nstatic const StringID STR_LAST_STRINGID = 0x%X;\n\n", next - 1); fprintf(_output_file, - "static const uint LANGUAGE_PACK_IDENT = 0x474E414C; // Big Endian value for 'LANG' (LE is 0x 4C 41 4E 47)\n" "static const uint LANGUAGE_PACK_VERSION = 0x%X;\n\n", (uint)_hash ); @@ -1069,8 +1068,7 @@ static void WriteLangfile(const char *filename) _lang.offsets[i] = TO_LE16(n); } - /* see line 655: fprintf(..."\tLANGUAGE_PACK_IDENT = 0x474E414C,...) */ - _lang.ident = TO_LE32(0x474E414C); // Big Endian value for 'LANG' + _lang.ident = TO_LE32(LanguagePackHeader::IDENT); _lang.version = TO_LE32(_hash); _lang.winlangid = TO_LE16(_lang.winlangid); diff --git a/src/strgen/strgen.h b/src/strgen/strgen.h index 40c5f2031..ecaeb05ff 100644 --- a/src/strgen/strgen.h +++ b/src/strgen/strgen.h @@ -14,6 +14,8 @@ /** Header of a language file. */ struct LanguagePackHeader { + static const uint32 IDENT = 0x474E414C; ///< Identifier for OpenTTD language files, big endian for "LANG" + 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 |