Files
@ r4962:2ff3f433591e
Branch filter:
Location: cpp/openttd-patchpack/source/economy.h - annotation
r4962:2ff3f433591e
1.7 KiB
text/x-c
(svn r6961) -Codechange: Remove relic from r212 WWT_NODISTXTBTN which was originally used to not
to allow clicking if a button was disabled. This has been superseded in r212 with
general code that doesn't allow any click events for disabled buttons.
to allow clicking if a button was disabled. This has been superseded in r212 with
general code that doesn't allow any click events for disabled buttons.
r2186:5ee653b1b5e1 r2186:5ee653b1b5e1 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r2506:85d8b779563a r2508:f51627d1c095 r2506:85d8b779563a r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r3344:abc4ac7cb74a r0:d63b455452f6 r3346:134319cc6f99 r820:b2b538ba23ae r820:b2b538ba23ae r0:d63b455452f6 r0:d63b455452f6 r0:d63b455452f6 r116:e56e45d1abc8 r4077:259c4c4aacad r4077:259c4c4aacad r4077:259c4c4aacad r4077:259c4c4aacad r4077:259c4c4aacad r4077:259c4c4aacad r4077:259c4c4aacad r4077:259c4c4aacad r4077:259c4c4aacad r4077:259c4c4aacad r116:e56e45d1abc8 r4077:259c4c4aacad r193:6aa65dc5a4b4 r4077:259c4c4aacad r4077:259c4c4aacad r116:e56e45d1abc8 r116:e56e45d1abc8 r116:e56e45d1abc8 r4077:259c4c4aacad r4077:259c4c4aacad r4077:259c4c4aacad r116:e56e45d1abc8 r116:e56e45d1abc8 r2261:e6fb9fd7ed61 r2261:e6fb9fd7ed61 r116:e56e45d1abc8 r147:612ed080a7f6 r116:e56e45d1abc8 r0:d63b455452f6 r2630:73464cd368d6 r820:b2b538ba23ae r820:b2b538ba23ae r0:d63b455452f6 r3344:abc4ac7cb74a r1977:1f8b99c96041 r0:d63b455452f6 r0:d63b455452f6 | /* $Id$ */
#ifndef ECONOMY_H
#define ECONOMY_H
void ResetPriceBaseMultipliers(void);
void SetPriceBaseMultiplier(uint price, byte factor);
typedef struct {
// Maximum possible loan
int32 max_loan;
int32 max_loan_unround;
// Economy fluctuation status
int fluct;
// Interest
byte interest_rate;
byte infl_amount;
byte infl_amount_pr;
} Economy;
VARDEF Economy _economy;
typedef struct Subsidy {
CargoID cargo_type;
byte age;
/* from and to can either be TownID, StationID or IndustryID */
uint16 from;
uint16 to;
} Subsidy;
enum {
SCORE_VEHICLES = 0,
SCORE_STATIONS = 1,
SCORE_MIN_PROFIT = 2,
SCORE_MIN_INCOME = 3,
SCORE_MAX_INCOME = 4,
SCORE_DELIVERED = 5,
SCORE_CARGO = 6,
SCORE_MONEY = 7,
SCORE_LOAN = 8,
SCORE_TOTAL = 9, // This must always be the last entry
NUM_SCORE = 10, // How many scores are there..
SCORE_MAX = 1000 // The max score that can be in the performance history
// the scores together of score_info is allowed to be more!
};
typedef struct ScoreInfo {
byte id; // Unique ID of the score
int needed; // How much you need to get the perfect score
int score; // How much score it will give
} ScoreInfo;
extern const ScoreInfo _score_info[];
extern int _score_part[MAX_PLAYERS][NUM_SCORE];
int UpdateCompanyRatingAndValue(Player *p, bool update);
VARDEF Subsidy _subsidies[MAX_PLAYERS];
Pair SetupSubsidyDecodeParam(const Subsidy* s, bool mode);
void DeleteSubsidyWithIndustry(uint16 index);
void DeleteSubsidyWithStation(uint16 index);
int32 GetTransportedGoodsIncome(uint num_pieces, uint dist, byte transit_days, CargoID cargo_type);
uint MoveGoodsToStation(TileIndex tile, int w, int h, int type, uint amount);
#endif /* ECONOMY_H */
|