# depot.cpp File Reference

Handling of depots. More...

`#include "stdafx.h"`
`#include "depot_base.h"`
`#include "order_func.h"`
`#include "window_func.h"`
`#include "oldpool_func.h"`
`#include "core/bitmath_func.hpp"`
`#include "tile_map.h"`
`#include "water_map.h"`
`#include "vehicle_gui.h"`

Go to the source code of this file.

## Functions

Depot * | GetDepotByTile (TileIndex tile)
| Gets a depot from a tile.
void | InitializeDepots ()

## Detailed Description

Handling of depots.

Definition in file depot.cpp.

## Function Documentation

Depot* GetDepotByTile | ( | TileIndex | tile | ) |

Gets a depot from a tile.

Returns:
  Returns the depot if the tile had a depot, else it returns NULL

Definition at line 22 of file depot.cpp.

References min().

Referenced by AIOrder::InsertOrder(), and YapfFindNearestRoadDepot().