summaryrefslogtreecommitdiff
path: root/rail.h
AgeCommit message (Collapse)Author
2005-10-16(svn r3049) Replace byte/int/uint by RailType where appropriatetron
2005-10-14(svn r3040) Don't deduce the cursor sprites when building rails from magic ↵tron
numbers, but fetch them from the central rail info array.
2005-10-13(svn r3037) Don't deduce the sprites for tunnels and level crossings from ↵tron
magic numbers, but fetch them from the central rail info array. This is a preparation step for electrified rails
2005-09-29(svn r2998) -Codechange: Split rail drawing code off from DrawTile_Rail into ↵peter1138
a separate function to be used elsewhere. (Deja vu?)
2005-09-18(svn r2962) - const correctness for all Get* functions and most Draw* ↵Darkvater
functions that don't change their pointer parameters - change a lot of byte player types to PlayerID - beautify header files, same "#endif /* filename */" ending
2005-08-03(svn r2798) -Codechange: Unified the rail toolbars into one that is modified bycelestar
request using the RailtypeInfo struct
2005-07-31(svn r2774) -Codechange: Removed TRACKTYPE_SPRITE_PITCH globally and ↵celestar
replaced it by a member of RailtypeInfo
2005-07-29(svn r2756) Renamed railtypes into _railtypesludde
Renamed railtypes.c into railtypes.h, all other tables are in .h files. (It should be in the tables dir but I couldn't figure out how to get it there without deleting it first). Added const and extern.
2005-07-29(svn r2753) -Codechange: Introduced a new struct "RailtypeInfo" to store ↵celestar
rail type specific information. Begun populating it with a bunch of sprites, more to come later. This should result in cleaner, more compact code which allows easy introduction of new railtypes.
2005-07-29(svn r2752) -Doc: Added some doxygen stuff to rail.h. I'm gonna mess around ↵celestar
with this file and wanted to get rid of this first
2005-07-24(svn r2701) Insert Id tags into all source filestron
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-10(svn r2541) -Feature: Modified IsCompatibleRail so that an engine can move ↵celestar
on more than one railtype (like Diesel engines on electrified rail). -Codechange: Use IsCompatibleRail where it should be used
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-07-02(svn r2507) -Fix: Forgot to change an enum in rail.h in r2499 (thanks ↵celestar
blathijs for pointing it out)
2005-06-22(svn r2473) - Add: VehicleMayEnterTile(), which checks if the tile owner of ↵matthijs
a tile is correct for a vehicle to enter it. Based upon glx's code. - Fix: [ 1203769 ] [NPF] NPF tries to plan over bridges, through tunnels, over level crossings of other players. (glx) - Codechange: Renamed TRANSPORT_MAX to TRANSPORT_END and added INVALID_TRANSPORT. - Codechange: Moved IsLevelCrossing() from tile.h to rail.h - Add: GetCrossingTransportType(), which returns the transport type (road, rail) of both tracks on a level crossing. - Removed old TODO that was fulfilled already.
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 r2453) * CodeChange: Declared the lookup arrays in rail.h as extern, so ↵matthijs
the linker will complain if they are not defined (ie when rail.c is not included).
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.