@@ -123,16 +123,14 @@ struct CargoSummaryItem {
FORCEINLINE bool operator != (const CargoSummaryItem &other) const
{
return this->cargo != other.cargo || this->subtype != other.subtype;
}
};
enum {
TRAIN_DETAILS_MIN_INDENT = 32, ///< Minimum indent level in the train details window
TRAIN_DETAILS_MAX_INDENT = 72, ///< Maximum indent level in the train details window; wider than this and we start on a new line
static const uint TRAIN_DETAILS_MIN_INDENT = 32; ///< Minimum indent level in the train details window
static const uint TRAIN_DETAILS_MAX_INDENT = 72; ///< Maximum indent level in the train details window; wider than this and we start on a new line
/** Container for the cargo summary information. */
typedef SmallVector<CargoSummaryItem, 2> CargoSummary;
/** Reused container of cargo details */
static CargoSummary _cargo_summary;
@@ -304,13 +302,13 @@ void DrawTrainDetails(const Train *v, in
int sprite_y_offset = 4 + (FONT_HEIGHT_NORMAL - 10) / 2;
int line_height = WD_MATRIX_TOP + FONT_HEIGHT_NORMAL + WD_MATRIX_BOTTOM;
for (; v != NULL && vscroll_pos > -vscroll_cap; v = v->GetNextVehicle()) {
GetCargoSummaryOfArticulatedVehicle(v, &_cargo_summary);
/* Draw sprites */
int dx = 0;
uint dx = 0;
int px = x;
const Train *u = v;
do {
Point offset;
int width = u->GetDisplayImageWidth(&offset);
if (vscroll_pos <= 0 && vscroll_pos > -vscroll_cap) {