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
tron
6c30c9ae4d
(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
86491ca257
(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
0e4ee1241f
(svn r3814) Remove another call to FindLandscapeHeight()
19 years ago
tron
ee03f15f27
(svn r3803) Change the second parameter of UpdateSignalsOnSegment() from Direction to DiagDirection as that's what it really operates on
19 years ago
tron
8cfcdaa733
(svn r3783) Replace further ints and magic numbers by Direction, DiagDirection and friends
19 years ago
tron
3027b8673e
(svn r3779) Move CheckTunnelInWay() to a more appropriate place, invert its result and give it a less ambiguous name (IsTunnelInWay)
19 years ago
tron
af42610321
(svn r3777) Add some functions to handle tunnels
19 years ago
tron
49cb8eb470
(svn r3776) Replace many ints and magic numbers by Direction, DiagDirection and friends
19 years ago
tron
4efa560ffc
(svn r3763) Adapt to the new 'map accessors go in foo_map.h'-scheme
19 years ago
tron
2f8e3dcc05
(svn r3658) Add functions and symbolic names to retrieve road tile types and road pieces
19 years ago
tron
251f519d26
(svn r3654) Turn another if-cascade into a switch
19 years ago
tron
c9d540c0f0
(svn r3653) -Fix: You didn't pay for terraforming at the end tile when building a tunnel
19 years ago
tron
9d4400c89f
(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
08f132fef2
(svn r3645) Fix stupid typos in last (r3644) commit *sigh*
19 years ago
tron
b8b6084da2
(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
7692556c62
(svn r3613) Some more const, indentation, whitespace and similar stuff
19 years ago
tron
5352e9fbcb
(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
087fe86ed2
(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
17ec6ed70d
(svn r3520) Remove unused parameters from some functions
19 years ago
tron
1c3e8630fe
(svn r3511) More whitespace ([FS#46] by Rubidium)
19 years ago
tron
9712d6f639
(svn r3510) Fiddle with whitespace and parentheses
19 years ago
tron
244d4ab5cb
(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
a56ab08f3b
(svn r3487) -Fix: Price for demolishing a bridge was dependent on orientation and map size
19 years ago
Darkvater
4014e36aec
(svn r3472) - [PBS] Remove from trunk. Anyone interested can still find it in branch/pbs. This reverts revisions r3158, r3140, r3075, r2977, r2674, r2625, r2621, r2529, r2528, r2525, r2524, r2519, r2517, r2516, r2507, r2499. (in conjunction with Tron)
...
- The only change is that the nsignalsw.grf file is kept and that existing nightlies with PBS signals get those signals converted to combo-signals.
19 years ago
peter1138
bea2d63154
(svn r3418) - Fix: When removing a town-owned tunnel the player's rating was not reduced, as it checked the ownership of the tunnel after clearing it. Now we perform the rating adjustment before clearing the tiles. (spotted by glx)
19 years ago
peter1138
7ae5e344a2
(svn r3391) - PBS Fix: Keep PBS reservation state when building a bridge over rail.
19 years ago
tron
49f0691c1a
(svn r3308) BAD
...
foo.h: int bar;
GOOD
foo.h: extern int bar;
foo.c: int bar;
19 years ago
peter1138
80986fcd32
(svn r3282) - Codechange: Replace tests against CMD_ERROR with CmdFailed()
19 years ago
bjarni
16e65960b9
(svn r3218) -Feature: Multiheaded train engines will now stay in the same train
...
This means that any user attempt to remove a rear engine will tell the user to move the front engine instead
This fixes the assert when moving multiheaded engines (introduced in r3144)
Note: to make old savegames use this feature, some engines might be turned around in order to link engines in pairs
-Codechange: train subtype is now a bitmask
This allows fast access to info like if it is a wagon or engine and if it is in front and so on
Note: savegame version bump
19 years ago
tron
ef7fb8b515
(svn r3205) Some more uses for GB/SB
19 years ago
tron
ca1dfe94d2
(svn r3186) Unnecessary casts and truncation
19 years ago
tron
84a16a0b30
(svn r3184) GB/SB
19 years ago
tron
9d0e7b6458
(svn r3181) -Bracing
...
-Indentation
-Whitespace
-DeMorgan's Law
-Test with NULL or 0 for non-booleans
-'\0' instead of 0 for chars
-Remove redundantly redundant comments (like DoFoo(); // Do foo)
-Join multiple short lines with a single statement
-Split single lines with multiple statements
-Avoid assignments in if
19 years ago
tron
524fd25cbd
(svn r3177) GB, CLRBIT, HASBIT, TOGGLEBIT
19 years ago
tron
71d293f2a3
(svn r3066) Constify the parameter of GetSlopeZ_*()
19 years ago
celestar
ab049c7bca
(svn r3065) -Codechange/Add: Modified the bridge drawing code so that the basic offset is read from the RailTypeInfo struct. This is (hopefully) the last DrawTile change on the way to electrified railways. While being at it, de-mystified the function a bit and added some asserts.
19 years ago
tron
b17b87469c
(svn r3064) Replace some numbers by sprite names
19 years ago
tron
53a4a6a0f4
(svn r3046) Replace some numbers with sprite names and fix a typo in the sprite list
19 years ago
tron
4529d1fc8e
(svn r3037) Don't deduce the sprites for tunnels and level crossings from magic numbers, but fetch them from the central rail info array. This is a preparation step for electrified rails
19 years ago
tron
7ab7d79190
(svn r3028) s/255/OWNER_SPECTATOR/
19 years ago