Darkvater
70eba6d525
(svn r7127) -Codechange [FS#149]: Improve the usability of the signal-dragger, do not bail out
...
at (certain) errors, just silently ignore them.
2006-11-10 19:04:27 +00:00
peter1138
2f6bc5add3
(svn r7112) -Codechange (r7106): Improve the test for determining if the rail type should be converted
2006-11-08 10:09:46 +00:00
tron
7673628161
(svn r7111) After checking p1 in CmdBuildSingleRail() assign it to a variable railtype instead of using p1 in the function. Also assign p2 to track only after it has been checked for validity
2006-11-08 09:18:27 +00:00
Darkvater
8786045eab
(svn r7108) -Fix (r7106): signed/unsigned comparison warning
2006-11-07 23:25:27 +00:00
peter1138
32c1de3be0
(svn r7106) -Feature: Allow over-building of compatible railtypes, i.e. normal and
...
electrified rail. If building electrified rail, normal rail is upgraded
for you (for the normal cost).
2006-11-07 22:34:59 +00:00
Darkvater
6b44b88e9f
(svn r7048) -Cleanup: DEBUG doesn't need a newline character, use DEBUG instead of printf and the
...
verb is build/built/built not build/*/build or build/*/builded.
2006-11-03 01:18:40 +00:00
Darkvater
a85d679f54
(svn r6774) -Codechange: Rename the badly named OWNER_SPECTATOR to PLAYER_SPECTATOR and
...
put it into player.h where it belongs (instead of map.h)
2006-10-14 15:49:43 +00:00
bjarni
3dfe48b189
(svn r6714) -Codechange: replaced a direct manipulation of windows with 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 08:14:30 +00:00
bjarni
cea27e2622
(svn r6712) -Code cleanup: renamed buildtrain_d to buildvehicle_d as it's used for all vehicle types
2006-10-10 07:56:23 +00:00
bjarni
b31bfb25ca
(svn r6651) -Coding feature: added the windowevent WE_INVALIDATE_DATA
...
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-05 12:59:28 +00:00
bjarni
db9cdd6749
(svn r6637) -Codechange: merged all (vehicle type)EnterDepot into 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-10-04 12:01:59 +00:00
bjarni
40eecb3391
(svn r6513) -Codechange: unified the code to draw depot windows
...
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-26 16:47:51 +00:00
Darkvater
7e4d0f112e
(svn r6406) -Codechange: Rename TileOffsByDir to TileOffsByDiagDir because it accepts
...
DiagDirections, and add TileOffsByDir that handles Directions.
-Codechange: Make the treeloop use TileOffsByDir().
2006-09-05 23:21:41 +00:00
glx
ab5135dd38
(svn r6395) -Fix: when converting a depot from/to elrail, update the power of trains that are in it
2006-09-05 16:40:23 +00:00
rubidium
21ac20aeca
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
...
-Cleanup: whitespace alignment of a few tables.
2006-09-04 20:40:33 +00:00
tron
fbbaa57001
(svn r6268) Remove now pointless assignment (followup of r6267)
2006-08-31 12:19:32 +00:00
tron
8193ee2b04
(svn r6267) Simplify the control flow in the rail tile loop by eliminating a bool flag and replacing it by a simple goto
2006-08-31 11:42:16 +00:00
tron
f44e915cdc
(svn r6264) Get rid of a cast
2006-08-31 10:36:59 +00:00
tron
d0a0786ef1
(svn r6251) Replace 2 bool variables by a simple switch
2006-08-31 06:46:52 +00:00
tron
bcb516aa19
(svn r6212) Remove dependency on window.h from station.h
2006-08-29 06:50:47 +00:00
rubidium
86dc219b4b
(svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else {' -> '} else {', tabs between code and comment, etc.
2006-08-28 18:53:03 +00:00
truelight
4d43389c28
(svn r6141) -Codechange: introduced DepotID and used it as much as possible
...
-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-26 14:44:55 +00:00
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.
2006-08-22 14:38:37 +00:00
tron
d577209761
(svn r5864) -Feature: Also allow horizontal and vertical rails on steep slopes
2006-08-12 12:56:45 +00:00
tron
0403405d5d
(svn r5833) -Feature: Allow building of (certain) rails, roads and bridge ramps on steep sloped tiles
2006-08-10 14:44:32 +00:00
tron
d8b8035f9f
(svn r5794) Pass the TileIndex plus x and y coordinates into GetSlopeZ_* instead of a TileInfo
2006-08-06 16:32:49 +00:00
tron
fb251d18e0
(svn r5787) Rename width, height and unk of struct DrawTileSeqStruct to size_{x,y,z}
2006-08-06 08:23:19 +00:00
tron
24ae7a2241
(svn r5771) Unify several code paths and data structures for drawing train depots and waypoints
2006-08-05 16:54:55 +00:00
tron
3c368fc05e
(svn r5624) Use {IsPlainRailTile,IsRailDepot,IsRailWaypoint,HasSignals}() instead of GetRailTile{T,Subt}ype() - this is more concise and a bit more flexible if/when the rail tile encoding changes
2006-07-27 05:30:53 +00:00
tron
53e740cb0d
(svn r5618) Remove a redundant check, CheckTrackCombination() a few lines above performs the same test
2006-07-26 12:11:52 +00:00
tron
d7cc128c96
(svn r5582) Add and use AxisToTrack{Bits,}()
2006-07-22 08:59:52 +00:00
tron
731753b1aa
(svn r5500) Undo r4597, because it breaks the intended change of r5315 to prohibit building rails on a road tile while road works are in progress
2006-07-15 09:29:39 +00:00
truelight
d3dc7ed676
(svn r5497) -Fix: somehow in r5315 slipped some wrong logic, allowed you to build rail on all road pieces without really building it ;)
2006-07-14 18:14:08 +00:00
tron
473efb372e
(svn r5396) - Remove two fixed parameters
...
- Simplify an expresssion: c ? f(x) : f(y) -> f(c ? x : y)
2006-06-28 06:10:20 +00:00
tron
772fbda3e3
(svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular
2006-06-27 21:25:53 +00:00
tron
ef4b0ab5b6
(svn r5363) Revert 5312, 5288, 5248, 3992, 3249, 3228
...
They were all aimed at fixing the terraform-into-tunnel problem, but introduced new sideeffects while doing so
2006-06-25 17:39:19 +00:00
tron
5d1ae07dc5
(svn r5326) Remove the indicator bit for custom waypoint graphics, because it just contains redundant information
...
Yup-yup-ed by: peter1138
2006-06-21 11:30:28 +00:00
tron
d8605beacf
(svn r5315) -Fix: Prohibit altering a road tile while road works are in progress
...
This fixes some glitches like "turning" the excavation by adding/removing road bits or removing the road piece
2006-06-19 17:22:57 +00:00
tron
098bf494da
(svn r5308) Replace an array of function pointers with a switch: It's shorter, more comprehensible, less dependent on magic numbers
2006-06-18 09:37:08 +00:00
tron
a2362674e3
(svn r5210) Many small changes which piled up: const, unsigned, variable scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc.
2006-06-10 08:37:41 +00:00
tron
7fd88e5798
(svn r5155) - Remove the bridge branch merge (revision r5070)
2006-06-07 19:35:21 +00:00
celestar
b618b75c9b
(svn r5070) Merged the bridge branch
...
-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-06-02 13:05:41 +00:00
KUDr
308f27a3de
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
2006-05-27 16:12:16 +00:00
tron
e774caca2a
(svn r4940) Remove the dubious feature of remembering the last built depot. It serves no real purpose except causing confusion
2006-05-21 13:51:36 +00:00
tron
2b17d16ce2
(svn r4937) Reduce the use of _error_message a bit
2006-05-21 11:34:08 +00:00
tron
b95c1faca9
(svn r4927) Replace 3 big ifs (which regard foundations) by a bit less confusing code
2006-05-20 18:03:22 +00:00
glx
d2c8412e50
(svn r4906) - Fix: Refresh build vehicle window (if opened) when converting rail depot
2006-05-18 16:51:42 +00:00
tron
1be0d9926e
(svn r4790) Remove slope magic from EnsureNoVehicleZ() and rename it to EnsureNoVehicleOnGround() to make more clear what it does
2006-05-09 09:56:09 +00:00
rubidium
2a337ab009
(svn r4789) - Codechange: rename RoadType to RoadTileType and ROAD_{NORMAL,CROSSING,DEPOT} to ROAD_TILE_* for consistency
2006-05-09 08:25:31 +00:00
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
2006-05-09 08:17:33 +00:00