Page 4 of 6

Re: New Patch: RouteMarkers

Posted: 01 Oct 2008 00:36
by Aali
I'm going to go ahead and revive this thread again :P

I really liked this patch so I ported it to trunk (revision 14423 at the time of writing)

It may be a little rough at the moment, I'm not really familiar with how everything works yet.
This also means there may be some odd new bugs caused by codechanges since r10000-something :roll:

I also changed the interface a bit, CTRL-click no longer changes the color but the type of the marker (this could not be done without removing the marker and rebuilding it again)

Oh and bonus-markers was never going to work, you can only ever give positive penalties to a route or the pathfinder goes crazy, so instead these "bonus"-markers give penalties to all trains that don't match the color of the marker.

If there is still interest in this patch I might even add some new features, like showing the color in the train list, sorting by color, assigning a color to an entire list etc.

(Oh, and, first post :) )

:EDIT:

Updated to r14545, some bugs fixed (old version could crash ottd)

Re: New Patch: RouteMarkers

Posted: 13 Oct 2008 07:08
by chrissicom
Very nice I will test it immediately :) Thanks for your effots I like this patch!

Re: New Patch: RouteMarkers

Posted: 29 Oct 2008 16:13
by Aali
*bump*

New version, added 2 more colours, fixed a crash with RVs and autoreplace. (cloning a vehicle while it was in a road stop could cause ottd to crash if it was later autoreplaced).

See above post for DL.

Re: New Patch: RouteMarkers

Posted: 29 Oct 2008 20:22
by Batti5
i like this idea but when comlieing i get this

[SRC] Compiling npf.cpp
/home/batti5/openttd/src/npf.cpp: In function ‘int32 NPFRailPathCost(AyStar*, AyStarNode*, OpenListNode*)’:
/home/batti5/openttd/src/npf.cpp:422: warning: comparison between signed and unsigned integer expressions
/home/batti5/openttd/src/npf.cpp:425: warning: comparison between signed and unsigned integer expressions

[SRC] Compiling pathfind.cpp
/home/batti5/openttd/src/pathfind.cpp: In function ‘void NTPEnum(NewTrackPathFinder*, TileIndex, DiagDirection)’:
/home/batti5/openttd/src/pathfind.cpp:714: warning: comparison between signed and unsigned integer expressions
/home/batti5/openttd/src/pathfind.cpp:717: warning: comparison between signed and unsigned integer expressions

