Patch: RouteMarkers

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Aali
Traffic Manager
Traffic Manager
Posts: 144
Joined: 01 Oct 2008 00:04
Location: Sweden

Re: New Patch: RouteMarkers

Post 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)
Attachments
routemarker.grf
GRF hasn't really changed, included just in case
(1.38 KiB) Downloaded 341 times
routemarker-r14545-bin.zip
(1.01 MiB) Downloaded 267 times
routemarker-r14545.patch
(41.71 KiB) Downloaded 299 times
Last edited by Aali on 29 Oct 2008 16:13, edited 2 times in total.
chrissicom
Route Supervisor
Route Supervisor
Posts: 415
Joined: 07 Oct 2004 10:05

Re: New Patch: RouteMarkers

Post by chrissicom »

Very nice I will test it immediately :) Thanks for your effots I like this patch!
Aali
Traffic Manager
Traffic Manager
Posts: 144
Joined: 01 Oct 2008 00:04
Location: Sweden

Re: New Patch: RouteMarkers

Post 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.
Batti5
Transport Coordinator
Transport Coordinator
Posts: 279
Joined: 06 Aug 2007 17:37

Re: New Patch: RouteMarkers

Post 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.
Wish to earn some money for free just by viewing some advertisment? Click this banner for more info.
Image
It is Legal.
Conditional Zenith
Chief Executive
Chief Executive
Posts: 697
Joined: 10 Jun 2003 00:19
Location: Australia

Re: New Patch: RouteMarkers

Post 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
Attachments
routemarker-r15700.diff
(40.41 KiB) Downloaded 311 times
Last edited by Conditional Zenith on 13 Mar 2009 22:16, edited 5 times in total.
Aali
Traffic Manager
Traffic Manager
Posts: 144
Joined: 01 Oct 2008 00:04
Location: Sweden

Re: New Patch: RouteMarkers

Post 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.
Conditional Zenith
Chief Executive
Chief Executive
Posts: 697
Joined: 10 Jun 2003 00:19
Location: Australia

Re: New Patch: RouteMarkers

Post 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.
Aali
Traffic Manager
Traffic Manager
Posts: 144
Joined: 01 Oct 2008 00:04
Location: Sweden

Re: New Patch: RouteMarkers

Post 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
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Re: New Patch: RouteMarkers

Post by richk67 »

Give that man a star ;)
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
Conditional Zenith
Chief Executive
Chief Executive
Posts: 697
Joined: 10 Jun 2003 00:19
Location: Australia

Re: New Patch: RouteMarkers

Post 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).
Conditional Zenith
Chief Executive
Chief Executive
Posts: 697
Joined: 10 Jun 2003 00:19
Location: Australia

Re: New Patch: RouteMarkers

Post 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).
Klaatu
Engineer
Engineer
Posts: 43
Joined: 04 Aug 2003 14:58

Re: New Patch: RouteMarkers

Post 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!
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: New Patch: RouteMarkers

Post 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.
Conditional Zenith
Chief Executive
Chief Executive
Posts: 697
Joined: 10 Jun 2003 00:19
Location: Australia

Re: New Patch: RouteMarkers

Post by Conditional Zenith »

Yes, I'm not the OP, I can't change the title.
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: New Patch: RouteMarkers

Post 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)
2007Alain2007
Chief Executive
Chief Executive
Posts: 658
Joined: 11 Nov 2007 12:06
Contact:

Re: New Patch: RouteMarkers

Post by 2007Alain2007 »

sounds very nice A LOT better then placeing lots of way ponints :D keep up the good work
For Community Integrated Version http://code.google.com/p/civopenttd/
Conditional Zenith
Chief Executive
Chief Executive
Posts: 697
Joined: 10 Jun 2003 00:19
Location: Australia

Re: New Patch: RouteMarkers

Post by Conditional Zenith »

Updated to latest trunk. Grab it from http://www.tt-forums.net/viewtopic.php?p=755753#p755753
2007Alain2007
Chief Executive
Chief Executive
Posts: 658
Joined: 11 Nov 2007 12:06
Contact:

Re: New Patch: RouteMarkers

Post by 2007Alain2007 »

Conditional Zenith this file worked on the new one any ways
For Community Integrated Version http://code.google.com/p/civopenttd/
Conditional Zenith
Chief Executive
Chief Executive
Posts: 697
Joined: 10 Jun 2003 00:19
Location: Australia

Re: New Patch: RouteMarkers

Post 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.
2007Alain2007
Chief Executive
Chief Executive
Posts: 658
Joined: 11 Nov 2007 12:06
Contact:

Re: New Patch: RouteMarkers

Post by 2007Alain2007 »

why is the patch useing a/ and b/ becuse i dont see why it is need and sorry for the other post
For Community Integrated Version http://code.google.com/p/civopenttd/
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Google [Bot] and 3 guests