| 1 |
// ____ _ __ |
| 2 |
// / __ )____ _____ | | / /___ ___________ |
| 3 |
// / __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/ |
| 4 |
// / /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ ) |
| 5 |
// /_____/\____/____/ |__/|__/\__,_/_/ /____/ |
| 6 |
// |
| 7 |
// A futuristic real-time strategy game. |
| 8 |
// This file is part of Bos Wars. |
| 9 |
// |
| 10 |
/**@name upgrade.h - The upgrades headerfile. */ |
| 11 |
// |
| 12 |
// (c) Copyright 1999-2007 by Vladi Belperchinov-Shabanski and Jimmy Salmon |
| 13 |
// |
| 14 |
// This program is free software; you can redistribute it and/or modify |
| 15 |
// it under the terms of the GNU General Public License as published by |
| 16 |
// the Free Software Foundation; only version 2 of the License. |
| 17 |
// |
| 18 |
// This program is distributed in the hope that it will be useful, |
| 19 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 21 |
// GNU General Public License for more details. |
| 22 |
// |
| 23 |
// You should have received a copy of the GNU General Public License |
| 24 |
// along with this program; if not, write to the Free Software |
| 25 |
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 26 |
// 02111-1307, USA. |
| 27 |
|
| 28 |
#ifndef __UPGRADE_H__ |
| 29 |
#define __UPGRADE_H__ |
| 30 |
|
| 31 |
//@{ |
| 32 |
|
| 33 |
/*---------------------------------------------------------------------------- |
| 34 |
-- Declarations |
| 35 |
----------------------------------------------------------------------------*/ |
| 36 |
|
| 37 |
class CFile; |
| 38 |
class CPlayer; |
| 39 |
|
| 40 |
/*---------------------------------------------------------------------------- |
| 41 |
-- General/Map functions |
| 42 |
----------------------------------------------------------------------------*/ |
| 43 |
|
| 44 |
/// save the upgrades |
| 45 |
extern void SaveUpgrades(CFile *file); |
| 46 |
|
| 47 |
/// Register CCL features for upgrades |
| 48 |
extern void UpgradesCclRegister(void); |
| 49 |
|
| 50 |
// AllowStruct will be static in the player so will be |
| 51 |
// load/saved with the player struct |
| 52 |
|
| 53 |
extern int UnitTypeIdByIdent(const std::string &sid); |
| 54 |
|
| 55 |
/*---------------------------------------------------------------------------- |
| 56 |
-- Allow(s) |
| 57 |
----------------------------------------------------------------------------*/ |
| 58 |
|
| 59 |
// all the following functions are just map handlers, no specific notes |
| 60 |
// id -- unit type id, af -- `A'llow/`F'orbid |
| 61 |
|
| 62 |
extern int UnitIdAllowed(const CPlayer *player, int id); |
| 63 |
|
| 64 |
//@} |
| 65 |
|
| 66 |
#endif // !__UPGRADE_H__ |