diff options
author | Olivier Gayot <duskcoder@gmail.com> | 2015-01-08 06:02:31 +0100 |
---|---|---|
committer | Olivier Gayot <duskcoder@gmail.com> | 2015-01-08 06:02:31 +0100 |
commit | 9a98118c3d9a062b33134e8354620be43ecf3786 (patch) | |
tree | ee04aa9b65a401a720e387439b8180578ee8cbfe /constantes.h | |
parent | c1e13470835e18ac0077bf77ce8f77db07144bcf (diff) |
improve code and fix numerous bugs
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'constantes.h')
-rw-r--r-- | constantes.h | 20 |
1 files changed, 12 insertions, 8 deletions
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; |