File diff r13023:9f6499c8d4fb → r13024:48c81d0b078a
src/economy.cpp
Show inline comments
 
@@ -281,7 +281,7 @@ int UpdateCompanyRatingAndValue(Company 
 
		c->old_economy[0].company_value = CalculateCompanyValue(c);
 
	}
 

	
 
	InvalidateWindow(WC_PERFORMANCE_DETAIL, 0);
 
	SetWindowDirty(WC_PERFORMANCE_DETAIL, 0);
 
	return score;
 
}
 

	
 
@@ -576,12 +576,12 @@ static void CompaniesGenStatistics()
 
		CompanyCheckBankrupt(c);
 
	}
 

	
 
	InvalidateWindow(WC_INCOME_GRAPH, 0);
 
	InvalidateWindow(WC_OPERATING_PROFIT, 0);
 
	InvalidateWindow(WC_DELIVERED_CARGO, 0);
 
	InvalidateWindow(WC_PERFORMANCE_HISTORY, 0);
 
	InvalidateWindow(WC_COMPANY_VALUE, 0);
 
	InvalidateWindow(WC_COMPANY_LEAGUE, 0);
 
	SetWindowDirty(WC_INCOME_GRAPH, 0);
 
	SetWindowDirty(WC_OPERATING_PROFIT, 0);
 
	SetWindowDirty(WC_DELIVERED_CARGO, 0);
 
	SetWindowDirty(WC_PERFORMANCE_HISTORY, 0);
 
	SetWindowDirty(WC_COMPANY_VALUE, 0);
 
	SetWindowDirty(WC_COMPANY_LEAGUE, 0);
 
}
 

	
 
/**
 
@@ -670,10 +670,10 @@ void RecomputePrices()
 
		cs->current_payment = ((int64)cs->initial_payment * _economy.inflation_payment) >> 16;
 
	}
 

	
 
	InvalidateWindowClasses(WC_BUILD_VEHICLE);
 
	InvalidateWindowClasses(WC_REPLACE_VEHICLE);
 
	InvalidateWindowClasses(WC_VEHICLE_DETAILS);
 
	InvalidateWindow(WC_PAYMENT_RATES, 0);
 
	SetWindowClassesDirty(WC_BUILD_VEHICLE);
 
	SetWindowClassesDirty(WC_REPLACE_VEHICLE);
 
	SetWindowClassesDirty(WC_VEHICLE_DETAILS);
 
	SetWindowDirty(WC_PAYMENT_RATES, 0);
 
}
 

	
 
static void CompaniesPayInterest()
 
@@ -966,7 +966,7 @@ static void TriggerIndustryProduction(In
 
		if (HasBit(callback, CBM_IND_PRODUCTION_CARGO_ARRIVAL)) {
 
			IndustryProductionCallback(i, 0);
 
		} else {
 
			InvalidateWindow(WC_INDUSTRY_VIEW, i->index);
 
			SetWindowDirty(WC_INDUSTRY_VIEW, i->index);
 
		}
 
	} else {
 
		for (uint cargo_index = 0; cargo_index < lengthof(i->incoming_cargo_waiting); cargo_index++) {
 
@@ -1354,13 +1354,13 @@ static void LoadUnloadVehicle(Vehicle *v
 
	}
 

	
 
	if (result != 0) {
 
		InvalidateWindow(GetWindowClassForVehicleType(v->type), v->owner);
 
		InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
 
		SetWindowDirty(GetWindowClassForVehicleType(v->type), v->owner);
 
		SetWindowDirty(WC_VEHICLE_DETAILS, v->index);
 

	
 
		st->MarkTilesDirty(true);
 
		v->MarkDirty();
 

	
 
		if (result & 2) InvalidateWindow(WC_STATION_VIEW, last_visited);
 
		if (result & 2) SetWindowDirty(WC_STATION_VIEW, last_visited);
 
	}
 
}
 

	
 
@@ -1495,7 +1495,7 @@ CommandCost CmdBuyShareInCompany(TileInd
 
				break;
 
			}
 
		}
 
		InvalidateWindow(WC_COMPANY, p1);
 
		SetWindowDirty(WC_COMPANY, p1);
 
	}
 
	return cost;
 
}
 
@@ -1525,7 +1525,7 @@ CommandCost CmdSellShareInCompany(TileIn
 
		OwnerByte *b = c->share_owners;
 
		while (*b != _current_company) b++; // share owners is guaranteed to contain company
 
		*b = COMPANY_SPECTATOR;
 
		InvalidateWindow(WC_COMPANY, p1);
 
		SetWindowDirty(WC_COMPANY, p1);
 
	}
 
	return CommandCost(EXPENSES_OTHER, cost);
 
}