Move flecs out of engine, reorganize systems
This commit is contained in:
@@ -10,6 +10,20 @@ extern ECS_TAG_DECLARE(TextureTerrain);
|
||||
extern ECS_TAG_DECLARE(TextureBuildings);
|
||||
extern ECS_TAG_DECLARE(TextureEntities);
|
||||
|
||||
typedef enum ResourceType {
|
||||
RES_IRON,
|
||||
RES_WOOD,
|
||||
RES_GOLD,
|
||||
RES_FOOD,
|
||||
RES_COUNT,
|
||||
} ResourceType;
|
||||
|
||||
typedef struct Resource {
|
||||
ResourceType type;
|
||||
i32 amount;
|
||||
} Resource;
|
||||
extern ECS_COMPONENT_DECLARE(Resource);
|
||||
|
||||
typedef struct TilePosition {
|
||||
BzTile x;
|
||||
BzTile y;
|
||||
@@ -27,34 +41,21 @@ typedef struct Owner {
|
||||
} Owner;
|
||||
extern ECS_COMPONENT_DECLARE(Owner);
|
||||
|
||||
typedef Vector2 Position, Size, TargetPosition, MoveForce;
|
||||
extern ECS_COMPONENT_DECLARE(Position);
|
||||
extern ECS_COMPONENT_DECLARE(Size);
|
||||
extern ECS_COMPONENT_DECLARE(TargetPosition);
|
||||
extern ECS_COMPONENT_DECLARE(MoveForce);
|
||||
|
||||
typedef enum ResourceType {
|
||||
RES_IRON,
|
||||
RES_WOOD,
|
||||
RES_GOLD,
|
||||
RES_FOOD,
|
||||
RES_COUNT,
|
||||
} ResourceType;
|
||||
|
||||
typedef struct Resource {
|
||||
ResourceType type;
|
||||
i32 amount;
|
||||
} Resource;
|
||||
extern ECS_COMPONENT_DECLARE(Resource);
|
||||
|
||||
typedef BzSpatialGridID SpatialGridID;
|
||||
extern ECS_COMPONENT_DECLARE(SpatialGridID);
|
||||
|
||||
typedef f32 Rotation;
|
||||
typedef Vector2 Position, Size, Velocity;
|
||||
extern ECS_COMPONENT_DECLARE(Position);
|
||||
extern ECS_COMPONENT_DECLARE(Size);
|
||||
extern ECS_COMPONENT_DECLARE(Velocity);
|
||||
typedef f32 Rotation, AngularVelocity;
|
||||
extern ECS_COMPONENT_DECLARE(Rotation);
|
||||
|
||||
typedef f32 Health;
|
||||
extern ECS_COMPONENT_DECLARE(Health);
|
||||
extern ECS_COMPONENT_DECLARE(AngularVelocity);
|
||||
typedef struct SteeringOutput {
|
||||
Vector2 linear;
|
||||
f32 angular;
|
||||
} SteeringOutput;
|
||||
extern ECS_COMPONENT_DECLARE(SteeringOutput);
|
||||
|
||||
typedef struct TextureRegion {
|
||||
Texture2D texture;
|
||||
|
||||
Reference in New Issue
Block a user