project_files/frontlib/model/weapon.h
changeset 7177 bf6cf4dd847a
child 7224 5143861c83bd
equal deleted inserted replaced
7175:038e3415100a 7177:bf6cf4dd847a
       
     1 #ifndef MODEL_WEAPON_H_
       
     2 #define MODEL_WEAPON_H_
       
     3 
       
     4 #include "../hwconsts.h"
       
     5 
       
     6 /**
       
     7  * These values are all in the range 0..9
       
     8  *
       
     9  * For loadout, 9 means inifinite ammo.
       
    10  * For the other setting, 9 might actually be invalid, it's not possible to set more than 8 in the QtFrontend. (TODO)
       
    11  */
       
    12 typedef struct {
       
    13 	char loadout[WEAPONS_COUNT+1];
       
    14 	char crateprob[WEAPONS_COUNT+1];
       
    15 	char crateammo[WEAPONS_COUNT+1];
       
    16 	char delay[WEAPONS_COUNT+1];
       
    17 	char *name;
       
    18 } flib_weaponset;
       
    19 
       
    20 /**
       
    21  * Returns a new weapon set, or NULL on error.
       
    22  * name must not be NULL.
       
    23  *
       
    24  * The new weapon set is pre-filled with default
       
    25  * settings (see hwconsts.h)
       
    26  */
       
    27 flib_weaponset *flib_weaponset_create(const char *name);
       
    28 flib_weaponset *flib_weaponset_from_ini(const char *filename);
       
    29 int flib_weaponset_to_ini(const char *filename, const flib_weaponset *set);
       
    30 void flib_weaponset_destroy(flib_weaponset *set);
       
    31 
       
    32 #endif