Mercurial > hg > openttd
diff src/engine_gui.cpp @ 11408:17fa6dfa4cb1 draft
(svn r15763) -Codechange/Fix: Add Engine::GetDisplayDefaultCapacity() and use it everywhere, so CB 36 is also used everywhere.
author | frosch <frosch@openttd.org> |
---|---|
date | Wed, 18 Mar 2009 19:32:13 +0000 |
parents | 474ba6cc0946 |
children | 59d9d4ed4c23 |
line wrap: on
line diff
--- a/src/engine_gui.cpp +++ b/src/engine_gui.cpp @@ -14,7 +14,6 @@ #include "engine_gui.h" #include "articulated_vehicles.h" #include "rail.h" -#include "aircraft.h" #include "table/strings.h" #include "table/sprites.h" @@ -151,7 +150,7 @@ if (cargo == CT_INVALID || cargo == CT_PASSENGERS) { SetDParam(0, e->GetCost()); SetDParam(1, e->GetDisplayMaxSpeed()); - SetDParam(2, e->u.air.passenger_capacity); + SetDParam(2, e->GetDisplayDefaultCapacity()); SetDParam(3, e->u.air.mail_capacity); SetDParam(4, e->GetRunningCost()); @@ -160,7 +159,7 @@ SetDParam(0, e->GetCost()); SetDParam(1, e->GetDisplayMaxSpeed()); SetDParam(2, cargo); - SetDParam(3, AircraftDefaultCargoCapacity(cargo, &e->u.air)); + SetDParam(3, e->GetDisplayDefaultCapacity()); SetDParam(4, e->GetRunningCost()); DrawStringMultiCenter(x, y, STR_982E_COST_MAX_SPEED_CAPACITY, maxw); @@ -187,13 +186,12 @@ static void DrawShipEngineInfo(EngineID engine, int x, int y, int maxw) { - const ShipVehicleInfo *svi = ShipVehInfo(engine); const Engine *e = GetEngine(engine); SetDParam(0, e->GetCost()); SetDParam(1, e->GetDisplayMaxSpeed()); SetDParam(2, e->GetDefaultCargoType()); - SetDParam(3, GetEngineProperty(engine, 0x0D, svi->capacity)); + SetDParam(3, e->GetDisplayDefaultCapacity()); SetDParam(4, e->GetRunningCost()); DrawStringMultiCenter(x, y, STR_982E_COST_MAX_SPEED_CAPACITY, maxw); }