2008-03-31 00:06:17 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
|
|
|
/** @file station_func.h Functions related to stations. */
|
|
|
|
|
|
|
|
#ifndef STATION_FUNC_H
|
|
|
|
#define STATION_FUNC_H
|
|
|
|
|
|
|
|
#include "station_type.h"
|
|
|
|
#include "sprite.h"
|
2008-10-14 12:07:14 +00:00
|
|
|
#include "oldpool.h"
|
2008-03-31 06:42:26 +00:00
|
|
|
#include "rail_type.h"
|
2008-03-31 00:06:17 +00:00
|
|
|
#include "road_type.h"
|
|
|
|
#include "tile_type.h"
|
|
|
|
#include "cargo_type.h"
|
|
|
|
#include "vehicle_type.h"
|
|
|
|
#include <set>
|
|
|
|
|
2008-09-30 20:39:50 +00:00
|
|
|
void ModifyStationRatingAround(TileIndex tile, Owner owner, int amount, uint radius);
|
2008-03-31 00:06:17 +00:00
|
|
|
|
|
|
|
/** A set of stations (\c const \c Station* ) */
|
2008-10-14 12:07:14 +00:00
|
|
|
typedef std::set<Station*, PoolItemIndexLess<Station> > StationSet;
|
2008-03-31 00:06:17 +00:00
|
|
|
|
2008-11-22 15:48:43 +00:00
|
|
|
StationSet FindStationsAroundTiles(TileIndex tile, int w_prod, int h_prod);
|
2008-03-31 00:06:17 +00:00
|
|
|
|
|
|
|
void ShowStationViewWindow(StationID station);
|
|
|
|
void UpdateAllStationVirtCoord();
|
|
|
|
|
|
|
|
void GetProductionAroundTiles(AcceptedCargo produced, TileIndex tile, int w, int h, int rad);
|
|
|
|
void GetAcceptanceAroundTiles(AcceptedCargo accepts, TileIndex tile, int w, int h, int rad);
|
|
|
|
|
|
|
|
const DrawTileSprites *GetStationTileLayout(StationType st, byte gfx);
|
|
|
|
void StationPickerDrawSprite(int x, int y, StationType st, RailType railtype, RoadType roadtype, int image);
|
|
|
|
|
2008-09-30 20:39:50 +00:00
|
|
|
bool HasStationInUse(StationID station, CompanyID company);
|
2008-03-31 00:06:17 +00:00
|
|
|
|
|
|
|
RoadStop * GetRoadStopByTile(TileIndex tile, RoadStopType type);
|
2009-01-10 00:31:47 +00:00
|
|
|
uint GetNumRoadStops(const Station *st, RoadStopType type);
|
2008-03-31 00:06:17 +00:00
|
|
|
RoadStop * AllocateRoadStop();
|
|
|
|
|
|
|
|
void ClearSlot(Vehicle *v);
|
|
|
|
|
|
|
|
void DeleteOilRig(TileIndex t);
|
|
|
|
|
2008-03-31 06:42:26 +00:00
|
|
|
/* Check if a rail station tile is traversable. */
|
|
|
|
bool IsStationTileBlocked(TileIndex tile);
|
|
|
|
|
|
|
|
/* Check if a rail station tile is electrifiable. */
|
|
|
|
bool IsStationTileElectrifiable(TileIndex tile);
|
|
|
|
|
2008-05-24 02:54:47 +00:00
|
|
|
void UpdateAirportsNoise();
|
2008-03-31 06:42:26 +00:00
|
|
|
|
2008-03-31 00:06:17 +00:00
|
|
|
#endif /* STATION_FUNC_H */
|