summaryrefslogtreecommitdiff
path: root/waypoint.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-04-10 07:15:58 +0000
committertron <tron@openttd.org>2006-04-10 07:15:58 +0000
commit35e93e451fbf0b88401d9af137b2423fefe1dc58 (patch)
treef8613338e934555520fd9b45b411e8a946c5be7a /waypoint.c
parentb0b5641639e042399e0ee3886740999678bc63ea (diff)
downloadopenttd-35e93e451fbf0b88401d9af137b2423fefe1dc58.tar.xz
(svn r4342) Change the first two parameters of commands - virtual pixel coordinates of the tile to operate on - to a TileIndex
Remove DoCommandByTile(), because now it does the same as DoCommand()
Diffstat (limited to 'waypoint.c')
-rw-r--r--waypoint.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/waypoint.c b/waypoint.c
index dbd583e84..715c530b3 100644
--- a/waypoint.c
+++ b/waypoint.c
@@ -163,16 +163,15 @@ void UpdateAllWaypointCustomGraphics(void)
/** Convert existing rail to waypoint. Eg build a waypoint station over
* piece of rail
- * @param x,y coordinates where waypoint will be built
+ * @param tile tile where waypoint will be built
* @param p1 graphics for waypoint type, 0 indicates standard graphics
* @param p2 unused
*
* @todo When checking for the tile slope,
* distingush between "Flat land required" and "land sloped in wrong direction"
*/
-int32 CmdBuildTrainWaypoint(int x, int y, uint32 flags, uint32 p1, uint32 p2)
+int32 CmdBuildTrainWaypoint(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
{
- TileIndex tile = TileVirtXY(x, y);
Waypoint *wp;
uint tileh;
Axis axis;
@@ -311,23 +310,22 @@ int32 RemoveTrainWaypoint(TileIndex tile, uint32 flags, bool justremove)
}
/** Delete a waypoint
- * @param x,y coordinates where waypoint is to be deleted
+ * @param tile tile where waypoint is to be deleted
* @param p1 unused
* @param p2 unused
*/
-int32 CmdRemoveTrainWaypoint(int x, int y, uint32 flags, uint32 p1, uint32 p2)
+int32 CmdRemoveTrainWaypoint(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
{
- TileIndex tile = TileVirtXY(x, y);
SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION);
return RemoveTrainWaypoint(tile, flags, true);
}
/** Rename a waypoint.
- * @param x,y unused
+ * @param tile unused
* @param p1 id of waypoint
* @param p2 unused
*/
-int32 CmdRenameWaypoint(int x, int y, uint32 flags, uint32 p1, uint32 p2)
+int32 CmdRenameWaypoint(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
{
Waypoint *wp;
StringID str;