Changeset - r4661:f04708c9a3e8
[Not reviewed]
master
0 6 0
peter1138 - 18 years ago 2006-09-28 07:02:55
peter1138@openttd.org
(svn r6544) - Codechange: Rename CmdReplaceVehicle to CmdSetAutoReplace, to reflect what it does.
6 files changed with 13 insertions and 13 deletions:
0 comments (0 inline, 0 general)
command.c
Show inline comments
 
@@ -156,7 +156,7 @@ DEF_COMMAND(CmdRefitRailVehicle);
 
DEF_COMMAND(CmdBuildSignalTrack);
 
DEF_COMMAND(CmdRemoveSignalTrack);
 

	
 
DEF_COMMAND(CmdReplaceVehicle);
 
DEF_COMMAND(CmdSetAutoReplace);
 

	
 
DEF_COMMAND(CmdCloneVehicle);
 
DEF_COMMAND(CmdMassStartStopVehicle);
 
@@ -303,7 +303,7 @@ static const Command _command_proc_table
 
	{NULL,                                   0}, /* 112 */
 
	{CmdGiveMoney,                           0}, /* 113 */
 
	{CmdChangePatchSetting,         CMD_SERVER}, /* 114 */
 
	{CmdReplaceVehicle,                      0}, /* 115 */
 
	{CmdSetAutoReplace,                      0}, /* 115 */
 
	{CmdCloneVehicle,                        0}, /* 116 */
 
	{CmdMassStartStopVehicle,                0}, /* 117 */
 
	{CmdDepotSellAllVehicles,                0}, /* 118 */
command.h
Show inline comments
 
@@ -133,7 +133,7 @@ enum {
 
	CMD_GIVE_MONEY                   = 113,
 
	CMD_CHANGE_PATCH_SETTING         = 114,
 

	
 
	CMD_REPLACE_VEHICLE              = 115,
 
	CMD_SET_AUTOREPLACE              = 115,
 

	
 
	CMD_CLONE_VEHICLE                = 116,
 
	CMD_MASS_START_STOP              = 117,
openttd.c
Show inline comments
 
@@ -606,7 +606,7 @@ static void MakeNewGameDone(void)
 

	
 
	_local_player = 0;
 
	_current_player = _local_player;
 
	DoCommandP(0, (_patches.autorenew << 15 ) | (_patches.autorenew_months << 16) | 4, _patches.autorenew_money, NULL, CMD_REPLACE_VEHICLE);
 
	DoCommandP(0, (_patches.autorenew << 15 ) | (_patches.autorenew_months << 16) | 4, _patches.autorenew_money, NULL, CMD_SET_AUTOREPLACE);
 

	
 
	MarkWholeScreenDirty();
 
}
 
@@ -681,7 +681,7 @@ static void StartScenario(void)
 

	
 
	_local_player = 0;
 
	_current_player = _local_player;
 
	DoCommandP(0, (_patches.autorenew << 15 ) | (_patches.autorenew_months << 16) | 4, _patches.autorenew_money, NULL, CMD_REPLACE_VEHICLE);
 
	DoCommandP(0, (_patches.autorenew << 15 ) | (_patches.autorenew_months << 16) | 4, _patches.autorenew_money, NULL, CMD_SET_AUTOREPLACE);
 

	
 
	MarkWholeScreenDirty();
 
}
players.c
Show inline comments
 
@@ -700,7 +700,7 @@ static void DeletePlayerStuff(PlayerID p
 
 * if p1 = 5, then
 
 * - p2 = enable renew_keep_length
 
 */
 
int32 CmdReplaceVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
int32 CmdSetAutoReplace(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
{
 
	Player *p;
 
	if (!(_current_player < MAX_PLAYERS))
 
@@ -869,7 +869,7 @@ int32 CmdPlayerCtrl(TileIndex tile, uint
 
					MarkWholeScreenDirty();
 
				}
 
			} else if (p->index == _local_player) {
 
				DoCommandP(0, (_patches.autorenew << 15 ) | (_patches.autorenew_months << 16) | 4, _patches.autorenew_money, NULL, CMD_REPLACE_VEHICLE);
 
				DoCommandP(0, (_patches.autorenew << 15 ) | (_patches.autorenew_months << 16) | 4, _patches.autorenew_money, NULL, CMD_SET_AUTOREPLACE);
 
			}
 
#ifdef ENABLE_NETWORK
 
			if (_network_server) {
settings.c
Show inline comments
 
@@ -1123,19 +1123,19 @@ static int32 CheckInterval(int32 p1)
 

	
 
static int32 EngineRenewUpdate(int32 p1)
 
{
 
	DoCommandP(0, 0, _patches.autorenew, NULL, CMD_REPLACE_VEHICLE);
 
	DoCommandP(0, 0, _patches.autorenew, NULL, CMD_SET_AUTOREPLACE);
 
	return 0;
 
}
 

	
 
static int32 EngineRenewMonthsUpdate(int32 p1)
 
{
 
	DoCommandP(0, 1, _patches.autorenew_months, NULL, CMD_REPLACE_VEHICLE);
 
	DoCommandP(0, 1, _patches.autorenew_months, NULL, CMD_SET_AUTOREPLACE);
 
	return 0;
 
}
 

	
 
static int32 EngineRenewMoneyUpdate(int32 p1)
 
{
 
	DoCommandP(0, 2, _patches.autorenew_money, NULL, CMD_REPLACE_VEHICLE);
 
	DoCommandP(0, 2, _patches.autorenew_money, NULL, CMD_SET_AUTOREPLACE);
 
	return 0;
 
}
 
/* End - Callback Functions */
vehicle_gui.c
Show inline comments
 
@@ -989,19 +989,19 @@ static void ReplaceVehicleWndProc(Window
 
					break;
 

	
 
				case 17: /* toggle renew_keep_length */
 
					DoCommandP(0, 5, GetPlayer(_local_player)->renew_keep_length ? 0 : 1, NULL, CMD_REPLACE_VEHICLE);
 
					DoCommandP(0, 5, GetPlayer(_local_player)->renew_keep_length ? 0 : 1, NULL, CMD_SET_AUTOREPLACE);
 
					break;
 

	
 
				case 4: { /* Start replacing */
 
					EngineID veh_from = WP(w, replaceveh_d).sel_engine[0];
 
					EngineID veh_to = WP(w, replaceveh_d).sel_engine[1];
 
					DoCommandP(0, 3, veh_from + (veh_to << 16), NULL, CMD_REPLACE_VEHICLE);
 
					DoCommandP(0, 3, veh_from + (veh_to << 16), NULL, CMD_SET_AUTOREPLACE);
 
					break;
 
				}
 

	
 
				case 6: { /* Stop replacing */
 
					EngineID veh_from = WP(w, replaceveh_d).sel_engine[0];
 
					DoCommandP(0, 3, veh_from + (INVALID_ENGINE << 16), NULL, CMD_REPLACE_VEHICLE);
 
					DoCommandP(0, 3, veh_from + (INVALID_ENGINE << 16), NULL, CMD_SET_AUTOREPLACE);
 
					break;
 
				}
 

	
0 comments (0 inline, 0 general)