Vanilla-Conquer
Vanilla-Conquer copied to clipboard
Fixes indexing of various Overlapper related loops.
I don't want to refactor the use cases of this array which would be what i'd need to do if i'd introduce the enum. Most of TD codebase will eventually go as it merges with RA's so this is just needless work and pollution.
I don't want to refactor the use cases of this array which would be what i'd need to do if i'd introduce the enum. Most of TD codebase will eventually go as it merges with RA's so this is just needless work and pollution.
You don't need to refactor the use cases. And pollution
in this case is quite subjective. Still, loops like this:
for (int i = 0; i < MAX_OVERLAPPERS; i++)
reads way better than:
for (unsigned i = 0; i < (sizeof(_offsets) / sizeof(_offsets[0]) - 1); i++)
or
for (i = 0; i < ARRAY_SIZE((*this)[cell].CellClass::Overlapper); i++) {
which is flirted with obscurantism.
How does RA handle this in the instances where the TD code has been updated? Or are these bits TD specific logic? I think a macro for the array sizes would make things easier to read, I wasn't a fan of the ARRAY_SIZE macro in the chronoshift days either :D
This is RA's changes ported over