ECS improvements!
This commit is contained in:
@@ -8,4 +8,4 @@
|
||||
#include "camera.h"
|
||||
|
||||
camera_t CAMERA_DATA[ECS_ENTITY_COUNT_MAX] = { 0 };
|
||||
ecscomponent_t CAMERA_COMPONENT = ecsComponentInit(CAMERA_DATA);
|
||||
ecscomponent_t CAMERA_COMPONENT = ecsComponentInit(CAMERA_DATA, NULL);
|
||||
|
@@ -20,7 +20,7 @@ extern ecscomponent_t CAMERA_COMPONENT;
|
||||
*
|
||||
* @param id The ID of the entity to initialize the camera for.
|
||||
*/
|
||||
#define cameraAdd(id) ecsComponentDataAdd(&CAMERA_COMPONENT, id)
|
||||
#define cameraAdd(id) ((camera_t*)ecsComponentDataAdd(&CAMERA_COMPONENT, id))
|
||||
|
||||
/**
|
||||
* Gets the camera component data for a specific entity.
|
||||
@@ -28,7 +28,7 @@ extern ecscomponent_t CAMERA_COMPONENT;
|
||||
* @param id The ID of the entity to get the camera data for.
|
||||
* @return Pointer to the camera data for the entity.
|
||||
*/
|
||||
#define cameraGet(id) ecsComponentDataGet(&CAMERA_COMPONENT, id)
|
||||
#define cameraGet(id) ((camera_t*)ecsComponentDataGet(&CAMERA_COMPONENT, id))
|
||||
|
||||
/**
|
||||
* Checks if the camera component has data for a specific entity.
|
||||
|
Reference in New Issue
Block a user