File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change 3
3
4
4
#include < stdint.h>
5
5
6
+ #ifdef __cplusplus
7
+ # define ECSACT_DEPRECATED (Reason ) [[deprecated(Reason)]]
8
+ #else
9
+ # define ECSACT_DEPRECATED (Reason )
10
+ #endif
11
+
12
+ #define ECSACT_INVALID_ID (ID_TYPE ) ((ecsact_##ID_TYPE##_id)(-1 ))
13
+
6
14
#ifdef __cplusplus
7
15
# define ECSACT_TYPED_ID (name ) enum class name : int32_t
8
16
#else
@@ -146,15 +154,21 @@ typedef void (*ecsact_system_execution_impl)(//
146
154
struct ecsact_system_execution_context *
147
155
);
148
156
149
- static const ecsact_system_id ecsact_invalid_system_id = (ecsact_system_id)-1 ;
157
+ ECSACT_DEPRECATED (" use ECSACT_INVALID_ID(system) instead" )
158
+ static const ecsact_system_id ecsact_invalid_system_id =
159
+ ECSACT_INVALID_ID(system);
150
160
161
+ ECSACT_DEPRECATED (" use ECSACT_INVALID_ID(registry) instead" )
151
162
static const ecsact_registry_id ecsact_invalid_registry_id =
152
- (ecsact_registry_id)- 1 ;
163
+ ECSACT_INVALID_ID(registry) ;
153
164
165
+ ECSACT_DEPRECATED (" use ECSACT_INVALID_ID(component) instead" )
154
166
static const ecsact_component_id ecsact_invalid_component_id =
155
- (ecsact_component_id)- 1 ;
167
+ ECSACT_INVALID_ID(component) ;
156
168
157
- static const ecsact_entity_id ecsact_invalid_entity_id = (ecsact_entity_id)-1 ;
169
+ ECSACT_DEPRECATED (" use ECSACT_INVALID_ID(entity) instead" )
170
+ static const ecsact_entity_id ecsact_invalid_entity_id =
171
+ ECSACT_INVALID_ID(entity);
158
172
159
173
/* *
160
174
* Entity is from a generator system.
You can’t perform that action at this time.
0 commit comments