[SRC] Compiling yapf/yapf_rail.cpp
/home/batti5/openttd/src/yapf/yapf_costrail.hpp: In member function ‘int CYapfCostRailT<Types>::RoutemarkerCost(typename Types::NodeList::Titem&, TileIndex, Trackdir) [with Types = CYapfRail_TypesT<CYapfRail1, CFollowTrackT<TRANSPORT_BEGIN, true, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationTileOrStationRailT, CYapfFollowRailT>]’:
/home/batti5/openttd/src/yapf/yapf_costrail.hpp:397: instantiated from ‘bool CYapfCostRailT<Types>::PfCalcCost(typename Types::NodeList::Titem&, const typename Types::TrackFollower*) [with Types = CYapfRail_TypesT<CYapfRail1, CFollowTrackT<TRANSPORT_BEGIN, true, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationTileOrStationRailT, CYapfFollowRailT>]’
/home/batti5/openttd/src/yapf/yapf_base.hpp:219: instantiated from ‘void CYapfBaseT<Types>::AddNewNode(typename Types::NodeList::Titem&, const typename Types::TrackFollower&) [with Types = CYapfRail_TypesT<CYapfRail1, CFollowTrackT<TRANSPORT_BEGIN, true, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationTileOrStationRailT, CYapfFollowRailT>]’
/home/batti5/openttd/src/yapf/yapf_base.hpp:203: instantiated from ‘void CYapfBaseT<Types>::AddMultipleNodes(typename Types::NodeList::Titem*, const typename Types::TrackFollower&) [with Types = CYapfRail_TypesT<CYapfRail1, CFollowTrackT<TRANSPORT_BEGIN, true, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationTileOrStationRailT, CYapfFollowRailT>]’
/home/batti5/openttd/src/yapf/yapf_rail.cpp:343: instantiated from ‘void CYapfFollowRailT<Types>::PfFollowNode(typename Types::NodeList::Titem&) [with Types = CYapfRail_TypesT<CYapfRail1, CFollowTrackT<TRANSPORT_BEGIN, true, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationTileOrStationRailT, CYapfFollowRailT>]’
/home/batti5/openttd/src/yapf/yapf_base.hpp:128: instantiated from ‘bool CYapfBaseT<Types>::FindPath(const Vehicle*) [with Types = CYapfRail_TypesT<CYapfRail1, CFollowTrackT<TRANSPORT_BEGIN, true, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationTileOrStationRailT, CYapfFollowRailT>]’
/home/batti5/openttd/src/yapf/yapf_rail.cpp:388: instantiated from ‘Trackdir CYapfFollowRailT<Types>::ChooseRailTrack(const Vehicle*, TileIndex, DiagDirection, TrackBits, bool*, bool, PBSTileInfo*) [with Types = CYapfRail_TypesT<CYapfRail1, CFollowTrackT<TRANSPORT_BEGIN, true, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationTileOrStationRailT, CYapfFollowRailT>]’
/home/batti5/openttd/src/yapf/yapf_rail.cpp:354: instantiated from ‘static Trackdir CYapfFollowRailT<Types>::stChooseRailTrack(const Vehicle*, TileIndex, DiagDirection, TrackBits, bool*, bool, PBSTileInfo*) [with Types = CYapfRail_TypesT<CYapfRail1, CFollowTrackT<TRANSPORT_BEGIN, true, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationTileOrStationRailT, CYapfFollowRailT>]’
/home/batti5/openttd/src/yapf/yapf_rail.cpp:493: instantiated from here
/home/batti5/openttd/src/yapf/yapf_costrail.hpp:150: warning: comparison between signed and unsigned integer expressions
/home/batti5/openttd/src/yapf/yapf_costrail.hpp:154: warning: comparison between signed and unsigned integer expressions
/home/batti5/openttd/src/yapf/yapf_costrail.hpp: In member function ‘int CYapfCostRailT<Types>::RoutemarkerCost(typename Types::NodeList::Titem&, TileIndex, Trackdir) [with Types = CYapfRail_TypesT<CYapfRail2, CFollowTrackT<TRANSPORT_BEGIN, false, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationTileOrStationRailT, CYapfFollowRailT>]’:
/home/batti5/openttd/src/yapf/yapf_costrail.hpp:397: instantiated from ‘bool CYapfCostRailT<Types>::PfCalcCost(typename Types::NodeList::Titem&, const typename Types::TrackFollower*) [with Types = CYapfRail_TypesT<CYapfRail2, CFollowTrackT<TRANSPORT_BEGIN, false, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationTileOrStationRailT, CYapfFollowRailT>]’
/home/batti5/openttd/src/yapf/yapf_base.hpp:219: instantiated from ‘void CYapfBaseT<Types>::AddNewNode(typename Types::NodeList::Titem&, const typename Types::TrackFollower&) [with Types = CYapfRail_TypesT<CYapfRail2, CFollowTrackT<TRANSPORT_BEGIN, false, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationTileOrStationRailT, CYapfFollowRailT>]’
/home/batti5/openttd/src/yapf/yapf_base.hpp:203: instantiated from ‘void CYapfBaseT<Types>::AddMultipleNodes(typename Types::NodeList::Titem*, const typename Types::TrackFollower&) [with Types = CYapfRail_TypesT<CYapfRail2, CFollowTrackT<TRANSPORT_BEGIN, false, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationTileOrStationRailT, CYapfFollowRailT>]’
/home/batti5/openttd/src/yapf/yapf_rail.cpp:343: instantiated from ‘void CYapfFollowRailT<Types>::PfFollowNode(typename Types::NodeList::Titem&) [with Types = CYapfRail_TypesT<CYapfRail2, CFollowTrackT<TRANSPORT_BEGIN, false, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationTileOrStationRailT, CYapfFollowRailT>]’
/home/batti5/openttd/src/yapf/yapf_base.hpp:128: instantiated from ‘bool CYapfBaseT<Types>::FindPath(const Vehicle*) [with Types = CYapfRail_TypesT<CYapfRail2, CFollowTrackT<TRANSPORT_BEGIN, false, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationTileOrStationRailT, CYapfFollowRailT>]’
/home/batti5/openttd/src/yapf/yapf_rail.cpp:388: instantiated from ‘Trackdir CYapfFollowRailT<Types>::ChooseRailTrack(const Vehicle*, TileIndex, DiagDirection, TrackBits, bool*, bool, PBSTileInfo*) [with Types = CYapfRail_TypesT<CYapfRail2, CFollowTrackT<TRANSPORT_BEGIN, false, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationTileOrStationRailT, CYapfFollowRailT>]’
/home/batti5/openttd/src/yapf/yapf_rail.cpp:354: instantiated from ‘static Trackdir CYapfFollowRailT<Types>::stChooseRailTrack(const Vehicle*, TileIndex, DiagDirection, TrackBits, bool*, bool, PBSTileInfo*) [with Types = CYapfRail_TypesT<CYapfRail2, CFollowTrackT<TRANSPORT_BEGIN, false, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationTileOrStationRailT, CYapfFollowRailT>]’
/home/batti5/openttd/src/yapf/yapf_rail.cpp:497: instantiated from here
/home/batti5/openttd/src/yapf/yapf_costrail.hpp:150: warning: comparison between signed and unsigned integer expressions
/home/batti5/openttd/src/yapf/yapf_costrail.hpp:154: warning: comparison between signed and unsigned integer expressions
/home/batti5/openttd/src/yapf/yapf_costrail.hpp: In member function ‘int CYapfCostRailT<Types>::RoutemarkerCost(typename Types::NodeList::Titem&, TileIndex, Trackdir) [with Types = CYapfRail_TypesT<CYapfAnyDepotRail1, CFollowTrackT<TRANSPORT_BEGIN, true, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnyDepotRailT, CYapfFollowAnyDepotRailT>]’:
/home/batti5/openttd/src/yapf/yapf_costrail.hpp:397: instantiated from ‘bool CYapfCostRailT<Types>::PfCalcCost(typename Types::NodeList::Titem&, const typename Types::TrackFollower*) [with Types = CYapfRail_TypesT<CYapfAnyDepotRail1, CFollowTrackT<TRANSPORT_BEGIN, true, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnyDepotRailT, CYapfFollowAnyDepotRailT>]’
/home/batti5/openttd/src/yapf/yapf_base.hpp:219: instantiated from ‘void CYapfBaseT<Types>::AddNewNode(typename Types::NodeList::Titem&, const typename Types::TrackFollower&) [with Types = CYapfRail_TypesT<CYapfAnyDepotRail1, CFollowTrackT<TRANSPORT_BEGIN, true, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnyDepotRailT, CYapfFollowAnyDepotRailT>]’
/home/batti5/openttd/src/yapf/yapf_base.hpp:203: instantiated from ‘void CYapfBaseT<Types>::AddMultipleNodes(typename Types::NodeList::Titem*, const typename Types::TrackFollower&) [with Types = CYapfRail_TypesT<CYapfAnyDepotRail1, CFollowTrackT<TRANSPORT_BEGIN, true, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnyDepotRailT, CYapfFollowAnyDepotRailT>]’
/home/batti5/openttd/src/yapf/yapf_rail.cpp:185: instantiated from ‘void CYapfFollowAnyDepotRailT<Types>::PfFollowNode(typename Types::NodeList::Titem&) [with Types = CYapfRail_TypesT<CYapfAnyDepotRail1, CFollowTrackT<TRANSPORT_BEGIN, true, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnyDepotRailT, CYapfFollowAnyDepotRailT>]’
/home/batti5/openttd/src/yapf/yapf_base.hpp:128: instantiated from ‘bool CYapfBaseT<Types>::FindPath(const Vehicle*) [with Types = CYapfRail_TypesT<CYapfAnyDepotRail1, CFollowTrackT<TRANSPORT_BEGIN, true, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnyDepotRailT, CYapfFollowAnyDepotRailT>]’
/home/batti5/openttd/src/yapf/yapf_rail.cpp:218: instantiated from ‘bool CYapfFollowAnyDepotRailT<Types>::FindNearestDepotTwoWay(const Vehicle*, TileIndex, Trackdir, TileIndex, Trackdir, int, int, TileIndex*, bool*) [with Types = CYapfRail_TypesT<CYapfAnyDepotRail1, CFollowTrackT<TRANSPORT_BEGIN, true, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnyDepotRailT, CYapfFollowAnyDepotRailT>]’
/home/batti5/openttd/src/yapf/yapf_rail.cpp:194: instantiated from ‘static bool CYapfFollowAnyDepotRailT<Types>::stFindNearestDepotTwoWay(const Vehicle*, TileIndex, Trackdir, TileIndex, Trackdir, int, int, TileIndex*, bool*) [with Types = CYapfRail_TypesT<CYapfAnyDepotRail1, CFollowTrackT<TRANSPORT_BEGIN, true, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnyDepotRailT, CYapfFollowAnyDepotRailT>]’
/home/batti5/openttd/src/yapf/yapf_rail.cpp:577: instantiated from here
/home/batti5/openttd/src/yapf/yapf_costrail.hpp:150: warning: comparison between signed and unsigned integer expressions
/home/batti5/openttd/src/yapf/yapf_costrail.hpp:154: warning: comparison between signed and unsigned integer expressions
/home/batti5/openttd/src/yapf/yapf_costrail.hpp: In member function ‘int CYapfCostRailT<Types>::RoutemarkerCost(typename Types::NodeList::Titem&, TileIndex, Trackdir) [with Types = CYapfRail_TypesT<CYapfAnyDepotRail2, CFollowTrackT<TRANSPORT_BEGIN, false, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnyDepotRailT, CYapfFollowAnyDepotRailT>]’:
/home/batti5/openttd/src/yapf/yapf_costrail.hpp:397: instantiated from ‘bool CYapfCostRailT<Types>::PfCalcCost(typename Types::NodeList::Titem&, const typename Types::TrackFollower*) [with Types = CYapfRail_TypesT<CYapfAnyDepotRail2, CFollowTrackT<TRANSPORT_BEGIN, false, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnyDepotRailT, CYapfFollowAnyDepotRailT>]’
/home/batti5/openttd/src/yapf/yapf_base.hpp:219: instantiated from ‘void CYapfBaseT<Types>::AddNewNode(typename Types::NodeList::Titem&, const typename Types::TrackFollower&) [with Types = CYapfRail_TypesT<CYapfAnyDepotRail2, CFollowTrackT<TRANSPORT_BEGIN, false, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnyDepotRailT, CYapfFollowAnyDepotRailT>]’
/home/batti5/openttd/src/yapf/yapf_base.hpp:203: instantiated from ‘void CYapfBaseT<Types>::AddMultipleNodes(typename Types::NodeList::Titem*, const typename Types::TrackFollower&) [with Types = CYapfRail_TypesT<CYapfAnyDepotRail2, CFollowTrackT<TRANSPORT_BEGIN, false, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnyDepotRailT, CYapfFollowAnyDepotRailT>]’
/home/batti5/openttd/src/yapf/yapf_rail.cpp:185: instantiated from ‘void CYapfFollowAnyDepotRailT<Types>::PfFollowNode(typename Types::NodeList::Titem&) [with Types = CYapfRail_TypesT<CYapfAnyDepotRail2, CFollowTrackT<TRANSPORT_BEGIN, false, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnyDepotRailT, CYapfFollowAnyDepotRailT>]’
/home/batti5/openttd/src/yapf/yapf_base.hpp:128: instantiated from ‘bool CYapfBaseT<Types>::FindPath(const Vehicle*) [with Types = CYapfRail_TypesT<CYapfAnyDepotRail2, CFollowTrackT<TRANSPORT_BEGIN, false, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnyDepotRailT, CYapfFollowAnyDepotRailT>]’
/home/batti5/openttd/src/yapf/yapf_rail.cpp:218: instantiated from ‘bool CYapfFollowAnyDepotRailT<Types>::FindNearestDepotTwoWay(const Vehicle*, TileIndex, Trackdir, TileIndex, Trackdir, int, int, TileIndex*, bool*) [with Types = CYapfRail_TypesT<CYapfAnyDepotRail2, CFollowTrackT<TRANSPORT_BEGIN, false, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnyDepotRailT, CYapfFollowAnyDepotRailT>]’
/home/batti5/openttd/src/yapf/yapf_rail.cpp:194: instantiated from ‘static bool CYapfFollowAnyDepotRailT<Types>::stFindNearestDepotTwoWay(const Vehicle*, TileIndex, Trackdir, TileIndex, Trackdir, int, int, TileIndex*, bool*) [with Types = CYapfRail_TypesT<CYapfAnyDepotRail2, CFollowTrackT<TRANSPORT_BEGIN, false, false>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnyDepotRailT, CYapfFollowAnyDepotRailT>]’
/home/batti5/openttd/src/yapf/yapf_rail.cpp:581: instantiated from here
/home/batti5/openttd/src/yapf/yapf_costrail.hpp:150: warning: comparison between signed and unsigned integer expressions
/home/batti5/openttd/src/yapf/yapf_costrail.hpp:154: warning: comparison between signed and unsigned integer expressions
/home/batti5/openttd/src/yapf/yapf_costrail.hpp: In member function ‘int CYapfCostRailT<Types>::RoutemarkerCost(typename Types::NodeList::Titem&, TileIndex, Trackdir) [with Types = CYapfRail_TypesT<CYapfAnySafeTileRail1, CFollowTrackT<TRANSPORT_BEGIN, true, true>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnySafeTileRailT, CYapfFollowAnySafeTileRailT>]’:
/home/batti5/openttd/src/yapf/yapf_costrail.hpp:397: instantiated from ‘bool CYapfCostRailT<Types>::PfCalcCost(typename Types::NodeList::Titem&, const typename Types::TrackFollower*) [with Types = CYapfRail_TypesT<CYapfAnySafeTileRail1, CFollowTrackT<TRANSPORT_BEGIN, true, true>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnySafeTileRailT, CYapfFollowAnySafeTileRailT>]’
/home/batti5/openttd/src/yapf/yapf_base.hpp:219: instantiated from ‘void CYapfBaseT<Types>::AddNewNode(typename Types::NodeList::Titem&, const typename Types::TrackFollower&) [with Types = CYapfRail_TypesT<CYapfAnySafeTileRail1, CFollowTrackT<TRANSPORT_BEGIN, true, true>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnySafeTileRailT, CYapfFollowAnySafeTileRailT>]’
/home/batti5/openttd/src/yapf/yapf_base.hpp:203: instantiated from ‘void CYapfBaseT<Types>::AddMultipleNodes(typename Types::NodeList::Titem*, const typename Types::TrackFollower&) [with Types = CYapfRail_TypesT<CYapfAnySafeTileRail1, CFollowTrackT<TRANSPORT_BEGIN, true, true>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnySafeTileRailT, CYapfFollowAnySafeTileRailT>]’
/home/batti5/openttd/src/yapf/yapf_rail.cpp:261: instantiated from ‘void CYapfFollowAnySafeTileRailT<Types>::PfFollowNode(typename Types::NodeList::Titem&) [with Types = CYapfRail_TypesT<CYapfAnySafeTileRail1, CFollowTrackT<TRANSPORT_BEGIN, true, true>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnySafeTileRailT, CYapfFollowAnySafeTileRailT>]’
/home/batti5/openttd/src/yapf/yapf_base.hpp:128: instantiated from ‘bool CYapfBaseT<Types>::FindPath(const Vehicle*) [with Types = CYapfRail_TypesT<CYapfAnySafeTileRail1, CFollowTrackT<TRANSPORT_BEGIN, true, true>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnySafeTileRailT, CYapfFollowAnySafeTileRailT>]’
/home/batti5/openttd/src/yapf/yapf_rail.cpp:302: instantiated from ‘bool CYapfFollowAnySafeTileRailT<Types>::FindNearestSafeTile(const Vehicle*, TileIndex, Trackdir, bool, bool) [with Types = CYapfRail_TypesT<CYapfAnySafeTileRail1, CFollowTrackT<TRANSPORT_BEGIN, true, true>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnySafeTileRailT, CYapfFollowAnySafeTileRailT>]’
/home/batti5/openttd/src/yapf/yapf_rail.cpp:272: instantiated from ‘static bool CYapfFollowAnySafeTileRailT<Types>::stFindNearestSafeTile(const Vehicle*, TileIndex, Trackdir, bool) [with Types = CYapfRail_TypesT<CYapfAnySafeTileRail1, CFollowTrackT<TRANSPORT_BEGIN, true, true>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnySafeTileRailT, CYapfFollowAnySafeTileRailT>]’
/home/batti5/openttd/src/yapf/yapf_rail.cpp:591: instantiated from here
/home/batti5/openttd/src/yapf/yapf_costrail.hpp:150: warning: comparison between signed and unsigned integer expressions
/home/batti5/openttd/src/yapf/yapf_costrail.hpp:154: warning: comparison between signed and unsigned integer expressions
/home/batti5/openttd/src/yapf/yapf_costrail.hpp: In member function ‘int CYapfCostRailT<Types>::RoutemarkerCost(typename Types::NodeList::Titem&, TileIndex, Trackdir) [with Types = CYapfRail_TypesT<CYapfAnySafeTileRail2, CFollowTrackT<TRANSPORT_BEGIN, false, true>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnySafeTileRailT, CYapfFollowAnySafeTileRailT>]’:
/home/batti5/openttd/src/yapf/yapf_costrail.hpp:397: instantiated from ‘bool CYapfCostRailT<Types>::PfCalcCost(typename Types::NodeList::Titem&, const typename Types::TrackFollower*) [with Types = CYapfRail_TypesT<CYapfAnySafeTileRail2, CFollowTrackT<TRANSPORT_BEGIN, false, true>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnySafeTileRailT, CYapfFollowAnySafeTileRailT>]’
/home/batti5/openttd/src/yapf/yapf_base.hpp:219: instantiated from ‘void CYapfBaseT<Types>::AddNewNode(typename Types::NodeList::Titem&, const typename Types::TrackFollower&) [with Types = CYapfRail_TypesT<CYapfAnySafeTileRail2, CFollowTrackT<TRANSPORT_BEGIN, false, true>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnySafeTileRailT, CYapfFollowAnySafeTileRailT>]’
/home/batti5/openttd/src/yapf/yapf_base.hpp:203: instantiated from ‘void CYapfBaseT<Types>::AddMultipleNodes(typename Types::NodeList::Titem*, const typenameTypes::TrackFollower&) [with Types = CYapfRail_TypesT<CYapfAnySafeTileRail2, CFollowTrackT<TRANSPORT_BEGIN, false, true>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnySafeTileRailT, CYapfFollowAnySafeTileRailT>]’
/home/batti5/openttd/src/yapf/yapf_rail.cpp:261: instantiated from ‘void CYapfFollowAnySafeTileRailT<Types>::PfFollowNode(typename Types::NodeList::Titem&) [with Types = CYapfRail_TypesT<CYapfAnySafeTileRail2, CFollowTrackT<TRANSPORT_BEGIN, false, true>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12,16>, CYapfDestinationAnySafeTileRailT, CYapfFollowAnySafeTileRailT>]’
/home/batti5/openttd/src/yapf/yapf_base.hpp:128: instantiated from ‘bool CYapfBaseT<Types>::FindPath(const Vehicle*) [with Types = CYapfRail_TypesT<CYapfAnySafeTileRail2, CFollowTrackT<TRANSPORT_BEGIN, false, true>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnySafeTileRailT,CYapfFollowAnySafeTileRailT>]’
/home/batti5/openttd/src/yapf/yapf_rail.cpp:302: instantiated from ‘bool CYapfFollowAnySafeTileRailT<Types>::FindNearestSafeTile(const Vehicle*, TileIndex, Trackdir, bool, bool) [with Types = CYapfRail_TypesT<CYapfAnySafeTileRail2, CFollowTrackT<TRANSPORT_BEGIN, false, true>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnySafeTileRailT, CYapfFollowAnySafeTileRailT>]’
/home/batti5/openttd/src/yapf/yapf_rail.cpp:272: instantiated from ‘static bool CYapfFollowAnySafeTileRailT<Types>::stFindNearestSafeTile(const Vehicle*, TileIndex, Trackdir, bool) [with Types = CYapfRail_TypesT<CYapfAnySafeTileRail2, CFollowTrackT<TRANSPORT_BEGIN, false, true>, CNodeList_HashTableT<CYapfRailNodeT<CYapfNodeKeyTrackDir>, 12, 16>, CYapfDestinationAnySafeTileRailT, CYapfFollowAnySafeTileRailT>]’
/home/batti5/openttd/src/yapf/yapf_rail.cpp:595: instantiated from here
/home/batti5/openttd/src/yapf/yapf_costrail.hpp:150: warning: comparison between signed and unsigned integer expressions
/home/batti5/openttd/src/yapf/yapf_costrail.hpp:154: warning: comparison between signed and unsigned integer expressions

