forked from mirror/OpenTTD
(svn r17327) -Codechange: Allow external use of GetEngineCategoryName().
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include "vehicle_func.h"
|
||||
#include "settings_type.h"
|
||||
#include "core/pool_func.hpp"
|
||||
#include "engine_gui.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
#include "table/engines.h"
|
||||
@@ -614,8 +615,6 @@ CommandCost CmdWantEnginePreview(TileIndex tile, DoCommandFlag flags, uint32 p1,
|
||||
return CommandCost();
|
||||
}
|
||||
|
||||
StringID GetEngineCategoryName(EngineID engine);
|
||||
|
||||
static void NewVehicleAvailable(Engine *e)
|
||||
{
|
||||
Vehicle *v;
|
||||
|
@@ -27,6 +27,10 @@
|
||||
#include "table/strings.h"
|
||||
#include "table/sprites.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)
|
||||
{
|
||||
switch (Engine::Get(engine)->type) {
|
||||
|
@@ -20,6 +20,7 @@ typedef int CDECL EngList_SortTypeFunction(const void*, const void*); ///< argum
|
||||
void EngList_Sort(GUIEngineList *el, EngList_SortTypeFunction compare); ///< qsort of the engine list
|
||||
void EngList_SortPartial(GUIEngineList *el, EngList_SortTypeFunction compare, uint begin, uint num_items); ///< qsort of specified portion of the engine list
|
||||
|
||||
StringID GetEngineCategoryName(EngineID engine);
|
||||
void DrawVehicleEngine(int x, int y, EngineID engine, SpriteID pal);
|
||||
|
||||
#endif /* ENGINE_GUI_H */
|
||||
|
Reference in New Issue
Block a user