Files @ r4118:b656cd93a69a
Branch filter:

Location: cpp/openttd-patchpack/source/newgrf_text.h

miham
(svn r5462) WebTranslator2 update to 2006-07-05 19:54:20
bulgarian - 218 fixed, 79 changed by quicksilverbg (20), kokobongo (203), groupsky (74)
french - 1 changed by glx (1)
italian - 14 changed by sidew (14)
/* $Id$ */
#ifndef NEWGRF_TEXT_H
#define NEWGRF_TEXT_H

/** @file
 * Header of Action 04 "universal holder" structure and functions
 */

/**
 * Element of the linked list.
 * Each of those elements represent the string,
 * but according to a different lang.
 */
typedef struct GRFText {
	byte langid;
	char *text;
	struct GRFText *next;
} GRFText;


/**
 * Holder of the above structure.
 * Putting both grfid and stringid togueter allow us to avoid duplicates,
 * since it is NOT SUPPOSED to happen.
 */
typedef struct GRFTextEntry {
	uint32 grfid;
	uint16 stringid;
	StringID def_string;
	GRFText *textholder;
} GRFTextEntry;


StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid, bool new_scheme, const char *text_to_add, StringID def_string);
StringID GetGRFStringID(uint32 grfid, uint16 stringid);
char *GetGRFString(char *buff, uint16 stringid);
void CleanUpStrings(void);
void SetCurrentGrfLangID(const char *iso_name);

#endif /* NEWGRF_TEXT_H */