2008-04-17 21:10:30 +02:00
|
|
|
/* $Id$ */
|
|
|
|
|
2008-05-06 17:11:33 +02:00
|
|
|
/** @file depot_base.h Base for all depots (except hangars) */
|
2008-04-17 21:10:30 +02:00
|
|
|
|
|
|
|
#ifndef DEPOT_BASE_H
|
|
|
|
#define DEPOT_BASE_H
|
|
|
|
|
|
|
|
#include "tile_type.h"
|
|
|
|
#include "depot_type.h"
|
2009-05-22 17:39:22 +02:00
|
|
|
#include "core/pool_type.hpp"
|
2008-04-17 21:10:30 +02:00
|
|
|
#include "town_type.h"
|
|
|
|
|
2009-05-22 17:13:50 +02:00
|
|
|
typedef Pool<Depot, DepotID, 64, 64000> DepotPool;
|
|
|
|
extern DepotPool _depot_pool;
|
2008-04-17 21:10:30 +02:00
|
|
|
|
2009-05-22 17:13:50 +02:00
|
|
|
struct Depot : DepotPool::PoolItem<&_depot_pool> {
|
2008-04-17 21:10:30 +02:00
|
|
|
TileIndex xy;
|
|
|
|
TownID town_index;
|
|
|
|
|
2009-01-03 17:06:58 +01:00
|
|
|
Depot(TileIndex xy = INVALID_TILE) : xy(xy) {}
|
2008-04-17 21:10:30 +02:00
|
|
|
~Depot();
|
|
|
|
};
|
|
|
|
|
|
|
|
Depot *GetDepotByTile(TileIndex tile);
|
|
|
|
|
2009-05-22 16:23:36 +02:00
|
|
|
#define FOR_ALL_DEPOTS_FROM(var, start) FOR_ALL_ITEMS_FROM(Depot, depot_index, var, start)
|
|
|
|
#define FOR_ALL_DEPOTS(var) FOR_ALL_DEPOTS_FROM(var, 0)
|
2008-04-17 21:10:30 +02:00
|
|
|
|
|
|
|
#endif /* DEPOT_BASE_H */
|