summaryrefslogtreecommitdiff
path: root/blits.c
diff options
context:
space:
mode:
Diffstat (limited to 'blits.c')
-rw-r--r--blits.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/blits.c b/blits.c
index 24bdd93..23913d8 100644
--- a/blits.c
+++ b/blits.c
@@ -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]);
}
}
}