2007-12-21 21:50:46 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2009-08-21 20:21:05 +00:00
|
|
|
/*
|
|
|
|
* This file is part of OpenTTD.
|
|
|
|
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
|
|
|
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2007-12-21 21:50:46 +00:00
|
|
|
/** @file economy_func.h Functions related to the economy. */
|
|
|
|
|
|
|
|
#ifndef ECONOMY_FUNC_H
|
|
|
|
#define ECONOMY_FUNC_H
|
|
|
|
|
2007-12-22 23:30:28 +00:00
|
|
|
#include "core/geometry_type.hpp"
|
2007-12-21 21:50:46 +00:00
|
|
|
#include "economy_type.h"
|
2007-12-21 22:50:51 +00:00
|
|
|
#include "cargo_type.h"
|
|
|
|
#include "vehicle_type.h"
|
2007-12-25 23:42:52 +00:00
|
|
|
#include "tile_type.h"
|
2008-01-07 14:02:26 +00:00
|
|
|
#include "town_type.h"
|
|
|
|
#include "industry_type.h"
|
2008-09-30 20:51:04 +00:00
|
|
|
#include "company_type.h"
|
2008-03-28 16:33:28 +00:00
|
|
|
#include "station_type.h"
|
2007-12-21 21:50:46 +00:00
|
|
|
|
|
|
|
void ResetPriceBaseMultipliers();
|
|
|
|
void SetPriceBaseMultiplier(uint price, byte factor);
|
|
|
|
|
|
|
|
extern const ScoreInfo _score_info[];
|
2008-09-30 20:39:50 +00:00
|
|
|
extern int _score_part[MAX_COMPANIES][SCORE_END];
|
2007-12-21 21:50:46 +00:00
|
|
|
extern Economy _economy;
|
|
|
|
/* Prices and also the fractional part. */
|
|
|
|
extern Prices _price;
|
|
|
|
|
2008-09-30 20:39:50 +00:00
|
|
|
int UpdateCompanyRatingAndValue(Company *c, bool update);
|
2009-01-04 15:32:25 +00:00
|
|
|
void StartupIndustryDailyChanges(bool init_counter);
|
2007-12-21 21:50:46 +00:00
|
|
|
|
|
|
|
Money GetTransportedGoodsIncome(uint num_pieces, uint dist, byte transit_days, CargoID cargo_type);
|
2009-08-08 16:42:55 +00:00
|
|
|
uint MoveGoodsToStation(TileIndex tile, int w, int h, CargoID type, uint amount, SourceType source_type, SourceID source_id);
|
2007-12-21 21:50:46 +00:00
|
|
|
|
2009-06-29 19:55:36 +00:00
|
|
|
void PrepareUnload(Vehicle *front_v);
|
2007-12-21 21:50:46 +00:00
|
|
|
void LoadUnloadStation(Station *st);
|
|
|
|
|
2009-11-07 22:47:54 +00:00
|
|
|
Money GetPriceByIndex(Price index);
|
2008-02-21 19:09:10 +00:00
|
|
|
|
2009-09-06 18:53:57 +00:00
|
|
|
void InitializeEconomy();
|
|
|
|
void RecomputePrices();
|
|
|
|
void AddInflation(bool check_year = true);
|
|
|
|
|
2007-12-21 21:50:46 +00:00
|
|
|
#endif /* ECONOMY_FUNC_H */
|