author | tron |
Sun, 23 Apr 2006 13:48:16 +0000 | |
changeset 3636 | d87b21df2944 |
parent 3605 | 045805e70df0 |
child 3641 | 7dc47659e794 |
permissions | -rw-r--r-- |
3601
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
1 |
/* $Id$ */ |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
2 |
#ifndef NEWGRF_TEXT_H |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
3 |
#define NEWGRF_TEXT_H |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
4 |
|
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
5 |
/** @file |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
6 |
* Header of Action 04 "universal holder" structure and functions |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
7 |
*/ |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
8 |
|
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
9 |
/** |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
10 |
* Element of the linked list. |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
11 |
* Each of those elements represent the string, |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
12 |
* but according to a different lang. |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
13 |
*/ |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
14 |
typedef struct GRFText { |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
15 |
byte langid; |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
16 |
char *text; |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
17 |
struct GRFText *next; |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
18 |
} GRFText; |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
19 |
|
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
20 |
|
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
21 |
/** |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
22 |
* Holder of the above structure. |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
23 |
* Putting both grfid and stringid togueter allow us to avoid duplicates, |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
24 |
* since it is NOT SUPPOSED to happen. |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
25 |
*/ |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
26 |
typedef struct GRFTextEntry { |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
27 |
uint32 grfid; |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
28 |
uint16 stringid; |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
29 |
GRFText *textholder; |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
30 |
} GRFTextEntry; |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
31 |
|
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
32 |
|
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
33 |
StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid, const char *text_to_add); |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
34 |
StringID GetGRFStringID(uint32 grfid, uint16 stringid); |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
35 |
char *GetGRFString(char *buff, uint16 stringid); |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
36 |
void CleanUpStrings(void); |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
37 |
void SetCurrentGrfLangID(const char *iso_name); |
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
38 |
|
ac6df06db648
(svn r4493) Newgrf : Action 04. Beginning of implementation.
belugas
parents:
diff
changeset
|
39 |
#endif /* NEWGRF_TEXT_H */ |