Commit Graph

182 Commits

Author SHA1 Message Date
tron
a2362674e3 (svn r5210) Many small changes which piled up: const, unsigned, variable scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc. 2006-06-10 08:37:41 +00:00
tron
56710ebc2c (svn r5199) Make the control flow of GetTileTrackStatus_TunnelBridge() more comprehensible 2006-06-09 15:27:17 +00:00
tron
7fd88e5798 (svn r5155) - Remove the bridge branch merge (revision r5070) 2006-06-07 19:35:21 +00:00
celestar
e530e53564 (svn r5081) -Fix: Could not build bridges over crossings (but crossings under bridges were possible), noticed by WhiteRabbit 2006-06-02 21:03:59 +00:00
celestar
b618b75c9b (svn r5070) Merged the bridge branch
-Feature: Bridges can now be placed above:
	Any railway track combination (excluding depots and waypoints)
	Any road combination (excluding depots)
	Clear tiles (duh), including fields
	Tunnel entrances
	Bridge heads

Thanks to Tron for idea and implementation, KUDr for the yapf synchronization and many others for hours of testing

There are still a number of visual problems remaining, especially when electric railways are on or under the bridge.
DO NOT REPORT THOSE BUGS FOR THE TIME BEING please.
2006-06-02 13:05:41 +00:00
KUDr
308f27a3de (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing. 2006-05-27 16:12:16 +00:00
tron
2b17d16ce2 (svn r4937) Reduce the use of _error_message a bit 2006-05-21 11:34:08 +00:00
tron
b95c1faca9 (svn r4927) Replace 3 big ifs (which regard foundations) by a bit less confusing code 2006-05-20 18:03:22 +00:00
celestar
0310643a7e (svn r4882) -Fix: Forgot a change in previous commit 2006-05-16 12:31:15 +00:00
celestar
967d4011f7 (svn r4881) -Codechange: Be a little more strict about types and remove some null-operations 2006-05-16 12:04:53 +00:00
tron
1be0d9926e (svn r4790) Remove slope magic from EnsureNoVehicleZ() and rename it to EnsureNoVehicleOnGround() to make more clear what it does 2006-05-09 09:56:09 +00:00
rubidium
2a337ab009 (svn r4789) - Codechange: rename RoadType to RoadTileType and ROAD_{NORMAL,CROSSING,DEPOT} to ROAD_TILE_* for consistency 2006-05-09 08:25:31 +00:00
rubidium
3dae1a9bba (svn r4788) - Codechange: RAILTYPE_{NORMAL,ELECTRIC,...} and RAIL_TYPE_{NORMAL,SIGNAL,...} have nearly the same name, rename RAIL_TYPE_* to RAIL_TILE_* of extra clarity 2006-05-09 08:17:33 +00:00
tron
40a843e808 (svn r4771) -Regression: It was possible to remove a bridge while a vehicle was on it 2006-05-07 11:55:28 +00:00
tron
00930cf8d9 (svn r4766) -Fix: Vehicles on a sloped tile under a bridge were affected by the bridge speed limit 2006-05-07 08:18:12 +00:00
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 2006-05-07 07:55:05 +00:00
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
2006-04-25 07:32:33 +00:00
tron
6dbc9c9ced (svn r4554) Replace magic numbers by TILE_{HEIGHT,SIZE} 2006-04-23 19:35:36 +00:00
tron
dd180a1e18 (svn r4541) Add a type for slopes and replace many magic numbers by the appropriate enums 2006-04-23 13:48:16 +00:00
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 2006-04-15 16:07:00 +00:00
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!) 2006-04-12 19:05:31 +00:00
celestar
9aa247b0b4 (svn r4398) -Fix: Quick and Dirty solution for FS#116. Just for the nightlies 2006-04-12 17:58:58 +00:00
celestar
2e25c5218e (svn r4392) -Codechange: Use water map accessors in bridge code 2006-04-12 15:23:32 +00:00
celestar
cd53476cc4 (svn r4391) -Fix: faulty ")" in previous commit 2006-04-12 15:21:33 +00:00
celestar
7b797c50db (svn r4390) -Codechange: Upon merging elrails, one direct map access to the railtype went unnoticed... 2006-04-12 15:08:48 +00:00
tron
85b907c3ef (svn r4374) Never directly commit something you prepared the evening before, mysteriously it will break in the morning, fix r4373 2006-04-12 05:26:36 +00:00
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
2006-04-12 05:19:19 +00:00
tron
c5bc91eb0c (svn r4344) Use tile coordinates or even TileIndices instead of virtual tile coordinates where it suffices. 2006-04-10 12:36:04 +00:00
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()
2006-04-10 07:15:58 +00:00
Darkvater
b02fc3b62b (svn r4265) - Fix: compile warning on VS2005 (parameter 2 different from declaration) 2006-04-03 18:11:42 +00:00
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 2006-04-03 09:07:21 +00:00
tron
7163a64c25 (svn r4242) Pass TileIndex and slope to GetSlopeTileh_*() instead of TileInfo 2006-04-02 12:49:18 +00:00
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. 2006-03-30 19:16:44 +00:00
tron
410b5569fe (svn r4164) Use acessor functions 2006-03-30 09:08:43 +00:00
belugas
1cadf4ea53 (svn r4157) CodeChange : Keep on cleaning up Celestar's elrail merge 2006-03-29 20:35:39 +00:00
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. 2006-03-29 16:30:26 +00:00
tron
21ae42de51 (svn r4047) Remove two calls to FindLandscapeHeight() and some confusing use of the comma operator 2006-03-23 06:30:39 +00:00
tron
bf3811122d (svn r3979) Move GetRailFoundation() to rail_map.h and use it and friends to get information about rail tiles 2006-03-19 12:06:12 +00:00
tron
d3aa2addc2 (svn r3922) Fix copy&pasto in r3916 (Slowly it's getting a bad habit) 2006-03-17 13:28:50 +00:00
tron
7b1c7c31fb (svn r3916) Get/Set the rail type by [GS]etRailType{Crossing,OnBridge,}() 2006-03-17 10:10:31 +00:00
tron
6e988259a4 (svn r3907) Replace many bridge related direct map accesses with calls to shiny new functions and mark some strange constructs with XXX 2006-03-16 15:16:27 +00:00
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 2006-03-16 13:35:35 +00:00
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 2006-03-16 10:00:50 +00:00
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) 2006-03-16 07:18:38 +00:00
tron
13ed895336 (svn r3902) When drawing a bridge middle part get the bridge axis only once instead of again and again 2006-03-16 07:12:28 +00:00
tron
385326943d (svn r3901) Remove the last user of FindEdgesOfBridge() by using functions with similar functionality 2006-03-16 06:38:51 +00:00
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 2006-03-16 06:30:47 +00:00
tron
666c0a379d (svn r3899) Use wrapper functions to make more clear how deleting stuff under bridges works; also remove an unnecessary local variable 2006-03-16 06:06:05 +00:00
tron
1ac97fe008 (svn r3898) Add functions to find a bridge end starting at a middle tile 2006-03-16 05:28:15 +00:00
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. 2006-03-15 21:27:19 +00:00