2008-05-27 12:24:23 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2009-08-21 20:21:05 +00:00
|
|
|
/*
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
2012-01-01 17:22:32 +00:00
|
|
|
/** @file engine_gui.h %Engine GUI functions, used by build_vehicle_gui and autoreplace_gui */
|
2008-05-27 12:24:23 +00:00
|
|
|
|
|
|
|
#ifndef ENGINE_GUI_H
|
|
|
|
#define ENGINE_GUI_H
|
|
|
|
|
2010-01-15 16:41:15 +00:00
|
|
|
#include "engine_type.h"
|
2008-05-28 17:29:27 +00:00
|
|
|
#include "sortlist_type.h"
|
2010-01-15 16:41:15 +00:00
|
|
|
#include "gfx_type.h"
|
2012-01-03 20:26:05 +00:00
|
|
|
#include "vehicle_type.h"
|
2008-05-27 12:24:23 +00:00
|
|
|
|
2009-04-12 17:38:01 +00:00
|
|
|
typedef GUIList<EngineID, CargoID> GUIEngineList;
|
2008-05-27 12:24:23 +00:00
|
|
|
|
2012-01-01 17:22:32 +00:00
|
|
|
typedef int CDECL EngList_SortTypeFunction(const EngineID*, const EngineID*); ///< argument type for #EngList_Sort.
|
|
|
|
void EngList_Sort(GUIEngineList *el, EngList_SortTypeFunction compare);
|
|
|
|
void EngList_SortPartial(GUIEngineList *el, EngList_SortTypeFunction compare, uint begin, uint num_items);
|
2008-05-27 12:24:23 +00:00
|
|
|
|
2009-08-30 17:54:11 +00:00
|
|
|
StringID GetEngineCategoryName(EngineID engine);
|
2009-08-30 18:41:03 +00:00
|
|
|
StringID GetEngineInfoString(EngineID engine);
|
2009-11-16 17:15:42 +00:00
|
|
|
|
2011-11-01 16:51:47 +00:00
|
|
|
void DrawVehicleEngine(int left, int right, int preferred_x, int y, EngineID engine, PaletteID pal, EngineImageType image_type);
|
|
|
|
void DrawTrainEngine(int left, int right, int preferred_x, int y, EngineID engine, PaletteID pal, EngineImageType image_type);
|
|
|
|
void DrawRoadVehEngine(int left, int right, int preferred_x, int y, EngineID engine, PaletteID pal, EngineImageType image_type);
|
|
|
|
void DrawShipEngine(int left, int right, int preferred_x, int y, EngineID engine, PaletteID pal, EngineImageType image_type);
|
|
|
|
void DrawAircraftEngine(int left, int right, int preferred_x, int y, EngineID engine, PaletteID pal, EngineImageType image_type);
|
2009-08-30 17:38:28 +00:00
|
|
|
|
2008-05-27 12:24:23 +00:00
|
|
|
#endif /* ENGINE_GUI_H */
|