This function is used to check if the needed components are in the entity.
int dg_system_require(dg_entity_t *entity, unsigned int len, ...);
if (!dg_system_require(entity, 3, "pos", "sprite", "texture")) return;
int dg_system_require(dg_entity_t *entity, unsigned int len, ...)
{
va_list arg;
unsigned int test = 0;
va_start(arg, len);
for (int i = 0; i < len; i++) {
if (dg_entity_has_component(entity, va_arg(arg, char *)) >= 0)
test++;
}
if (test == len)
return 1;
return 0;
}