|
|
1 | /* |
|
|
2 | * This file is part of Crossfire TRT, the Multiplayer Online Role Playing Game. |
|
|
3 | * |
|
|
4 | * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Crossfire TRT team |
|
|
5 | * |
|
|
6 | * Crossfire TRT is free software; you can redistribute it and/or modify it |
|
|
7 | * under the terms of the GNU General Public License as published by the Free |
|
|
8 | * Software Foundation; either version 2 of the License, or (at your option) |
|
|
9 | * any later version. |
|
|
10 | * |
|
|
11 | * This program is distributed in the hope that it will be useful, but |
|
|
12 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
|
|
13 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
|
14 | * for more details. |
|
|
15 | * |
|
|
16 | * You should have received a copy of the GNU General Public License along |
|
|
17 | * with Crossfire TRT; if not, write to the Free Software Foundation, Inc. 51 |
|
|
18 | * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
|
19 | * |
|
|
20 | * The authors can be reached via e-mail to <crossfire@schmorp.de> |
|
|
21 | */ |
|
|
22 | |
1 | #ifndef TRAITS_H__ |
23 | #ifndef TRAITS_H__ |
2 | #define TRAITS_H__ |
24 | #define TRAITS_H__ |
3 | |
25 | |
4 | #include <inttypes.h> |
26 | #include <inttypes.h> |
5 | |
27 | |
… | |
… | |
10 | typedef int32_t sint32; |
32 | typedef int32_t sint32; |
11 | typedef uint32_t uint32; |
33 | typedef uint32_t uint32; |
12 | typedef int64_t sint64; |
34 | typedef int64_t sint64; |
13 | typedef uint64_t uint64; |
35 | typedef uint64_t uint64; |
14 | |
36 | |
|
|
37 | typedef uint32_t tick_t; |
|
|
38 | |
|
|
39 | const int sint32_digits = 11; // number of digits an sint32 uses max. |
|
|
40 | const int sint64_digits = 20; |
|
|
41 | |
15 | struct client_container; |
42 | struct client_container; |
16 | struct client; |
43 | struct client; |
17 | struct player; |
44 | struct player; |
18 | struct object; |
45 | struct object; |
19 | struct maptile; |
46 | struct maptile; |
20 | struct mapspace; |
47 | struct mapspace; |
21 | struct archetype; |
48 | struct archetype; |
22 | struct region; |
49 | struct region; |
23 | struct party; |
50 | struct party; |
24 | struct treasurelist; |
51 | struct treasurelist; |
|
|
52 | struct random_map_params; |
25 | |
53 | |
26 | // could have used templates, but a more traditional C api |
54 | // could have used templates, but a more traditional C api |
27 | // uses more explicit typing which is ok for this purpose. |
55 | // uses more explicit typing which is ok for this purpose. |
28 | enum data_type |
56 | enum data_type |
29 | { |
57 | { |