Commit Graph

59 Commits (8ba55322c1c0080e40b96f535d7c672f3b77b570)

Author SHA1 Message Date
rubidium 86dc219b4b (svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else {' -> '} else {', tabs between code and comment, etc. 18 years ago
rubidium 908d3bcfe6 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct. 18 years ago
matthijs 06e26ed2d3 (svn r5911) -Fix [FS#215]: Discard upper bits of TrackdirBitsToTrackBits result. 18 years ago
tron d7cc128c96 (svn r5582) Add and use AxisToTrack{Bits,}() 18 years ago
tron 772fbda3e3 (svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular 18 years ago
tron 000497273c (svn r5309) Partially fix the rail header dependency fiasco: rail_map.h now depends on rail.h and not the other way round anymore 18 years ago
KUDr 308f27a3de (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing. 18 years ago
celestar b725af6ad7 (svn r4946) "Feature": Add a cheat that allows running electric engines on normal rail 18 years ago
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 18 years ago
tron ec7e431cf6 (svn r4764) Move some functions from rail.h to rail_map.h 18 years ago
tron dd180a1e18 (svn r4541) Add a type for slopes and replace many magic numbers by the appropriate enums 18 years ago
celestar 01cd0f6fd3 (svn r4461) -Codechange: Add and make use of map accessor functions for signal drawing. Includes some basic cleanup of the drawing functions 18 years ago
celestar 62ded2f58d (svn r4376) -Codechange Renamed GetSignalState to GetSignalStateByTrackdir 19 years ago
peter1138 b87b68842a (svn r4354) [Elrail][NewGRF] Codechange: Drawing of custom waypoints with custom ground sprites used the index of the rail type as an offset. With the introduction of elrails this offset is incorrect, so instead there is now a lookup table within the RailTypeInfo struct to explicitly list the offset. 19 years ago
tron 28dfdd7863 (svn r4351) Simplify ReverseTrackdir() to use a simple arithmetic operation instead of a table lookup 19 years ago
tron 93789afac7 (svn r4349) Remove GetCrossingTransportType(), it's slightly overkill 19 years ago
tron a9b607f259 (svn r4348) Move IsLevelCrossing() from rail.h to road_map.h 19 years ago
orudge ff3c61b011 (svn r4204) - Get trunk compiling again on OS/2 19 years ago
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. 19 years ago
tron bf3811122d (svn r3979) Move GetRailFoundation() to rail_map.h and use it and friends to get information about rail tiles 19 years ago
tron 76ae9585dd (svn r3946) Add short hand names for common track combinations 19 years ago
tron dabfa14778 (svn r3941) Get rid of RAIL_TYPE_SPECIAL 19 years ago
tron 853a9b2da4 (svn r3913) Move declarations to rail_map.h so rail.h is dependent on rail_map.h and not the other way round 19 years ago
tron 4fb11f23ad (svn r3912) Move the signal type enum and GetSignalType() to rail_map.h; also add SetSignalType() and use the functions 19 years ago
tron 0e3699bd5c (svn r3911) Add functions to retrieve/set the signal variant (electric/semaphore) 19 years ago
tron f6176a89f9 (svn r3767) Move all direction related enums and functions to a separate header 19 years ago
tron d851781663 (svn r3747) Change HASBIT() to return 0/1 instead of 0/value of tested bit, because the name suggests it does the former and current behavior broke in some places in very subtle ways (for example HASBIT(x, 0) != HASBIT(y, 1) doesn't work, returning a bool after HASBIT(x, 9) neither) 19 years ago
tron 7b106a3d8f (svn r3697) Rename DIAG1/DIAG2 to X resp. Y as this conveys a bit better in which direction a pieces of rail goes 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 9712d6f639 (svn r3510) Fiddle with whitespace and parentheses 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
Darkvater 9eb1589827 (svn r3466) - Codechange: Some changes to increase readability of signals code. 19 years ago
peter1138 e8e7794c97 (svn r3443) - Fix signed/unsigned comparison warning when compiling with gcc 2.95 (tokai) 19 years ago
tron 318fe153eb (svn r3365) Staticise 36 functions 19 years ago
matthijs 30397b6561 (svn r3329) - Doc: Some documentation cleanups.
- Add: TracksOverlap() (from the map branch), TrackdirBitsToTrackBits(), DiagdirReachesTrackdirs(), DiagdirReachesTracks().
 - Fix: Infinite loop in the pathfinder introduces in r3321.
19 years ago
tron 0b936c3222 (svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in comments, excess empty lines, minor other changes
nothing spectacular, just some stuff, which piled up
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 e3d1e43559 (svn r3049) Replace byte/int/uint by RailType where appropriate 19 years ago
tron 8d4ed0840b (svn r3040) Don't deduce the cursor sprites when building rails from magic numbers, but fetch them from the central rail info array. 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
peter1138 fdebfbe8d5 (svn r2998) -Codechange: Split rail drawing code off from DrawTile_Rail into a separate function to be used elsewhere. (Deja vu?) 19 years ago
Darkvater 4a58250cb9 (svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
- change a lot of byte player types to PlayerID
- beautify header files, same "#endif /* filename */" ending
19 years ago
celestar 940872e51f (svn r2798) -Codechange: Unified the rail toolbars into one that is modified by
request using the RailtypeInfo struct
19 years ago
celestar 5352ad4582 (svn r2774) -Codechange: Removed TRACKTYPE_SPRITE_PITCH globally and replaced it by a member of RailtypeInfo 19 years ago
ludde b8c9194b7c (svn r2756) Renamed railtypes into _railtypes
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.
19 years ago
celestar f287f2ff8d (svn r2753) -Codechange: Introduced a new struct "RailtypeInfo" to store 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. 19 years ago
celestar a855a54686 (svn r2752) -Doc: Added some doxygen stuff to rail.h. I'm gonna mess around with this file and wanted to get rid of this first 19 years ago
tron 647cbd6bdd (svn r2701) Insert Id tags into all source files 19 years ago
tron a4bf608d40 (svn r2558) Change the internal map format from 7 arrays to one array of structs, this doesn't change the saved format for now. It's a stepping stone for further changes. 19 years ago
celestar 84faec4c43 (svn r2541) -Feature: Modified IsCompatibleRail so that an engine can move on more
than one railtype (like Diesel engines on electrified rail).
-Codechange: Use IsCompatibleRail where it should be used
19 years ago