# economy_func.h

Go to the documentation of this file.

    00001 /* $Id$ */
    00002
    00003 /*
    00004  * This file is part of OpenTTD.
    00005  * 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.
    00006  * 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.
    00007  * 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/>.
    00008  */
    00009
    00012 #ifndef ECONOMY_FUNC_H
    00013 #define ECONOMY_FUNC_H
    00014
    00015 #include "core/geometry_type.hpp"
    00016 #include "economy_type.h"
    00017 #include "cargo_type.h"
    00018 #include "vehicle_type.h"
    00019 #include "tile_type.h"
    00020 #include "town_type.h"
    00021 #include "industry_type.h"
    00022 #include "company_type.h"
    00023 #include "station_type.h"
    00024 #include "station_func.h"
    00025
    00026 void ResetPriceBaseMultipliers();
    00027 void SetPriceBaseMultiplier(Price price, int factor);
    00028
    00029 extern const ScoreInfo _score_info[];
    00030 extern int _score_part[MAX_COMPANIES][SCORE_END];
    00031 extern Economy _economy;
    00032 /* Prices and also the fractional part. */
    00033 extern Prices _price;
    00034
    00035 int UpdateCompanyRatingAndValue(Company *c, bool update);
    00036 void StartupIndustryDailyChanges(bool init_counter);
    00037
    00038 Money GetTransportedGoodsIncome(uint num_pieces, uint dist, byte transit_days, CargoID cargo_type);
    00039 uint MoveGoodsToStation(CargoID type, uint amount, SourceType source_type, SourceID source_id, const StationList *all_stations);
    00040
    00041 void PrepareUnload(Vehicle *front_v);
    00042 void LoadUnloadStation(Station *st);
    00043
    00044 Money GetPrice(Price index, uint cost_factor, const struct GRFFile *grf_file, int shift = 0);
    00045
    00046 void InitializeEconomy();
    00047 void RecomputePrices();
    00048 void AddInflation(bool check_year = true);
    00049
    00050 #endif /* ECONOMY_FUNC_H */