|
|
/* $Id$ */
|
|
|
|
|
|
/** @file pathfinder.cpp Pathfinder support for the trolly AI. */
|
|
|
|
|
|
#include "../../stdafx.h"
|
|
|
#include "../../openttd.h"
|
|
|
#include "../../bridge_map.h"
|
|
|
#include "../../debug.h"
|
|
|
#include "../../command_func.h"
|
|
|
#include "trolly.h"
|
|
|
#include "../../tunnel_map.h"
|
|
|
#include "../../bridge.h"
|
|
|
#include "../../tunnelbridge_map.h"
|
|
|
#include "../ai.h"
|
|
|
#include "../../variables.h"
|
|
|
#include "../../player_base.h"
|
|
|
#include "../../player_func.h"
|
|
|
#include "../../tunnelbridge.h"
|
|
|
|
|
|
|
|
|
#define TEST_STATION_NO_DIR 0xFF
|
|
|
|
|
|
// Tests if a station can be build on the given spot
|
|
|
// TODO: make it train compatible
|
|
|
static bool TestCanBuildStationHere(TileIndex tile, byte dir)
|
|
|
{
|
|
|
Player *p = GetPlayer(_current_player);
|
|
|
|