Merge branch upstream/master while introducing compile errors and reverting parts of Android changes, video BPP options are gone
This commit is contained in:
@@ -899,7 +899,7 @@ struct PaymentRatesGraphWindow : BaseGraphWindow {
|
||||
|
||||
this->CreateNestedTree();
|
||||
this->vscroll = this->GetScrollbar(WID_CPR_MATRIX_SCROLLBAR);
|
||||
this->vscroll->SetCount(_sorted_standard_cargo_specs_size);
|
||||
this->vscroll->SetCount(static_cast<int>(_sorted_standard_cargo_specs.size()));
|
||||
|
||||
/* Initialise the dataset */
|
||||
this->OnHundredthTick();
|
||||
@@ -918,8 +918,7 @@ struct PaymentRatesGraphWindow : BaseGraphWindow {
|
||||
this->excluded_data = 0;
|
||||
|
||||
int i = 0;
|
||||
const CargoSpec *cs;
|
||||
FOR_ALL_SORTED_STANDARD_CARGOSPECS(cs) {
|
||||
for (const CargoSpec *cs : _sorted_standard_cargo_specs) {
|
||||
if (HasBit(_legend_excluded_cargo, cs->Index())) SetBit(this->excluded_data, i);
|
||||
i++;
|
||||
}
|
||||
@@ -932,8 +931,7 @@ struct PaymentRatesGraphWindow : BaseGraphWindow {
|
||||
return;
|
||||
}
|
||||
|
||||
const CargoSpec *cs;
|
||||
FOR_ALL_SORTED_STANDARD_CARGOSPECS(cs) {
|
||||
for (const CargoSpec *cs : _sorted_standard_cargo_specs) {
|
||||
SetDParam(0, cs->name);
|
||||
Dimension d = GetStringBoundingBox(STR_GRAPH_CARGO_PAYMENT_CARGO);
|
||||
d.width += this->legend_width + 4; // colour field
|
||||
@@ -965,15 +963,14 @@ struct PaymentRatesGraphWindow : BaseGraphWindow {
|
||||
int pos = this->vscroll->GetPosition();
|
||||
int max = pos + this->vscroll->GetCapacity();
|
||||
|
||||
const CargoSpec *cs;
|
||||
FOR_ALL_SORTED_STANDARD_CARGOSPECS(cs) {
|
||||
for (const CargoSpec *cs : _sorted_standard_cargo_specs) {
|
||||
if (pos-- > 0) continue;
|
||||
if (--max < 0) break;
|
||||
|
||||
bool lowered = !HasBit(_legend_excluded_cargo, cs->Index());
|
||||
|
||||
/* Redraw box if lowered */
|
||||
if (lowered) DrawFrameRect(r.left, y, r.right, y + this->line_height - 1, COLOUR_BROWN, lowered ? FR_LOWERED : FR_NONE);
|
||||
if (lowered) DrawFrameRect(r.left, y, r.right, y + this->line_height - 1, COLOUR_BROWN, FR_LOWERED);
|
||||
|
||||
byte clk_dif = lowered ? 1 : 0;
|
||||
int rect_x = clk_dif + (rtl ? r.right - this->legend_width - WD_FRAMERECT_RIGHT : r.left + WD_FRAMERECT_LEFT);
|
||||
@@ -1000,8 +997,7 @@ struct PaymentRatesGraphWindow : BaseGraphWindow {
|
||||
case WID_CPR_DISABLE_CARGOES: {
|
||||
/* Add all cargoes to the excluded lists. */
|
||||
int i = 0;
|
||||
const CargoSpec *cs;
|
||||
FOR_ALL_SORTED_STANDARD_CARGOSPECS(cs) {
|
||||
for (const CargoSpec *cs : _sorted_standard_cargo_specs) {
|
||||
SetBit(_legend_excluded_cargo, cs->Index());
|
||||
SetBit(this->excluded_data, i);
|
||||
i++;
|
||||
@@ -1014,8 +1010,7 @@ struct PaymentRatesGraphWindow : BaseGraphWindow {
|
||||
uint row = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_CPR_MATRIX);
|
||||
if (row >= this->vscroll->GetCount()) return;
|
||||
|
||||
const CargoSpec *cs;
|
||||
FOR_ALL_SORTED_STANDARD_CARGOSPECS(cs) {
|
||||
for (const CargoSpec *cs : _sorted_standard_cargo_specs) {
|
||||
if (row-- > 0) continue;
|
||||
|
||||
ToggleBit(_legend_excluded_cargo, cs->Index());
|
||||
@@ -1054,8 +1049,7 @@ struct PaymentRatesGraphWindow : BaseGraphWindow {
|
||||
this->UpdateExcludedData();
|
||||
|
||||
int i = 0;
|
||||
const CargoSpec *cs;
|
||||
FOR_ALL_SORTED_STANDARD_CARGOSPECS(cs) {
|
||||
for (const CargoSpec *cs : _sorted_standard_cargo_specs) {
|
||||
this->colours[i] = cs->legend_colour;
|
||||
for (uint j = 0; j != 20; j++) {
|
||||
this->cost[i][j] = GetTransportedGoodsIncome(10, 20, j * 4 + 4, cs->Index());
|
||||
@@ -1425,7 +1419,7 @@ struct PerformanceRatingDetailWindow : Window {
|
||||
int64 needed = _score_info[score_type].needed;
|
||||
int score = _score_info[score_type].score;
|
||||
|
||||
/* SCORE_TOTAL has his own rules ;) */
|
||||
/* SCORE_TOTAL has its own rules ;) */
|
||||
if (score_type == SCORE_TOTAL) {
|
||||
for (ScoreID i = SCORE_BEGIN; i < SCORE_END; i++) score += _score_info[i].score;
|
||||
needed = SCORE_MAX;
|
||||
|
||||
Reference in New Issue
Block a user