blob: 8d4b3f47f91f743ceca747cf0c86e726d2e0a3f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
/* $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;
GRFText *textholder;
} GRFTextEntry;
StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid, bool new_scheme, const char *text_to_add);
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 */
|