summaryrefslogtreecommitdiff
path: root/rail.c
AgeCommit message (Collapse)Author
2006-04-04(svn r4272) -Codechange: Moved the map-accessing stuff from station.h into ↵celestar
station_map.h
2006-03-18(svn r3946) Add short hand names for common track combinationstron
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 r3905) -Fix: When returning the rail type under a bridge, check if ↵tron
there are rails at all
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-05(svn r3767) Move all direction related enums and functions to a separate headertron
2006-03-01(svn r3697) Rename DIAG1/DIAG2 to X resp. Y as this conveys a bit better in ↵tron
which direction a pieces of rail goes
2005-10-22(svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in ↵tron
comments, excess empty lines, minor other changes nothing spectacular, just some stuff, which piled up
2005-07-24(svn r2701) Insert Id tags into all source filestron
2005-07-19(svn r2643) Get rid of some unnecessary caststron
2005-07-13(svn r2558) Change the internal map format from 7 arrays to one array of ↵tron
structs, this doesn't change the saved format for now. It's a stepping stone for further changes.
2005-07-09(svn r2539) * Fix: Mixed up use of trackdirs and directions in ↵matthijs
GetTileRailType() causes NPF to not consider routes under bridges.
2005-07-04(svn r2516) - Feature: [pbs] Implement path-based-signalling. This allows ↵hackykid
multiple trains within the same signal block, provided their paths dont intersect. For this the block must have all exit and entry signals be pbs signals. Place these by ctrl-clicking 4 times on a normal signal. - Feature: [pbs] Implement autoplacement of pbs blocks, when a block has an entry and an exit pbs signal, covert the entire block to pbs. Can be turned off in the patch settings. - Feature: [pbs] Allow showing of reserved status by making the tracks darker, when the pbs debug level is at least 1.
2005-07-03(svn r2514) - Codechange: [NPF] Move the checking of railtype into a ↵matthijs
funciton IsCompatibleRail(). - Codechange: [NPF] Check the railtype along a route against the engine type instead of against the previouse tile. This clears the way for electriefied rails. - Add: [NPF] [ 1209644 ] A penalty for crossings (peter1138)
2005-06-17(svn r2456) * Prettyfied npf.c using enums and wrappers from rail.h.matthijs
* Moved GetTileRailType() from npf.c to rail.[ch].
2005-06-17(svn r2454) * Codechange: Move #include "stdafx.h" and "openttd.h" from ↵matthijs
rail.h to rail.c * Codechange: Move declaration of lookup arrays into the functions that need them. This doesn't pollute the global namespace with the array names. * Add: rail.h to the openttd.vcproj and openttd.dsp for MSVC.
2005-06-17(svn r2450) * Codechange: Replaced all uses of the arrays in tile.h with ↵matthijs
calls to the associated wrapper functions. * Codechange: Made npf.c use some map array accessing wrappers instead of direct access. * Codechange/Fix: Named every enum in tile.h. Fixes a nasty bug on MSVC where arrays would be initialised with zeroes (tnx Asterix_) * Removed magic numbers from tables in tile.c. * Added some explicit casts in tile.h.
2005-06-16(svn r2448) General cleanup of rail related code, more to follow.matthijs
* Add: rail.[ch] for rail-related enums and wrapper functions. * Codechange: Removed dozens of magic numbers with below enums. * Codechange: Rewrote CheckTrackCombination(). * Add: TILE_SIZE, TILE_PIXELS and TILE_HEIGHT constants. * Add: enums RailTileType, RailTileSubtype, SignalType to mask against the map arrays. * Add: enums Track, TrackBits, Trackdir, TrackdirBits for railway track data. (Note that the old RAIL_BIT constants are replaced by TRACK_BIT ones). * Add: enums Direction and DiagDirection * Codechange: Moved a bunch of track(dir) related lookup arrays from npf.[ch] to rail.[ch]. * Codechange: move RailType enum from tile.h to rail.h. * Add: Wrapper functions for masking signal status in the map arrays: SignalAlongTrackdir, SignalAgainstTrackdir and SignalOnTrack. * Add: Wrapper functions to access rail tiles, using above enums * Add: Wrapper functions to modify tracks, trackdirs, directions, etc. * Add: Wrapper functions for all lookup arrays in rail.[ch] (Arrays are still used in parts of the code) * Codechange: Renamed some variables and arguments to better represent what they contain (railbit -> track, bits -> trackdirbits, etc.). * Codechange: Don't use FindLandscapeHeight() in CmdRemoveSingleRail(), since it returns way too much info. Use GetTileSlope() instead. * Codechange: [NPF] Removed some unused globals and code from npf.c.