Commit Graph

253 Commits (0a532f8491ce2ce1fa8e2d8d664079a91f0a8607)

Author SHA1 Message Date
peter1138 6e2b98b060 (svn r4758) - Newstations: add support for 'blocked' station tiles, which no train can pass. 18 years ago
peter1138 10992deeb3 (svn r4757) - Newstations: add saveload support for custom station speclists 18 years ago
peter1138 f689b20874 (svn r4754) - Newstations: expose default station display data via a function so we can use it (rarely) in other places. 18 years ago
peter1138 86b5790782 (svn r4742) - Newstations: Add callbacks for building and drawing custom stations. 18 years ago
peter1138 4963eb80b7 (svn r4739) - Newstations: remove cargo type parameter of GetCustomStationRelocation() as we can determine it internally 18 years ago
peter1138 530b413612 (svn r4724) - Newstations: Add per-tile random data for station tiles. 18 years ago
peter1138 be5744ae50 (svn r4723) - Newstations: add TileIndex parameter to station resolver. 18 years ago
peter1138 76411cef63 (svn r4719) - Newstations: instead of drawing nothing, fall back to the default sprite layout if a station layout specifies so. 18 years ago
matthijs daef7e410c (svn r4640) - Add: IsValidDiagDirection, IsValidDirection and IsValidAxis functions.
- Codechange: Use IsValidDiagDirection() in CmdBuildRoadStop().
18 years ago
celestar d3edede498 (svn r4619) -Codechange: Rename FindRoadStationSpot into FindRoadStopSpot and try to document it a little.
if anyone comes up with an idea on how to simplify this thing a bit, I'd be grateful
18 years ago
peter1138 725f04b0e1 (svn r4612) - NewStations: add random bits (for graphic variation) to stations 18 years ago
glx 885de1aff9 (svn r4602) - Fix: an assertion triggered when building a station near the south corner of the map (appeared in r4367) 18 years ago
belugas 187013b6a3 (svn r4593) CodeChange : Renamed spec (when using StationSpec) to statspec.
This is following the same scheme as for IndustrySpec
18 years ago
tron 18ad0ae50e (svn r4572) Remove vehicle_leave_tile_proc
There's exactly one implemented function (unbarring a level crossing) and one place where it can be triggered (a train leaves a level crossing)
It's a bit overkill, so just handle this one case where it can happen
18 years ago
tron c1dc517dab (svn r4554) Replace magic numbers by TILE_{HEIGHT,SIZE} 18 years ago
tron 0347fb2ab6 (svn r4541) Add a type for slopes and replace many magic numbers by the appropriate enums 18 years ago
Darkvater 5a8d992eaa (svn r4529) - Codechange: Use proper naming for hex numbers in debug prints eg. 0xF3A6. Use fixed lengths where applicable (newgrf). Unfortunately '%#X' is unusable since it gives 0XFF3 and '%#x' gives 0xff3 while we want 0xFF3 :P 18 years ago
peter1138 de84d6338d (svn r4473) - Newstations:
- Alter parameters of CMD_BUILD_RAILROAD_STATION to accept a custom station class and id.
  - Add a dynamically allocated list of custom stations that the SpecIndex (m4) references.
