Revision: | 1.13 |
Committed: | Wed Apr 25 18:47:50 2007 UTC (17 years, 2 months 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. |
# | User | Rev | Content |
---|---|---|---|
1 | root | 1.1 | #ifndef TRAITS_H__ |
2 | #define TRAITS_H__ | ||
3 | |||
4 | root | 1.11 | #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 | root | 1.13 | typedef uint32_t tick_t; |
16 | |||
17 | root | 1.8 | struct client_container; |
18 | root | 1.6 | struct client; |
19 | root | 1.4 | struct player; |
20 | root | 1.1 | struct object; |
21 | root | 1.4 | struct maptile; |
22 | root | 1.9 | struct mapspace; |
23 | root | 1.3 | struct archetype; |
24 | root | 1.1 | struct region; |
25 | struct party; | ||
26 | root | 1.4 | struct treasurelist; |
27 | root | 1.12 | struct random_map_params; |
28 | root | 1.1 | |
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 | root | 1.10 | DT_ATTACHABLE, // will go |
41 | root | 1.1 | DT_OBJECT, |
42 | DT_MAP, | ||
43 | root | 1.7 | DT_CLIENT, |
44 | root | 1.1 | DT_PLAYER, |
45 | DT_ARCH, | ||
46 | DT_PARTY, | ||
47 | DT_REGION, | ||
48 | |||
49 | NUM_DATA_TYPES | ||
50 | }; | ||
51 | |||
52 | #endif | ||
53 |