diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-10-03 21:13:32 +0200 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-12-16 22:28:32 +0100 |
commit | a38bbefe1b28ac59b2a9fef45765fa3890cde32e (patch) | |
tree | 8d842f88a25db5ce231ce5bdb0d39914b7e2ed70 /src/vehicle_func.h | |
parent | 549caca39cebc8c988f4e51d79d353cab4646d58 (diff) | |
download | openttd-a38bbefe1b28ac59b2a9fef45765fa3890cde32e.tar.xz |
Codechange: Untangle command code, flags and error string for DoCommand*.
Diffstat (limited to 'src/vehicle_func.h')
-rw-r--r-- | src/vehicle_func.h | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/vehicle_func.h b/src/vehicle_func.h index ec14e526a..5784de108 100644 --- a/src/vehicle_func.h +++ b/src/vehicle_func.h @@ -115,50 +115,50 @@ const struct Livery *GetEngineLivery(EngineID engine_type, CompanyID company, En SpriteID GetEnginePalette(EngineID engine_type, CompanyID company); SpriteID GetVehiclePalette(const Vehicle *v); -extern const uint32 _veh_build_proc_table[]; -extern const uint32 _veh_sell_proc_table[]; -extern const uint32 _veh_refit_proc_table[]; -extern const uint32 _send_to_depot_proc_table[]; +extern const StringID _veh_build_msg_table[]; +extern const StringID _veh_sell_msg_table[]; +extern const StringID _veh_refit_msg_table[]; +extern const StringID _send_to_depot_msg_table[]; /* Functions to find the right command for certain vehicle type */ -static inline uint32 GetCmdBuildVeh(VehicleType type) +static inline StringID GetCmdBuildVehMsg(VehicleType type) { - return _veh_build_proc_table[type]; + return _veh_build_msg_table[type]; } -static inline uint32 GetCmdBuildVeh(const BaseVehicle *v) +static inline StringID GetCmdBuildVehMsg(const BaseVehicle *v) { - return GetCmdBuildVeh(v->type); + return GetCmdBuildVehMsg(v->type); } -static inline uint32 GetCmdSellVeh(VehicleType type) +static inline StringID GetCmdSellVehMsg(VehicleType type) { - return _veh_sell_proc_table[type]; + return _veh_sell_msg_table[type]; } -static inline uint32 GetCmdSellVeh(const BaseVehicle *v) +static inline StringID GetCmdSellVehMsg(const BaseVehicle *v) { - return GetCmdSellVeh(v->type); + return GetCmdSellVehMsg(v->type); } -static inline uint32 GetCmdRefitVeh(VehicleType type) +static inline StringID GetCmdRefitVehMsg(VehicleType type) { - return _veh_refit_proc_table[type]; + return _veh_refit_msg_table[type]; } -static inline uint32 GetCmdRefitVeh(const BaseVehicle *v) +static inline StringID GetCmdRefitVehMsg(const BaseVehicle *v) { - return GetCmdRefitVeh(v->type); + return GetCmdRefitVehMsg(v->type); } -static inline uint32 GetCmdSendToDepot(VehicleType type) +static inline StringID GetCmdSendToDepotMsg(VehicleType type) { - return _send_to_depot_proc_table[type]; + return _send_to_depot_msg_table[type]; } -static inline uint32 GetCmdSendToDepot(const BaseVehicle *v) +static inline StringID GetCmdSendToDepotMsg(const BaseVehicle *v) { - return GetCmdSendToDepot(v->type); + return GetCmdSendToDepotMsg(v->type); } CommandCost EnsureNoVehicleOnGround(TileIndex tile); |