summaryrefslogtreecommitdiff
path: root/src/train_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-12-28 14:37:19 +0000
committerrubidium <rubidium@openttd.org>2008-12-28 14:37:19 +0000
commit87e5a8b52bf2f200467d65c1e17fd79548d31129 (patch)
tree36bbbb5d389d41119ee184607bc012666dda7812 /src/train_cmd.cpp
parent53679122af1e0a68bbe4e9c1f73526dd7e118df6 (diff)
downloadopenttd-87e5a8b52bf2f200467d65c1e17fd79548d31129.tar.xz
(svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter.
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r--src/train_cmd.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 40604b55b..d1fa79a97 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -757,7 +757,7 @@ static void AddRearEngineToMultiheadedTrain(Vehicle *v, Vehicle *u, bool buildin
* @param p1 engine type id
* @param p2 bit 1 prevents any free cars from being added to the train
*/
-CommandCost CmdBuildRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
+CommandCost CmdBuildRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p2, const char *text)
{
/* Check if the engine-type is valid (for the company) */
if (!IsEngineBuildable(p1, VEH_TRAIN, _current_company)) return_cmd_error(STR_RAIL_VEHICLE_NOT_AVAILABLE);
@@ -1018,7 +1018,7 @@ static void NormaliseTrainConsist(Vehicle *v)
* - p1 (bit 16 - 31) what wagon to put the source wagon AFTER, XXX - INVALID_VEHICLE to make a new line
* @param p2 (bit 0) move all vehicles following the source vehicle
*/
-CommandCost CmdMoveRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
+CommandCost CmdMoveRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p2, const char *text)
{
VehicleID s = GB(p1, 0, 16);
VehicleID d = GB(p1, 16, 16);
@@ -1324,7 +1324,7 @@ CommandCost CmdMoveRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p
/* As in CmdMoveRailVehicle src_head->group_id will be equal to DEFAULT_GROUP
* we need to save the group and reaffect it to src_head */
const GroupID tmp_g = src_head->group_id;
- CmdMoveRailVehicle(0, flags, src_head->index | (INVALID_VEHICLE << 16), 1);
+ CmdMoveRailVehicle(0, flags, src_head->index | (INVALID_VEHICLE << 16), 1, text);
SetTrainGroupID(src_head, tmp_g);
src_head = NULL; // don't do anything more to this train since the new call will do it
}
@@ -1372,7 +1372,7 @@ CommandCost CmdMoveRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p
* - p2 = 2: when selling attached locos, rearrange all vehicles after it to separate lines;
* all wagons of the same type will go on the same line. Used by the AI currently
*/
-CommandCost CmdSellRailWagon(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
+CommandCost CmdSellRailWagon(TileIndex tile, uint32 flags, uint32 p1, uint32 p2, const char *text)
{
/* Check if we deleted a vehicle window */
Window *w = NULL;
@@ -1940,7 +1940,7 @@ static void ReverseTrainDirection(Vehicle *v)
* @param p1 train to reverse
* @param p2 if true, reverse a unit in a train (needs to be in a depot)
*/
-CommandCost CmdReverseTrainDirection(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
+CommandCost CmdReverseTrainDirection(TileIndex tile, uint32 flags, uint32 p1, uint32 p2, const char *text)
{
if (!IsValidVehicleID(p1)) return CMD_ERROR;
@@ -1990,7 +1990,7 @@ CommandCost CmdReverseTrainDirection(TileIndex tile, uint32 flags, uint32 p1, ui
* @param p1 train to ignore the red signal
* @param p2 unused
*/
-CommandCost CmdForceTrainProceed(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
+CommandCost CmdForceTrainProceed(TileIndex tile, uint32 flags, uint32 p1, uint32 p2, const char *text)
{
if (!IsValidVehicleID(p1)) return CMD_ERROR;
@@ -2013,7 +2013,7 @@ CommandCost CmdForceTrainProceed(TileIndex tile, uint32 flags, uint32 p1, uint32
* - p2 = (bit 16) - refit only this vehicle
* @return cost of refit or error
*/
-CommandCost CmdRefitRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
+CommandCost CmdRefitRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p2, const char *text)
{
CargoID new_cid = GB(p2, 0, 8);
byte new_subtype = GB(p2, 8, 8);
@@ -2217,7 +2217,7 @@ bool Train::FindClosestDepot(TileIndex *location, DestinationID *destination, bo
* - p2 bit 0-3 - DEPOT_ flags (see vehicle.h)
* - p2 bit 8-10 - VLW flag (for mass goto depot)
*/
-CommandCost CmdSendTrainToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
+CommandCost CmdSendTrainToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p2, const char *text)
{
if (p2 & DEPOT_MASS_SEND) {
/* Mass goto depot requested */