|
|
/* $Id$ */
|
|
|
|
|
|
#include "stdafx.h"
|
|
|
#include "openttd.h"
|
|
|
#include "functions.h"
|
|
|
#include "string.h"
|
|
|
#include "strings.h"
|
|
|
#include "table/strings.h"
|
|
|
#include "namegen.h"
|
|
|
#include "station.h"
|
|
|
#include "town.h"
|
|
|
#include "vehicle.h"
|
|
|
#include "news.h"
|
|
|
#include "screenshot.h"
|
|
|
#include "waypoint.h"
|
|
|
#include "industry.h"
|
|
|
#include "variables.h"
|
|
|
|
|
|
char _userstring[128];
|
|
|
|
|
|
static char *StationGetSpecialString(char *buff, int x);
|
|
|
static char *GetSpecialTownNameString(char *buff, int ind, uint32 seed);
|
|
|
static char *GetSpecialPlayerNameString(char *buff, int ind, const int32 *argv);
|
|
|
|
|
|
static char *FormatString(char *buff, const char *str, const int32 *argv, uint casei);
|
|
|
|
|
|
extern const char _openttd_revision[];
|
|
|
|
|
|
typedef struct LanguagePack {
|
|
|
uint32 ident;
|
|
|
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 pad[3]; // pad header to be a multiple of 4
|
|
|
char data[VARARRAY_SIZE];
|
|
|
} LanguagePack;
|
|
|
|
|
|
static char **_langpack_offs;
|
|
|
static LanguagePack *_langpack;
|
|
|
static uint _langtab_num[32]; // Offset into langpack offs
|
|
|
static uint _langtab_start[32]; // Offset into langpack offs
|