diff options
author | Olivier Gayot <duskcoder@gmail.com> | 2015-01-07 22:38:45 +0100 |
---|---|---|
committer | Olivier Gayot <duskcoder@gmail.com> | 2015-01-07 23:31:26 +0100 |
commit | 8218792cbbd00da3530826330270a20906fefad5 (patch) | |
tree | 1a3d2cec03feeba3cab9fe376129258e134abb52 | |
parent | 2612e584f6aab4515c7da5a7a6ea005d0e8344ba (diff) |
add the warrior gobelin as a real class
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
-rw-r--r-- | main.c | 3 | ||||
-rw-r--r-- | menuchoixpersos.c | 4 | ||||
-rw-r--r-- | players.c | 6 | ||||
-rw-r--r-- | structures.h | 2 |
4 files changed, 15 insertions, 0 deletions
@@ -214,6 +214,7 @@ int Fchargerimages (SURFACES *surfaces) int i; LOAD_IMAGE(Pgobelin, "images/gobelin.bmp"); + LOAD_IMAGE(red_warrior_gobelin, "images/gobelin.bmp"); LOAD_IMAGE(Ppaladin, "images/paladin.bmp"); LOAD_IMAGE(Ppretre, "images/pretre.bmp"); LOAD_IMAGE(Pvoleur, "images/voleur.bmp"); @@ -242,6 +243,7 @@ int Fchargerimages (SURFACES *surfaces) //définition de la transparence alpha dans les surfaces SDL_SetColorKey(surfaces->Pgobelin,SDL_SRCCOLORKEY,SDL_MapRGB(surfaces->Pecran->format,0,255,18)); + SDL_SetColorKey(surfaces->red_warrior_gobelin, SDL_SRCCOLORKEY,SDL_MapRGB(surfaces->Pecran->format,0,255,18)); SDL_SetColorKey(surfaces->Ppretre,SDL_SRCCOLORKEY,SDL_MapRGB(surfaces->Pecran->format,39,189,31)); SDL_SetColorKey(surfaces->Ppaladin,SDL_SRCCOLORKEY,SDL_MapRGB(surfaces->Pecran->format,189,31,31)); @@ -266,6 +268,7 @@ void Fdechargerimages (SURFACES *surfaces)//dechargement des surfaces alouées int i; SDL_FreeSurface(surfaces->Pecran); SDL_FreeSurface (surfaces->Pgobelin); + SDL_FreeSurface(surfaces->red_warrior_gobelin); SDL_FreeSurface (surfaces->Ppaladin); SDL_FreeSurface (surfaces->Ppretre); diff --git a/menuchoixpersos.c b/menuchoixpersos.c index 05e1a0a..ef8b8a1 100644 --- a/menuchoixpersos.c +++ b/menuchoixpersos.c @@ -41,6 +41,10 @@ struct team_t *new_ally_team(SURFACES *surfaces, chr->def_surf = surfaces->Pvoleur; chr->red_surf = surfaces->red_thief; break; + case CLASS_WARRIOR_GOBELIN: + chr->def_surf = surfaces->Pgobelin; + chr->red_surf = surfaces->red_warrior_gobelin; + break; default: abort(); } @@ -22,5 +22,11 @@ struct stats_base_class_t base_stats_g[CLASS_CNT] = { .magic = 11, .defense = 15, .spirit = 15, + }, [CLASS_WARRIOR_GOBELIN] = { + .hp = 1000, + .mp = 0, + .strength = 15, + .magic = 0, + .defense = 10, }, }; diff --git a/structures.h b/structures.h index 1339a5f..b0f5b3b 100644 --- a/structures.h +++ b/structures.h @@ -5,7 +5,9 @@ typedef struct surfaces SURFACES; struct surfaces { SDL_Surface *Pecran; + SDL_Surface *Pgobelin; + SDL_Surface *red_warrior_gobelin; SDL_Surface *Ppaladin; SDL_Surface *Ppretre; |