File diff r12108:f8d8164485bd → r12109:90df01928018
src/train_gui.cpp
Show inline comments
 
@@ -80,7 +80,7 @@ void DrawTrainImage(const Vehicle *v, in
 
	_cur_dpi = &tmp_dpi;
 

	
 
	do {
 
		int width = ((const Train *)v)->tcache.cached_veh_length;
 
		int width = Train::From(v)->tcache.cached_veh_length;
 

	
 
		if (dx + width > 0) {
 
			if (dx <= count) {
 
@@ -236,7 +236,7 @@ void DrawTrainDetails(const Vehicle *v, 
 
				do {
 
					SpriteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
 
					DrawSprite(u->GetImage(DIR_W), pal, x + WagonLengthToPixels(4 + dx), y + 6 + (is_custom_sprite(RailVehInfo(u->engine_type)->image_index) ? _traininfo_vehicle_pitch : 0));
 
					dx += ((const Train *)u)->tcache.cached_veh_length;
 
					dx += Train::From(u)->tcache.cached_veh_length;
 
					u = u->Next();
 
				} while (u != NULL && IsArticulatedPart(u) && u->cargo_cap == 0);