src/economy_func.h
author rubidium
Fri, 04 Jul 2008 19:00:11 +0000
changeset 11118 f66e0a4ce878
parent 9265 3988d0156a49
permissions -rw-r--r--
(svn r13676) -Fix [FS#2126]: inactive companies from old (TTD) saves could be marked active in some cases, which then loads garbage in their statistics and such.
2186
461a2aff3486 (svn r2701) Insert Id tags into all source files
tron
parents: 1977
diff changeset
     1
/* $Id$ */
461a2aff3486 (svn r2701) Insert Id tags into all source files
tron
parents: 1977
diff changeset
     2
8612
6414fc21c2f3 (svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents: 7814
diff changeset
     3
/** @file economy_func.h Functions related to the economy. */
6451
7baba06b4b85 (svn r8862) -Cleanup: doxygen changes, again. Mostly @files missing tags and a few comments style.
belugas
parents: 5838
diff changeset
     4
8612
6414fc21c2f3 (svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents: 7814
diff changeset
     5
#ifndef ECONOMY_FUNC_H
6414fc21c2f3 (svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents: 7814
diff changeset
     6
#define ECONOMY_FUNC_H
6414fc21c2f3 (svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents: 7814
diff changeset
     7
8617
931e0970d509 (svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents: 8615
diff changeset
     8
#include "core/geometry_type.hpp"
8612
6414fc21c2f3 (svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents: 7814
diff changeset
     9
#include "economy_type.h"
8615
6b91ca653bad (svn r11680) -Codechange: refactor more out of openttd.h and functions.h.
rubidium
parents: 8612
diff changeset
    10
#include "cargo_type.h"
6b91ca653bad (svn r11680) -Codechange: refactor more out of openttd.h and functions.h.
rubidium
parents: 8612
diff changeset
    11
#include "vehicle_type.h"
8634
5ffca02f9115 (svn r11700) -Codechange: reduce the amount of unnecessary includes.
rubidium
parents: 8617
diff changeset
    12
#include "tile_type.h"
8709
4187ad809fe7 (svn r11776) -Codechange: more header splittings to reduce the dependencies.
rubidium
parents: 8634
diff changeset
    13
#include "town_type.h"
4187ad809fe7 (svn r11776) -Codechange: more header splittings to reduce the dependencies.
rubidium
parents: 8634
diff changeset
    14
#include "industry_type.h"
8750
fdd6054e7bae (svn r11818) -Codechange: split player.h into smaller pieces.
rubidium
parents: 8709
diff changeset
    15
#include "player_type.h"
9265
3988d0156a49 (svn r12468) -Codechange: move some type related stuff from station.h (and openttd.h) to station_type.h.
rubidium
parents: 9122
diff changeset
    16
#include "station_type.h"
8612
6414fc21c2f3 (svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents: 7814
diff changeset
    17
6414fc21c2f3 (svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents: 7814
diff changeset
    18
struct Player;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    19
6573
7624f942237f (svn r9050) -Codechange: Foo(void) -> Foo()
rubidium
parents: 6451
diff changeset
    20
void ResetPriceBaseMultipliers();
2508
c1a1af1920ce (svn r3034) -NewGRF: Improve error checking of setting price bases.
peter1138
parents: 2506
diff changeset
    21
void SetPriceBaseMultiplier(uint price, byte factor);
2506
777ac2d9a98a (svn r3032) -NewGRF, Feature: Add support for changing base prices.
peter1138
parents: 2261
diff changeset
    22
2261
3f78323707bb (svn r2781) Fix some of the issues with variables in .h files.
ludde
parents: 2186
diff changeset
    23
extern const ScoreInfo _score_info[];
5838
9c3129cb019b (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents: 5726
diff changeset
    24
extern int _score_part[MAX_PLAYERS][SCORE_END];
8612
6414fc21c2f3 (svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents: 7814
diff changeset
    25
extern Economy _economy;
6414fc21c2f3 (svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents: 7814
diff changeset
    26
extern Subsidy _subsidies[MAX_PLAYERS];
6414fc21c2f3 (svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents: 7814
diff changeset
    27
/* Prices and also the fractional part. */
6414fc21c2f3 (svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents: 7814
diff changeset
    28
extern Prices _price;
6414fc21c2f3 (svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents: 7814
diff changeset
    29
extern uint16 _price_frac[NUM_PRICES];
8615
6b91ca653bad (svn r11680) -Codechange: refactor more out of openttd.h and functions.h.
rubidium
parents: 8612
diff changeset
    30
extern Money  _cargo_payment_rates[NUM_CARGO];
6b91ca653bad (svn r11680) -Codechange: refactor more out of openttd.h and functions.h.
rubidium
parents: 8612
diff changeset
    31
extern uint16 _cargo_payment_rates_frac[NUM_CARGO];
116
ca4332a9ec1d (svn r117) Feature: Performance details window in company league menu (TrueLight)
dominik
parents: 0
diff changeset
    32
147
d0c8100d18cf (svn r148) -Feature: Company HQ can now be moved somewhere else (cost 1% of company value). Water floods HQ.
darkvater
parents: 116
diff changeset
    33
int UpdateCompanyRatingAndValue(Player *p, bool update);
7814
fe643468ad64 (svn r10673) -Cleanup: some assorted style cleanups. Primarily type* var -> type *var.
rubidium
parents: 7740
diff changeset
    34
Pair SetupSubsidyDecodeParam(const Subsidy *s, bool mode);
5566
02b1ecccc540 (svn r7563) -Fix (FS#468): removing towns in the scenario editor could leave subsidies with that town as source/destination, resulting in an assertion when displaying the Subsidies Window.
rubidium
parents: 4077
diff changeset
    35
void DeleteSubsidyWithTown(TownID index);
02b1ecccc540 (svn r7563) -Fix (FS#468): removing towns in the scenario editor could leave subsidies with that town as source/destination, resulting in an assertion when displaying the Subsidies Window.
rubidium
parents: 4077
diff changeset
    36
void DeleteSubsidyWithIndustry(IndustryID index);
02b1ecccc540 (svn r7563) -Fix (FS#468): removing towns in the scenario editor could leave subsidies with that town as source/destination, resulting in an assertion when displaying the Subsidies Window.
rubidium
parents: 4077
diff changeset
    37
void DeleteSubsidyWithStation(StationID index);
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    38
7450
4034e2193a9e (svn r10209) -Fix/Codechange: forgot a few changes of int32 -> Money in the previous commit
rubidium
parents: 7112
diff changeset
    39
Money GetTransportedGoodsIncome(uint num_pieces, uint dist, byte transit_days, CargoID cargo_type);
6676
30aea9ac89bc (svn r9388) -Codechange: variable scope and type, and standardify all CargoID loops.
peter1138
parents: 6574
diff changeset
    40
uint MoveGoodsToStation(TileIndex tile, int w, int h, CargoID type, uint amount);
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    41
7061
81d3a68972b5 (svn r9770) -Codechange: perform the payment of cargo when loading/unloading, but when arriving at the station.
rubidium
parents: 6676
diff changeset
    42
void VehiclePayment(Vehicle *front_v);
7112
fcac9e881b43 (svn r9836) -Codechange: make non-improved loading happen FIFO-ish; generally loading/unloading will happen fifo, but there are no guarantees on the FIFO-ness. For (better) FIFO guarantees you still need to use improved loading.
rubidium
parents: 7061
diff changeset
    43
void LoadUnloadStation(Station *st);
7061
81d3a68972b5 (svn r9770) -Codechange: perform the payment of cargo when loading/unloading, but when arriving at the station.
rubidium
parents: 6676
diff changeset
    44
9122
bc3651767850 (svn r12209) -Fix: [NewGRF] Support using any base price for rail and road vehicles' running cost, and show running cost of wagons if they have it.
peter1138
parents: 8750
diff changeset
    45
Money GetPriceByIndex(uint8 index);
bc3651767850 (svn r12209) -Fix: [NewGRF] Support using any base price for rail and road vehicles' running cost, and show running cost of wagons if they have it.
peter1138
parents: 8750
diff changeset
    46
8612
6414fc21c2f3 (svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents: 7814
diff changeset
    47
#endif /* ECONOMY_FUNC_H */