Codechange: add and use TileOffsByAxis(...) over TileOffsByDir(DiagDirToAxis(...))
This commit is contained in:
@@ -108,6 +108,12 @@ TileIndex TileAddWrap(TileIndex tile, int addx, int addy)
|
||||
return TileXY(x, y);
|
||||
}
|
||||
|
||||
/** 'Lookup table' for tile offsets given an Axis */
|
||||
extern const TileIndexDiffC _tileoffs_by_axis[] = {
|
||||
{ 1, 0}, ///< AXIS_X
|
||||
{ 0, 1}, ///< AXIS_Y
|
||||
};
|
||||
|
||||
/** 'Lookup table' for tile offsets given a DiagDirection */
|
||||
extern const TileIndexDiffC _tileoffs_by_diagdir[] = {
|
||||
{-1, 0}, ///< DIAGDIR_NE
|
||||
|
||||
Reference in New Issue
Block a user