Commit Graph

175 Commits

Author SHA1 Message Date
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
tron
6dbc9c9ced (svn r4554) Replace magic numbers by TILE_{HEIGHT,SIZE} 2006-04-23 19:35:36 +00:00
Darkvater
0a0b8f22aa (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 2006-04-22 13:56:16 +00:00
celestar
78f95ecdeb (svn r4507) Just a comment 2006-04-21 20:10:53 +00:00
celestar
dd3a3adbbd (svn r4506) -Fix: (FS#95) Use the tile hash when pathfinding to a depot. Eats a tiny bit of performance, but the likelihood that the depot is found is greatly increased 2006-04-21 20:08:25 +00:00
Darkvater
fd8e02119c (svn r4435) - Fix: an assertion triggered when trying to remove a bridge with the remove-tool (r4348 surfaced this). In CmdRemoveRoad tiletype was not checked for ownership. Intorudce IsLevelCrossingTile() which checks if a tile is a crossing without knowing the type. Suggested by peter1138 and Tron. 2006-04-15 20:07:42 +00:00
belugas
fbf6dd2cb9 (svn r4359) MSV6 Release mode now compiles (problem of UINT_MAX. stdafx.h should be the first include). Thanks to KUDr for solution and testing 2006-04-11 15:18:22 +00:00
tron
35e93e451f (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()
2006-04-10 07:15:58 +00:00
tron
d68d287708 (svn r4326) Only reduce the slot age of a vehicle if it has a slot assigned 2006-04-08 14:18:39 +00:00
celestar
8cbe98a3fd (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
2006-04-03 14:25:32 +00:00
celestar
6443c14ebd (svn r4246) -Codechange. Replaced about 100 occurences of '16' by TILE_SIZE 2006-04-03 05:32:11 +00:00
celestar
2ab5b8e666 (svn r4215) -Codechange: Renamed *RoadStation* functions to *RoadStop* and moved them to station_map.h to keep consistency 2006-03-31 19:10:54 +00:00
tron
c40740e058 (svn r4120) Use the new station functions where appropriate 2006-03-26 19:20:15 +00:00
tron
f6285a659c (svn r4079) Add GetSation{Index,ByTile}() to get the station index resp. the station from a tile 2006-03-24 08:55:08 +00:00
celestar
d0908375f4 (svn r3909) [multistop]
-Codechange: No longer hijack the VS_STOPPED flag when waiting for a slot.
-Fix: Vehicles waiting for slots can still be controlled (sent to depot, orders modified, ...)
-Fix: Vehicles no longer stop on crossings and during overtake operations
2006-03-16 16:47:39 +00:00
tron
00cf5c9acf (svn r3832) Replace some magic numbers by (Diag)Direction enums 2006-03-12 17:42:04 +00:00
tron
0100871412 (svn r3830) Move IsTunnelTile() from tile.h to tunnel_map.h and add IsTunnel(), which just checks for a tunnel, but not the tile type as IsTunnelTile() does 2006-03-12 15:04:03 +00:00
tron
7803f259e2 (svn r3798) Fix typo in r3795 2006-03-08 20:25:28 +00:00
tron
cf7b94254e (svn r3796) When unmagicfying code, do it Right(tm) and also give the variables sensible names. I flipped a 'b' and a 'd' in r3785 2006-03-08 19:47:18 +00:00
tron
86550c94bc (svn r3795) Add a function to request the orientation of a depot 2006-03-08 15:29:23 +00:00
tron
ab9af3b05d (svn r3787) Use DirToDiagDir() instead of >> 1 2006-03-08 08:28:48 +00:00
tron
fa6632ec32 (svn r3786) More work for DirDiff 2006-03-08 08:16:31 +00:00
tron
f0d82204e0 (svn r3785) Replace some if-magic to determine the turning direction for road vehicles with the new DirDiff stuff 2006-03-08 07:50:26 +00:00
tron
8cfcdaa733 (svn r3783) Replace further ints and magic numbers by Direction, DiagDirection and friends 2006-03-08 06:55:33 +00:00
tron
49cb8eb470 (svn r3776) Replace many ints and magic numbers by Direction, DiagDirection and friends 2006-03-06 20:28:28 +00:00
tron
4efa560ffc (svn r3763) Adapt to the new 'map accessors go in foo_map.h'-scheme 2006-03-05 10:19:33 +00:00
tron
ca0862c3f4 (svn r3758) Remove the news validation callback. It is superseded by r3757. 2006-03-04 11:15:44 +00:00
tron
332b54d5a6 (svn r3757) -Feature: Delete news items about vehicles, when they get stale
This is used to delete
- all news about a vehicle, when it gets deleted
- "vehicle has stopped in depot" news, when it gets started
- "vehicle has invalid orders" news, when the orders get changed
2006-03-04 11:01:35 +00:00
tron
f383a038f0 (svn r3754) Miscellaneous changes: indentation, reduce variable scope, constness, avoid some more function pointer casts 2006-03-03 22:21:29 +00:00
tron
622b4d4036 (svn r3752) FYOS avoid to cast function pointers 2006-03-03 21:29:13 +00:00
tron
36467a4bcf (svn r3751) -Fix: Correctly implement minimum search, so road vehicles head twoards the closest station, not the last one in the list 2006-03-03 21:18:19 +00:00
tron
2942939ad1 (svn r3750) Use INVALID_STATION instead of -1 in NPF 2006-03-03 20:54:54 +00:00
celestar
db4777c818 (svn r3730) Multistop modifications:
-Codechange: Completely rewritten the slot assignment system. It now consumes less CPU cycles and memory
-Codechange: Increased maximum number of roadstops to 16.
-Fix: Several conditions where a slot becomes unliked from a vehicle
-Codechange: ClearSlot now only takes one parameter, the vehicle
-Feature: Console command 'clearslots' to clear ALL currently assinged slots. debug usage only
-Feature: vehicles that cannot get a slot now wait on the road instead of planlessly blocking stops or circling around
-Codechange: Adjusted debug levels
TODO: Make the slot finder compatible with (a) pathfinder(s).
2006-03-02 08:55:12 +00:00
peter1138
b32bd10590 (svn r3681) - [Multistop] Check the RoadStop type before check its status. This fixes an assert introduced in r3663. Also fix the return type of GetRoadStopType(). 2006-02-27 19:43:19 +00:00
peter1138
ea59cc4a26 (svn r3663) - Fix: [Multistop] Check the status of the destination road stop instead of a station's first road stop. This only has effect with road vehicle queuing disabled. 2006-02-24 17:52:07 +00:00
tron
2f8e3dcc05 (svn r3658) Add functions and symbolic names to retrieve road tile types and road pieces 2006-02-23 08:20:28 +00:00
tron
661bad9032 (svn r3643) Remove a local variable which is just a pointer to a road stop status field and had the sensible name 'b'; instead directly use the road stop status field 2006-02-21 06:43:53 +00:00
tron
7692556c62 (svn r3613) Some more const, indentation, whitespace and similar stuff 2006-02-18 14:41:24 +00:00
peter1138
95ce125633 (svn r3612) - RoadStop->slot[] stores a vehicle index. Adjust its type and use INVALID_VEHICLE instead of nonsense INVALID_SLOT. 2006-02-18 14:11:23 +00:00
tron
5352e9fbcb (svn r3597) Miscellaneous (I like that word) changes: Fix some indentation, add consts, reduce indentation level by short-circuit logic, convert if cascades to switch, whitespace, bracing, plus some minor stuff 2006-02-13 21:15:00 +00:00
peter1138
30429dc4fb (svn r3589) - Rename u.road.unk2 to u.road.blocked_ctr 2006-02-11 10:45:20 +00:00
tron
c60b3216ae (svn r3584) Replace the rather obscure control flow for handling road vehicle orders by something remotly comprehensible 2006-02-10 06:03:51 +00:00
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
2006-02-06 09:18:04 +00:00
peter1138
6c28b1cec7 (svn r3524) - Split newgrf features from engine.[ch] into newgrf_engine.[ch], and add the new files to project files. 2006-02-03 12:55:21 +00:00
peter1138
2a71cd9dcf (svn r3513) Fix strange typo in last commit ... 2006-02-01 09:11:31 +00:00
peter1138
49e51cf27f (svn r3512) Yet more whitespace fixes (mostly by Rubidium) 2006-02-01 09:08:25 +00:00
tron
1c3e8630fe (svn r3511) More whitespace ([FS#46] by Rubidium) 2006-02-01 07:36:15 +00:00
tron
9712d6f639 (svn r3510) Fiddle with whitespace and parentheses 2006-02-01 06:32:03 +00:00
tron
ec74a57ada (svn r3489) Remove an unused declaration 2006-01-30 16:58:05 +00:00
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.
2006-01-29 18:57:26 +00:00