summaryrefslogtreecommitdiff
path: root/pathfind.c
AgeCommit message (Collapse)Author
2006-05-23(svn r4964) - Fix NTP over bridges: don't check the rail type when on a bridgepeter1138
2006-05-13(svn r4859) - Pathfinder: fix issue with train pathfinding over level crossings.peter1138
2006-05-10(svn r4812) -Fix (FS#161) NTP properly checks for railtypes on ↵celestar
non-plain-rail-tiles (Rubidium)
2006-05-03(svn r4715) - Fix: (FS#109) — Wrongfully bad signal - Don't allow OPF to ↵KUDr
enter train depot from the back
2006-04-22(svn r4515) -Codechange: TPFMode2 is currently only used for ↵celestar
TRANSPORT_WATER. So remove all stuff that deals with other transport types and assert TRANSPORT_WATER
2006-04-02(svn r4245) Simplify FindLengthOfTunnel()tron
2006-03-29(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of ↵celestar
code and proofreading, thanks to peter1138 for another lot of code and ideas.
2006-03-19(svn r3979) Move GetRailFoundation() to rail_map.h and use it and friends to ↵tron
get information about rail tiles
2006-03-16(svn r3907) Replace many bridge related direct map accesses with calls to ↵tron
shiny new functions and mark some strange constructs with XXX
2006-03-12(svn r3830) Move IsTunnelTile() from tile.h to tunnel_map.h and add ↵tron
IsTunnel(), which just checks for a tunnel, but not the tile type as IsTunnelTile() does
2006-03-08(svn r3783) Replace further ints and magic numbers by Direction, ↵tron
DiagDirection and friends
2006-03-06(svn r3777) Add some functions to handle tunnelstron
2006-03-06(svn r3776) Replace many ints and magic numbers by Direction, DiagDirection ↵tron
and friends
2006-03-03(svn r3747) Change HASBIT() to return 0/1 instead of 0/value of tested bit, ↵tron
because the name suggests it does the former and current behavior broke in some places in very subtle ways (for example HASBIT(x, 0) != HASBIT(y, 1) doesn't work, returning a bool after HASBIT(x, 9) neither)
2006-03-01(svn r3697) Rename DIAG1/DIAG2 to X resp. Y as this conveys a bit better in ↵tron
which direction a pieces of rail goes
2006-02-13(svn r3599) -Fix: added some casts to suppress some more warningstruelight
2006-02-13(svn r3597) Miscellaneous (I like that word) changes: Fix some indentation, ↵tron
add consts, reduce indentation level by short-circuit logic, convert if cascades to switch, whitespace, bracing, plus some minor stuff
2006-02-01(svn r3511) More whitespace ([FS#46] by Rubidium)tron
2005-12-21(svn r3329) - Doc: Some documentation cleanups.matthijs
- Add: TracksOverlap() (from the map branch), TrackdirBitsToTrackBits(), DiagdirReachesTrackdirs(), DiagdirReachesTracks(). - Fix: Infinite loop in the pathfinder introduces in r3321.
2005-12-20(svn r3321) - Fix: A wrong use of the map m5 bits, where a previously ↵matthijs
calculated "bits" variable should have been used. This resulted in the pathfinder imagining junctions, which negatively affects performance somewhat (Darkvater). - Fix: [ 1346377 ] Limiting the "depth" of the search tree fixes this assert. Though the above fix seems to fix this bug too, it will only make it less likely to occur. The problem here was the StackedItem::depth field overflowing, which made the pathfinder think it was at the first tile again. Adding an explicit overflow check should fix this.
2005-10-22(svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in ↵tron
comments, excess empty lines, minor other changes nothing spectacular, just some stuff, which piled up
2005-10-05(svn r3019) -Codechange: Replace explicit shifting/anding/oring with GB and SBtron
2005-10-04(svn r3012) Extract the correct bits when checking if it's a road or rail ↵tron
tunnel; this is not flagged as fix, because it accidently worked
2005-08-01(svn r2781) Fix some of the issues with variables in .h files.ludde
2005-07-24(svn r2701) Insert Id tags into all source filestron
2005-07-22(svn r2673) Include functions.h directly, not globally via openttd.htron
2005-07-21(svn r2663) Include variables.h only in these files which need it, not ↵tron
globally via openttd.h
2005-07-20(svn r2647) Fix: [ntp] Fix assertion error introduced in r2635ludde
2005-07-20(svn r2646) Change: [ntp] Fix uninitialized variable and add some more ↵ludde
asserts to be able to debug an assert error.
2005-07-19(svn r2635) Fix: [ntp/misc] Improve the old pathfinder. Changed it to A* ↵ludde
instead of Dijkstra. - Benchmark shows that NTP is now around 10x faster than NPF. - Made IsTunnelTile macro to determine if a tile is a tunnel. - Added some useful debugging functions for making tiles red / getting accurate timestamps. - Remove old depot finding algorithm. - Disable warning for signed/unsigned comparisons.
2005-07-13(svn r2558) Change the internal map format from 7 arrays to one array of ↵tron
structs, this doesn't change the saved format for now. It's a stepping stone for further changes.
2005-07-12(svn r2555) Initialise since r2553 uninitialised variable and remove since ↵tron
r2553 unused array (ludde)
2005-07-12(svn r2554) - Fix: [pathfinding] Change to using some helper functions for ↵ludde
checking the railtype.
2005-07-12(svn r2553) - Fix: [pathfinding] Remove old-old train pathfinder. Enhanced ↵ludde
old pathfinder. - Penalties for red signals and for slopes. - Increased the search depth to work better with large train networks.
2005-07-03(svn r2514) - Codechange: [NPF] Move the checking of railtype into a ↵matthijs
funciton IsCompatibleRail(). - Codechange: [NPF] Check the railtype along a route against the engine type instead of against the previouse tile. This clears the way for electriefied rails. - Add: [NPF] [ 1209644 ] A penalty for crossings (peter1138)
2005-06-27(svn r2492) Remove some pointless casts and fix some nearby indentationtron
2005-06-25(svn r2486) Turn TILE_FROM_XY into an inline function and rename it to ↵tron
TileVirtXY
2005-06-24(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"tron
2005-06-04(svn r2407) Use {Get,Is}TileOwner to get/check the owner of a tile and fix ↵tron
some bogus reads of _map_owner
2005-06-02(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.Darkvater
2005-01-29(svn r1713) Split off several functions which query/set information about a ↵tron
single tile from map.h and put them into a seperate file tile.h
2005-01-16(svn r1536) Move GET_TILEHEIGHT, GET_TILETYPE and IS_TILETYPE to map.h, turn ↵tron
them into inline functions and add some asserts
2005-01-16(svn r1535) -Fix: bah, I hate to be wrong.. oh, euh, wrong copy/paste from ↵truelight
TPFMode 1
2005-01-10(svn r1475) Fix some more signed/unsigned comparison warningstron
2005-01-07(svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn ↵tron
the latter into inline functions names Tile[XY]
2005-01-06(svn r1400) -Fix: signal stays red if a track is removed (Darkvater / Tron / ↵truelight
TrueLight)
2005-01-05(svn r1391) Make an assert map size agnostictron
2005-01-05(svn r1386) Move TileIndexDiff to map.htron
Move _tileoffs_by_dir to map.[ch] and encapsulate it in TileOffsByDir()
2004-12-21(svn r1209) -Fix: fix compiler warning (sorry)truelight
2004-12-21(svn r1208) -Fix: the owner-check introduced in r1203 now also works ↵truelight
correctly for bridges (the middle-parts don't have any owner)