diff src/train_cmd.cpp @ 10499:45ca88a8de7d draft

(svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter.
author rubidium <rubidium@openttd.org>
date Sun, 28 Dec 2008 14:37:19 +0000 (2008-12-28)
parents 5531e81401ee
children 21e2aec5a241
line wrap: on
line diff
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -757,7 +757,7 @@
  * @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 @@
  * - 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 @@
 			/* 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 @@
  * - 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 @@
  * @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 @@
  * @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 @@
  * - 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 @@
  * - 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 */