in r14545, in the rest the game works fine.

Re: New Patch: RouteMarkers

Posted: 09 Jan 2009 11:13
by Conditional Zenith
Updated so that it works for latest trunk (r14931). No other changes (apart from fixing some spelling mistakes in the strings). Still gets the bucketload of warnings that batti5 mentions, I may look into them later.

GRF hasn't changed, grab it from Aali's post above. This is a mercurial diff file, so you will need to apply it with -p1 instead of -p0.

I'm not making any binaries, please don't ask me for them.

13/01/09: Updated to r15049 and fixed warnings
04/02/09: Updated to r15332, consolidated some code into the rail_gui file.
25/02/09: Updated to r15572, which required me to fix some magic numbers.
14/03/09: Updated to r15700

Re: New Patch: RouteMarkers

Posted: 09 Jan 2009 14:02
by Aali
That's odd, I don't get those warnings..

It's probably related to the fact that the actual routemarker's colour is an enum while vehicles store it as a uint8.

Not sure what the best solution for that is, but if you just want to get rid of the warnings, casting _train_routemarker_colour to RoutemarkerColour in the pathfinder code should do it.

Re: New Patch: RouteMarkers

Posted: 09 Jan 2009 14:12
by Conditional Zenith
Yes, that is exactly the cause of the warnings (well the first 4 at least), I just didn't know the patch well enough to know why the vehicle used a uint instead of the enum, and didn't want to change things before I understood them.

