Crossfire Server, Trunk
arch_types_valid.c
Go to the documentation of this file.
1 /*****************************************
2  * This file is automatically generated! *
3  * Its contents will be overwritten on *
4  * the next build. *
5  * *
6  * is_valid_types_gen.py generates this. *
7  *****************************************/
8 
15 #include <global.h>
16 #include <libproto.h>
17 int is_type_valid(uint8_t type) {
18  if (type >= OBJECT_TYPE_MAX)
19  return 0;
20  switch (type) { // Listed types are invalid ones
21  case 11:
22  case 12:
23  case 19:
24  case 25:
25  case 35:
26  case 38:
27  case 44:
28  case 47:
29  case 61:
30  case 63:
31  case 76:
32  case 78:
33  case 81:
34  case 84:
35  case 86:
36  case 88:
37  case 89:
38  case 96:
39  case 97:
40  case 107:
41  case 108:
42  case 110:
43  case 117:
44  case 118:
45  case 119:
46  case 120:
47  case 125:
48  case 126:
49  case 127:
50  case 128:
51  case 129:
52  case 131:
53  case 132:
54  case 133:
55  case 134:
56  case 135:
57  case 136:
58  case 137:
59  case 140:
60  case 141:
61  case 142:
62  case 143:
63  case 144:
64  case 145:
65  case 146:
66  case 147:
67  case 148:
68  case 149:
69  case 151:
70  case 152:
71  case 153:
72  return 0;
73  }
74  return 1;
75 }
global.h
is_type_valid
int is_type_valid(uint8_t type)
Definition: arch_types_valid.c:17
OBJECT_TYPE_MAX
@ OBJECT_TYPE_MAX
Definition: object.h:251
libproto.h
is_valid_types_gen.type
list type
Definition: is_valid_types_gen.py:25