I'm trying to figure out where most of the slowdown is coming from in my code, and I noticed that there's a whole lot of unnecessary looping going on, even though it's not doing any processing during it.
Basically, would this be a significant source of slowdown if most of the EnemyStructArray was empty?
void Enemies(){
for(x=0;x<100;x++){
switch(EnemyStructArray[x].ID){
case 0:
case 1: A;
Hundred;
Lines;
Of;
Code;
}
}
}
And if so, would this be faster?
void Enemies(){
for(x=0;x<100;x++){
switch(EnemyStructArray[x].ID){
case 0:
case 1: Enemy1AI(x);
}
}
}
void Enemy1AI(int EnemyStructArraySlot){
A;
Hundred;
Lines;
Of;
Code;
}