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 |
struct client_container; |
16 |
struct client; |
17 |
struct player; |
18 |
struct object; |
19 |
struct maptile; |
20 |
struct mapspace; |
21 |
struct archetype; |
22 |
struct region; |
23 |
struct party; |
24 |
struct treasurelist; |
25 |
struct random_map_params; |
26 |
|
27 |
// could have used templates, but a more traditional C api |
28 |
// uses more explicit typing which is ok for this purpose. |
29 |
enum data_type |
30 |
{ |
31 |
DT_END, // no further arguments |
32 |
DT_AV, // perl-only av that needs to be flattened out |
33 |
DT_INT, |
34 |
DT_INT64, |
35 |
DT_DOUBLE, |
36 |
DT_STRING, // 0-terminated string |
37 |
DT_DATA, // string + length |
38 |
DT_ATTACHABLE, // will go |
39 |
DT_OBJECT, |
40 |
DT_MAP, |
41 |
DT_CLIENT, |
42 |
DT_PLAYER, |
43 |
DT_ARCH, |
44 |
DT_PARTY, |
45 |
DT_REGION, |
46 |
|
47 |
NUM_DATA_TYPES |
48 |
}; |
49 |
|
50 |
#endif |
51 |
|