Revision: | 1.13 |
Committed: | Wed Apr 25 18:47:50 2007 UTC (17 years, 1 month ago) by root |
Content type: | text/plain |
Branch: | MAIN |
CVS Tags: | rel-2_1 |
Changes since 1.12: | +2 -0 lines |
Log Message: | rewrote output buffer handling. the new system: - outputs messages immediately. - suppresses following duplicates. - enforces a minimum setting. - is, as usual, faster and leaner. the only problem is that the code worked out of the box, which is not reassuring. |
# | Content |
---|---|
1 | #ifndef TRAITS_H__ |
2 | #define TRAITS_H__ |
3 | |
4 | #include <inttypes.h> |
5 | |
6 | typedef int8_t sint8; |
7 | typedef uint8_t uint8; |
8 | typedef int16_t sint16; |
9 | typedef uint16_t uint16; |
10 | typedef int32_t sint32; |
11 | typedef uint32_t uint32; |
12 | typedef int64_t sint64; |
13 | typedef uint64_t uint64; |
14 | |
15 | typedef uint32_t tick_t; |
16 | |
17 | struct client_container; |
18 | struct client; |
19 | struct player; |
20 | struct object; |
21 | struct maptile; |
22 | struct mapspace; |
23 | struct archetype; |
24 | struct region; |
25 | struct party; |
26 | struct treasurelist; |
27 | struct random_map_params; |
28 | |
29 | // could have used templates, but a more traditional C api |
30 | // uses more explicit typing which is ok for this purpose. |
31 | enum data_type |
32 | { |
33 | DT_END, // no further arguments |
34 | DT_AV, // perl-only av that needs to be flattened out |
35 | DT_INT, |
36 | DT_INT64, |
37 | DT_DOUBLE, |
38 | DT_STRING, // 0-terminated string |
39 | DT_DATA, // string + length |
40 | DT_ATTACHABLE, // will go |
41 | DT_OBJECT, |
42 | DT_MAP, |
43 | DT_CLIENT, |
44 | DT_PLAYER, |
45 | DT_ARCH, |
46 | DT_PARTY, |
47 | DT_REGION, |
48 | |
49 | NUM_DATA_TYPES |
50 | }; |
51 | |
52 | #endif |
53 |