Commit Graph

168 Commits (f324715c5523c0389c414d89f8bbf0711d36e5fc)

Author SHA1 Message Date
tron 00930cf8d9 (svn r4766) -Fix: Vehicles on a sloped tile under a bridge were affected by the bridge speed limit 18 years ago
tron ebcf2ee3b1 (svn r4765) Add GetTileMaxZ(), which returns the height of the highest corner of a tile, and use it to simplify the code in a few places 18 years ago
tron b57640e28a (svn r4572) Remove vehicle_leave_tile_proc
There's exactly one implemented function (unbarring a level crossing) and one place where it can be triggered (a train leaves a level crossing)
It's a bit overkill, so just handle this one case where it can happen
18 years ago
tron 6dbc9c9ced (svn r4554) Replace magic numbers by TILE_{HEIGHT,SIZE} 18 years ago
tron dd180a1e18 (svn r4541) Add a type for slopes and replace many magic numbers by the appropriate enums 18 years ago
Darkvater 1cfd43d145 (svn r4430) - NewGRF: Use the bridge's sprite layout for drawing high pillars. This fixes newgrf's high-bridge pillars drawing. Also remove the now obsolete _bridge_poles_table which was already integrated into the bridge sprite tables 18 years ago
tron 011178034e (svn r4402) Fix a faulty entry in the table for slopes under bridges, remove a now unnecessary test which hid the faulty entry till now and undo r4398 (don't do this!) 18 years ago
celestar 9aa247b0b4 (svn r4398) -Fix: Quick and Dirty solution for FS#116. Just for the nightlies 18 years ago
celestar 2e25c5218e (svn r4392) -Codechange: Use water map accessors in bridge code 18 years ago
celestar cd53476cc4 (svn r4391) -Fix: faulty ")" in previous commit 18 years ago
celestar 7b797c50db (svn r4390) -Codechange: Upon merging elrails, one direct map access to the railtype went unnoticed... 18 years ago
tron 85b907c3ef (svn r4374) Never directly commit something you prepared the evening before, mysteriously it will break in the morning, fix r4373 18 years ago
tron 5671f5d258 (svn r4373) Rewrite GetSlopeZ_TunnelBridge() and slightly change its behavior:
- Report the correct z alongside the ramp when a foundation is present
- Always report the z under the bridge for a bridge middle part, except if the z hack is used
This should fix some weird behavior of the tile selector near bridges
18 years ago
tron c5bc91eb0c (svn r4344) Use tile coordinates or even TileIndices instead of virtual tile coordinates where it suffices. 19 years ago
tron 35e93e451f (svn r4342) Change the first two parameters of commands - virtual pixel coordinates of the tile to operate on - to a TileIndex
Remove DoCommandByTile(), because now it does the same as DoCommand()
19 years ago
Darkvater b02fc3b62b (svn r4265) - Fix: compile warning on VS2005 (parameter 2 different from declaration) 19 years ago
celestar 69e1c716e8 (svn r4249) -Codechange: Replace more occurences of 16 by TILE_SIZE and of 8 by TILE_HEIGHT. Reverted one change from the previous commit because it was faulty 19 years ago
tron 7163a64c25 (svn r4242) Pass TileIndex and slope to GetSlopeTileh_*() instead of TileInfo 19 years ago
belugas 1b28d92fc8 (svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear. 19 years ago
tron 410b5569fe (svn r4164) Use acessor functions 19 years ago
belugas 1cadf4ea53 (svn r4157) CodeChange : Keep on cleaning up Celestar's elrail merge 19 years ago
celestar 6c44bf5012 (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 21ae42de51 (svn r4047) Remove two calls to FindLandscapeHeight() and some confusing use of the comma operator 19 years ago
tron bf3811122d (svn r3979) Move GetRailFoundation() to rail_map.h and use it and friends to get information about rail tiles 19 years ago
tron d3aa2addc2 (svn r3922) Fix copy&pasto in r3916 (Slowly it's getting a bad habit) 19 years ago
tron 7b1c7c31fb (svn r3916) Get/Set the rail type by [GS]etRailType{Crossing,OnBridge,}() 19 years ago
tron 6e988259a4 (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 b2e8045613 (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 1c6915bca3 (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 3a36dba821 (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 13ed895336 (svn r3902) When drawing a bridge middle part get the bridge axis only once instead of again and again 19 years ago
tron 385326943d (svn r3901) Remove the last user of FindEdgesOfBridge() by using functions with similar functionality 19 years ago
tron 633870df94 (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 666c0a379d (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 1ac97fe008 (svn r3898) Add functions to find a bridge end starting at a middle tile 19 years ago
Darkvater a390b6e4d1 (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 8208ee5ea2 (svn r3891) Fix r3885 19 years ago
tron 0c9a269bd3 (svn r3890) Simplify deleting a bridge by handling the ramps outside of the removal loop 19 years ago
tron 23d5188b7b (svn r3889) Change a part of the bridge drawing code to make it more comprehensible and add the needed accessors 19 years ago
tron e74d77211f (svn r3888) If you think you've checked everything, check once more. *sigh* Fix r3887 19 years ago
tron 626109f3f9 (svn r3887) Add a function to get the other bridge end when you're at a bridge ramp 19 years ago
tron bd5def0092 (svn r3885) Simplify DoConvertTunnelBridgeRail() a bit 19 years ago
tron c515c34008 (svn r3877) Add functions to turn a tile into a rail/road bridge ramp/middle part 19 years ago
tron 273533d4c7 (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 23ae850484 (svn r3849) Fix bug in r3846 19 years ago
tron 26815f7405 (svn r3846) Add functions to set the type of stuff (clear, water, rail, road) under bridges 19 years ago
tron 3e932a0a4f (svn r3838) Demystify building bridge middle parts a bit by removing some magic numbers and generic names 19 years ago
tron 8259a29ead (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 0100871412 (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 7a0071cc53 (svn r3829) Reduce the use of _error_message by directly returning error codes instead of using this global variable 19 years ago