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

# 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.14 const int sint32_digits = 11; // number of digits an sint32 uses max.
18     const int sint64_digits = 20;
19    
20 root 1.8 struct client_container;
21 root 1.6 struct client;
22 root 1.4 struct player;
23 root 1.1 struct object;
24 root 1.4 struct maptile;
25 root 1.9 struct mapspace;
26 root 1.3 struct archetype;
27 root 1.1 struct region;
28     struct party;
29 root 1.4 struct treasurelist;
30 root 1.12 struct random_map_params;
31 root 1.1
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 root 1.10 DT_ATTACHABLE, // will go
44 root 1.1 DT_OBJECT,
45     DT_MAP,
46 root 1.7 DT_CLIENT,
47 root 1.1 DT_PLAYER,
48     DT_ARCH,
49     DT_PARTY,
50     DT_REGION,
51    
52     NUM_DATA_TYPES
53     };
54    
55     #endif
56