summaryrefslogtreecommitdiff
path: root/tunnelbridge_cmd.c
AgeCommit message (Collapse)Author
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-17(svn r3922) Fix copy&pasto in r3916 (Slowly it's getting a bad habit)tron
2006-03-17(svn r3916) Get/Set the rail type by [GS]etRailType{Crossing,OnBridge,}()tron
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-16(svn r3906) Before removing a rail/setting the owner of a road to none check ↵tron
if there's a transport route at all under the bridge
2006-03-16(svn r3904) Move GetBridgePiece() and GetBridgeType() to bridge_map.h and ↵tron
make the only place which still extracted that info diretly use the wrapper
2006-03-16(svn r3903) Fix a copy&pasto in last commit and remove a redundant comment ↵tron
(the line above already says what's going on)
2006-03-16(svn r3902) When drawing a bridge middle part get the bridge axis only once ↵tron
instead of again and again
2006-03-16(svn r3901) Remove the last user of FindEdgesOfBridge() by using functions ↵tron
with similar functionality
2006-03-16(svn r3900) When clearing a bridge determine the bridge direction and tile ↵tron
offset once instead of all over the place; also use UpdateSignalsOnSegment() instead of SetSignalsOnBothDir(), because this is sufficient
2006-03-16(svn r3899) Use wrapper functions to make more clear how deleting stuff ↵tron
under bridges works; also remove an unnecessary local variable
2006-03-16(svn r3898) Add functions to find a bridge end starting at a middle tiletron
2006-03-15(svn r3893) - Fix: Properly set back the owner of a crossing/road-under ↵Darkvater
bridge after removing it. For crossings we can always use .m2 because it is already 0 when not owned by a town.
2006-03-15(svn r3891) Fix r3885tron
2006-03-15(svn r3890) Simplify deleting a bridge by handling the ramps outside of the ↵tron
removal loop
2006-03-15(svn r3889) Change a part of the bridge drawing code to make it more ↵tron
comprehensible and add the needed accessors
2006-03-15(svn r3888) If you think you've checked everything, check once more. *sigh* ↵tron
Fix r3887
2006-03-15(svn r3887) Add a function to get the other bridge end when you're at a ↵tron
bridge ramp
2006-03-15(svn r3885) Simplify DoConvertTunnelBridgeRail() a bittron
2006-03-15(svn r3877) Add functions to turn a tile into a rail/road bridge ramp/middle ↵tron
part
2006-03-14(svn r3857) Add and use GetBridgeRampDirection()tron
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]
2006-03-13(svn r3849) Fix bug in r3846tron
2006-03-13(svn r3846) Add functions to set the type of stuff (clear, water, rail, ↵tron
road) under bridges
2006-03-13(svn r3838) Demystify building bridge middle parts a bit by removing some ↵tron
magic numbers and generic names
2006-03-12(svn r3837) Partially unmagicfy restoring the tiles when deleting a bridgetron
Existing bug: When restoring a road piece which belongs to a town the town index unconditionally gets set to 0
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-12(svn r3829) Reduce the use of _error_message by directly returning error ↵tron
codes instead of using this global variable
2006-03-12(svn r3823) Remove dead code: A value for 'image' gets calculated and ↵tron
overwritten just a few lines later without being used in between
2006-03-11(svn r3820) Be a bit more strict with types: use special types instead of ↵tron
generic byte and don't fill arbitrary data into inappropriate types
2006-03-10(svn r3814) Remove another call to FindLandscapeHeight()tron
2006-03-09(svn r3803) Change the second parameter of UpdateSignalsOnSegment() from ↵tron
Direction to DiagDirection as that's what it really operates on
2006-03-08(svn r3783) Replace further ints and magic numbers by Direction, ↵tron
DiagDirection and friends
2006-03-07(svn r3779) Move CheckTunnelInWay() to a more appropriate place, invert its ↵tron
result and give it a less ambiguous name (IsTunnelInWay)
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-05(svn r3763) Adapt to the new 'map accessors go in foo_map.h'-schemetron
2006-02-23(svn r3658) Add functions and symbolic names to retrieve road tile types and ↵tron
road pieces
2006-02-22(svn r3654) Turn another if-cascade into a switchtron
2006-02-22(svn r3653) -Fix: You didn't pay for terraforming at the end tile when ↵tron
building a tunnel
2006-02-22(svn r3652) Rewrite CmdBuildTunnel in the hope to make it a bit more ↵tron
comprehensible This implementation is also significantly shorter because it removes many redundant checks
2006-02-21(svn r3645) Fix stupid typos in last (r3644) commit *sigh*tron
2006-02-21(svn r3644) Don't use FindLandscapeHeightByTile() when it's overkill - often ↵tron
it was just a complicated way of writing GetTileSlope(tile, NULL)
2006-02-18(svn r3613) Some more const, indentation, whitespace and similar stufftron
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-06(svn r3564) Several smaller changes:tron
- 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
2006-02-02(svn r3520) Remove unused parameters from some functionstron
2006-02-01(svn r3511) More whitespace ([FS#46] by Rubidium)tron
2006-02-01(svn r3510) Fiddle with whitespace and parenthesestron
2006-01-30(svn r3490) -Fix: A bunch (10) of off-by-one errors when checking if a ↵tron
TileIndex points to a tile on the map
2006-01-30(svn r3487) -Fix: Price for demolishing a bridge was dependent on ↵tron
orientation and map size