18 years ago
peter1138 ae7ec5cd0d (svn r4471) - Pools: Add a facility for calling a custom function during pool block clean up. 18 years ago
celestar e75e4e8f74 (svn r4466) -Fix: (FS#71) Game no longer crashes when the last vehicle serving a station has been deleted.
-Negative side effect: upon loading old games, stations whose last vehicle was a station have (temporarily) lower ratings.
   -Positive side effect: station.h no longer includes vehicle.h (breaks the station.h->vehicle.h->rail.h chain)
18 years ago
peter1138 8d0e07378a (svn r4462) - Newstations: ensure the chosen tile layout is available from a custom station 18 years ago
peter1138 3b6cbf62d4 (svn r4460) - Newstations: remove unused class_id / stat_id variables from the
Station struct.
18 years ago
peter1138 857b8b045b (svn r4450) - NewStations, rename *CustomStationSprite() to *CustomStationSpecIndex() to reflect their use, and alter the test for determining if a station has customised graphics. 18 years ago
belugas 88e0bab283 (svn r4426) Code Cleaning : replacing tabs with spaces, removing obvious comments, aligning arrays etc... 18 years ago
belugas ea706f8ead (svn r4425) Fix bug introduced in r4411 : while IS_BYTE_INSIDE, max value is STRICKLY LESS THEN. This caused airports animations to stay unanimated. Industries were similarly affected.
Thanks to Richk67 for finding it.
Also, more Gfx define and use.
18 years ago
belugas e84d878213 (svn r4411) CodeChange : Define and use some Gfx for both stations and industries. More are still to come
Also, a bit of code cleaning, as pointed by Tron
18 years ago
belugas b505564ee7 (svn r4403) CodeChange : Add GetStationGfx and make use of [G|S]etStationGfx accessors. Also, use GetStationGfx instead of directly accessing the map for functions in station_map.h 18 years ago
peter1138 f733f94677 (svn r4383) - Codechange: Remove extraneous code from 4354; no need to get RailTypeInfo when we already have it... 18 years ago
belugas 88440522fe (svn r4367) CodeChange : Remove another direct map access in station_cmd.c. Replace an array of TileIndexDiffC by a use of loop with TileDiffXY. Thanks to Rubidium 18 years ago
peter1138 5f24141cb8 (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. 18 years ago
tron 81e6d68f95 (svn r4342) Change the first two parameters of commands - virtual pixel coordinates of the tile to operate on - to a TileIndex
Remove DoCommandByTile(), because now it does the same as DoCommand()
18 years ago
tron fade7a5997 (svn r4331) Replace some direction calculation magic with DiagDirection to make a bit more clear what's going on 19 years ago
tron 4e577f689a (svn r4325) When updating the vehicle count for road stops after load use the slot pointer of the vehicle instead of recalculating the road stop using the destination tile of the vehicle. Apart from being more simple this could prevent a inconsistency of slot information in the edge case when the destination tile isn't the tile of the assigned slot. 19 years ago
tron 90836a461d (svn r4324) Remove the unused road stop type attribute from struct RoadStop 19 years ago
tron da60a82021 (svn r4323) -Regression: Clear the slot assignments of all vehicles heading twoards a road stop if that road stop gets removed
This issue was fixed in r2210 and reintroduced in r4259 when the multistop handling was overhauled.
19 years ago
celestar fd10af66d7 (svn r4320) -Fix/Codechange: rs->num_vehicles is no longer saved or loaded, but computed on the fly. Partly fixes FS#101 19 years ago
celestar 9760d3dccf (svn r4319) -Codechange: Station map accessors 19 years ago
celestar da095bc941 (svn r4316) -Codechange: finished r4257 (forgot one variable there) 19 years ago
Darkvater fc68881906 (svn r4265) - Fix: compile warning on VS2005 (parameter 2 different from declaration) 19 years ago
celestar 5931b34aff (svn r4259) -[multistop] Fix/Feature/Codechange:
1) Improved the road vehicle allocation (aka slotting) for multistop. Stops can now accept unlimited, er... 256, vehicles.
2) Removed the "wait for stop" feature, because it did not work in practise.
3) Slotting now ignores unreachable stations. Uses NPF at the moment because the old pathfinder cannot do it (yet)
4) Now matter how many vehicles approach a station, they will always be distributed evenly over existing stops.
5) Hopefully the last fundamental change to multistop
19 years ago
celestar 13812b08ec (svn r4257) -Codechange: Renamed the airport_map5_tiles_* variables into airport_sections_* 19 years ago
celestar cc87f682b9 (svn r4249) -Codechange: Replace more occurences of 16 by TILE_SIZE and of 8 by TILE_HEIGHT. Reverted one change from the previous commit because it was faulty 19 years ago
tron 892a4c587d (svn r4242) Pass TileIndex and slope to GetSlopeTileh_*() instead of TileInfo 19 years ago
celestar b364658f42 (svn r4173) -Codechange: Use IsClearWaterTile for buoy construction 19 years ago
belugas 3633d56923 (svn r4157) CodeChange : Keep on cleaning up Celestar's elrail merge 19 years ago
celestar a7d8ad0004 (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
Darkvater d5909f901a (svn r4128) - CodeChange: Add proper semantics for CargoID for such variables instead of using the general byte-type. 19 years ago
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
19 years ago
tron 9ad72f2d47 (svn r4111) Fix/Remove some stale comments 19 years ago
tron 9be713f1ae (svn r4079) Add GetSation{Index,ByTile}() to get the station index resp. the station from a tile 19 years ago