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
dacbf1a433
(svn r3922) Fix copy&pasto in r3916 (Slowly it's getting a bad habit)
19 years ago
tron
89090790c2
(svn r3916) Get/Set the rail type by [GS]etRailType{Crossing,OnBridge,}()
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
d6134455a5
(svn r3906) Before removing a rail/setting the owner of a road to none check if there's a transport route at all under the bridge
19 years ago
tron
483c8f7018
(svn r3904) Move GetBridgePiece() and GetBridgeType() to bridge_map.h and make the only place which still extracted that info diretly use the wrapper
19 years ago
tron
a3c45635a7
(svn r3903) Fix a copy&pasto in last commit and remove a redundant comment (the line above already says what's going on)
19 years ago
tron
1257d9e565
(svn r3902) When drawing a bridge middle part get the bridge axis only once instead of again and again
19 years ago
tron
efb64283df
(svn r3901) Remove the last user of FindEdgesOfBridge() by using functions with similar functionality
19 years ago
tron
fedebdd09b
(svn r3900) When clearing a bridge determine the bridge direction and tile offset once instead of all over the place; also use UpdateSignalsOnSegment() instead of SetSignalsOnBothDir(), because this is sufficient
19 years ago
tron
8a77808f65
(svn r3899) Use wrapper functions to make more clear how deleting stuff under bridges works; also remove an unnecessary local variable
19 years ago
tron
ec33376fa3
(svn r3898) Add functions to find a bridge end starting at a middle tile
19 years ago
Darkvater
748d082a79
(svn r3893) - Fix: Properly set back the owner of a crossing/road-under bridge after removing it. For crossings we can always use .m2 because it is already 0 when not owned by a town.
19 years ago
tron
76aa40cecf
(svn r3891) Fix r3885
19 years ago
tron
b36203f671
(svn r3890) Simplify deleting a bridge by handling the ramps outside of the removal loop
19 years ago
tron
f262ae6c8b
(svn r3889) Change a part of the bridge drawing code to make it more comprehensible and add the needed accessors
19 years ago
tron
dcf6c85bf2
(svn r3888) If you think you've checked everything, check once more. *sigh* Fix r3887
19 years ago
tron
3d9c76d8b8
(svn r3887) Add a function to get the other bridge end when you're at a bridge ramp
19 years ago
tron
962852b732
(svn r3885) Simplify DoConvertTunnelBridgeRail() a bit
19 years ago
tron
251242165c
(svn r3877) Add functions to turn a tile into a rail/road bridge ramp/middle part
19 years ago
tron
42d1731cc1
(svn r3857) Add and use GetBridgeRampDirection()
...
Note: This slightly changes the behavior of GetAnyRoadBits() to only return a road piece for the start of the bridge ramp instead of a full ROAD_[XY]
19 years ago
tron
b812bbeda3
(svn r3849) Fix bug in r3846
19 years ago
tron
e8ccd9641f
(svn r3846) Add functions to set the type of stuff (clear, water, rail, road) under bridges
19 years ago
tron
1067069e33
(svn r3838) Demystify building bridge middle parts a bit by removing some magic numbers and generic names
19 years ago
tron
2732fc8d6f
(svn r3837) Partially unmagicfy restoring the tiles when deleting a bridge
...
Existing bug: When restoring a road piece which belongs to a town the town index unconditionally gets set to 0
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
b394f72fa9
(svn r3829) Reduce the use of _error_message by directly returning error codes instead of using this global variable
19 years ago
tron
b9ade45008
(svn r3823) Remove dead code: A value for 'image' gets calculated and overwritten just a few lines later without being used in between
19 years ago
tron
e63e3bb84c
(svn r3820) Be a bit more strict with types: use special types instead of generic byte and don't fill arbitrary data into inappropriate types
19 years ago
tron
6892e04d14
(svn r3814) Remove another call to FindLandscapeHeight()
19 years ago
tron
78a7b15ce0
(svn r3803) Change the second parameter of UpdateSignalsOnSegment() from Direction to DiagDirection as that's what it really operates on
19 years ago
tron
fbe939b31f
(svn r3783) Replace further ints and magic numbers by Direction, DiagDirection and friends
19 years ago
tron
313754011d
(svn r3779) Move CheckTunnelInWay() to a more appropriate place, invert its result and give it a less ambiguous name (IsTunnelInWay)
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
cc4f5b4e6f
(svn r3763) Adapt to the new 'map accessors go in foo_map.h'-scheme
19 years ago
tron
df156dacb2
(svn r3658) Add functions and symbolic names to retrieve road tile types and road pieces
19 years ago
tron
ae02bd6506
(svn r3654) Turn another if-cascade into a switch
19 years ago
tron
9a364389cb
(svn r3653) -Fix: You didn't pay for terraforming at the end tile when building a tunnel
19 years ago
tron
d451db7a5f
(svn r3652) Rewrite CmdBuildTunnel in the hope to make it a bit more comprehensible
...
This implementation is also significantly shorter because it removes many redundant checks
19 years ago
tron
2e3e9daf32
(svn r3645) Fix stupid typos in last (r3644) commit *sigh*
19 years ago
tron
4b46883751
(svn r3644) Don't use FindLandscapeHeightByTile() when it's overkill - often it was just a complicated way of writing GetTileSlope(tile, NULL)
19 years ago
tron
49c7eb934b
(svn r3613) Some more const, indentation, whitespace and similar stuff
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
453b30e387
(svn r3564) Several smaller changes:
...
- Don't treat non-booleans as booleans
- Reduce variable scope
- Bracing
- Use DeMorgan's law to make conditionals easier to read
- if cascade -> switch
- Replace some magic numbers by symbolic names
- Avoid assignments within other statements
19 years ago
tron
b844aa2db3
(svn r3520) Remove unused parameters from some functions
19 years ago
tron
84fb96fe85
(svn r3511) More whitespace ([FS#46] by Rubidium)
19 years ago
tron
22dc05faf2
(svn r3510) Fiddle with whitespace and parentheses
19 years ago
tron
5e1e902600
(svn r3490) -Fix: A bunch (10) of off-by-one errors when checking if a TileIndex points to a tile on the map
19 years ago
tron
2f668b8669
(svn r3487) -Fix: Price for demolishing a bridge was dependent on orientation and map size
19 years ago