Update to OpenTTD 1.9.0-beta2
--HG-- branch : openttd
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $Id: map_func.h 24900 2013-01-08 22:46:42Z planetmaker $ */
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
@@ -147,7 +147,7 @@ static inline uint ScaleByMapSize1D(uint n)
|
||||
* An offset value between to tiles.
|
||||
*
|
||||
* This value is used for the difference between
|
||||
* to tiles. It can be added to a tileindex to get
|
||||
* two tiles. It can be added to a tileindex to get
|
||||
* the resulting tileindex of the start tile applied
|
||||
* with this saved difference.
|
||||
*
|
||||
@@ -362,6 +362,18 @@ static inline TileIndexDiff TileOffsByDir(Direction dir)
|
||||
return ToTileIndexDiff(_tileoffs_by_dir[dir]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a Direction to a tile.
|
||||
*
|
||||
* @param tile The current tile
|
||||
* @param dir The direction in which we want to step
|
||||
* @return the moved tile
|
||||
*/
|
||||
static inline TileIndex TileAddByDir(TileIndex tile, Direction dir)
|
||||
{
|
||||
return TILE_ADD(tile, TileOffsByDir(dir));
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a DiagDir to a tile.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user