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