author | Tero Marttila <terom@fixme.fi> |
Fri, 18 Jul 2008 21:28:42 +0300 | |
changeset 11175 | 020c61e39c94 |
parent 10429 | 1b99254f9607 |
permissions | -rw-r--r-- |
7452 | 1 |
/* $Id$ */ |
10429
1b99254f9607
(svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
rubidium
parents:
8760
diff
changeset
|
2 |
|
1b99254f9607
(svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
rubidium
parents:
8760
diff
changeset
|
3 |
/** @file newgrf_townname.h |
1b99254f9607
(svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
rubidium
parents:
8760
diff
changeset
|
4 |
* Header of Action 0F "universal holder" structure and functions |
1b99254f9607
(svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
rubidium
parents:
8760
diff
changeset
|
5 |
*/ |
1b99254f9607
(svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
rubidium
parents:
8760
diff
changeset
|
6 |
|
7452 | 7 |
#ifndef NEWGRF_TOWNNAME_H |
8 |
#define NEWGRF_TOWNNAME_H |
|
9 |
||
8760
ce0891c412ce
(svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h.
rubidium
parents:
7452
diff
changeset
|
10 |
#include "strings_type.h" |
ce0891c412ce
(svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h.
rubidium
parents:
7452
diff
changeset
|
11 |
|
7452 | 12 |
struct NamePart { |
13 |
byte prob; ///< The relative probablity of the following name to appear in the bottom 7 bits. |
|
14 |
union { |
|
15 |
char *text; ///< If probability bit 7 is clear |
|
16 |
byte id; ///< If probability bit 7 is set |
|
17 |
} data; |
|
18 |
}; |
|
19 |
||
20 |
struct NamePartList { |
|
21 |
byte partcount; |
|
22 |
byte bitstart; |
|
23 |
byte bitcount; |
|
24 |
uint16 maxprob; |
|
25 |
NamePart *parts; |
|
26 |
}; |
|
27 |
||
28 |
struct GRFTownName { |
|
29 |
uint32 grfid; |
|
30 |
byte nb_gen; |
|
31 |
byte id[128]; |
|
32 |
StringID name[128]; |
|
33 |
byte nbparts[128]; |
|
34 |
NamePartList *partlist[128]; |
|
35 |
GRFTownName *next; |
|
36 |
}; |
|
37 |
||
38 |
GRFTownName *AddGRFTownName(uint32 grfid); |
|
39 |
GRFTownName *GetGRFTownName(uint32 grfid); |
|
40 |
void DelGRFTownName(uint32 grfid); |
|
41 |
void CleanUpGRFTownNames(); |
|
42 |
StringID *GetGRFTownNameList(); |
|
43 |
char *GRFTownNameGenerate(char *buf, uint32 grfid, uint16 gen, uint32 seed, const char *last); |
|
44 |
uint32 GetGRFTownNameId(int gen); |
|
45 |
uint16 GetGRFTownNameType(int gen); |
|
46 |
||
47 |
#endif /* NEWGRF_TOWNNAME_H */ |