Files
@ r10873:29bc815821c2
Branch filter:
Location: cpp/openttd-patchpack/source/src/depot_base.h - annotation
r10873:29bc815821c2
881 B
text/x-c
(svn r15208) -Codechange: Remove some kind (undocumented, so who really knows) of original attempt to limit maximum tractive effort from 'realistic' acceleration.
r8962:cfbdc736c8db r8962:cfbdc736c8db r9111:983de9c5a848 r8962:cfbdc736c8db r8962:cfbdc736c8db r8962:cfbdc736c8db r8962:cfbdc736c8db r8962:cfbdc736c8db r8962:cfbdc736c8db r8962:cfbdc736c8db r8962:cfbdc736c8db r8962:cfbdc736c8db r8962:cfbdc736c8db r8962:cfbdc736c8db r8962:cfbdc736c8db r8962:cfbdc736c8db r8962:cfbdc736c8db r8962:cfbdc736c8db r10550:fdff38307dad r8962:cfbdc736c8db r8962:cfbdc736c8db r10550:fdff38307dad r8962:cfbdc736c8db r8962:cfbdc736c8db r8962:cfbdc736c8db r8962:cfbdc736c8db r8962:cfbdc736c8db r8962:cfbdc736c8db r8962:cfbdc736c8db r8962:cfbdc736c8db r8962:cfbdc736c8db r8962:cfbdc736c8db r8962:cfbdc736c8db r8962:cfbdc736c8db r8962:cfbdc736c8db | /* $Id$ */
/** @file depot_base.h Base for all depots (except hangars) */
#ifndef DEPOT_BASE_H
#define DEPOT_BASE_H
#include "tile_type.h"
#include "depot_type.h"
#include "oldpool.h"
#include "town_type.h"
DECLARE_OLD_POOL(Depot, Depot, 3, 8000)
struct Depot : PoolItem<Depot, DepotID, &_Depot_pool> {
TileIndex xy;
TownID town_index;
Depot(TileIndex xy = INVALID_TILE) : xy(xy) {}
~Depot();
inline bool IsValid() const { return this->xy != INVALID_TILE; }
};
static inline bool IsValidDepotID(DepotID index)
{
return index < GetDepotPoolSize() && GetDepot(index)->IsValid();
}
Depot *GetDepotByTile(TileIndex tile);
#define FOR_ALL_DEPOTS_FROM(d, start) for (d = GetDepot(start); d != NULL; d = (d->index + 1U < GetDepotPoolSize()) ? GetDepot(d->index + 1U) : NULL) if (d->IsValid())
#define FOR_ALL_DEPOTS(d) FOR_ALL_DEPOTS_FROM(d, 0)
#endif /* DEPOT_BASE_H */
|