This function is used to create a component.
dg_entity_t *dg_entity_create(char *name);
dg_entity_t *entity = dg_entity_create("camera");
dg_entity_t *dg_entity_create(char *name)
{
dg_entity_t *entity = malloc(sizeof(dg_entity_t));
if (!entity)
return 0;
entity->name = name;
entity->components = 0;
return entity;
}