ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/traits.h
Revision: 1.14
Committed: Sun May 27 23:49:49 2007 UTC (17 years ago) by root
Content type: text/plain
Branch: MAIN
Changes since 1.13: +3 -0 lines
Log Message:
more ยต-opts

File Contents

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