00001 00006 /* 00007 Copyright (C) 2002-2010 UFO: Alien Invasion. 00008 00009 This program is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU General Public License 00011 as published by the Free Software Foundation; either version 2 00012 of the License, or (at your option) any later version. 00013 00014 This program is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00017 00018 See the GNU General Public License for more details. 00019 00020 You should have received a copy of the GNU General Public License 00021 along with this program; if not, write to the Free Software 00022 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00023 00024 */ 00025 00026 #ifndef CLIENT_CL_MARKET_H 00027 #define CLIENT_CL_MARKET_H 00028 00030 typedef struct market_s { 00031 int numItems[MAX_OBJDEFS]; 00032 int bidItems[MAX_OBJDEFS]; 00033 int askItems[MAX_OBJDEFS]; 00034 double currentEvolutionItems[MAX_OBJDEFS]; 00035 qboolean autosell[MAX_OBJDEFS]; 00036 int numAircraft[AIRCRAFTTYPE_MAX]; 00037 int bidAircraft[AIRCRAFTTYPE_MAX]; 00038 int askAircraft[AIRCRAFTTYPE_MAX]; 00039 double currentEvolutionAircraft[AIRCRAFTTYPE_MAX]; 00040 } market_t; 00041 00042 void BS_AddItemToMarket(const objDef_t *od, int amount); 00043 void BS_RemoveItemFromMarket(const objDef_t *od, int amount); 00044 void BS_AddAircraftToMarket(const aircraft_t *aircraft, int amount); 00045 void BS_RemoveAircraftFromMarket(const aircraft_t *aircraft, int amount); 00046 int BS_GetAircraftOnMarket(const aircraft_t *aircraft); 00047 int BS_GetAircraftSellingPrice(const aircraft_t *aircraft); 00048 int BS_GetAircraftBuyingPrice(const aircraft_t *aircraft); 00049 int BS_GetItemSellingPrice(const objDef_t *od); 00050 int BS_GetItemBuyingPrice(const objDef_t *od); 00051 00052 qboolean BS_CheckAndDoBuyItem(base_t* base, const objDef_t *item, int number); 00053 void BS_ProcessCraftItemSale(const objDef_t *craftitem, const int numItems); 00054 00055 qboolean BS_IsOnMarket(const objDef_t const* item); 00056 void BS_InitMarket(void); 00057 void CL_CampaignRunMarket(void); 00058 00059 #endif /* CLIENT_CL_MARKET_H */