diff options
-rw-r--r-- | blits.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -294,12 +294,12 @@ void blit_character_affinities(SURFACES *surfaces, POSITIONS *positions, const s AFFINITY_ABSORPTION, }; - for (enum element_t elmt = 0; elmt < ELEMENT_COUNT; ++elmt) { - for (int i = 0; i < countof(affinities); ++i) { + for (int i = 0; i < countof(affinities); ++i) { + for (enum element_t elmt = 0; elmt < ELEMENT_COUNT; ++elmt) { if (chr->affinities[elmt] == affinities[i]) { - SDL_BlitSurface (surfaces->Pactive,NULL,surfaces->Pecran,&positions->Vpositionactivedesactive[i + elmt * countof(affinities)]); + SDL_BlitSurface (surfaces->Pactive,NULL,surfaces->Pecran,&positions->Vpositionactivedesactive[i * ELEMENT_COUNT + elmt]); } else { - SDL_BlitSurface (surfaces->Pdesactive,NULL,surfaces->Pecran,&positions->Vpositionactivedesactive[i + elmt * countof(affinities)]); + SDL_BlitSurface (surfaces->Pdesactive,NULL,surfaces->Pecran,&positions->Vpositionactivedesactive[i * ELEMENT_COUNT + elmt]); } } } |