~ubuntu-branches/debian/squeeze/openttd/squeeze

« back to all changes in this revision

Viewing changes to src/depot_map.h

  • Committer: Bazaar Package Importer
  • Author(s): Jordi Mallach, Matthijs Kooijman, Jordi Mallach
  • Date: 2009-04-15 18:22:10 UTC
  • mfrom: (1.1.6 upstream) (2.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090415182210-22ktb8kdbp2tf3bm
[ Matthijs Kooijman ]
* New upstream release.
* Remove Debian specific desktop file, upstream provides one now. 
* Add debian/watch file.

[ Jordi Mallach ]
* Bump Standards-Version to 3.8.1, with no changes required.
* Move to debhelper compat 7. Bump Build-Depends accordingly.
* Use dh_prep.
* Add "set -e" to config script.
* Remove a few extra doc files that get installed by upstream Makefile.
* Add more complete copyright information.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: depot_map.h 12754 2008-04-17 19:10:30Z rubidium $ */
 
2
 
 
3
/** @file depot_map.h Map related accessors for depots. */
 
4
 
 
5
#ifndef DEPOT_MAP_H
 
6
#define DEPOT_MAP_H
 
7
 
 
8
#include "road_map.h"
 
9
#include "rail_map.h"
 
10
#include "water_map.h"
 
11
#include "station_map.h"
 
12
 
 
13
/**
 
14
 * Check if a tile is a depot and it is a depot of the given type.
 
15
 */
 
16
static inline bool IsDepotTypeTile(TileIndex tile, TransportType type)
 
17
{
 
18
        switch (type) {
 
19
                default: NOT_REACHED();
 
20
                case TRANSPORT_RAIL:
 
21
                        return IsRailDepotTile(tile);
 
22
 
 
23
                case TRANSPORT_ROAD:
 
24
                        return IsRoadDepotTile(tile);
 
25
 
 
26
                case TRANSPORT_WATER:
 
27
                        return IsShipDepotTile(tile);
 
28
        }
 
29
}
 
30
 
 
31
/**
 
32
 * Is the given tile a tile with a depot on it?
 
33
 * @param tile the tile to check
 
34
 * @return true if and only if there is a depot on the tile.
 
35
 */
 
36
static inline bool IsDepotTile(TileIndex tile)
 
37
{
 
38
        return IsRailDepotTile(tile) || IsRoadDepotTile(tile) || IsShipDepotTile(tile) || IsHangarTile(tile);
 
39
}
 
40
 
 
41
#endif /* DEPOT_MAP_H */