project_files/frontlib/model/weapon.h
changeset 7224 5143861c83bd
parent 7177 bf6cf4dd847a
child 7230 240620f46dd7
equal deleted inserted replaced
7221:8d04e85ca204 7224:5143861c83bd
     5 
     5 
     6 /**
     6 /**
     7  * These values are all in the range 0..9
     7  * These values are all in the range 0..9
     8  *
     8  *
     9  * For loadout, 9 means inifinite ammo.
     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)
    10  * For the other setting, 9 is invalid.
    11  */
    11  */
    12 typedef struct {
    12 typedef struct {
    13 	char loadout[WEAPONS_COUNT+1];
    13 	char loadout[WEAPONS_COUNT+1];
    14 	char crateprob[WEAPONS_COUNT+1];
    14 	char crateprob[WEAPONS_COUNT+1];
    15 	char crateammo[WEAPONS_COUNT+1];
    15 	char crateammo[WEAPONS_COUNT+1];
    23  *
    23  *
    24  * The new weapon set is pre-filled with default
    24  * The new weapon set is pre-filled with default
    25  * settings (see hwconsts.h)
    25  * settings (see hwconsts.h)
    26  */
    26  */
    27 flib_weaponset *flib_weaponset_create(const char *name);
    27 flib_weaponset *flib_weaponset_create(const char *name);
       
    28 
       
    29 /**
       
    30  * Loads a weapon set, returns NULL on error.
       
    31  */
    28 flib_weaponset *flib_weaponset_from_ini(const char *filename);
    32 flib_weaponset *flib_weaponset_from_ini(const char *filename);
       
    33 
       
    34 /**
       
    35  * Write the weapon set to an ini file. Attempts to
       
    36  * retain extra ini settings that were already present.
       
    37  */
    29 int flib_weaponset_to_ini(const char *filename, const flib_weaponset *set);
    38 int flib_weaponset_to_ini(const char *filename, const flib_weaponset *set);
    30 void flib_weaponset_destroy(flib_weaponset *set);
    39 void flib_weaponset_destroy(flib_weaponset *set);
    31 
    40 
    32 #endif
    41 #endif