summaryrefslogtreecommitdiff
path: root/rail_cmd.c
AgeCommit message (Collapse)Author
2006-10-14(svn r6774) -Codechange: Rename the badly named OWNER_SPECTATOR to ↵Darkvater
PLAYER_SPECTATOR and put it into player.h where it belongs (instead of map.h)
2006-10-10(svn r6714) -Codechange: replaced a direct manipulation of windows with ↵bjarni
InvalidateWindowData() in rail_cmd.c Moved the actual modification of railtype to WE_INVALIDATE_DATA in the train depot handler -Codechange: added SetWindowDirty() to WE_INVALIDATE_DATA as it made no sense to update the list without making the window dirty
2006-10-10(svn r6712) -Code cleanup: renamed buildtrain_d to buildvehicle_d as it's ↵bjarni
used for all vehicle types
2006-10-05(svn r6651) -Coding feature: added the windowevent WE_INVALIDATE_DATAbjarni
This gives the ability to invalidate some window data and recalculate as needed instead of doing it for each WE_PAINT This event is called right away when using InvalidateWindowData(), so it may be a good idea to set a bool or similar in the window or similar and then act on that bool in WE_PAINT instead of doing a lot of stuff in WE_INVALIDATE_DATA as it might be called more than once before WE_PAINT is called InvalidateWindowData() will not automatically repaint the window, so if you want to repaint it as well, you need to mark it dirty as well. Made the depot windows use WE_INVALIDATE_DATA to set when to generate the engine and wagon lists instead of at each redraw It makes no sense to regenerate the list when say using the scrollbar if we know that no vehicle have entered or left the list NOTE: currently there is a piece of code to generate the list when it's not needed and compare it to the stored list and assert if they mismatch This check is somewhat slow and kills the whole idea of WE_INVALIDATE_DATA, so it's a short lived one to verify that InvalidateWindowData() is used everywhere where it's needed
2006-10-04(svn r6637) -Codechange: merged all (vehicle type)EnterDepot into ↵bjarni
VehicleEnterDepot() This revealed duplicated code like aircraft lists got invalidated twice Moved invalidation of the vehicle detail window to VehicleServiceInDepot() as it should always be updated when serviced
2006-09-26(svn r6513) -Codechange: unified the code to draw depot windowsbjarni
This change is intended to make it easier to make depot behaviour consistent and faster to code when adding more features in the future The user interface should hopefully not be affected by this
2006-09-05(svn r6406) -Codechange: Rename TileOffsByDir to TileOffsByDiagDir because ↵Darkvater
it accepts DiagDirections, and add TileOffsByDir that handles Directions. -Codechange: Make the treeloop use TileOffsByDir().
2006-09-05(svn r6395) -Fix: when converting a depot from/to elrail, update the power ↵glx
of trains that are in it
2006-09-04(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines ↵rubidium
more uniform. -Cleanup: whitespace alignment of a few tables.
2006-08-31(svn r6268) Remove now pointless assignment (followup of r6267)tron
2006-08-31(svn r6267) Simplify the control flow in the rail tile loop by eliminating a ↵tron
bool flag and replacing it by a simple goto
2006-08-31(svn r6264) Get rid of a casttron
2006-08-31(svn r6251) Replace 2 bool variables by a simple switchtron
2006-08-29(svn r6212) Remove dependency on window.h from station.htron
2006-08-28(svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else ↵rubidium
{' -> '} else {', tabs between code and comment, etc.
2006-08-26(svn r6141) -Codechange: introduced DepotID and used it as much as possibletruelight
-Codechange: DeleteDepot removes a depot from the pool -Codechange: DestroyDepot is called by DeleteDepot to remove all things where a depot depends on. Last 2 changes to prepare for new pool system. Not pretty now, will be soon. -Codechange: Removed DoDeleteDepot as it was stupid
2006-08-22(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. ↵rubidium
whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
2006-08-12(svn r5864) -Feature: Also allow horizontal and vertical rails on steep slopestron
2006-08-10(svn r5833) -Feature: Allow building of (certain) rails, roads and bridge ↵tron
ramps on steep sloped tiles
2006-08-06(svn r5794) Pass the TileIndex plus x and y coordinates into GetSlopeZ_* ↵tron
instead of a TileInfo
2006-08-06(svn r5787) Rename width, height and unk of struct DrawTileSeqStruct to ↵tron
size_{x,y,z}
2006-08-05(svn r5771) Unify several code paths and data structures for drawing train ↵tron
depots and waypoints
2006-07-27(svn r5624) Use {IsPlainRailTile,IsRailDepot,IsRailWaypoint,HasSignals}() ↵tron
instead of GetRailTile{T,Subt}ype() - this is more concise and a bit more flexible if/when the rail tile encoding changes
2006-07-26(svn r5618) Remove a redundant check, CheckTrackCombination() a few lines ↵tron
above performs the same test
2006-07-22(svn r5582) Add and use AxisToTrack{Bits,}()tron
2006-07-15(svn r5500) Undo r4597, because it breaks the intended change of r5315 to ↵tron
prohibit building rails on a road tile while road works are in progress
2006-07-14(svn r5497) -Fix: somehow in r5315 slipped some wrong logic, allowed you to ↵truelight
build rail on all road pieces without really building it ;)
2006-06-28(svn r5396) - Remove two fixed parameterstron
- Simplify an expresssion: c ? f(x) : f(y) -> f(c ? x : y)
2006-06-27(svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectaculartron
2006-06-25(svn r5363) Revert 5312, 5288, 5248, 3992, 3249, 3228tron
They were all aimed at fixing the terraform-into-tunnel problem, but introduced new sideeffects while doing so
2006-06-21(svn r5326) Remove the indicator bit for custom waypoint graphics, because ↵tron
it just contains redundant information Yup-yup-ed by: peter1138
2006-06-19(svn r5315) -Fix: Prohibit altering a road tile while road works are in progresstron
This fixes some glitches like "turning" the excavation by adding/removing road bits or removing the road piece
2006-06-18(svn r5308) Replace an array of function pointers with a switch: It's ↵tron
shorter, more comprehensible, less dependent on magic numbers
2006-06-10(svn r5210) Many small changes which piled up: const, unsigned, variable ↵tron
scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc.
2006-06-07(svn r5155) - Remove the bridge branch merge (revision r5070)tron
2006-06-02(svn r5070) Merged the bridge branchcelestar
-Feature: Bridges can now be placed above: Any railway track combination (excluding depots and waypoints) Any road combination (excluding depots) Clear tiles (duh), including fields Tunnel entrances Bridge heads Thanks to Tron for idea and implementation, KUDr for the yapf synchronization and many others for hours of testing There are still a number of visual problems remaining, especially when electric railways are on or under the bridge. DO NOT REPORT THOSE BUGS FOR THE TIME BEING please.
2006-05-27(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous ↵KUDr
support and users for testing.
2006-05-21(svn r4940) Remove the dubious feature of remembering the last built depot. ↵tron
It serves no real purpose except causing confusion
2006-05-21(svn r4937) Reduce the use of _error_message a bittron
2006-05-20(svn r4927) Replace 3 big ifs (which regard foundations) by a bit less ↵tron
confusing code
2006-05-18(svn r4906) - Fix: Refresh build vehicle window (if opened) when converting ↵glx
rail depot
2006-05-09(svn r4790) Remove slope magic from EnsureNoVehicleZ() and rename it to ↵tron
EnsureNoVehicleOnGround() to make more clear what it does
2006-05-09(svn r4789) - Codechange: rename RoadType to RoadTileType and ↵rubidium
ROAD_{NORMAL,CROSSING,DEPOT} to ROAD_TILE_* for consistency
2006-05-09(svn r4788) - Codechange: RAILTYPE_{NORMAL,ELECTRIC,...} and ↵rubidium
RAIL_TYPE_{NORMAL,SIGNAL,...} have nearly the same name, rename RAIL_TYPE_* to RAIL_TILE_* of extra clarity
2006-05-07(svn r4770) - Revert unindented change to rail_cmd.c in r4769.peter1138
2006-05-07(svn r4769) - Newstations: add newstations ttdpatch flagpeter1138
2006-05-07(svn r4767) - Newstations: fix loading / use of custom ground spritespeter1138
2006-05-06(svn r4754) - Newstations: expose default station display data via a ↵peter1138
function so we can use it (rarely) in other places.
2006-05-06(svn r4748) - Newstations: use custom sprite layout callback for waypoints ↵peter1138
as well as stations. Supports merging of adjacent waypoints if the GRF supports it (newstatsw.grf)
2006-05-04(svn r4739) - Newstations: remove cargo type parameter of ↵peter1138
GetCustomStationRelocation() as we can determine it internally