summaryrefslogtreecommitdiff
path: root/jouer.c
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2015-01-07 23:18:11 +0100
committerOlivier Gayot <duskcoder@gmail.com>2015-01-07 23:51:30 +0100
commita50e94bce89f17148b0640909fd9b536c4599d9e (patch)
tree3faf9bf2bb6a9074d357e75c05684843b39ff89d /jouer.c
parent7bb8e452b2f2349ea2fae60eaf69adbcf7a182a8 (diff)
make team blitting and characters highlighting generic
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'jouer.c')
-rw-r--r--jouer.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/jouer.c b/jouer.c
index 802642a..53f93a3 100644
--- a/jouer.c
+++ b/jouer.c
@@ -5,16 +5,16 @@
#include "constantes.h"
#include "prototypes.h"
-static inline void highlight_current_character(struct team_t *ally, int character_idx)
+static inline void highlight_current_character(struct team_t *team, int character_idx)
{
- struct character_t *chr = &ally->chrs[character_idx];
+ struct character_t *chr = &team->chrs[character_idx];
chr->surf = chr->red_surf;
}
-static inline void unhighlight_prev_character(struct team_t *ally, int character_idx)
+static inline void unhighlight_prev_character(struct team_t *team, int character_idx)
{
- struct character_t *chr = &ally->chrs[character_idx];
+ struct character_t *chr = &team->chrs[character_idx];
chr->surf = chr->def_surf;
}
@@ -117,9 +117,9 @@ int Fjouer (SURFACES *surfaces, POSITIONS *positions, struct team_t *ally,ENNEMI
highlight_current_character(ally, Vtourallie);
}
- blit_ally_team(surfaces,positions, ally); // on blit les persos sur l'ecran
Fblitterennemis(surfaces,positions,ennemis,Vnbennemis); // idem pour les ennemis
+ blit_team(surfaces, ally);
while (continuer)
{
@@ -180,7 +180,7 @@ int Fjouer (SURFACES *surfaces, POSITIONS *positions, struct team_t *ally,ENNEMI
if (actionp && (*actionp)(surfaces,positions, ally, Vtourallie,ennemis,Vnbennemis) == ACTION_PERFORMED) {
update_current_character(ally, &Vtourallie, (bool *)&Vtour);
- blit_ally_team(surfaces, positions, ally);
+ blit_team(surfaces, ally);
}
}
break;