diff -r bd87e54186f2 -r 7209db94ad12 src/ai/api/ai_tilelist_valuator.hpp --- a/src/ai/api/ai_tilelist_valuator.hpp Sun Feb 24 22:05:07 2008 +0000 +++ b/src/ai/api/ai_tilelist_valuator.hpp Sun Feb 24 22:10:05 2008 +0000 @@ -8,53 +8,53 @@ #include "ai_abstractlist.hpp" /** - * Check if tiles are buildable for entries in an AITileList instance. + * Check if tiles are buildable for entries in an AITileList_v instance. * @note resulting items are of the type bool (0 = not buildable, 1 = buildable) * @note the input items are of the type TileIndex */ -class AITileListBuildable : public AIAbstractList::Valuator { +class AITileList_vBuildable : public AIAbstractList::Valuator { public: /** * The name of the class, needed by several sub-processes. */ - static const char *GetClassName() { return "AITileListBuildable"; } + static const char *GetClassName() { return "AITileList_vBuildable"; } private: int32 Valuate(int32 tile) const; }; /** - * Check if tiles are water-tiles for entries in an AITileList instance. + * Check if tiles are water-tiles for entries in an AITileList_v instance. * @note resulting items are of the type bool (0 = not water-tile, 1 = water-tile) * @note the input items are of the type TileIndex */ -class AITileListWater : public AIAbstractList::Valuator { +class AITileList_vWater : public AIAbstractList::Valuator { public: /** * The name of the class, needed by several sub-processes. */ - static const char *GetClassName() { return "AITileListWater"; } + static const char *GetClassName() { return "AITileList_vWater"; } private: int32 Valuate(int32 tile) const; }; /** - * Check if tiles are buildable in a rectangle around entries in an AITileList instance, with the entry in the list as top-left. + * Check if tiles are buildable in a rectangle around entries in an AITileList_v instance, with the entry in the list as top-left. * @note resulting items are of the type bool (0 = not buildable, 1 = buildable) * @note the input items are of the type TileIndex */ -class AITileListBuildableRectangle : public AIAbstractList::Valuator { +class AITileList_vBuildableRectangle : public AIAbstractList::Valuator { public: /** * The name of the class, needed by several sub-processes. */ - static const char *GetClassName() { return "AITileListBuildableRectangle"; } + static const char *GetClassName() { return "AITileList_vBuildableRectangle"; } /** * Custom constructor, we want a width and height as parameter. */ - AITileListBuildableRectangle(uint width, uint height) { this->width = width; this->height = height; } + AITileList_vBuildableRectangle(uint width, uint height) { this->width = width; this->height = height; } private: uint width, height; @@ -63,72 +63,72 @@ }; /** - * Check how tiles in an AITileList instance are sloped. + * Check how tiles in an AITileList_v instance are sloped. * @note resulting items are of the type int32 (0 = flat, > 1 = slope) * @note the input items are of the type TileIndex */ -class AITileListSlope : public AIAbstractList::Valuator { +class AITileList_vSlope : public AIAbstractList::Valuator { public: /** * The name of the class, needed by several sub-processes. */ - static const char *GetClassName() { return "AITileListSlope"; } - -private: - int32 Valuate(int32 tile) const; -}; - -/** - * Check the height of the tiles in an AITileList instance. - * @note resulting items are of the type int32 (height, ranging from 0 to 15) - * @note the input items are of the type TileIndex - */ -class AITileListHeight : public AIAbstractList::Valuator { -public: - /** - * The name of the class, needed by several sub-processes. - */ - static const char *GetClassName() { return "AITileListHeight"; } + static const char *GetClassName() { return "AITileList_vSlope"; } private: int32 Valuate(int32 tile) const; }; /** - * Count for each entry in AITileList the amount of neighbours that contain road. - * This is a value between 0 and 4, as it only check horizontal and vertical. - * @note resulting items are of the type int32 (the amount of neighbour road tiles, value between 0 and 4) + * Check the height of the tiles in an AITileList_v instance. + * @note resulting items are of the type int32 (height, ranging from 0 to 15) * @note the input items are of the type TileIndex */ -class AITileListNeighbourRoadCount : public AIAbstractList::Valuator { +class AITileList_vHeight : public AIAbstractList::Valuator { public: /** * The name of the class, needed by several sub-processes. */ - static const char *GetClassName() { return "AITileListNeighbourRoad"; } + static const char *GetClassName() { return "AITileList_vHeight"; } private: int32 Valuate(int32 tile) const; }; /** - * Check if the tiles in AITileList have a piece of road on them. - * @note resulting items are of the type bool (0 = no road, 1 = road) + * Count for each entry in AITileList_v the amount of neighbours that contain road. + * This is a value between 0 and 4, as it only check horizontal and vertical. + * @note resulting items are of the type int32 (the amount of neighbour road tiles, value between 0 and 4) * @note the input items are of the type TileIndex */ -class AITileListRoadTile : public AIAbstractList::Valuator { +class AITileList_vNeighbourRoadCount : public AIAbstractList::Valuator { public: /** * The name of the class, needed by several sub-processes. */ - static const char *GetClassName() { return "AITileListRoadTile"; } + static const char *GetClassName() { return "AITileList_vNeighbourRoad"; } private: int32 Valuate(int32 tile) const; }; /** - * Get the amount of estimated accepted cargo for all tiles in AITileList. + * Check if the tiles in AITileList_v have a piece of road on them. + * @note resulting items are of the type bool (0 = no road, 1 = road) + * @note the input items are of the type TileIndex + */ +class AITileList_vRoadTile : public AIAbstractList::Valuator { +public: + /** + * The name of the class, needed by several sub-processes. + */ + static const char *GetClassName() { return "AITileList_vRoadTile"; } + +private: + int32 Valuate(int32 tile) const; +}; + +/** + * Get the amount of estimated accepted cargo for all tiles in AITileList_v. * If this value is >= 8, it means it will accept this cargo. For passengers * and mail it is also a good indicator how much cargo would be brought to * the station. @@ -136,17 +136,17 @@ * @note resulting items are of the type int32 (indicating acceptance) * @note the input items are of the type TileIndex */ -class AITileListCargoAcceptance : public AIAbstractList::Valuator { +class AITileList_vCargoAcceptance : public AIAbstractList::Valuator { public: /** * The name of the class, needed by several sub-processes. */ - static const char *GetClassName() { return "AITileListCargoAcceptance"; } + static const char *GetClassName() { return "AITileList_vCargoAcceptance"; } /** * Custom constructor, we want a cargo-type as parameter. */ - AITileListCargoAcceptance(CargoID cargo_type, uint width, uint height, uint radius) { this->cargo_type = cargo_type; this->width = width; this->height = height; this->radius = radius; } + AITileList_vCargoAcceptance(CargoID cargo_type, uint width, uint height, uint radius) { this->cargo_type = cargo_type; this->width = width; this->height = height; this->radius = radius; } private: CargoID cargo_type; @@ -156,21 +156,21 @@ }; /** - * Get the manhattan distance to a tile for entries in an AITileList instance. + * Get the manhattan distance to a tile for entries in an AITileList_v instance. * @note resulting items are of the type distance * @note the input items are of the type TileIndex */ -class AITileListDistanceManhattanToTile : public AIAbstractList::Valuator { +class AITileList_vDistanceManhattanToTile : public AIAbstractList::Valuator { public: /** * The name of the class, needed by several sub-processes. */ - static const char *GetClassName() { return "AITileListDistanceManhattanToTile"; } + static const char *GetClassName() { return "AITileList_vDistanceManhattanToTile"; } /** * Custom constructor, we want a tile as parameter. */ - AITileListDistanceManhattanToTile(TileIndex tile) { this->tile = tile; } + AITileList_vDistanceManhattanToTile(TileIndex tile) { this->tile = tile; } private: TileIndex tile; @@ -179,21 +179,21 @@ }; /** - * Get the sqsuare distance to a tile for entries in an AITileList instance. + * Get the sqsuare distance to a tile for entries in an AITileList_v instance. * @note resulting items are of the type distance * @note the input items are of the type TileIndex */ -class AITileListDistanceSquareToTile : public AIAbstractList::Valuator { +class AITileList_vDistanceSquareToTile : public AIAbstractList::Valuator { public: /** * The name of the class, needed by several sub-processes. */ - static const char *GetClassName() { return "AITileListDistanceSquareToTile"; } + static const char *GetClassName() { return "AITileList_vDistanceSquareToTile"; } /** * Custom constructor, we want a tile as parameter. */ - AITileListDistanceSquareToTile(TileIndex tile) { this->tile = tile; } + AITileList_vDistanceSquareToTile(TileIndex tile) { this->tile = tile; } private: TileIndex tile;