(svn r3816) Use existing accessors

This commit is contained in:
tron
2006-03-11 09:10:46 +00:00
parent 0e4ee1241f
commit 25606a2e0b
6 changed files with 9 additions and 11 deletions

View File

@@ -8,6 +8,7 @@
#include "direction.h"
#include "pool.h"
#include "road_map.h"
#include "tile.h"
#include "variables.h"
@@ -102,10 +103,8 @@ static inline DiagDirection GetDepotDirection(TileIndex tile, TransportType type
switch (type)
{
case TRANSPORT_RAIL:
case TRANSPORT_ROAD:
/* Rail and road store a diagonal direction in bits 0 and 1 */
return (DiagDirection)GB(_m[tile].m5, 0, 2);
case TRANSPORT_RAIL: return (DiagDirection)GB(_m[tile].m5, 0, 2);
case TRANSPORT_ROAD: return GetRoadDepotDirection(tile);
case TRANSPORT_WATER:
/* Water is stubborn, it stores the directions in a different order. */
switch (GB(_m[tile].m5, 0, 2)) {