equal
deleted
inserted
replaced
|
1 /* $Id$ */ |
|
2 #ifndef NEWGRF_TEXT_H |
|
3 #define NEWGRF_TEXT_H |
|
4 |
|
5 /** @file |
|
6 * Header of Action 04 "universal holder" structure and functions |
|
7 */ |
|
8 |
|
9 #define MAX_LANG 28 |
|
10 |
|
11 /** |
|
12 * Element of the linked list. |
|
13 * Each of those elements represent the string, |
|
14 * but according to a different lang. |
|
15 */ |
|
16 typedef struct GRFText { |
|
17 byte langid; |
|
18 char *text; |
|
19 struct GRFText *next; |
|
20 } GRFText; |
|
21 |
|
22 |
|
23 /** |
|
24 * Holder of the above structure. |
|
25 * Putting both grfid and stringid togueter allow us to avoid duplicates, |
|
26 * since it is NOT SUPPOSED to happen. |
|
27 */ |
|
28 typedef struct GRFTextEntry { |
|
29 uint32 grfid; |
|
30 uint16 stringid; |
|
31 GRFText *textholder; |
|
32 } GRFTextEntry; |
|
33 |
|
34 |
|
35 StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid, const char *text_to_add); |
|
36 StringID GetGRFStringID(uint32 grfid, uint16 stringid); |
|
37 char *GetGRFString(char *buff, uint16 stringid); |
|
38 void CleanUpStrings(void); |
|
39 void SetCurrentGrfLangID(const char *iso_name); |
|
40 |
|
41 #endif /* NEWGRF_TEXT_H */ |