Skip to content

Commit 39e4b62

Browse files
authored
feat: new field index type (#204)
for ecsact-dev/ecsact_parse#123
1 parent 755034e commit 39e4b62

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

ecsact/runtime/definitions.h

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,24 @@ typedef enum ecsact_builtin_type {
3434
ECSACT_ENTITY_TYPE = 0b0010000000100000,
3535
} ecsact_builtin_type;
3636

37+
/**
38+
* Type that refers to another composites field
39+
*/
40+
typedef struct ecsact_field_index_type {
41+
ecsact_composite_id composite_id;
42+
ecsact_field_id field_id;
43+
} ecsact_field_index_type;
44+
3745
typedef enum ecsact_type_kind {
3846
ECSACT_TYPE_KIND_BUILTIN,
3947
ECSACT_TYPE_KIND_ENUM,
48+
ECSACT_TYPE_KIND_FIELD_INDEX,
4049
} ecsact_type_kind;
4150

4251
typedef union ecsact_type {
43-
ecsact_builtin_type builtin;
44-
ecsact_enum_id enum_id;
52+
ecsact_builtin_type builtin;
53+
ecsact_enum_id enum_id;
54+
ecsact_field_index_type field_index;
4555
} ecsact_type;
4656

4757
typedef struct ecsact_field_type {

0 commit comments

Comments
 (0)