diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp --- a/src/ai/ai_gui.cpp +++ b/src/ai/ai_gui.cpp @@ -641,7 +641,7 @@ struct AIDebugWindow : public Window { { /* Disable the companies who are not active or not an AI */ for (CompanyID i = COMPANY_FIRST; i < MAX_COMPANIES; i++) { - this->SetWidgetDisabledState(i + AID_WIDGET_COMPANY_BUTTON_START, !IsValidCompanyID(i) || !Company::Get(i)->is_ai); + this->SetWidgetDisabledState(i + AID_WIDGET_COMPANY_BUTTON_START, !Company::IsValidID(i) || !Company::Get(i)->is_ai); } this->DisableWidget(AID_WIDGET_RELOAD_TOGGLE); @@ -659,7 +659,7 @@ struct AIDebugWindow : public Window { virtual void OnPaint() { /* Check if the currently selected company is still active. */ - if (ai_debug_company == INVALID_COMPANY || !IsValidCompanyID(ai_debug_company)) { + if (ai_debug_company == INVALID_COMPANY || !Company::IsValidID(ai_debug_company)) { if (ai_debug_company != INVALID_COMPANY) { /* Raise and disable the widget for the previous selection. */ this->RaiseWidget(ai_debug_company + AID_WIDGET_COMPANY_BUTTON_START); @@ -669,7 +669,7 @@ struct AIDebugWindow : public Window { } for (CompanyID i = COMPANY_FIRST; i < MAX_COMPANIES; i++) { - if (IsValidCompanyID(i) && Company::Get(i)->is_ai) { + if (Company::IsValidID(i) && Company::Get(i)->is_ai) { /* Lower the widget corresponding to this company. */ this->LowerWidget(i + AID_WIDGET_COMPANY_BUTTON_START); @@ -690,7 +690,7 @@ struct AIDebugWindow : public Window { /* Paint the company icons */ for (CompanyID i = COMPANY_FIRST; i < MAX_COMPANIES; i++) { - if (!IsValidCompanyID(i) || !Company::Get(i)->is_ai) { + if (!Company::IsValidID(i) || !Company::Get(i)->is_ai) { /* Check if we have the company as an active company */ if (!this->IsWidgetDisabled(i + AID_WIDGET_COMPANY_BUTTON_START)) { /* Bah, company gone :( */