depot.h
changeset 3185 a9d0cdff7b84
parent 3179 8ef3e8028af5
child 3346 a0d4def7d934
equal deleted inserted replaced
3184:118a520164e4 3185:a9d0cdff7b84
     6 /** @file depot.h Header files for depots (not hangars)
     6 /** @file depot.h Header files for depots (not hangars)
     7   * @see depot.c */
     7   * @see depot.c */
     8 
     8 
     9 #include "direction.h"
     9 #include "direction.h"
    10 #include "pool.h"
    10 #include "pool.h"
       
    11 #include "rail_map.h"
    11 #include "road_map.h"
    12 #include "road_map.h"
    12 #include "tile.h"
    13 #include "tile.h"
    13 #include "variables.h"
    14 #include "variables.h"
    14 
    15 
    15 struct Depot {
    16 struct Depot {
   101 {
   102 {
   102 	assert(IsTileDepotType(tile, type));
   103 	assert(IsTileDepotType(tile, type));
   103 
   104 
   104 	switch (type)
   105 	switch (type)
   105 	{
   106 	{
   106 		case TRANSPORT_RAIL: return (DiagDirection)GB(_m[tile].m5, 0, 2);
   107 		case TRANSPORT_RAIL: return GetRailDepotDirection(tile);
   107 		case TRANSPORT_ROAD: return GetRoadDepotDirection(tile);
   108 		case TRANSPORT_ROAD: return GetRoadDepotDirection(tile);
   108 		case TRANSPORT_WATER:
   109 		case TRANSPORT_WATER:
   109 			/* Water is stubborn, it stores the directions in a different order. */
   110 			/* Water is stubborn, it stores the directions in a different order. */
   110 			switch (GB(_m[tile].m5, 0, 2)) {
   111 			switch (GB(_m[tile].m5, 0, 2)) {
   111 				case 0: return DIAGDIR_NE;
   112 				case 0: return DIAGDIR_NE;