Changeset - r13456:7f9200df57a3
[Not reviewed]
master
0 20 0
frosch - 15 years ago 2009-11-05 19:46:17
frosch@openttd.org
(svn r17976) -Codechange: Move CargoClass to cargotype.h and clean up including of newgrf_cargo.h
20 files changed with 21 insertions and 28 deletions:
0 comments (0 inline, 0 general)
src/ai/api/ai_cargo.cpp
Show inline comments
 
@@ -5,25 +5,24 @@
 
 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
 
 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file ai_cargo.cpp Implementation of AICargo. */
 

	
 
#include "ai_cargo.hpp"
 
#include "../../cargotype.h"
 
#include "../../economy_func.h"
 
#include "../../core/alloc_func.hpp"
 
#include "../../core/bitmath_func.hpp"
 
#include "../../newgrf_cargo.h"
 

	
 
/* static */ bool AICargo::IsValidCargo(CargoID cargo_type)
 
{
 
	return (cargo_type < NUM_CARGO && ::CargoSpec::Get(cargo_type)->IsValid());
 
}
 

	
 
/* static */ char *AICargo::GetCargoLabel(CargoID cargo_type)
 
{
 
	if (!IsValidCargo(cargo_type)) return NULL;
 
	const CargoSpec *cargo = ::CargoSpec::Get(cargo_type);
 

	
 
	/* cargo->label is a uint32 packing a 4 character non-terminated string,
src/aircraft_cmd.cpp
Show inline comments
 
@@ -26,25 +26,24 @@
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 
#include "functions.h"
 
#include "cheat_type.h"
 
#include "autoreplace_func.h"
 
#include "autoreplace_gui.h"
 
#include "gfx_func.h"
 
#include "ai/ai.hpp"
 
#include "company_func.h"
 
#include "effectvehicle_func.h"
 
#include "station_base.h"
 
#include "cargotype.h"
 
#include "newgrf_cargo.h"
 

	
 
#include "table/strings.h"
 
#include "table/sprites.h"
 

	
 
void Aircraft::UpdateDeltaXY(Direction direction)
 
{
 
	uint32 x;
 
#define MKIT(a, b, c, d) ((a & 0xFF) << 24) | ((b & 0xFF) << 16) | ((c & 0xFF) << 8) | ((d & 0xFF) << 0)
 
	switch (this->subtype) {
 
		default: NOT_REACHED();
 
		case AIR_AIRCRAFT:
 
		case AIR_HELICOPTER:
src/build_vehicle_gui.cpp
Show inline comments
 
@@ -22,25 +22,24 @@
 
#include "newgrf_engine.h"
 
#include "newgrf_text.h"
 
#include "group.h"
 
#include "strings_func.h"
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "vehicle_func.h"
 
#include "gfx_func.h"
 
#include "widgets/dropdown_func.h"
 
#include "window_gui.h"
 
#include "engine_gui.h"
 
#include "cargotype.h"
 
#include "newgrf_cargo.h"
 

	
 
#include "table/sprites.h"
 
#include "table/strings.h"
 

	
 
enum BuildVehicleWidgets {
 
	BUILD_VEHICLE_WIDGET_CLOSEBOX = 0,
 
	BUILD_VEHICLE_WIDGET_CAPTION,
 
	BUILD_VEHICLE_WIDGET_LIST_CONTROL,
 
	BUILD_VEHICLE_WIDGET_SORT_ASSENDING_DESCENDING,
 
	BUILD_VEHICLE_WIDGET_SORT_DROPDOWN,
 
	BUILD_VEHICLE_WIDGET_CARGO_FILTER_DROPDOWN,
 
	BUILD_VEHICLE_WIDGET_LIST,
src/cargotype.cpp
Show inline comments
 
/* $Id$ */
 

	
 
/*
 
 * This file is part of OpenTTD.
 
 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
 
 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file cargotype.cpp Implementation of cargos. */
 

	
 
#include "stdafx.h"
 
#include "newgrf_cargo.h"
 
#include "cargotype.h"
 
#include "core/bitmath_func.hpp"
 

	
 
#include "table/sprites.h"
 
#include "table/strings.h"
 
#include "table/cargo_const.h"
 

	
 
CargoSpec CargoSpec::array[NUM_CARGO];
 

	
 
/* Bitmask of cargo types available */
 
uint32 _cargo_mask;
 

	
src/cargotype.h
Show inline comments
 
@@ -20,24 +20,38 @@
 

	
 
typedef uint32 CargoLabel;
 

	
 
enum TownEffect {
 
	TE_NONE,
 
	TE_PASSENGERS,
 
	TE_MAIL,
 
	TE_GOODS,
 
	TE_WATER,
 
	TE_FOOD,
 
};
 

	
 
enum CargoClass {
 
	CC_NOAVAILABLE  = 0,       ///< No cargo class has been specified
 
	CC_PASSENGERS   = 1 <<  0, ///< Passengers
 
	CC_MAIL         = 1 <<  1, ///< Mail
 
	CC_EXPRESS      = 1 <<  2, ///< Express cargo (Goods, Food, Candy, but also possible for passengers)
 
	CC_ARMOURED     = 1 <<  3, ///< Armoured cargo (Valuables, Gold, Diamonds)
 
	CC_BULK         = 1 <<  4, ///< Bulk cargo (Coal, Grain etc., Ores, Fruit)
 
	CC_PIECE_GOODS  = 1 <<  5, ///< Piece goods (Livestock, Wood, Steel, Paper)
 
	CC_LIQUID       = 1 <<  6, ///< Liquids (Oil, Water, Rubber)
 
	CC_REFRIGERATED = 1 <<  7, ///< Refrigerated cargo (Food, Fruit)
 
	CC_HAZARDOUS    = 1 <<  8, ///< Hazardous cargo (Nuclear Fuel, Explosives, etc.)
 
	CC_COVERED      = 1 <<  9, ///< Covered/Sheltered Freight (Transporation in Box Vans, Silo Wagons, etc.)
 
	CC_SPECIAL      = 1 << 15  ///< Special bit used for livery refit tricks instead of normal cargoes.
 
};
 

	
 
static const byte INVALID_CARGO = 0xFF;
 

	
 
struct CargoSpec {
 
	uint8 bitnum;
 
	CargoLabel label;
 
	uint8 legend_colour;
 
	uint8 rating_colour;
 
	uint8 weight;
 
	uint16 initial_payment;
 
	uint8 transit_days[2];
 

	
 
@@ -106,22 +120,22 @@ private:
 
};
 

	
 
extern uint32 _cargo_mask;
 

	
 
/* Set up the default cargo types for the given landscape type */
 
void SetupCargoForClimate(LandscapeID l);
 
/* Get the cargo icon for a given cargo ID */
 
SpriteID GetCargoSprite(CargoID i);
 
/* Get the cargo ID with the cargo label */
 
CargoID GetCargoIDByLabel(CargoLabel cl);
 
CargoID GetCargoIDByBitnum(uint8 bitnum);
 

	
 
static inline bool IsCargoInClass(CargoID c, uint16 cc)
 
static inline bool IsCargoInClass(CargoID c, CargoClass cc)
 
{
 
	return (CargoSpec::Get(c)->classes & cc) != 0;
 
}
 

	
 
#define FOR_ALL_CARGOSPECS_FROM(var, start) for (size_t cargospec_index = start; var = NULL, cargospec_index < CargoSpec::GetArraySize(); cargospec_index++) \
 
		if ((var = CargoSpec::Get(cargospec_index))->IsValid())
 
#define FOR_ALL_CARGOSPECS(var) FOR_ALL_CARGOSPECS_FROM(var, 0)
 

	
 
#endif /* CARGOTYPE_H */
src/economy.cpp
Show inline comments
 
@@ -14,24 +14,25 @@
 
#include "tile_cmd.h"
 
#include "company_func.h"
 
#include "command_func.h"
 
#include "industry.h"
 
#include "town.h"
 
#include "news_func.h"
 
#include "network/network.h"
 
#include "network/network_func.h"
 
#include "vehicle_gui.h"
 
#include "ai/ai.hpp"
 
#include "aircraft.h"
 
#include "train.h"
 
#include "newgrf_cargo.h"
 
#include "newgrf_engine.h"
 
#include "newgrf_sound.h"
 
#include "newgrf_industries.h"
 
#include "newgrf_industrytiles.h"
 
#include "newgrf_station.h"
 
#include "unmovable.h"
 
#include "group.h"
 
#include "strings_func.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "vehicle_func.h"
src/industry_cmd.cpp
Show inline comments
 
@@ -16,24 +16,25 @@
 
#include "station_base.h"
 
#include "train.h"
 
#include "landscape.h"
 
#include "viewport_func.h"
 
#include "command_func.h"
 
#include "town.h"
 
#include "news_func.h"
 
#include "variables.h"
 
#include "cheat_type.h"
 
#include "genworld.h"
 
#include "tree_map.h"
 
#include "newgrf.h"
 
#include "newgrf_cargo.h"
 
#include "newgrf_commons.h"
 
#include "newgrf_industries.h"
 
#include "newgrf_industrytiles.h"
 
#include "autoslope.h"
 
#include "transparency.h"
 
#include "water.h"
 
#include "strings_func.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
src/misc_gui.cpp
Show inline comments
 
@@ -24,25 +24,24 @@
 
#include "town.h"
 
#include "network/network.h"
 
#include "network/network_content.h"
 
#include "company_base.h"
 
#include "texteff.hpp"
 
#include "cargotype.h"
 
#include "company_manager_face.h"
 
#include "strings_func.h"
 
#include "fileio_func.h"
 
#include "fios.h"
 
#include "zoom_func.h"
 
#include "window_func.h"
 
#include "newgrf_cargo.h"
 
#include "tilehighlight_func.h"
 
#include "querystring_gui.h"
 

	
 
#include "table/strings.h"
 

	
 

	
 
/**
 
 * Try to retrive the current clipboard contents.
 
 *
 
 * @note OS-specific funtion.
 
 * @return True if some text could be retrived.
 
 */
src/newgrf.cpp
Show inline comments
 
@@ -18,24 +18,25 @@
 
#include "fileio_func.h"
 
#include "engine_func.h"
 
#include "engine_base.h"
 
#include "spritecache.h"
 
#include "variables.h"
 
#include "bridge.h"
 
#include "town.h"
 
#include "newgrf_engine.h"
 
#include "newgrf_text.h"
 
#include "fontcache.h"
 
#include "currency.h"
 
#include "landscape.h"
 
#include "newgrf_cargo.h"
 
#include "newgrf_house.h"
 
#include "newgrf_sound.h"
 
#include "newgrf_station.h"
 
#include "industry.h"
 
#include "newgrf_canal.h"
 
#include "newgrf_commons.h"
 
#include "newgrf_townname.h"
 
#include "newgrf_industries.h"
 
#include "rev.h"
 
#include "fios.h"
 
#include "rail.h"
 
#include "strings_func.h"
src/newgrf_cargo.h
Show inline comments
 
@@ -7,39 +7,24 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file newgrf_cargo.h Cargo support for NewGRFs. */
 

	
 
#ifndef NEWGRF_CARGO_H
 
#define NEWGRF_CARGO_H
 

	
 
#include "newgrf_callbacks.h"
 
#include "cargo_type.h"
 
#include "gfx_type.h"
 

	
 
enum CargoClass {
 
	CC_NOAVAILABLE  = 0,       ///< No cargo class has been specified
 
	CC_PASSENGERS   = 1 <<  0, ///< Passengers
 
	CC_MAIL         = 1 <<  1, ///< Mail
 
	CC_EXPRESS      = 1 <<  2, ///< Express cargo (Goods, Food, Candy, but also possible for passengers)
 
	CC_ARMOURED     = 1 <<  3, ///< Armoured cargo (Valuables, Gold, Diamonds)
 
	CC_BULK         = 1 <<  4, ///< Bulk cargo (Coal, Grain etc., Ores, Fruit)
 
	CC_PIECE_GOODS  = 1 <<  5, ///< Piece goods (Livestock, Wood, Steel, Paper)
 
	CC_LIQUID       = 1 <<  6, ///< Liquids (Oil, Water, Rubber)
 
	CC_REFRIGERATED = 1 <<  7, ///< Refrigerated cargo (Food, Fruit)
 
	CC_HAZARDOUS    = 1 <<  8, ///< Hazardous cargo (Nuclear Fuel, Explosives, etc.)
 
	CC_COVERED      = 1 <<  9, ///< Covered/Sheltered Freight (Transporation in Box Vans, Silo Wagons, etc.)
 
	CC_SPECIAL      = 1 << 15  ///< Special bit used for livery refit tricks instead of normal cargoes.
 
};
 

	
 
static const CargoID CT_DEFAULT      = NUM_CARGO + 0;
 
static const CargoID CT_PURCHASE     = NUM_CARGO + 1;
 
static const CargoID CT_DEFAULT_NA   = NUM_CARGO + 2;
 

	
 
/* Forward declarations of structs used */
 
struct CargoSpec;
 
struct GRFFile;
 

	
 
SpriteID GetCustomCargoSprite(const CargoSpec *cs);
 
uint16 GetCargoCallback(CallbackID callback, uint32 param1, uint32 param2, const CargoSpec *cs);
 
CargoID GetCargoTranslation(uint8 cargo, const GRFFile *grffile, bool usebit = false);
 
uint8 GetReverseCargoTranslation(CargoID cargo, const GRFFile *grffile);
src/newgrf_engine.cpp
Show inline comments
 
@@ -6,24 +6,25 @@
 
 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file newgrf_engine.cpp NewGRF handling of engines. */
 

	
 
#include "stdafx.h"
 
#include "debug.h"
 
#include "train.h"
 
#include "roadveh.h"
 
#include "company_func.h"
 
#include "newgrf.h"
 
#include "newgrf_cargo.h"
 
#include "newgrf_engine.h"
 
#include "newgrf_spritegroup.h"
 
#include "date_func.h"
 
#include "vehicle_func.h"
 
#include "core/random_func.hpp"
 
#include "aircraft.h"
 
#include "core/smallmap_type.hpp"
 
#include "station_base.h"
 

	
 
struct WagonOverride {
 
	EngineID *train_id;
 
	uint trains;
src/newgrf_spritegroup.h
Show inline comments
 
@@ -12,25 +12,24 @@
 
#ifndef NEWGRF_SPRITEGROUP_H
 
#define NEWGRF_SPRITEGROUP_H
 

	
 
#include "town_type.h"
 
#include "industry_type.h"
 
#include "core/bitmath_func.hpp"
 
#include "gfx_type.h"
 
#include "engine_type.h"
 
#include "tile_type.h"
 
#include "core/pool_type.hpp"
 
#include "house_type.h"
 

	
 
#include "newgrf_cargo.h"
 
#include "newgrf_callbacks.h"
 
#include "newgrf_generic.h"
 
#include "newgrf_storage.h"
 

	
 
/**
 
 * Gets the value of a so-called newgrf "register".
 
 * @param i index of the register
 
 * @pre i < 0x110
 
 * @return the value of the register
 
 */
 
static inline uint32 GetRegister(uint i)
 
{
src/newgrf_station.cpp
Show inline comments
 
@@ -7,24 +7,25 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file newgrf_station.cpp Functions for dealing with station classes and custom stations. */
 

	
 
#include "stdafx.h"
 
#include "variables.h"
 
#include "landscape.h"
 
#include "debug.h"
 
#include "station_base.h"
 
#include "waypoint_base.h"
 
#include "roadstop_base.h"
 
#include "newgrf_cargo.h"
 
#include "newgrf_commons.h"
 
#include "newgrf_station.h"
 
#include "newgrf_spritegroup.h"
 
#include "newgrf_sound.h"
 
#include "town.h"
 
#include "newgrf_town.h"
 
#include "gfx_func.h"
 
#include "date_func.h"
 
#include "company_func.h"
 
#include "animated_tile_func.h"
 
#include "functions.h"
 
#include "tunnelbridge_map.h"
src/newgrf_station.h
Show inline comments
 
@@ -5,25 +5,24 @@
 
 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
 
 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file newgrf_station.h Header file for NewGRF stations */
 

	
 
#ifndef NEWGRF_STATION_H
 
#define NEWGRF_STATION_H
 

	
 
#include "engine_type.h"
 
#include "newgrf_callbacks.h"
 
#include "newgrf_cargo.h"
 
#include "tile_type.h"
 
#include "station_type.h"
 
#include "strings_type.h"
 
#include "sprite.h"
 
#include "direction_type.h"
 
#include "newgrf.h"
 

	
 
enum StationClassID {
 
	STAT_CLASS_BEGIN = 0,    ///< the lowest valid value
 
	STAT_CLASS_DFLT = 0,     ///< Default station class.
 
	STAT_CLASS_WAYP,         ///< Waypoint class.
 
	STAT_CLASS_MAX = 32,     ///< Maximum number of classes.
src/order_cmd.cpp
Show inline comments
 
@@ -10,25 +10,24 @@
 
/** @file order_cmd.cpp Handling of orders. */
 

	
 
#include "stdafx.h"
 
#include "debug.h"
 
#include "command_func.h"
 
#include "company_func.h"
 
#include "news_func.h"
 
#include "vehicle_gui.h"
 
#include "cargotype.h"
 
#include "strings_func.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "newgrf_cargo.h"
 
#include "timetable.h"
 
#include "vehicle_func.h"
 
#include "depot_base.h"
 
#include "roadstop_base.h"
 
#include "core/pool_func.hpp"
 
#include "aircraft.h"
 
#include "roadveh.h"
 
#include "station_base.h"
 
#include "waypoint_base.h"
 

	
 
#include "table/strings.h"
 

	
src/order_gui.cpp
Show inline comments
 
@@ -14,25 +14,24 @@
 
#include "command_func.h"
 
#include "viewport_func.h"
 
#include "gfx_func.h"
 
#include "depot_base.h"
 
#include "vehicle_base.h"
 
#include "vehicle_gui.h"
 
#include "timetable.h"
 
#include "cargotype.h"
 
#include "strings_func.h"
 
#include "window_func.h"
 
#include "vehicle_func.h"
 
#include "company_func.h"
 
#include "newgrf_cargo.h"
 
#include "widgets/dropdown_func.h"
 
#include "textbuf_gui.h"
 
#include "string_func.h"
 
#include "tilehighlight_func.h"
 
#include "network/network.h"
 
#include "station_base.h"
 
#include "waypoint_base.h"
 

	
 
#include "table/sprites.h"
 
#include "table/strings.h"
 

	
 
/** Widget numbers of the order window. */
src/roadveh_cmd.cpp
Show inline comments
 
@@ -27,25 +27,24 @@
 
#include "functions.h"
 
#include "window_func.h"
 
#include "date_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 
#include "autoreplace_gui.h"
 
#include "gfx_func.h"
 
#include "ai/ai.hpp"
 
#include "depot_map.h"
 
#include "effectvehicle_func.h"
 
#include "roadstop_base.h"
 
#include "cargotype.h"
 
#include "newgrf_cargo.h"
 

	
 
#include "table/strings.h"
 
#include "table/sprites.h"
 

	
 
static const uint16 _roadveh_images[63] = {
 
	0xCD4, 0xCDC, 0xCE4, 0xCEC, 0xCF4, 0xCFC, 0xD0C, 0xD14,
 
	0xD24, 0xD1C, 0xD2C, 0xD04, 0xD1C, 0xD24, 0xD6C, 0xD74,
 
	0xD7C, 0xC14, 0xC1C, 0xC24, 0xC2C, 0xC34, 0xC3C, 0xC4C,
 
	0xC54, 0xC64, 0xC5C, 0xC6C, 0xC44, 0xC5C, 0xC64, 0xCAC,
 
	0xCB4, 0xCBC, 0xD94, 0xD9C, 0xDA4, 0xDAC, 0xDB4, 0xDBC,
 
	0xDCC, 0xDD4, 0xDE4, 0xDDC, 0xDEC, 0xDC4, 0xDDC, 0xDE4,
 
	0xE2C, 0xE34, 0xE3C, 0xC14, 0xC1C, 0xC2C, 0xC3C, 0xC4C,
src/station_cmd.cpp
Show inline comments
 
@@ -13,24 +13,25 @@
 
#include "openttd.h"
 
#include "aircraft.h"
 
#include "bridge_map.h"
 
#include "cmd_helper.h"
 
#include "landscape.h"
 
#include "viewport_func.h"
 
#include "command_func.h"
 
#include "town.h"
 
#include "news_func.h"
 
#include "train.h"
 
#include "roadveh.h"
 
#include "industry.h"
 
#include "newgrf_cargo.h"
 
#include "newgrf_station.h"
 
#include "newgrf_commons.h"
 
#include "yapf/yapf.h"
 
#include "road_internal.h" /* For drawing catenary/checking road removal */
 
#include "variables.h"
 
#include "autoslope.h"
 
#include "water.h"
 
#include "station_gui.h"
 
#include "strings_func.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "date_func.h"
src/water_cmd.cpp
Show inline comments
 
@@ -27,25 +27,24 @@
 
#include "cargotype.h"
 
#include "newgrf_canal.h"
 
#include "transparency.h"
 
#include "strings_func.h"
 
#include "functions.h"
 
#include "window_func.h"
 
#include "vehicle_func.h"
 
#include "sound_func.h"
 
#include "company_func.h"
 
#include "clear_map.h"
 
#include "tree_map.h"
 
#include "aircraft.h"
 
#include "newgrf_cargo.h"
 
#include "effectvehicle_func.h"
 
#include "tunnelbridge_map.h"
 
#include "station_base.h"
 
#include "ai/ai.hpp"
 

	
 
#include "table/sprites.h"
 
#include "table/strings.h"
 

	
 
/**
 
 * Describes the behaviour of a tile during flooding.
 
 */
 
enum FloodingBehaviour {
src/yapf/yapf_road.cpp
Show inline comments
 
@@ -3,25 +3,24 @@
 
/*
 
 * This file is part of OpenTTD.
 
 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
 
 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file yapf_road.cpp The road pathfinding. */
 

	
 
#include "../stdafx.h"
 
#include "../roadstop_base.h"
 
#include "../cargotype.h"
 
#include "../newgrf_cargo.h"
 

	
 
#include "yapf.hpp"
 
#include "yapf_node_road.hpp"
 

	
 

	
 
template <class Types>
 
class CYapfCostRoadT
 
{
 
public:
 
	typedef typename Types::Tpf Tpf; ///< pathfinder (derived from THIS class)
 
	typedef typename Types::TrackFollower TrackFollower; ///< track follower helper
 
	typedef typename Types::NodeList::Titem Node; ///< this will be our node type
0 comments (0 inline, 0 general)