Changeset - r12827:19af93950884
[Not reviewed]
master
0 3 0
alberth - 15 years ago 2009-08-30 17:54:11
alberth@openttd.org
(svn r17327) -Codechange: Allow external use of GetEngineCategoryName().
3 files changed with 6 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/engine.cpp
Show inline comments
 
@@ -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(TileInd
 
	return CommandCost();
 
}
 

	
 
StringID GetEngineCategoryName(EngineID engine);
 

	
 
static void NewVehicleAvailable(Engine *e)
 
{
 
	Vehicle *v;
src/engine_gui.cpp
Show inline comments
 
@@ -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) {
src/engine_gui.h
Show inline comments
 
@@ -20,6 +20,7 @@ typedef int CDECL EngList_SortTypeFuncti
 
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 */
0 comments (0 inline, 0 general)