Update to 1.10.0-beta2

This commit is contained in:
dP
2020-01-06 18:49:34 +03:00
parent 599ccf0c2b
commit c7c3966eec
1366 changed files with 2926 additions and 5639 deletions
+5 -11
View File
@@ -1,5 +1,3 @@
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
@@ -68,8 +66,7 @@ struct GoalListWindow : public Window {
int y = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_GOAL_LIST, WD_FRAMERECT_TOP);
int num = 0;
const Goal *s;
FOR_ALL_GOALS(s) {
for (const Goal *s : Goal::Iterate()) {
if (s->company == INVALID_COMPANY) {
y--;
if (y == 0) {
@@ -88,7 +85,7 @@ struct GoalListWindow : public Window {
y -= 2; // "Company specific goals:" line.
if (y < 0) return;
FOR_ALL_GOALS(s) {
for (const Goal *s : Goal::Iterate()) {
if (s->company == this->window_number) {
y--;
if (y == 0) {
@@ -160,8 +157,7 @@ struct GoalListWindow : public Window {
/* Count number of (non) awarded goals. */
uint num_global = 0;
uint num_company = 0;
const Goal *s;
FOR_ALL_GOALS(s) {
for (const Goal *s : Goal::Iterate()) {
if (s->company == INVALID_COMPANY) {
num_global++;
} else if (s->company == this->window_number) {
@@ -209,8 +205,7 @@ struct GoalListWindow : public Window {
bool rtl = _current_text_dir == TD_RTL;
uint num = 0;
const Goal *s;
FOR_ALL_GOALS(s) {
for (const Goal *s : Goal::Iterate()) {
if (global_section ? s->company == INVALID_COMPANY : (s->company == this->window_number && s->company != INVALID_COMPANY)) {
if (IsInsideMM(pos, 0, cap)) {
switch (column) {
@@ -280,8 +275,7 @@ struct GoalListWindow : public Window {
/* Calculate progress column width. */
uint max_width = 0;
Goal *s;
FOR_ALL_GOALS(s) {
for (const Goal *s : Goal::Iterate()) {
if (s->progress != nullptr) {
SetDParamStr(0, s->progress);
StringID str = s->completed ? STR_GOALS_PROGRESS_COMPLETE : STR_GOALS_PROGRESS;