ecs: code reduction
parent
022f3870b8
commit
498fa25e36
|
@ -2,16 +2,9 @@
|
||||||
#include "flecs/flecs.h"
|
#include "flecs/flecs.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
ECS_DECLARE_ENTITY(MoveWalk);
|
// NOTE(zaklaus): Public systems are exposed here
|
||||||
ECS_DECLARE_ENTITY(UpdateTrackerPos);
|
|
||||||
ECS_DECLARE_ENTITY(IntegratePositions);
|
|
||||||
ECS_DECLARE_ENTITY(PushOutOverlappingEntities);
|
|
||||||
} Systems;
|
} Systems;
|
||||||
|
|
||||||
#define SystemsImportHandles(handles)\
|
#define SystemsImportHandles(handles) (void)(handles)
|
||||||
ECS_IMPORT_ENTITY(handles, MoveWalk);\
|
|
||||||
ECS_IMPORT_ENTITY(handles, UpdateTrackerPos);\
|
|
||||||
ECS_IMPORT_ENTITY(handles, IntegratePositions);\
|
|
||||||
ECS_IMPORT_ENTITY(handles, PushOutOverlappingEntities);\
|
|
||||||
|
|
||||||
void SystemsImport(ecs_world_t *ecs);
|
void SystemsImport(ecs_world_t *ecs);
|
||||||
|
|
|
@ -184,10 +184,4 @@ void SystemsImport(ecs_world_t *ecs) {
|
||||||
//ECS_SYSTEM(ecs, PushOutOverlappingEntities, EcsOnValidate, components.Position, Velocity);
|
//ECS_SYSTEM(ecs, PushOutOverlappingEntities, EcsOnValidate, components.Position, Velocity);
|
||||||
|
|
||||||
ECS_SYSTEM(ecs, UpdateTrackerPos, EcsPostUpdate, components.Position);
|
ECS_SYSTEM(ecs, UpdateTrackerPos, EcsPostUpdate, components.Position);
|
||||||
|
|
||||||
|
|
||||||
ECS_SET_ENTITY(MoveWalk);
|
|
||||||
ECS_SET_ENTITY(UpdateTrackerPos);
|
|
||||||
ECS_SET_ENTITY(IntegratePositions);
|
|
||||||
//ECS_SET_ENTITY(PushOutOverlappingEntities);
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue