File diff r2149:653fa1740f53 → r2150:8d17c2dcd791
economy.c
Show inline comments
 
@@ -766,49 +766,49 @@ static const int32 _price_base[NUM_PRICE
 
void StartupEconomy(void)
 
{
 
	int i;
 

	
 
	assert(sizeof(_price) == NUM_PRICES * sizeof(int32));
 

	
 
	for(i=0; i!=NUM_PRICES; i++) {
 
		int32 price = _price_base[i];
 
		if (_price_category[i] != 0) {
 
			uint mod = _price_category[i] == 1 ? _opt.diff.vehicle_costs : _opt.diff.construction_cost;
 
			if (mod < 1) {
 
				price = price * 3 >> 2;
 
			} else if (mod > 1) {
 
				price = price * 9 >> 3;
 
			}
 
		}
 
		((int32*)&_price)[i] = price;
 
		_price_frac[i] = 0;
 
	}
 

	
 
	_economy.interest_rate = _opt.diff.initial_interest;
 
	_economy.infl_amount = _opt.diff.initial_interest;
 
	_economy.infl_amount_pr = max(0, _opt.diff.initial_interest - 1);
 
	_economy.max_loan_unround = _economy.max_loan = _opt.diff.max_loan * 1000;
 
	_economy.fluct = (byte)(Random()) + 168;
 
	_economy.fluct = GB(Random(), 0, 8) + 168;
 
}
 

	
 
Pair SetupSubsidyDecodeParam(Subsidy *s, bool mode)
 
{
 
	TileIndex tile;
 
	TileIndex tile2;
 
	Pair tp;
 

	
 
	/* if mode is false, convert into plural */
 
	SetDParam(0, _cargoc.names_s[s->cargo_type] + (mode?0:32));
 

	
 
	if (s->age < 12) {
 
		if (!(s->cargo_type == CT_PASSENGERS || s->cargo_type == CT_MAIL)) {
 
			SetDParam(1, STR_INDUSTRY);
 
			SetDParam(2, s->from);
 
			tile = GetIndustry(s->from)->xy;
 

	
 
			if (s->cargo_type != CT_GOODS && s->cargo_type != CT_FOOD) {
 
				SetDParam(4, STR_INDUSTRY);
 
				SetDParam(5, s->to);
 
				tile2 = GetIndustry(s->to)->xy;
 
			} else {
 
				SetDParam(4, STR_TOWN);
 
				SetDParam(5, s->to);