Skip to content

Commit

Permalink
feat: new field index type (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
zaucy authored Oct 1, 2023
1 parent 755034e commit 39e4b62
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions ecsact/runtime/definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,24 @@ typedef enum ecsact_builtin_type {
ECSACT_ENTITY_TYPE = 0b0010000000100000,
} ecsact_builtin_type;

/**
* Type that refers to another composites field
*/
typedef struct ecsact_field_index_type {
ecsact_composite_id composite_id;
ecsact_field_id field_id;
} ecsact_field_index_type;

typedef enum ecsact_type_kind {
ECSACT_TYPE_KIND_BUILTIN,
ECSACT_TYPE_KIND_ENUM,
ECSACT_TYPE_KIND_FIELD_INDEX,
} ecsact_type_kind;

typedef union ecsact_type {
ecsact_builtin_type builtin;
ecsact_enum_id enum_id;
ecsact_builtin_type builtin;
ecsact_enum_id enum_id;
ecsact_field_index_type field_index;
} ecsact_type;

typedef struct ecsact_field_type {
Expand Down

0 comments on commit 39e4b62

Please sign in to comment.