From 9a98118c3d9a062b33134e8354620be43ecf3786 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Thu, 8 Jan 2015 06:02:31 +0100 Subject: improve code and fix numerous bugs Signed-off-by: Olivier Gayot --- constantes.h | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'constantes.h') diff --git a/constantes.h b/constantes.h index d749d37..7e8a897 100644 --- a/constantes.h +++ b/constantes.h @@ -143,8 +143,8 @@ if(clan==ALLIE)\ while(!enemy->chrs[selection].alive) \ selection++;\ inverse_boolean(clan);\ - SDL_BlitSurface (surfaces->Pfondjeu,&positions->Vpositioncurseurallies,surfaces->Pecran,&positions->Vpositioncurseurallies);\ - Fchangercurseurennemis (surfaces,positions, &enemy->chrs[selection]);\ + update_selected_target (surfaces,positions, &enemy->chrs[selection]);\ + SDL_Flip(surfaces->Pecran); \ }\ break;\ case SDLK_LEFT:\ @@ -156,8 +156,8 @@ if(clan==ENNEMI)\ while (!ally->chrs[selection].alive)\ selection++;\ inverse_boolean(clan);\ - SDL_BlitSurface(surfaces->Pfondjeu,&positions->Vpositioncurseurennemis,surfaces->Pecran,&positions->Vpositioncurseurennemis);\ - Fchangercurseurpersos(surfaces,positions,selection);\ + update_selected_target(surfaces,positions, &ally->chrs[selection]);\ + SDL_Flip(surfaces->Pecran); \ }\ break;\ case SDLK_UP:\ @@ -175,7 +175,8 @@ if(clan==ENNEMI)\ else\ selection = enemy->chr_cnt;\ }\ - Fchangercurseurennemis (surfaces,positions, &enemy->chrs[selection]);\ + update_selected_target (surfaces,positions, &enemy->chrs[selection]);\ + SDL_Flip(surfaces->Pecran); \ }\ else\ {\ @@ -190,7 +191,8 @@ else\ else\ selection=2;\ }\ - Fchangercurseurpersos(surfaces,positions,selection); \ + update_selected_target(surfaces,positions, &ally->chrs[selection]); \ + SDL_Flip(surfaces->Pecran); \ }\ break;\ case SDLK_DOWN:\ @@ -207,7 +209,8 @@ if(clan==ENNEMI)\ else\ selection=0;\ }\ - Fchangercurseurennemis(surfaces,positions, &enemy->chrs[selection]); \ + update_selected_target(surfaces,positions, &enemy->chrs[selection]); \ + SDL_Flip(surfaces->Pecran); \ }\ else\ {\ @@ -222,7 +225,8 @@ else\ else\ selection=0;\ }\ - Fchangercurseurpersos(surfaces,positions,selection); \ + update_selected_target(surfaces,positions, &ally->chrs[selection]); \ + SDL_Flip(surfaces->Pecran); \ }\ break; -- cgit v1.2.3