UFO: Alien Invasion
Loading...
Searching...
No Matches
cp_market.h
Go to the documentation of this file.
1
5
6/*
7Copyright (C) 2002-2025 UFO: Alien Invasion.
8
9This program is free software; you can redistribute it and/or
10modify it under the terms of the GNU General Public License
11as published by the Free Software Foundation; either version 2
12of the License, or (at your option) any later version.
13
14This program is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
18See the GNU General Public License for more details.
19
20You should have received a copy of the GNU General Public License
21along with this program; if not, write to the Free Software
22Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23*/
24
25#pragma once
26
39
40bool BS_AircraftIsOnMarket(const aircraft_t* aircraft);
41int BS_GetAircraftOnMarket(const aircraft_t* aircraft);
42int BS_GetAircraftSellingPrice(const aircraft_t* aircraft);
43int BS_GetAircraftBuyingPrice(const aircraft_t* aircraft);
44bool BS_BuyAircraft(const aircraft_t* aircraftTemplate, base_t* base);
45bool BS_SellAircraft(aircraft_t* aircraft);
46
47bool BS_IsOnMarket(const objDef_t* item);
48int BS_GetItemOnMarket(const objDef_t* od);
49void BS_AddItemToMarket(const objDef_t* od, int amount);
50int BS_GetItemSellingPrice(const objDef_t* od);
51int BS_GetItemBuyingPrice(const objDef_t* od);
52bool BS_BuyItem(const objDef_t* od, base_t* base, int count);
53bool BS_SellItem(const objDef_t* od, base_t* base, int count);
54
55bool BS_BuyUGV(const ugv_t* ugv, base_t* base);
56bool BS_SellUGV(Employee* robot);
57
58void BS_InitMarket(const struct campaign_s* campaign);
59void CP_CampaignRunMarket(struct campaign_s* campaign);
int BS_GetItemBuyingPrice(const objDef_t *od)
Get the price for an item that you want to buy on the market.
int BS_GetAircraftOnMarket(const aircraft_t *aircraft)
Get the number of aircraft of the given type on the market.
int BS_GetItemSellingPrice(const objDef_t *od)
Get the price for an item that you want to sell on the market.
Definition cp_market.cpp:90
bool BS_AircraftIsOnMarket(const aircraft_t *aircraft)
Checks whether a given aircraft should appear on the market.
void CP_CampaignRunMarket(struct campaign_s *campaign)
int BS_GetItemOnMarket(const objDef_t *od)
Get the number of items of the given type on the market.
Definition cp_market.cpp:53
int BS_GetAircraftSellingPrice(const aircraft_t *aircraft)
Get the price for an aircraft that you want to sell on the market.
bool BS_SellUGV(Employee *robot)
Sells the given UGV with all the equipment.
bool BS_BuyUGV(const ugv_t *ugv, base_t *base)
Buys the given UGV.
void BS_AddItemToMarket(const objDef_t *od, int amount)
Internal function to add items to the market.
Definition cp_market.cpp:64
bool BS_SellAircraft(aircraft_t *aircraft)
Sells the given aircraft with all the equipment.
void BS_InitMarket(const struct campaign_s *campaign)
int BS_GetAircraftBuyingPrice(const aircraft_t *aircraft)
Get the price for an aircraft that you want to buy on the market.
bool BS_SellItem(const objDef_t *od, base_t *base, int count)
Sells items from the market.
bool BS_BuyItem(const objDef_t *od, base_t *base, int count)
Buys items from the market.
bool BS_IsOnMarket(const objDef_t *item)
Check if an item is on market.
Definition cp_market.cpp:42
bool BS_BuyAircraft(const aircraft_t *aircraftTemplate, base_t *base)
Buys an aircraft.
#define AIRCRAFTTYPE_MAX
Definition inv_shared.h:34
#define MAX_OBJDEFS
Definition inv_shared.h:37
QGL_EXTERN GLuint count
Definition r_gl.h:99
An aircraft with all it's data.
A base with all it's data.
Definition cp_base.h:84
int numItems[MAX_OBJDEFS]
Definition cp_market.h:29
int bidAircraft[AIRCRAFTTYPE_MAX]
Definition cp_market.h:35
int numAircraft[AIRCRAFTTYPE_MAX]
Definition cp_market.h:34
int askAircraft[AIRCRAFTTYPE_MAX]
Definition cp_market.h:36
bool autosell[MAX_OBJDEFS]
Definition cp_market.h:33
int askItems[MAX_OBJDEFS]
Definition cp_market.h:31
double currentEvolutionAircraft[AIRCRAFTTYPE_MAX]
Definition cp_market.h:37
double currentEvolutionItems[MAX_OBJDEFS]
Definition cp_market.h:32
int bidItems[MAX_OBJDEFS]
Definition cp_market.h:30
Defines all attributes of objects used in the inventory.
Definition inv_shared.h:264
Defines a type of UGV/Robot.
Definition chr_shared.h:245