2005-07-24 15:12:37 +01:00
|
|
|
/* $Id$ */
|
|
|
|
|
2008-05-06 16:11:33 +01:00
|
|
|
/** @file engine_func.h Functions related to engines. */
|
2007-02-23 18:55:07 +00:00
|
|
|
|
2004-08-09 18:04:08 +01:00
|
|
|
#ifndef ENGINE_H
|
|
|
|
#define ENGINE_H
|
|
|
|
|
2008-03-28 18:00:38 +00:00
|
|
|
#include "engine_type.h"
|
2006-01-12 15:52:18 +00:00
|
|
|
|
2008-01-08 18:25:51 +00:00
|
|
|
void SetupEngines();
|
2007-03-07 11:47:46 +00:00
|
|
|
void StartupEngines();
|
2004-08-09 18:04:08 +01:00
|
|
|
|
2008-04-29 22:31:29 +01:00
|
|
|
Engine *GetTempDataEngine(EngineID index);
|
|
|
|
void CopyTempEngineData();
|
|
|
|
|
|
|
|
/* Original engine data counts and offsets */
|
|
|
|
extern const uint8 _engine_counts[4];
|
|
|
|
extern const uint8 _engine_offsets[4];
|
2004-08-09 18:04:08 +01:00
|
|
|
|
2007-01-14 19:57:49 +00:00
|
|
|
void DrawTrainEngine(int x, int y, EngineID engine, SpriteID pal);
|
|
|
|
void DrawRoadVehEngine(int x, int y, EngineID engine, SpriteID pal);
|
|
|
|
void DrawShipEngine(int x, int y, EngineID engine, SpriteID pal);
|
|
|
|
void DrawAircraftEngine(int x, int y, EngineID engine, SpriteID pal);
|
2004-08-09 18:04:08 +01:00
|
|
|
|
2007-03-07 11:47:46 +00:00
|
|
|
void LoadCustomEngineNames();
|
|
|
|
void DeleteCustomEngineNames();
|
2004-08-09 18:04:08 +01:00
|
|
|
|
2008-09-30 21:39:50 +01:00
|
|
|
bool IsEngineBuildable(EngineID engine, VehicleType type, CompanyID company);
|
2008-12-16 22:02:12 +00:00
|
|
|
bool IsEngineRefittable(EngineID engine);
|
2007-04-20 17:56:55 +01:00
|
|
|
CargoID GetEngineCargoType(EngineID engine);
|
2008-05-13 22:36:09 +01:00
|
|
|
void SetCachedEngineCounts();
|
2004-08-09 18:04:08 +01:00
|
|
|
|
2005-09-18 21:56:44 +01:00
|
|
|
#endif /* ENGINE_H */
|