|
|
/* $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.
|
|
|
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
|
|
*/
|
|
|
|
|
|
/** @file engine_gui.cpp GUI to show engine related information. */
|
|
|
|
|
|
#include "stdafx.h"
|
|
|
#include "window_gui.h"
|
|
|
#include "gfx_func.h"
|
|
|
#include "engine_base.h"
|
|
|
#include "command_func.h"
|
|
|
#include "strings_func.h"
|
|
|
#include "engine_gui.h"
|
|
|
#include "articulated_vehicles.h"
|
|
|
#include "vehicle_func.h"
|
|
|
#include "company_func.h"
|
|
|
#include "rail.h"
|
|
|
#include "settings_type.h"
|
|
|
|
|
|
#include "widgets/engine_widget.h"
|
|
|
|
|
|
#include "table/strings.h"
|
|
|
|
|
|
/**
|
|
|
* Return the category of an engine.
|
|
|
* @param engine Engine to examine.
|
|
|
* @return String describing the category ("road veh", "train". "airplane", or "ship") of the engine.
|
|
|
*/
|
|
|
StringID GetEngineCategoryName(EngineID engine)
|
|
|
{
|
|
|
const Engine *e = Engine::Get(engine);
|
|
|
switch (e->type) {
|
|
|
default: NOT_REACHED();
|