cssdm_weapons.h
changeset 0 67dcd379a2d5
child 4 6db3288d2e63
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/cssdm_weapons.h	Sun Jun 24 21:58:09 2007 +0000
     1.3 @@ -0,0 +1,57 @@
     1.4 +/**
     1.5 + * vim: set ts=4 :
     1.6 + * ===============================================================
     1.7 + * CS:S DM, Copyright (C) 2004-2007 AlliedModders LLC. 
     1.8 + * By David "BAILOPAN" Anderson
     1.9 + * All rights reserved.
    1.10 + * ===============================================================
    1.11 + *
    1.12 + * This program is free software; you can redistribute it and/or modify
    1.13 + * it under the terms of the GNU General Public License as published by
    1.14 + * the Free Software Foundation; either version 2 of the License, or (at
    1.15 + * your option) any later version.
    1.16 + * 
    1.17 + * This program is distributed in the hope that it will be useful, but
    1.18 + * WITHOUT ANY WARRANTY; without even the implied warranty of
    1.19 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.20 + * General Public License for more details.
    1.21 + * 
    1.22 + * You should have received a copy of the GNU General Public License
    1.23 + * along with this program; see the file COPYING; if not, write to the
    1.24 + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
    1.25 + * MA 02110-1301 USA
    1.26 + * 
    1.27 + * Version: $Id$
    1.28 + */
    1.29 +
    1.30 +#ifndef _INCLUDE_CSSDM_WEAPONS_H_
    1.31 +#define _INCLUDE_CSSDM_WEAPONS_H_
    1.32 +
    1.33 +enum WeaponType
    1.34 +{
    1.35 +	WeaponType_Invalid = -1,
    1.36 +	WeaponType_Primary = 0,
    1.37 +	WeaponType_Secondary = 1,
    1.38 +	WeaponType_Grenade = 3,
    1.39 +	WeaponType_C4 = 4,
    1.40 +};
    1.41 +
    1.42 +struct dm_weapon_t
    1.43 +{
    1.44 +	char *classname;
    1.45 +	char *display;
    1.46 +	WeaponType type;
    1.47 +	int ammoType;
    1.48 +	int maxCarry;
    1.49 +	int id;
    1.50 +};
    1.51 +
    1.52 +/* External API */
    1.53 +dm_weapon_t *DM_FindWeapon(const char *name);
    1.54 +dm_weapon_t *DM_GetWeapon(unsigned int index);
    1.55 +
    1.56 +/* Internal API */
    1.57 +bool DM_ParseWeapons(char *error, size_t maxlength);
    1.58 +void DM_FreeWeapons();
    1.59 +
    1.60 +#endif //_INCLUDE_CSSDM_WEAPONS_H_