Commit Graph

53 Commits

Author SHA1 Message Date
Peter Nelson 45886e50b2
Codechange: Unify where rail station tile flags are set. (#12531)
This avoids repeating the logic in three places.
2024-04-18 18:54:10 +01:00
Patric Stout a3cfd23cf9
Codechange: rename byte to uint8_t (#12308) 2024-03-16 23:59:32 +01:00
Rubidium 3a676a5af0 Codechange: replace static inline with static for non-class functions 2024-01-06 13:37:33 +01:00
Peter Nelson b5dc9328f2
Change: Store station blocked/wires/pylons flags in map. (#11337)
This stores three flags in unused map bits, and avoids having to look up
station graphics and custom station specs to determine blocked/wires/pylons
status.

This potentially affects rail pathfinding performance.

Savegame version is not bumped, as the flags can just be updated every
time.
2023-09-30 12:30:25 +01:00
Peter Nelson 398c7e5f9d Codechange: Use new function to get a bitmask of empty cargo types. 2023-09-21 18:29:02 +01:00
Peter Nelson 69ee38bd43 Codechange: Use GetAcceptanceMask() instead of duplicating it. 2023-09-21 18:29:02 +01:00
frosch baf7cc858b Codechange: Rename ship docking tile related functions. 2023-09-19 22:49:59 +02:00
Rubidium eaae0bb5e7 Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
Nicolas Chappe 977604ef08 Feature: [Linkgraph] Prioritize faster routes for passengers, mail and express cargo
Passengers usually prefer fast paths to short paths.
Average travel times of links are updated in real-time for use in Dijkstra's algorithm,
and newer travel times weigh more, just like capacities.
2021-08-17 14:57:59 +02:00
dP 7bd52970a1 Codechange: Refactor FindStationsAroundTiles to avoid code duplication 2020-05-13 08:43:01 +01:00
Jonathan G Rennison c3223903ed Codechange: Cache resolved town, station and industry name strings 2020-01-12 19:37:43 +00:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
peter1138 ec2656ab7e Codechange: Restrict docking points of docks. 2019-06-30 16:46:32 +02:00
peter1138 f538179878 Feature: Multi-tile docks and docking points. 2019-06-30 16:46:32 +02:00
peter1138 c02ef3e456 Feature: Add NotRoadTypes (NRT) 2019-05-01 21:36:27 +02:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
Peter Nelson 8b1b3fd0f9 Feature: Non-rectangular sparse station catchment area. 2019-03-09 16:33:47 +00:00
PeterN dd20ccee88
Feature: Industries with neutral stations (e.g. Oil Rig) only supply/accept cargo to/from their neutral station. (#7234)
This change is a controlled by a game setting, located under Environment ->
Industries which allows toggling the behaviour. It defaults to enabled.

"Company stations can serve industries with attached neutral stations"

When enabled, industries with attached neutral station (such as Oil Rigs) may
also be served by company-owned stations built nearby. This is the traditional
behaviour.

When disabled, these industries may only be served by their neutral station.
Any nearby company-owned stations won't be able to serve them, nor will the
neutral station serve anything else other than the industry.
2019-03-08 18:30:44 +00:00
PeterN 4cebebcf68
Change: Add CargoTypes type for cargo masks. (#6790) 2018-05-21 22:08:39 +01:00
fonsinchen 11d98f043e (svn r26549) -Change: better estimation for link capacities during full load 2014-05-01 14:50:52 +00:00
fonsinchen 930c19dae2 (svn r25435) -Fix: reroute cargo in vehicles if station is deleted 2013-06-23 08:29:28 +00:00
rubidium 3947453277 (svn r25259) -Codechange: track capacities and usage of links 2013-05-19 14:22:04 +00:00
peter1138 fb58c42aa0 (svn r24840) -Fix: Draw NewGRF railtypes in NewGRF station previews. 2012-12-23 15:38:54 +00:00
frosch c8cb096533 (svn r24402) -Fix [FS#5243]: Station properties 11 and 14 were combined incorrectly. 2012-07-15 16:17:22 +00:00
rubidium e40eb8177a (svn r23735) -Codechange: remove ~50 includes from headers that weren't needed 2012-01-03 20:26:05 +00:00
michi_cc d3b7b89493 (svn r23415) -Feature: Infrastructure maintenance costs. 2011-12-03 23:40:46 +00:00
alberth be59c90e86 (svn r20674) -Codechange: Remove declared functions that do not exist (anymore) otherwise. 2010-08-28 20:15:45 +00:00
frosch 03ab158935 (svn r20579) -Change (r1579): Allow removing of buoys if they are only used by own vehicles. 2010-08-20 12:50:59 +00:00
frosch d27999e446 (svn r18837) -Codechange: Rename DrawStationTileSeq() to DrawCommonTileSeq() and move it to separate file. 2010-01-16 22:25:44 +00:00
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 2010-01-15 16:41:15 +00:00
frosch ed83388faa (svn r18802) -Codechange: Deduplicate drawing-code for depots and stations/waypoints. 2010-01-14 22:56:54 +00:00
rubidium 71f2789270 (svn r18716) -Codechange: pass a TileArea to FindStationsAroundTiles 2010-01-04 18:16:32 +00:00
rubidium 0ef0e13795 (svn r18385) -Cleanup: remove the now unneeded multistop slot management code 2009-12-02 18:18:56 +00:00
smatz 47660b984b (svn r18110) -Codechange [FS#3316]: search for stations nearby only once per producer (instead of once pre produced cargo type) (fonsinchen) 2009-11-15 21:06:13 +00:00
smatz 9225b3ba03 (svn r17589) -Codechange: rename town_acc to always_accepted 2009-09-20 17:44:33 +00:00
smatz 22e9d59559 (svn r17439) -Fix (r17436): you weren't paid for cargo delivered to houses and headquarters anymore 2009-09-07 07:39:08 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
rubidium e067d4a4b8 (svn r16821) -Codechange: unify the naming of type::UpdateVirtCoord and UpdateAll[Type]VirtCoords. 2009-07-13 22:33:25 +00:00
frosch a288e4d82f (svn r16678) -Codechange: Turn CargoArray into a class, so one does not have to deal with sizeof() wrt. typedef-ed arrays. 2009-06-27 21:06:58 +00:00
frosch 812ad41f23 (svn r16676) -Codechange: Rename AcceptedCargo to CargoArray and its instances to more meaningful names. 2009-06-27 18:26:50 +00:00
smatz 0045096403 (svn r16640) -Codechange: move roadstop stuff to separate files 2009-06-23 21:44:48 +00:00
rubidium d37b840cf3 (svn r16389) -Codechange: use RoadVehicle instead of Vehicle where appropriate 2009-05-22 20:18:45 +00:00
smatz 62a7948af0 (svn r16378) -Codechange: replace OldPool with simpler Pool. Compilation time, binary size and run time (with asserts disabled) should be improved 2009-05-22 15:13:50 +00:00
peter1138 792d1bd883 (svn r15073) -Fix (r15067) [FS#2532]: Default copy constructors don't necessarily do what you want. Instead of creating one, we now pass a pointer around as that avoids additional allocations. 2009-01-13 20:43:53 +00:00
peter1138 02bda12599 (svn r15067) -Fix [FS#2531]: Possible compiler bug, alleviated by using SmallVector instead of using std::set. SmallVector does everything needed anyway. 2009-01-13 18:18:53 +00:00
rubidium 11da45ee55 (svn r14949) -Cleanup: pointer coding style 2009-01-10 00:31:47 +00:00
smatz 7368c740a6 (svn r14828) -Codechange: move most of save/load-specific code to separate files 2009-01-04 15:32:25 +00:00
frosch b759ccd032 (svn r14604) -Codechange: Simplify a function and rename it, and fix some comments. 2008-11-22 15:48:43 +00:00
rubidium 03bef3fb5b (svn r14463) -Fix [FS#2348]: small possible chance of desync due to sorting on pointer instead of by (station) index (PhilSophus) 2008-10-14 12:07:14 +00:00
rubidium 3b798599b6 (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with. 2008-09-30 20:39:50 +00:00