summaryrefslogtreecommitdiff
path: root/rail_cmd.c
AgeCommit message (Collapse)Author
2006-12-29(svn r7617) -Fix (7609): GetTrackBits only works (as intended) for plain ↵rubidium
rail tiles, so get the trackbits if it is certain it is a plain rail tile. Noticed by Tron.
2006-12-29(svn r7609) -Codechange: remove some direct map accesses to m5 and some ↵rubidium
unneeded signal removal code in ClearTileTrack as it is done in CmdRemoveSingleRail too, which is called for every removed trackbit.
2006-12-27(svn r7583) -Fix (r7573): Merging of bridge branch broke (partially ↵peter1138
reverted?) automatic railtype conversion when building track on existing rail.
2006-12-27(svn r7573) -Merged the bridge branch. Allows to build bridges of arbitrary ↵celestar
rail/road combinations (including signals)
2006-12-26(svn r7565) -Codechange: Rework DEBUG functionality. Look for appropiate ↵Darkvater
debugging levels to use in debug.h. grfmsg() is now used as a specific debug-function for grf.
2006-12-01(svn r7313) -Codechange: Calling invalidate data on a window will surely ↵Darkvater
warrant a redraw, so call that after the WE_INVALIDATE_DATA event and remove (some of) the superflouous calls.
2006-11-17(svn r7195) -Feature: [FS#297, optional elrails] New patches/vehicles option ↵KUDr
'disable electrified railways'. (original patch by maedhros, ideas: peter1138, Darkvater, Rubidium, Patrick, Eddi|zuHause, ..)
2006-11-10(svn r7127) -Codechange [FS#149]: Improve the usability of the ↵Darkvater
signal-dragger, do not bail out at (certain) errors, just silently ignore them.
2006-11-08(svn r7112) -Codechange (r7106): Improve the test for determining if the ↵peter1138
rail type should be converted
2006-11-08(svn r7111) After checking p1 in CmdBuildSingleRail() assign it to a ↵tron
variable railtype instead of using p1 in the function. Also assign p2 to track only after it has been checked for validity
2006-11-07(svn r7108) -Fix (r7106): signed/unsigned comparison warningDarkvater
2006-11-07(svn r7106) -Feature: Allow over-building of compatible railtypes, i.e. ↵peter1138
normal and electrified rail. If building electrified rail, normal rail is upgraded for you (for the normal cost).
2006-11-03(svn r7048) -Cleanup: DEBUG doesn't need a newline character, use DEBUG ↵Darkvater
instead of printf and the verb is build/built/built not build/*/build or build/*/builded.
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.