(svn r16721) -Codechange: make Is/SetRoadVehicleFront, Is/Set/HasArticulatedPart member of RoadVehicle.

This commit is contained in:
rubidium
2009-07-02 08:59:27 +00:00
parent 77eaefb61c
commit 61e735ba4c
14 changed files with 76 additions and 72 deletions

View File

@@ -24,7 +24,9 @@
*/
void DrawRoadVehDetails(const Vehicle *v, int left, int right, int y)
{
uint y_offset = RoadVehHasArticPart(v) ? 15 : 0;
const RoadVehicle *rv = RoadVehicle::From(v);
uint y_offset = rv->RoadVehHasArticPart() ? 15 : 0;
StringID str;
Money feeder_share = 0;
@@ -33,7 +35,7 @@ void DrawRoadVehDetails(const Vehicle *v, int left, int right, int y)
SetDParam(2, v->value);
DrawString(left, right, y + y_offset, STR_VEHICLE_INFO_BUILT_VALUE);
if (RoadVehHasArticPart(v)) {
if (rv->RoadVehHasArticPart()) {
CargoArray max_cargo;
StringID subtype_text[NUM_CARGO];
char capacity[512];