This function is used to add a component at an entity.
void dg_entity_add_component(dg_entity_t *entity, dg_component_t *component);
dg_entity_add_component(entity, dg_cpt_sprite);
void dg_entity_add_component(dg_entity_t *entity, dg_component_t *component)
{
if (!entity || !component)
return;
dg_arr_add_begin(&(entity->components), component);
}