project_files/frontlib/model/team.h
changeset 7230 240620f46dd7
parent 7227 1c859f572d72
child 7269 5b0aeef8ba2a
equal deleted inserted replaced
7227:1c859f572d72 7230:240620f46dd7
    32 
    32 
    33 	int difficulty;
    33 	int difficulty;
    34 
    34 
    35 	// Transient setting used in game setup
    35 	// Transient setting used in game setup
    36 	int initialHealth;
    36 	int initialHealth;
       
    37 	flib_weaponset *weaponset;
    37 } flib_hog;
    38 } flib_hog;
    38 
    39 
    39 typedef struct {
    40 typedef struct {
    40 	flib_hog hogs[HEDGEHOGS_PER_TEAM];
    41 	flib_hog hogs[HEDGEHOGS_PER_TEAM];
    41 	char *name;
    42 	char *name;
    55 
    56 
    56 	// Transient settings used in game setup
    57 	// Transient settings used in game setup
    57 	uint32_t color;
    58 	uint32_t color;
    58 	int hogsInGame;
    59 	int hogsInGame;
    59 	bool remoteDriven;
    60 	bool remoteDriven;
    60 	char *hash; // TODO calculate
    61 	char *hash; // TODO calculate at the appropriate time... i.e. before trying to send the config to the engine
    61 
       
    62 	flib_weaponset *weaponset;
       
    63 } flib_team;
    62 } flib_team;
    64 
    63 
    65 /**
    64 /**
    66  * Returns a new team, or NULL on error. name must not be NULL.
    65  * Returns a new team, or NULL on error. name must not be NULL.
    67  *
    66  *
    83  * The flib_team can handle "difficulty" on a per-hog basis, but it
    82  * The flib_team can handle "difficulty" on a per-hog basis, but it
    84  * is only written per-team in the team file. The difficulty of the
    83  * is only written per-team in the team file. The difficulty of the
    85  * first hog is used for the entire team when writing.
    84  * first hog is used for the entire team when writing.
    86  */
    85  */
    87 int flib_team_to_ini(const char *filename, const flib_team *team);
    86 int flib_team_to_ini(const char *filename, const flib_team *team);
       
    87 
       
    88 /**
       
    89  * Set the same weaponset for every hog in the team
       
    90  */
       
    91 void flib_team_set_weaponset(flib_team *team, flib_weaponset *set);
       
    92 
    88 void flib_team_destroy(flib_team *team);
    93 void flib_team_destroy(flib_team *team);
    89 
    94 
    90 #endif /* TEAM_H_ */
    95 #endif /* TEAM_H_ */