diff -r ed8f92929297 -r dc85aaa556ae src/engine_gui.cpp --- a/src/engine_gui.cpp Fri Mar 23 12:03:41 2007 +0000 +++ b/src/engine_gui.cpp Sat Mar 31 12:34:36 2007 +0000 @@ -120,12 +120,20 @@ const RailVehicleInfo *rvi = RailVehInfo(engine); uint multihead = (rvi->railveh_type == RAILVEH_MULTIHEAD) ? 1 : 0; - SetDParam(0, (_price.build_railvehicle >> 3) * rvi->base_cost >> 5); + SetDParam(0, (_eco->GetPrice(CEconomy::BUILD_RAILVEHICLE) >> 3) * rvi->base_cost >> 5); SetDParam(2, rvi->max_speed * 10 / 16); SetDParam(3, rvi->power << multihead); SetDParam(1, rvi->weight << multihead); - SetDParam(4, rvi->running_cost_base * _price.running_rail[rvi->running_cost_class] >> 8 << multihead); + uint32 cost_class; + switch (rvi->running_cost_class) + { + default: + case 0: cost_class = _eco->GetPrice(CEconomy::RUNNING_RAIL0); break; + case 1: cost_class = _eco->GetPrice(CEconomy::RUNNING_RAIL1); break; + case 2: cost_class = _eco->GetPrice(CEconomy::RUNNING_RAIL2); break; + } + SetDParam(4, rvi->running_cost_base * cost_class >> 8 << multihead); if (rvi->capacity != 0) { SetDParam(5, rvi->cargo_type); @@ -139,11 +147,11 @@ static void DrawAircraftEngineInfo(EngineID engine, int x, int y, int maxw) { const AircraftVehicleInfo *avi = AircraftVehInfo(engine); - SetDParam(0, (_price.aircraft_base >> 3) * avi->base_cost >> 5); + SetDParam(0, (_eco->GetPrice(CEconomy::AIRCRAFT_BASE) >> 3) * avi->base_cost >> 5); SetDParam(1, avi->max_speed * 10 / 16); SetDParam(2, avi->passenger_capacity); SetDParam(3, avi->mail_capacity); - SetDParam(4, avi->running_cost * _price.aircraft_running >> 8); + SetDParam(4, avi->running_cost * _eco->GetPrice(CEconomy::AIRCRAFT_RUNNING) >> 8); DrawStringMultiCenter(x, y, STR_A02E_COST_MAX_SPEED_CAPACITY, maxw); } @@ -152,9 +160,9 @@ { const RoadVehicleInfo *rvi = RoadVehInfo(engine); - SetDParam(0, (_price.roadveh_base >> 3) * rvi->base_cost >> 5); + SetDParam(0, (_eco->GetPrice(CEconomy::ROADVEH_BASE) >> 3) * rvi->base_cost >> 5); SetDParam(1, rvi->max_speed * 10 / 32); - SetDParam(2, rvi->running_cost * _price.roadveh_running >> 8); + SetDParam(2, rvi->running_cost * _eco->GetPrice(CEconomy::ROADVEH_RUNNING) >> 8); SetDParam(3, rvi->cargo_type); SetDParam(4, rvi->capacity); @@ -164,11 +172,11 @@ static void DrawShipEngineInfo(EngineID engine, int x, int y, int maxw) { const ShipVehicleInfo *svi = ShipVehInfo(engine); - SetDParam(0, svi->base_cost * (_price.ship_base >> 3) >> 5); + SetDParam(0, svi->base_cost * (_eco->GetPrice(CEconomy::SHIP_BASE) >> 3) >> 5); SetDParam(1, svi->max_speed * 10 / 32); SetDParam(2, svi->cargo_type); SetDParam(3, svi->capacity); - SetDParam(4, svi->running_cost * _price.ship_running >> 8); + SetDParam(4, svi->running_cost * _eco->GetPrice(CEconomy::SHIP_RUNNING) >> 8); DrawStringMultiCenter(x, y, STR_982E_COST_MAX_SPEED_CAPACITY, maxw); }