And I'm guessing only GCC emits these warnings, whereas you are using something else.

Re: New Patch: RouteMarkers

Posted: 09 Jan 2009 15:25
by Aali
I'm not the original author so I can only guess, but I think it has to do with the saveload code since the vehicle colour is saved as a uint8

Re: New Patch: RouteMarkers

Posted: 09 Jan 2009 16:55
by richk67
Give that man a star ;)

Re: New Patch: RouteMarkers

Posted: 13 Jan 2009 03:28
by Conditional Zenith
Updated the patch to the latest trunk, see my above post for the new version (http://www.tt-forums.net/viewtopic.php?p=755753#p755753).

Re: New Patch: RouteMarkers

Posted: 04 Feb 2009 09:01
by Conditional Zenith
Updated again for latest trunk, see http://www.tt-forums.net/viewtopic.php?p=755753#p755753 for the latest.

Hasn't been tested much at all (I tested that it runs and I can place markers).

Re: New Patch: RouteMarkers

Posted: 05 Feb 2009 22:34
by Klaatu
So, why is the thread titled "New Patch"? Sure, I know it's been updated, but still it's not a new patch; it's 2 years old for [DEITY]'s sake!

Re: New Patch: RouteMarkers

Posted: 05 Feb 2009 22:37
by Yexo
Klaatu wrote:So, why is the thread titled "New Patch"? Sure, I know it's been updated, but still it's not a new patch; it's 2 years old for [DEITY]'s sake!
Because at the time the first post was made the patch was new, and nobody updated the topic title since then.

Re: New Patch: RouteMarkers

Posted: 06 Feb 2009 01:44
by Conditional Zenith
Yes, I'm not the OP, I can't change the title.

Re: New Patch: RouteMarkers

Posted: 12 Feb 2009 10:56
by Eddi
that's a primary rule in software development:
don't call anything "new", because it gets old very quickly.

(in TTD-Context this rule gets violated quite often. like a certain person's new<something>.grf files, "new" pathfinder, "new" curve and mountan handling, even NewGRF itself... [many more examples])

(calling anything "new" usually results in "yet another ..." and similar following incarnations)

Re: New Patch: RouteMarkers

Posted: 17 Feb 2009 23:35
by 2007Alain2007
sounds very nice A LOT better then placeing lots of way ponints :D keep up the good work

Re: New Patch: RouteMarkers

Posted: 25 Feb 2009 00:28
by Conditional Zenith
Updated to latest trunk. Grab it from http://www.tt-forums.net/viewtopic.php?p=755753#p755753

Re: New Patch: RouteMarkers

Posted: 25 Feb 2009 00:30
by 2007Alain2007
Conditional Zenith this file worked on the new one any ways

Re: New Patch: RouteMarkers

Posted: 25 Feb 2009 05:21
by Conditional Zenith
I'm not quite sure what you are saying. The old file here had some color -> colour issues, and used some magic numbers where it shouldn't have. I would be very surprised if the previous patch successfully built when applied to the latest trunk.

Re: New Patch: RouteMarkers

Posted: 25 Feb 2009 12:16
by 2007Alain2007
why is the patch useing a/ and b/ becuse i dont see why it is need and sorry for the other post