tron
a6403bd50a
(svn r4245) Simplify FindLengthOfTunnel()
19 years ago
celestar
a7d8ad0004
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
19 years ago
tron
77e5cf4bc1
(svn r3979) Move GetRailFoundation() to rail_map.h and use it and friends to get information about rail tiles
19 years ago
tron
b8da06ddb1
(svn r3907) Replace many bridge related direct map accesses with calls to shiny new functions and mark some strange constructs with XXX
19 years ago
tron
78083f0da7
(svn r3830) Move IsTunnelTile() from tile.h to tunnel_map.h and add IsTunnel(), which just checks for a tunnel, but not the tile type as IsTunnelTile() does
19 years ago
tron
fbe939b31f
(svn r3783) Replace further ints and magic numbers by Direction, DiagDirection and friends
19 years ago
tron
f2dc736554
(svn r3777) Add some functions to handle tunnels
19 years ago
tron
2d3c28f2b3
(svn r3776) Replace many ints and magic numbers by Direction, DiagDirection and friends
19 years ago
tron
40fd4377b0
(svn r3747) Change HASBIT() to return 0/1 instead of 0/value of tested bit, 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)
19 years ago
tron
793613a286
(svn r3697) Rename DIAG1/DIAG2 to X resp. Y as this conveys a bit better in which direction a pieces of rail goes
19 years ago
truelight
604a1a9974
(svn r3599) -Fix: added some casts to suppress some more warnings
19 years ago
tron
ea73b46684
(svn r3597) Miscellaneous (I like that word) changes: Fix some indentation, add consts, reduce indentation level by short-circuit logic, convert if cascades to switch, whitespace, bracing, plus some minor stuff
19 years ago
tron
84fb96fe85
(svn r3511) More whitespace ([FS#46] by Rubidium)
19 years ago
matthijs
128317d3ec
(svn r3329) - Doc: Some documentation cleanups.
...
- Add: TracksOverlap() (from the map branch), TrackdirBitsToTrackBits(), DiagdirReachesTrackdirs(), DiagdirReachesTracks().
- Fix: Infinite loop in the pathfinder introduces in r3321.
19 years ago
matthijs
8f873d4ece
(svn r3321) - Fix: A wrong use of the map m5 bits, where a previously 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.
19 years ago
tron
2cc2154ad2
(svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in comments, excess empty lines, minor other changes
...
nothing spectacular, just some stuff, which piled up
19 years ago
tron
ae4a1f3675
(svn r3019) -Codechange: Replace explicit shifting/anding/oring with GB and SB
19 years ago
tron
8bd4a63c47
(svn r3012) Extract the correct bits when checking if it's a road or rail tunnel; this is not flagged as fix, because it accidently worked
19 years ago
ludde
29564f9fcf
(svn r2781) Fix some of the issues with variables in .h files.
19 years ago
tron
a227065ab7
(svn r2701) Insert Id tags into all source files
19 years ago
tron
559babcdc9
(svn r2673) Include functions.h directly, not globally via openttd.h
19 years ago
tron
284d9ed7fb
(svn r2663) Include variables.h only in these files which need it, not globally via openttd.h
19 years ago
ludde
26c8bdde43
(svn r2647) Fix: [ntp] Fix assertion error introduced in r2635
19 years ago
ludde
b8b14ac6c8
(svn r2646) Change: [ntp] Fix uninitialized variable and add some more asserts to be able to debug an assert error.
19 years ago
ludde
3e97dda275
(svn r2635) Fix: [ntp/misc] Improve the old pathfinder. Changed it to A* 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.
19 years ago
tron
8c1d74162f
(svn r2558) Change the internal map format from 7 arrays to one array of structs, this doesn't change the saved format for now. It's a stepping stone for further changes.
19 years ago
tron
9c94a0ed6f
(svn r2555) Initialise since r2553 uninitialised variable and remove since r2553 unused array (ludde)
19 years ago
ludde
ebe3b89b98
(svn r2554) - Fix: [pathfinding] Change to using some helper functions for checking the railtype.
19 years ago
ludde
f523be81d4
(svn r2553) - Fix: [pathfinding] Remove old-old train pathfinder. Enhanced old pathfinder.
...
- Penalties for red signals and for slopes.
- Increased the search depth to work better with large train networks.
19 years ago
matthijs
fb8e5f61b1
(svn r2514) - Codechange: [NPF] Move the checking of railtype into a 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)
19 years ago
tron
ab7b8b50e3
(svn r2492) Remove some pointless casts and fix some nearby indentation
19 years ago
tron
61f6f07edd
(svn r2486) Turn TILE_FROM_XY into an inline function and rename it to TileVirtXY
19 years ago
tron
3154e7148d
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
19 years ago
tron
0c4ecbe9ec
(svn r2407) Use {Get,Is}TileOwner to get/check the owner of a tile and fix some bogus reads of _map_owner
20 years ago
Darkvater
b438b1248c
(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.
20 years ago
tron
5885b31bb4
(svn r1713) Split off several functions which query/set information about a single tile from map.h and put them into a seperate file tile.h
20 years ago
tron
ae796740aa
(svn r1536) Move GET_TILEHEIGHT, GET_TILETYPE and IS_TILETYPE to map.h, turn them into inline functions and add some asserts
20 years ago
truelight
d2643dc483
(svn r1535) -Fix: bah, I hate to be wrong.. oh, euh, wrong copy/paste from TPFMode 1
20 years ago
tron
05a3a83b6c
(svn r1475) Fix some more signed/unsigned comparison warnings
20 years ago
tron
7ca6b2b8b0
(svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY]
20 years ago
truelight
8e58dd8dec
(svn r1400) -Fix: signal stays red if a track is removed (Darkvater / Tron / TrueLight)
20 years ago
tron
5583fd89b3
(svn r1391) Make an assert map size agnostic
20 years ago
tron
67161506ad
(svn r1386) Move TileIndexDiff to map.h
...
Move _tileoffs_by_dir to map.[ch] and encapsulate it in TileOffsByDir()
20 years ago
truelight
91d1805fb1
(svn r1209) -Fix: fix compiler warning (sorry)
20 years ago
truelight
af4f4069ee
(svn r1208) -Fix: the owner-check introduced in r1203 now also works correctly for
...
bridges (the middle-parts don't have any owner)
20 years ago
truelight
8ab0190c29
(svn r1203) -Fix: the pathfinder no longer sees rail with an other owner as a
...
possible route. This also makes sure signals don't show red because
there is a train on the track of an other owner.
20 years ago
tron
765ecfed84
(svn r1117) Move map arrays and some related macros into their own files map.c and map.h
20 years ago
tron
c00258237e
(svn r907) Sprinkle holy ANSI water:
...
- "inline" must before the return type (and after "static")
- Initialise all struct members, not just some of them
- Remove (one) spurious semicolon
20 years ago
tron
fca55e3741
(svn r793) Merge INLINE -> inline replacement (revision 376)
20 years ago
tron
249a170ace
(svn r607) -Patch: [ 985102 ] static cleanup
...
Thanks to lvoge
20 years ago