#include "engine_type.h"
Go to the source code of this file.
Functions | |
| void | SetupEngines () |
| void | StartupEngines () |
| 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) |
| bool | IsEngineBuildable (EngineID engine, VehicleType type, CompanyID company) |
| Check if an engine is buildable. | |
| bool | IsEngineRefittable (EngineID engine) |
| Check if an engine is refittable. | |
| CargoID | GetEngineCargoType (EngineID engine) |
| Get the default cargo type for a certain engine type. | |
| void | SetCachedEngineCounts () |
| Sets cached values in Company::num_vehicles and Group::num_vehicles. | |
| void | SetYearEngineAgingStops () |
| void | StartupOneEngine (Engine *e, Date aging_date) |
Variables | |
| const uint8 | _engine_counts [4] |
| Number of engines of each vehicle type in original engine data. | |
| const uint8 | _engine_offsets [4] |
| Offset of the first engine of each vehicle type in original engine data. | |
Definition in file engine_func.h.
Get the default cargo type for a certain engine type.
| engine | The ID to get the cargo for |
Definition at line 671 of file engine.cpp.
Referenced by CmdCloneVehicle(), and IsEngineRefittable().
Check if an engine is buildable.
| engine | index of the engine to check. | |
| type | the type the engine should be. | |
| company | index of the company. |
Definition at line 619 of file engine.cpp.
References HasBit().
Referenced by CheckAutoreplaceValidity(), CmdBuildAircraft(), CmdBuildRailVehicle(), CmdBuildRoadVeh(), CmdBuildShip(), and GetNewEngineType().
| bool IsEngineRefittable | ( | EngineID | engine | ) |
Check if an engine is refittable.
| engine | index of the engine to check. |
Definition at line 646 of file engine.cpp.
References EngineInfo::callbackmask, CBM_VEHICLE_CARGO_SUFFIX, GetEngineCargoType(), HasBit(), and EngineInfo::refit_mask.
Referenced by DrawVehiclePurchaseInfo(), and IsVehicleRefitable().
1.5.6