tron
65c06663ba
(svn r4938) Remove STATION_HANGAR, because it isn't really a station type of its own
2006-05-21 12:01:57 +00:00
tron
edb5e87e0c
(svn r4918) Move the information about the size of airports from an global array into the struct which describes an airport
2006-05-20 15:13:27 +00:00
KUDr
530bc2bf91
(svn r4915) - Fix: SLE_UINT8 replaced by SLE_BOOL for bool variables (found by Celestar)
2006-05-19 19:36:17 +00:00
celestar
48d991b819
(svn r4822) -Feature: Station List View can now be sorted and filtered (by waiting cargo type and facilities)
2006-05-11 10:33:58 +00:00
glx
cd3c141336
(svn r4785) - Newstations: don't draw catenary on non-track tiles
2006-05-08 21:59:36 +00:00
peter1138
5f2257e13c
(svn r4780) - Newstations: when building using a dynamic layout, add the station axis to the returned tile type. Also supply correct parameters to var 10.
2006-05-08 06:22:01 +00:00
peter1138
31a54a6835
(svn r4767) - Newstations: fix loading / use of custom ground sprites
2006-05-07 10:58:53 +00:00
peter1138
ec1edb127a
(svn r4763) - Newstations: revert r4762, instead map bit the palette modifier from bit 14 to bit 31 on GRF load.
2006-05-06 22:55:21 +00:00
peter1138
b0f40692d8
(svn r4762) - Newstations: make child sprites transparent.
2006-05-06 22:32:54 +00:00
peter1138
15640ca7da
(svn r4761) - Newstations: support platform information in variable 10 (callback parameter 1) when building a station
2006-05-06 22:30:36 +00:00
peter1138
6e2b98b060
(svn r4758) - Newstations: add support for 'blocked' station tiles, which no train can pass.
2006-05-06 22:08:14 +00:00
peter1138
10992deeb3
(svn r4757) - Newstations: add saveload support for custom station speclists
2006-05-06 21:46:26 +00:00
peter1138
f689b20874
(svn r4754) - Newstations: expose default station display data via a function so we can use it (rarely) in other places.
2006-05-06 20:33:22 +00:00
peter1138
86b5790782
(svn r4742) - Newstations: Add callbacks for building and drawing custom stations.
2006-05-04 20:00:50 +00:00
peter1138
4963eb80b7
(svn r4739) - Newstations: remove cargo type parameter of GetCustomStationRelocation() as we can determine it internally
2006-05-04 19:21:16 +00:00
peter1138
530b413612
(svn r4724) - Newstations: Add per-tile random data for station tiles.
2006-05-03 21:25:49 +00:00
peter1138
be5744ae50
(svn r4723) - Newstations: add TileIndex parameter to station resolver.
2006-05-03 21:19:21 +00:00
peter1138
76411cef63
(svn r4719) - Newstations: instead of drawing nothing, fall back to the default sprite layout if a station layout specifies so.
2006-05-03 20:35:41 +00:00
matthijs
daef7e410c
(svn r4640) - Add: IsValidDiagDirection, IsValidDirection and IsValidAxis functions.
...
- Codechange: Use IsValidDiagDirection() in CmdBuildRoadStop().
2006-05-01 09:34:23 +00:00
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
2006-04-29 09:47:43 +00:00
peter1138
725f04b0e1
(svn r4612) - NewStations: add random bits (for graphic variation) to stations
2006-04-28 20:48:45 +00:00
glx
885de1aff9
(svn r4602) - Fix: an assertion triggered when building a station near the south corner of the map (appeared in r4367)
2006-04-28 01:52:32 +00:00
belugas
187013b6a3
(svn r4593) CodeChange : Renamed spec (when using StationSpec) to statspec.
...
This is following the same scheme as for IndustrySpec
2006-04-27 18:28:56 +00:00
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
2006-04-25 07:32:33 +00:00
tron
c1dc517dab
(svn r4554) Replace magic numbers by TILE_{HEIGHT,SIZE}
2006-04-23 19:35:36 +00:00
tron
0347fb2ab6
(svn r4541) Add a type for slopes and replace many magic numbers by the appropriate enums
2006-04-23 13:48:16 +00:00
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
2006-04-22 13:56:16 +00:00
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.
2006-04-19 07:17:00 +00:00
peter1138
ae7ec5cd0d
(svn r4471) - Pools: Add a facility for calling a custom function during pool block clean up.
2006-04-18 18:48:50 +00:00
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)
2006-04-18 08:50:17 +00:00
peter1138
8d0e07378a
(svn r4462) - Newstations: ensure the chosen tile layout is available from a custom station
2006-04-17 19:26:18 +00:00
peter1138
3b6cbf62d4
(svn r4460) - Newstations: remove unused class_id / stat_id variables from the
...
Station struct.
2006-04-17 18:47:50 +00:00
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.
2006-04-16 17:29:37 +00:00
belugas
88e0bab283
(svn r4426) Code Cleaning : replacing tabs with spaces, removing obvious comments, aligning arrays etc...
2006-04-15 03:08:14 +00:00
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.
2006-04-15 01:06:53 +00:00
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
2006-04-14 01:54:07 +00:00
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
2006-04-12 20:01:52 +00:00
peter1138
f733f94677
(svn r4383) - Codechange: Remove extraneous code from 4354; no need to get RailTypeInfo when we already have it...
2006-04-12 12:33:21 +00:00
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
2006-04-11 22:09:21 +00:00
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.
2006-04-11 10:45:06 +00:00
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()
2006-04-10 07:15:58 +00:00
tron
fade7a5997
(svn r4331) Replace some direction calculation magic with DiagDirection to make a bit more clear what's going on
2006-04-09 08:25:43 +00:00
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.
2006-04-08 13:58:19 +00:00
tron
90836a461d
(svn r4324) Remove the unused road stop type attribute from struct RoadStop
2006-04-08 13:50:01 +00:00
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.
2006-04-08 13:32:38 +00:00
celestar
fd10af66d7
(svn r4320) -Fix/Codechange: rs->num_vehicles is no longer saved or loaded, but computed on the fly. Partly fixes FS#101
2006-04-08 05:44:37 +00:00
celestar
9760d3dccf
(svn r4319) -Codechange: Station map accessors
2006-04-08 05:24:29 +00:00
celestar
da095bc941
(svn r4316) -Codechange: finished r4257 (forgot one variable there)
2006-04-07 09:37:04 +00:00
Darkvater
fc68881906
(svn r4265) - Fix: compile warning on VS2005 (parameter 2 different from declaration)
2006-04-03 18:11:42 +00:00
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
2006-04-03 14:25:32 +00:00
celestar
13812b08ec
(svn r4257) -Codechange: Renamed the airport_map5_tiles_* variables into airport_sections_*
2006-04-03 13:02:33 +00:00
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
2006-04-03 09:07:21 +00:00
tron
892a4c587d
(svn r4242) Pass TileIndex and slope to GetSlopeTileh_*() instead of TileInfo
2006-04-02 12:49:18 +00:00
celestar
b364658f42
(svn r4173) -Codechange: Use IsClearWaterTile for buoy construction
2006-03-30 12:00:35 +00:00
belugas
3633d56923
(svn r4157) CodeChange : Keep on cleaning up Celestar's elrail merge
2006-03-29 20:35:39 +00:00
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.
2006-03-29 16:30:26 +00:00
Darkvater
d5909f901a
(svn r4128) - CodeChange: Add proper semantics for CargoID for such variables instead of using the general byte-type.
2006-03-26 22:23:32 +00:00
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
2006-03-26 14:41:39 +00:00
tron
9ad72f2d47
(svn r4111) Fix/Remove some stale comments
2006-03-26 11:08:44 +00:00
tron
9be713f1ae
(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
tron
820b8ca230
(svn r3996) -Fix: Slope and height information returned for some tile types is wrong
...
This leads to graphical glitches when drawing foundations.
This doesn't fix all problems, but at least some of them.
2006-03-21 20:02:05 +00:00
celestar
e54f1e1e2b
(svn r3939) -Fix: No longer assume that the number of slots is 2. It was not a problem up to now, but it's not The Right Thing (TM) to do either
2006-03-18 08:00:27 +00:00
tron
89090790c2
(svn r3916) Get/Set the rail type by [GS]etRailType{Crossing,OnBridge,}()
2006-03-17 10:10:31 +00:00
Darkvater
d9ee10d3b8
(svn r3895) - Add proper SLE(G)_CONDNULL macros for the empty space reservation in savegames and update where used
...
- Also add this capability to settings
2006-03-16 00:20:33 +00:00
tron
b394f72fa9
(svn r3829) Reduce the use of _error_message by directly returning error codes instead of using this global variable
2006-03-12 12:19:25 +00:00
tron
2181a72e9e
(svn r3787) Use DirToDiagDir() instead of >> 1
2006-03-08 08:28:48 +00:00
tron
fbe939b31f
(svn r3783) Replace further ints and magic numbers by Direction, DiagDirection and friends
2006-03-08 06:55:33 +00:00
celestar
9d54e51ef9
(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
tron
819d210acc
(svn r3714) Add functions to turn tiles into water and shore tiles
2006-03-01 21:00:44 +00:00
tron
793613a286
(svn r3697) Rename DIAG1/DIAG2 to X resp. Y as this conveys a bit better in which direction a pieces of rail goes
2006-03-01 09:40:34 +00:00
tron
4b46883751
(svn r3644) Don't use FindLandscapeHeightByTile() when it's overkill - often it was just a complicated way of writing GetTileSlope(tile, NULL)
2006-02-21 07:41:54 +00:00
Darkvater
45e85d2eb2
(svn r3627) - Change all hardcoded 255 max-saveload versions with the define SL_MAX_VERSION
2006-02-20 19:43:26 +00:00
tron
49c7eb934b
(svn r3613) Some more const, indentation, whitespace and similar stuff
2006-02-18 14:41:24 +00:00
peter1138
6cfefdb275
(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
e407ced537
(svn r3582) Restructure MoveGoodsToStation() to avoid double bookkeeping of StationIDs and station pointers
2006-02-09 06:33:37 +00:00
tron
8097d92162
(svn r3581) Just noticed the indentation was totally off, fix it
2006-02-09 06:24:53 +00:00
tron
c4f992bad9
(svn r3580) Some small cleanups before the real change, especially reduce the indentation by one by using continue
2006-02-09 06:15:12 +00:00
tron
453b30e387
(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
05d7d046c7
(svn r3530) - NewGRF: Move station resolver to newgrf_station
2006-02-03 23:02:01 +00:00
tron
84fb96fe85
(svn r3511) More whitespace ([FS#46] by Rubidium)
2006-02-01 07:36:15 +00:00
tron
22dc05faf2
(svn r3510) Fiddle with whitespace and parentheses
2006-02-01 06:32:03 +00:00
Darkvater
4e09974975
(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
peter1138
183f6f6d07
(svn r3372) - Fix: update signal states when building or removing rail station blocks
2006-01-06 17:45:43 +00:00
tron
e272b03fee
(svn r3365) Staticise 36 functions
2006-01-05 12:40:50 +00:00
tron
246c126d25
(svn r3353) Simplify the automatic length adjustment algorithm for replacing trains: Use the length of the train before the replacement as reference length
2005-12-29 12:42:59 +00:00
truelight
8ffe9da482
(svn r3341) -Codechange: make mingw32 happy, and renamed Rectangle, because it already exists on that platform
2005-12-25 15:05:59 +00:00
tron
b06b3e2ca2
(svn r3313) Remove GPMI related changes from trunk
...
Revisions in detail: 2542, 3226 (partial), 3229, 3231, 3232, 3238, 3242-3245, 3251, 3253, 3260, 3263, 3265, 3266, 3269, 3277, 3278, 3279, 3283 (partial), 3304, 3305, 3306
2005-12-18 12:10:46 +00:00
truelight
531073bea0
(svn r3305) -Rename: Changed all instances of ottd_ related to the AI to ttai_
2005-12-14 15:54:23 +00:00
tron
23bfc03054
(svn r3297) Staticise
2005-12-14 06:20:23 +00:00
peter1138
809b03c81a
(svn r3282) - Codechange: Replace tests against CMD_ERROR with CmdFailed()
2005-12-10 12:05:39 +00:00
truelight
8733f49e88
(svn r3232) -Add: implemented the event-system for AIs
...
-Add: added several hooks (event-callbacks) for road-related-stuff
2005-11-23 15:08:29 +00:00
truelight
4845ff063b
(svn r3227) -Codechange: [Savegame] removed 'minor' version, and renamed 'major' version to just: version.
2005-11-22 19:33:29 +00:00
bjarni
22a4679837
(svn r3218) -Feature: Multiheaded train engines will now stay in the same train
...
This means that any user attempt to remove a rear engine will tell the user to move the front engine instead
This fixes the assert when moving multiheaded engines (introduced in r3144)
Note: to make old savegames use this feature, some engines might be turned around in order to link engines in pairs
-Codechange: train subtype is now a bitmask
This allows fast access to info like if it is a wagon or engine and if it is in front and so on
Note: savegame version bump
2005-11-18 23:41:03 +00:00
peter1138
3e702afc08
(svn r3213) - Codechange: Clean up handling of road stops, avoiding unnecessary use of pointers and using the *BIT() macros.
2005-11-17 10:12:21 +00:00
tron
d177e5da67
(svn r3202) If cascade -> switch
2005-11-16 12:29:37 +00:00
tron
b9729fb72e
(svn r3185) const
2005-11-15 09:00:02 +00:00
tron
1b0091e0d2
(svn r3184) GB/SB
2005-11-15 08:49:46 +00:00
tron
7b7593d092
(svn r3182) Fix braino in r3181
2005-11-14 20:20:24 +00:00
tron
f7abff5f96
(svn r3181) -Bracing
...
-Indentation
-Whitespace
-DeMorgan's Law
-Test with NULL or 0 for non-booleans
-'\0' instead of 0 for chars
-Remove redundantly redundant comments (like DoFoo(); // Do foo)
-Join multiple short lines with a single statement
-Split single lines with multiple statements
-Avoid assignments in if
2005-11-14 19:48:04 +00:00
tron
4a14a586e2
(svn r3173) Use the trinary operator and switch to improve readability
...
Also align short cases nicely
2005-11-13 14:54:09 +00:00