celestar
3770ad0637
(svn r4113) Moved all relevant map functions for stations to station_map.[ch]
...
Some work with animated tiles remains. Thanks to Tron for parts of the code and lots of proof-reading and suggesting
2006-03-26 14:41:39 +00:00
celestar
842eac5d7f
(svn r4088) -Codechange: Introduce {Unb,B}arCrossing and IsCrossingBarred to put and get the status of a level crossing
2006-03-24 15:24:16 +00:00
tron
9be713f1ae
(svn r4079) Add GetSation{Index,ByTile}() to get the station index resp. the station from a tile
2006-03-24 08:55:08 +00:00
tron
4b74fa1923
(svn r3981) More work for the rail accessing functions and enums
2006-03-19 13:48:08 +00:00
tron
77e5cf4bc1
(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
bjarni
a137268f13
(svn r3947) use TOGGLEBIT() instead of manual bit toggling in CmdReverseTrainDirection (pointed out by glx)
2006-03-18 14:35:54 +00:00
bjarni
b610872f35
(svn r3945) cleaned the layout in CmdReverseTrainDirection a bit (made a bit messy in last commit)
2006-03-18 13:15:34 +00:00
bjarni
a36f8a46fa
(svn r3944) -Feature: it's now possible to turn a single unit in a train
...
control-click on a unit in a train in a depot will make the click unit turn around
this is useful if you want "normal" engines to act as dualheaded (one each way) or similar
this only works on single unit units. Multiheaded and articulated engines get a red error box
this is based on a quick hack peter1138 while I made it network safe and correctly handling of multible unit engines
2006-03-18 13:00:32 +00:00
tron
89090790c2
(svn r3916) Get/Set the rail type by [GS]etRailType{Crossing,OnBridge,}()
2006-03-17 10:10:31 +00:00
tron
b8da06ddb1
(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
5d939d9c10
(svn r3851) Rail depots only have an entrance at one side, therefore use UpdateSignalsOnSegment() instead of SetSignalsOnBothDir()
2006-03-13 20:12:35 +00:00
tron
b05a98fdfa
(svn r3832) Replace some magic numbers by (Diag)Direction enums
2006-03-12 17:42:04 +00:00
tron
12d252d9bd
(svn r3831) Add and use GetRailDepotDirection()
2006-03-12 16:13:16 +00:00
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
2006-03-12 15:04:03 +00:00
tron
b394f72fa9
(svn r3829) Reduce the use of _error_message by directly returning error codes instead of using this global variable
2006-03-12 12:19:25 +00:00
tron
78a7b15ce0
(svn r3803) Change the second parameter of UpdateSignalsOnSegment() from Direction to DiagDirection as that's what it really operates on
2006-03-09 12:32:25 +00:00
tron
e68120034c
(svn r3789) Add an enum and function to handle DiagDirection changes
2006-03-08 08:51:26 +00:00
tron
2181a72e9e
(svn r3787) Use DirToDiagDir() instead of >> 1
2006-03-08 08:28:48 +00:00
tron
03536a32a1
(svn r3786) More work for DirDiff
2006-03-08 08:16:31 +00:00
tron
ecabf8a5f0
(svn r3784) Add a type and functions to handle direction changes
2006-03-08 07:48:56 +00:00
tron
fbe939b31f
(svn r3783) Replace further ints and magic numbers by Direction, DiagDirection and friends
2006-03-08 06:55:33 +00:00
tron
f2dc736554
(svn r3777) Add some functions to handle tunnels
2006-03-06 20:55:24 +00:00
tron
2d3c28f2b3
(svn r3776) Replace many ints and magic numbers by Direction, DiagDirection and friends
2006-03-06 20:28:28 +00:00
tron
87fdb129d2
(svn r3758) Remove the news validation callback. It is superseded by r3757.
2006-03-04 11:15:44 +00:00
tron
4270026b42
(svn r3757) -Feature: Delete news items about vehicles, when they get stale
...
This is used to delete
- all news about a vehicle, when it gets deleted
- "vehicle has stopped in depot" news, when it gets started
- "vehicle has invalid orders" news, when the orders get changed
2006-03-04 11:01:35 +00:00
peter1138
601b226f04
(svn r3602) - Move _railveh_score data to _rail_vehicle_info->ai_rank and remove global variable to return data as we can now access this directly.
2006-02-13 22:13:02 +00:00
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
2006-02-13 21:15:00 +00:00
peter1138
6f5f3101b6
(svn r3588) - Refit: Use only one global to return the refit capacity rather than one per vehicle type.
2006-02-11 09:24:51 +00:00
peter1138
1097ec2b62
(svn r3587) - NewGRF: Rename Callback IDs to include their "class"
2006-02-11 09:17:16 +00:00
tron
f5b564bc44
(svn r3585) Similar changes to the order handlers of the other vehicle types like r3584
2006-02-10 06:33:56 +00:00
peter1138
f4215cf6a0
(svn r3579) v->u.rail.first_engine holds an engine type, not a vehicle index, so use INVALID_ENGINE.
2006-02-08 19:06:46 +00:00
peter1138
fbd78c8185
(svn r3570) - Explicitly update v->first in TrainConsistChanged() if necessary, as this is far faster than brute forcing it later.
2006-02-07 18:55:06 +00:00
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
2006-02-06 09:18:04 +00:00
peter1138
ab771e4ff0
(svn r3557) - NewGRF: move callback enums to a new file as more than just engines will use them
2006-02-05 19:46:20 +00:00
bjarni
78b51cbec2
(svn r3535) -Feature: [autoreplace] allow autoreplacing of train wagons
...
currently ALL available wagons are displayed in the right menu in the replace window
however the replacement will only be done if the new wagon can be refitted to carry same cargo as the old one is currently carrying
Since the standard vehicles do not have any valid wagon replacements, this feature can only be used when using newgrf sets
2006-02-04 18:25:07 +00:00
peter1138
b88904f345
(svn r3524) - Split newgrf features from engine.[ch] into newgrf_engine.[ch], and add the new files to project files.
2006-02-03 12:55:21 +00:00
tron
84fb96fe85
(svn r3511) More whitespace ([FS#46] by Rubidium)
2006-02-01 07:36:15 +00:00
tron
22dc05faf2
(svn r3510) Fiddle with whitespace and parentheses
2006-02-01 06:32:03 +00:00
bjarni
8c7e594b08
(svn r3484) -fix: fixed issue in last commit where loading savegame versions 18 and 19 didn't init the multiheaded engine pointers
2006-01-29 23:04:51 +00:00
Darkvater
4e09974975
(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.
2006-01-29 18:57:26 +00:00
peter1138
952f246433
(svn r3431) - Fix crash when moving vehicles around in a train depot under certain conditions.
2006-01-25 21:33:57 +00:00
peter1138
0f28e74e3e
(svn r3422) - Fix: If an engine reaches the rear of a depot, make the engine turn around before it reaches the tile end (same as a normal end of line.) This fixes a bug whereby the engine could poke into the depot and crash with another engine just leaving it.
2006-01-23 21:05:05 +00:00
bjarni
e35a131153
(svn r3403) -Codechange: [multiheaded engines] the references between the front and rear engines are no longer saved
...
instead the pointers are generated on load
2006-01-18 15:05:01 +00:00
bjarni
b87b5f1187
(svn r3402) -Fix: [building/cloning] added a string telling if build failed due to not being able to build a vehicle. Triggered when cloning a retired design
2006-01-18 14:12:26 +00:00
peter1138
7c5a58bbad
(svn r3392) Train depot fixes:
...
- Only count the parts from the source train that will be moved, not the whole train.
- Don't count articulated parts of an engine. This alleviates issues with autoreplacing very long trains.
2006-01-08 16:56:41 +00:00
peter1138
e81c316134
(svn r3388) - NewGRF: Allow train running cost class to differ from engine class. Also fix typo in r3384.
2006-01-07 16:47:59 +00:00
truelight
e8c871a603
(svn r3381) -Fix: r3374 left one bug: allow moving around wagons in a 100 long train
2006-01-07 10:57:32 +00:00
peter1138
79ce0def50
(svn r3378) - NewGRF Fix: Use order status to determine whether a vehicle is loading instead
...
of speed, and get that state from first vehicle in a train consist.
2006-01-06 22:49:00 +00:00
truelight
b542f784f9
(svn r3374) -Fix: [ FS#36 ] Don't allow trains to get bigger than 100 via drag and drop
2006-01-06 21:10:58 +00:00
truelight
54501dc6df
(svn r3373) -Fix: don't link a wagon to itself, which resulted in a wagon disapearing, and a depot which was unable to remove
2006-01-06 18:26:02 +00:00