matthijs
63c24f25a7
(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.
2005-12-20 00:50:16 +00:00
tron
0b936c3222
(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
2005-10-22 06:39:32 +00:00
tron
39f5dbfd3b
(svn r3019) -Codechange: Replace explicit shifting/anding/oring with GB and SB
2005-10-05 07:20:26 +00:00
tron
b162f08446
(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
2005-10-04 06:34:39 +00:00
ludde
9a060a0f24
(svn r2781) Fix some of the issues with variables in .h files.
2005-08-01 16:31:19 +00:00
tron
647cbd6bdd
(svn r2701) Insert Id tags into all source files
2005-07-24 14:12:37 +00:00
tron
54cbd01825
(svn r2673) Include functions.h directly, not globally via openttd.h
2005-07-22 07:02:20 +00:00
tron
b0779b4b65
(svn r2663) Include variables.h only in these files which need it, not globally via openttd.h
2005-07-21 18:44:27 +00:00
ludde
57f92104af
(svn r2647) Fix: [ntp] Fix assertion error introduced in r2635
2005-07-20 09:31:46 +00:00
ludde
a2f6256c33
(svn r2646) Change: [ntp] Fix uninitialized variable and add some more asserts to be able to debug an assert error.
2005-07-20 09:17:20 +00:00
ludde
08725cd6df
(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.
2005-07-19 11:42:40 +00:00
tron
a4bf608d40
(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.
2005-07-13 18:04:01 +00:00
tron
2dd3247a4a
(svn r2555) Initialise since r2553 uninitialised variable and remove since r2553 unused array (ludde)
2005-07-12 21:13:30 +00:00
ludde
c62563bc5c
(svn r2554) - Fix: [pathfinding] Change to using some helper functions for checking the railtype.
2005-07-12 20:41:17 +00:00
ludde
7bcce65053
(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.
2005-07-12 20:28:19 +00:00
matthijs
e675794812
(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)
2005-07-03 13:02:54 +00:00
tron
5cbd8b598c
(svn r2492) Remove some pointless casts and fix some nearby indentation
2005-06-27 06:57:24 +00:00
tron
2b73dec567
(svn r2486) Turn TILE_FROM_XY into an inline function and rename it to TileVirtXY
2005-06-25 06:15:43 +00:00
tron
a733fede9b
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
2005-06-24 12:38:35 +00:00
tron
a9b95b3cbb
(svn r2407) Use {Get,Is}TileOwner to get/check the owner of a tile and fix some bogus reads of _map_owner
2005-06-04 11:56:32 +00:00
Darkvater
ba8c649fac
(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.
2005-06-02 19:30:21 +00:00
tron
39858e696b
(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
2005-01-29 12:19:05 +00:00
tron
61a6bc544d
(svn r1536) Move GET_TILEHEIGHT, GET_TILETYPE and IS_TILETYPE to map.h, turn them into inline functions and add some asserts
2005-01-16 11:24:58 +00:00
truelight
0c587b1a60
(svn r1535) -Fix: bah, I hate to be wrong.. oh, euh, wrong copy/paste from TPFMode 1
2005-01-16 11:18:17 +00:00
tron
f0be7b6192
(svn r1475) Fix some more signed/unsigned comparison warnings
2005-01-10 22:14:35 +00:00
tron
414ac3286b
(svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY]
2005-01-07 17:02:43 +00:00
truelight
8e28e8efc3
(svn r1400) -Fix: signal stays red if a track is removed (Darkvater / Tron / TrueLight)
2005-01-06 17:14:37 +00:00
tron
fa1564a1a4
(svn r1391) Make an assert map size agnostic
2005-01-05 18:59:02 +00:00
tron
e4cf2ba1b3
(svn r1386) Move TileIndexDiff to map.h
...
Move _tileoffs_by_dir to map.[ch] and encapsulate it in TileOffsByDir()
2005-01-05 13:32:03 +00:00
truelight
507c5a692b
(svn r1209) -Fix: fix compiler warning (sorry)
2004-12-21 19:39:21 +00:00
truelight
815d4284c3
(svn r1208) -Fix: the owner-check introduced in r1203 now also works correctly for
...
bridges (the middle-parts don't have any owner)
2004-12-21 19:37:10 +00:00
truelight
01839321ea
(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.
2004-12-21 17:12:20 +00:00
tron
a148ff4e0d
(svn r1117) Move map arrays and some related macros into their own files map.c and map.h
2004-12-15 22:18:54 +00:00
tron
ecf1c35849
(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
2004-12-03 07:43:00 +00:00
tron
fca55e3741
(svn r793) Merge INLINE -> inline replacement (revision 376)
2004-11-24 13:19:48 +00:00
tron
249a170ace
(svn r607) -Patch: [ 985102 ] static cleanup
...
Thanks to lvoge
2004-11-14 19:44:06 +00:00
darkvater
edf841fb6f
(svn r328) -Fix: remove some unlogical alloca()s (Tron)
2004-09-27 12:36:59 +00:00
darkvater
bf703a0e82
(svn r242) -Fix: Pathfinding bug for road vehicles introduced in r160 fixed (blathijs)
...
-Fix: Pathfinding under bridges bug for ships introduced in r160 fixed (Darkvater)
2004-09-14 01:21:07 +00:00
truelight
eb49a19460
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
2004-09-10 19:02:27 +00:00
truelight
10d54ac604
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
...
-Fix: some minor fixes around GetTileTrackStatus (blathijs)
2004-09-05 16:15:22 +00:00
truelight
b5a0840621
(svn r149) -Fix: [997703] Junction after tunnel bug (blathijs)
2004-09-03 16:03:17 +00:00
darkvater
f422014960
(svn r23) -Some omments on the code (blathijs)
2004-08-11 22:07:08 +00:00
truelight
efaeb275f7
(svn r1) Import of revision 975 of old (crashed) SVN
2004-08-09 17:04:08 +00:00