Commit Graph

289 Commits (jgrpp)

Author SHA1 Message Date
Jonathan G Rennison b6e9817edb Link graph: Explicitly flag invalidated flow stats instead of minimising their flows
Entirely exclude invalidated flow stats from link stats

Delete invalidated flow stats if they stay invalid for 32 link graph jobs

This is to prevent large numbers of invalidated flow stats from
unduly influencing link statistics
5 years ago
Jonathan G Rennison 18d51ccb80 Fix compilation on MSVC 5 years ago
Jonathan G Rennison 0246d59c8d FlowStat: Replace btree_map with flat map which is inlined in small case
Inline storage for size <= 2
Size = 1 is ~90%
Size = 2 is ~9%
Size >=3 is ~1% and gets a separate allocation
5 years ago
Jonathan G Rennison 90550d9642 FlowStatMap: Replace RB-tree with btree-indexed vector 5 years ago
Jonathan G Rennison 1391f8fc59 Use insert hints for station flow/share map insertion 5 years ago
Jonathan G Rennison 725ff47267 Avoid quadratic behaviour in updating nearby lists in RecomputeCatchmentForAll 5 years ago
Jonathan G Rennison d3e0c3787f Merge branch 'master' into jgrpp-nrt
Merge trunk multiple docks implementation

# Conflicts:
#	docs/landscape_grid.html
#	src/order_cmd.cpp
#	src/pathfinder/npf/npf.cpp
#	src/pathfinder/yapf/yapf_ship.cpp
#	src/rail_cmd.cpp
#	src/saveload/afterload.cpp
#	src/saveload/oldloader_sl.cpp
#	src/saveload/station_sl.cpp
#	src/script/api/script_order.cpp
#	src/ship_cmd.cpp
#	src/station.cpp
#	src/station_base.h
#	src/station_cmd.cpp
#	src/tunnelbridge_cmd.cpp
5 years ago
Jonathan G Rennison 36eb4165b8 Merge branch 'master' into jgrpp
# Conflicts:
#	src/bridge_map.h
#	src/crashlog.cpp
#	src/industry.h
#	src/linkgraph/linkgraph_type.h
#	src/order_type.h
#	src/saveload/afterload.cpp
#	src/settings.cpp
#	src/settings_type.h
#	src/smallmap_gui.cpp
#	src/spritecache.cpp
#	src/stdafx.h
#	src/table/settings.h.preamble
#	src/train.h
#	src/vehicle.cpp
#	src/viewport.cpp
#	src/viewport_func.h
#	src/widgets/station_widget.h
#	src/zoom_func.h
#	src/zoom_type.h
5 years ago
peter1138 f538179878 Feature: Multi-tile docks and docking points. 5 years ago
Charles Pigott 96097b34a5 Codechange: Remove Direction*Byte types 5 years ago
Charles Pigott 119ea7a195 Codechange: Remove StationHadVehicleOfTypeByte type 5 years ago
Jonathan G Rennison ba34ec7ade Merge branch 'master' into jgrpp
Replace build and refit, and group collapse implementations
Fix template creation build and refit

# Conflicts:
#	Makefile.bundle.in
#	config.lib
#	src/animated_tile.cpp
#	src/blitter/32bpp_anim.hpp
#	src/blitter/32bpp_base.hpp
#	src/blitter/8bpp_base.hpp
#	src/blitter/null.hpp
#	src/build_vehicle_gui.cpp
#	src/command.cpp
#	src/command_func.h
#	src/console_gui.cpp
#	src/core/smallstack_type.hpp
#	src/date.cpp
#	src/debug.cpp
#	src/genworld_gui.cpp
#	src/ground_vehicle.hpp
#	src/group_gui.cpp
#	src/lang/korean.txt
#	src/linkgraph/linkgraph_gui.h
#	src/main_gui.cpp
#	src/misc_gui.cpp
#	src/network/core/game.h
#	src/network/core/packet.cpp
#	src/network/core/udp.cpp
#	src/network/core/udp.h
#	src/network/network_content.cpp
#	src/network/network_type.h
#	src/network/network_udp.cpp
#	src/newgrf_house.h
#	src/openttd.cpp
#	src/order_cmd.cpp
#	src/order_gui.cpp
#	src/os/unix/crashlog_unix.cpp
#	src/os/windows/crashlog_win.cpp
#	src/osk_gui.cpp
#	src/pathfinder/opf/opf_ship.cpp
#	src/rail_cmd.cpp
#	src/rail_gui.cpp
#	src/saveload/saveload.cpp
#	src/settings.cpp
#	src/settings_gui.cpp
#	src/smallmap_gui.h
#	src/station_base.h
#	src/station_cmd.cpp
#	src/table/gameopt_settings.ini
#	src/table/newgrf_debug_data.h
#	src/table/settings.ini
#	src/timetable_gui.cpp
#	src/toolbar_gui.cpp
#	src/train_gui.cpp
#	src/vehicle.cpp
#	src/vehicle_gui.cpp
#	src/vehiclelist.cpp
#	src/viewport.cpp
#	src/widgets/dropdown.cpp
#	src/window_gui.h
5 years ago
Niels Martin Hansen ce10d9be3f Fix #7374: Ensure k-d trees are always updated when station sign moves 5 years ago
Henry Wilson af7d9020a1 Codechange: Use override specifer for overriding member declarations
This is a C++11 feature that allows the compiler to check that a virtual
member declaration overrides a base-class member with the same signature.

Also src/blitter/32bpp_anim_sse4.hpp +38 is no longer erroneously marked
as virtual despite being a template.
5 years ago
Jonathan G Rennison 290471c70f Use btree_set for IndustryList and StationList 5 years ago
Jonathan G Rennison 5e6d283463 Merge branch 'master' into jgrpp
Remove the viewport sign cache as this is now superseded by the kd tree
implementation

# Conflicts:
#	src/crashlog.cpp
#	src/lang/english.txt
#	src/misc.cpp
#	src/pathfinder/follow_track.hpp
#	src/pbs.cpp
#	src/rail_cmd.cpp
#	src/saveload/vehicle_sl.cpp
#	src/settings.cpp
#	src/settings_gui.cpp
#	src/ship_cmd.cpp
#	src/station.cpp
#	src/station_base.h
#	src/station_cmd.cpp
#	src/table/settings.ini
#	src/thread/thread_morphos.cpp
#	src/town_cmd.cpp
#	src/train_cmd.cpp
#	src/viewport.cpp
#	src/waypoint.cpp
5 years ago
Niels Martin Hansen d84b67e54d Codechange: Make a k-d tree index of stations 5 years ago
Peter Nelson 8b1b3fd0f9 Feature: Non-rectangular sparse station catchment area. 5 years ago
peter1138 94b40fd530 Codechange: Convert IndustryVector to a std::set. 5 years ago
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.
5 years ago
Jonathan G Rennison e6ee962b03 Fix ship collision avoidance near docks when dock not under station sign
See #77
5 years ago
Jonathan G Rennison 36ac643749 Merge branch 'master' into jgrpp
# Conflicts:
#	src/lang/afrikaans.txt
#	src/lang/basque.txt
#	src/lang/belarusian.txt
#	src/lang/brazilian_portuguese.txt
#	src/lang/bulgarian.txt
#	src/lang/catalan.txt
#	src/lang/croatian.txt
#	src/lang/czech.txt
#	src/lang/danish.txt
#	src/lang/dutch.txt
#	src/lang/english.txt
#	src/lang/english_AU.txt
#	src/lang/english_US.txt
#	src/lang/estonian.txt
#	src/lang/finnish.txt
#	src/lang/french.txt
#	src/lang/gaelic.txt
#	src/lang/galician.txt
#	src/lang/german.txt
#	src/lang/greek.txt
#	src/lang/hebrew.txt
#	src/lang/hungarian.txt
#	src/lang/icelandic.txt
#	src/lang/indonesian.txt
#	src/lang/irish.txt
#	src/lang/italian.txt
#	src/lang/japanese.txt
#	src/lang/korean.txt
#	src/lang/latin.txt
#	src/lang/latvian.txt
#	src/lang/lithuanian.txt
#	src/lang/luxembourgish.txt
#	src/lang/norwegian_bokmal.txt
#	src/lang/norwegian_nynorsk.txt
#	src/lang/polish.txt
#	src/lang/portuguese.txt
#	src/lang/romanian.txt
#	src/lang/russian.txt
#	src/lang/serbian.txt
#	src/lang/simplified_chinese.txt
#	src/lang/slovak.txt
#	src/lang/slovenian.txt
#	src/lang/spanish.txt
#	src/lang/spanish_MX.txt
#	src/lang/swedish.txt
#	src/lang/tamil.txt
#	src/lang/thai.txt
#	src/lang/traditional_chinese.txt
#	src/lang/turkish.txt
#	src/lang/ukrainian.txt
#	src/lang/unfinished/persian.txt
#	src/lang/vietnamese.txt
#	src/lang/welsh.txt
#	src/rail_cmd.cpp
#	src/station_cmd.cpp
5 years ago
Juanjo 45ce517105 Codechange: Move some common code after adding/removing tiles to a station to its own function. 5 years ago
Jonathan G Rennison e735c1a51a Merge branch 'master' into jgrpp
# Conflicts:
#	src/aircraft_cmd.cpp
#	src/autoreplace_cmd.cpp
#	src/pathfinder/follow_track.hpp
#	src/pathfinder/yapf/yapf_rail.cpp
#	src/saveload/afterload.cpp
#	src/saveload/saveload.cpp
#	src/script/api/ai/ai_station.hpp.sq
#	src/script/api/game/game_station.hpp.sq
#	src/script/api/script_station.hpp
#	src/track_func.h
#	src/vehicle_base.h
6 years ago
Charles Pigott f5b1115039 Doc: Lots and lots of doxymentation fixes 6 years ago
Jonathan G Rennison 777151c34d Station rating: Track last visited vehicle type separately per-cargo 6 years ago
Jonathan G Rennison 56be293107 Merge branch 'master' into jgrpp
# Conflicts:
#	src/blitter/32bpp_anim.cpp
#	src/blitter/32bpp_anim.hpp
#	src/blitter/32bpp_anim_sse2.cpp
#	src/blitter/32bpp_base.cpp
#	src/blitter/32bpp_base.hpp
#	src/ground_vehicle.cpp
#	src/linkgraph/linkgraph_gui.h
#	src/main_gui.cpp
#	src/newgrf_house.cpp
#	src/newgrf_house.h
#	src/town_cmd.cpp
#	src/vehicle_base.h
#	src/viewport_gui.cppp
6 years ago
PeterN 4cebebcf68
Change: Add CargoTypes type for cargo masks. (#6790) 6 years ago
Jonathan G Rennison 955126efac Improve pathfinder support for multiple docks
The pathfinder can now find docks other than the Manhattan closest one.

Based on Cirdan commits:
afc7969c13d7ca59afe4dae4bf88122ba8d27df2
4067190dedcd3e5f668ea4f49b1dd8dfed10b2a7
d9be6b712d2ae4fb1b5ae844dde4919dd24c4fb2
6 years ago
keldorkatarn 1d3cf59d8a Allow building multiple docks per station.
(cherry picked from commit 0110c4a35d383e0be2cbb53cbe9cbe6784abb3e9)

# Conflicts:
#	src/station_cmd.cpp
7 years ago
Jonathan G Rennison 7f9ce94cbc Change SharesMap form std::map to btree map. 7 years ago
Jonathan G Rennison e844b82d9e Use vector instead of list for Station::loading_vehicles. 8 years ago
Jonathan G Rennison c120b810d1 Mark dirty the catchment of a station on change as necessary for zoning.
If the zoning mode is station catchment, or unserved industry/building,
mark dirty the station catchment rectangle before removing, or after
adding, (a) station tile(s).
In the case of unserved industry mode, increase the refreshed catchment
radius by 10 tiles, to wholly include industries partially inside
the catchment area.
9 years ago
frosch a14b836bf2 (svn r27178) -Fix [FS#5969]: Data race due to lazy initialisation of objects. 9 years ago
frosch 780e595933 (svn r27178) -Fix [FS#5969]: Data race due to lazy initialisation of objects. 9 years ago
fonsinchen 78df68e695 (svn r26891) -Codechange: Add methods to retrieve flows from a FlowStatMap 10 years ago
fonsinchen 9fdb88962f (svn r26891) -Codechange: Add methods to retrieve flows from a FlowStatMap 10 years ago
rubidium d214ca2c7d (svn r26753) -Fix: desync due to not always properly restoring game state from the savegame 10 years ago
rubidium 134ad63b80 (svn r26753) -Fix: desync due to not always properly restoring game state from the savegame 10 years ago
rubidium 20f54c2f61 (svn r26590) -Fix: possible desync (big/little endian) due to not writing complete variables upon saveload 10 years ago
rubidium 191fd09d32 (svn r26590) -Fix: possible desync (big/little endian) due to not writing complete variables upon saveload 10 years ago
rubidium 1b11ea80ee (svn r26582) -Feature-ish: quickly decay cargo after about 21 months of not having picked any of the cargo, and prevent houses and industries providing more cargo 10 years ago
rubidium 0ceb05ee9f (svn r26582) -Feature-ish: quickly decay cargo after about 21 months of not having picked any of the cargo, and prevent houses and industries providing more cargo 10 years ago
rubidium fb9dbf30fa (svn r26580) -Codechange: s/GES_PICKUP/GES_RATING/ (it has nothing to do with actual pickup), s/acceptance_pickup/status/ (the enum isn't called GoodEntryStatus for a reason; it's not only acceptance and pickup anymore) 10 years ago
rubidium 89c25b955e (svn r26580) -Codechange: s/GES_PICKUP/GES_RATING/ (it has nothing to do with actual pickup), s/acceptance_pickup/status/ (the enum isn't called GoodEntryStatus for a reason; it's not only acceptance and pickup anymore) 10 years ago
fonsinchen fea3a433b2 (svn r26166) -Fix: Scale flows only after mapping to avoid rounding errors. 11 years ago
fonsinchen ec492bfb77 (svn r26166) -Fix: Scale flows only after mapping to avoid rounding errors. 11 years ago
frosch 6c63c98d7f (svn r26085) -Codechange: Pass ResolverObjects as reference instead of pointer since they are never NULL. 11 years ago
frosch db894b0b3f (svn r26085) -Codechange: Pass ResolverObjects as reference instead of pointer since they are never NULL. 11 years ago
rubidium 73474728e3 (svn r26057) -Fix: a number of possibly uninitialised variables 11 years ago
rubidium b3e93d6520 (svn r26057) -Fix: a number of possibly uninitialised variables 11 years ago
fonsinchen 05b50ada5c (svn r25963) -Fix [FS#5758]: Mixtures of old and new flows could create cycles. 11 years ago
fonsinchen 962d6d7e48 (svn r25963) -Fix [FS#5758]: Mixtures of old and new flows could create cycles. 11 years ago
fonsinchen 7025a145e3 (svn r25899) -Change: Restrict flows if links are restricted and don't normally pick them anymore. 11 years ago
fonsinchen 6524849386 (svn r25899) -Change: Restrict flows if links are restricted and don't normally pick them anymore. 11 years ago
fonsinchen 487f7f0473 (svn r25896) -Fix: Remove unused and unimplemented declaration of RunAverages. 11 years ago
fonsinchen e99965aa15 (svn r25896) -Fix: Remove unused and unimplemented declaration of RunAverages. 11 years ago
fonsinchen 8d53e23b6c (svn r25892) -Fix: off-by-one error in GetVia prevented certain flows from getting picked 11 years ago
fonsinchen 9337c561b0 (svn r25892) -Fix: off-by-one error in GetVia prevented certain flows from getting picked 11 years ago
fonsinchen e3807ed606 (svn r25424) -Fix: keep old flows around in an invalidated state to continue routing cargo if necessary 11 years ago
fonsinchen f0119308f6 (svn r25424) -Fix: keep old flows around in an invalidated state to continue routing cargo if necessary 11 years ago
fonsinchen 1de46050f6 (svn r25362) -Feature: consider cargo waiting at other stations for rating at the origin station 11 years ago
fonsinchen 741c431caa (svn r25362) -Feature: consider cargo waiting at other stations for rating at the origin station 11 years ago
fonsinchen c45cfa22a6 (svn r25346) -Codechange: Glue between stations and flow stats 11 years ago
fonsinchen db671ffb86 (svn r25346) -Codechange: Glue between stations and flow stats 11 years ago
fonsinchen 9f54020588 (svn r25345) -Add: implementation of SharesMap and FlowStatMap 11 years ago
fonsinchen c8f068d979 (svn r25345) -Add: implementation of SharesMap and FlowStatMap 11 years ago
rubidium 6b746167e4 (svn r25259) -Codechange: track capacities and usage of links 11 years ago
rubidium 3947453277 (svn r25259) -Codechange: track capacities and usage of links 11 years ago
rubidium 251bf7ddcb (svn r25257) -Add: basic link graph (fonsinchen) 11 years ago
rubidium 06313e4981 (svn r25257) -Add: basic link graph (fonsinchen) 11 years ago
rubidium e0d3265546 (svn r25149) -Codechange: replace 'magic' 'has rating' bitcheck by descriptive function 11 years ago
rubidium b2292122b6 (svn r25149) -Codechange: replace 'magic' 'has rating' bitcheck by descriptive function 11 years ago
frosch 193ee85c6f (svn r24718) -Codechange: Rename GoodsEntry::days_since_pickup to GoodsEntry::time_since_pickup. 12 years ago
frosch 883f9bec9b (svn r24718) -Codechange: Rename GoodsEntry::days_since_pickup to GoodsEntry::time_since_pickup. 12 years ago
frosch 39a8ed82f5 (svn r24708) -Codechange: Check magic values of GoodsEntry::last_speed only via wrapper function. 12 years ago
frosch 0566b29ab7 (svn r24708) -Codechange: Check magic values of GoodsEntry::last_speed only via wrapper function. 12 years ago
frosch a64a1a76c1 (svn r24707) -Doc: Improve description of GoodsEntryStatus flags. 12 years ago
frosch 03c94ae6a3 (svn r24707) -Doc: Improve description of GoodsEntryStatus flags. 12 years ago
alberth 6c6abd87db (svn r24535) -Doc: Two additions, lots of small spelling fixes, and some Doxygen improvements. 12 years ago
alberth 0849fb8d36 (svn r24535) -Doc: Two additions, lots of small spelling fixes, and some Doxygen improvements. 12 years ago
rubidium 0cfe86cead (svn r23735) -Codechange: remove ~50 includes from headers that weren't needed 13 years ago
rubidium e40eb8177a (svn r23735) -Codechange: remove ~50 includes from headers that weren't needed 13 years ago
truebrain aa1a0053b0 (svn r23640) -Fix: stop using FORCEINLINE (1/3rd of the instances were, the others were still regular inline), but make sure inline is always a 'forced' inline (I am looking at you MSVC) 13 years ago
truebrain 1c9bec1999 (svn r23640) -Fix: stop using FORCEINLINE (1/3rd of the instances were, the others were still regular inline), but make sure inline is always a 'forced' inline (I am looking at you MSVC) 13 years ago
smatz 36747f96a6 (svn r23588) -Codechange: use the 'final' keyword so compiler can optimise out some indirect calls 13 years ago
smatz 33d283fdb1 (svn r23588) -Codechange: use the 'final' keyword so compiler can optimise out some indirect calls 13 years ago
yexo a8f0dfd5be (svn r23461) -Fix: handle a missing airport newgrf as graceful as possible by not crashing when loading such savegame or when an airport is removed 13 years ago
yexo c9be5d50da (svn r23461) -Fix: handle a missing airport newgrf as graceful as possible by not crashing when loading such savegame or when an airport is removed 13 years ago
alberth 8b4443953f (svn r22742) -Add: Add function to query exit direction of hangars at airports. 13 years ago
alberth c4118e3f6a (svn r22742) -Add: Add function to query exit direction of hangars at airports. 13 years ago
terkhen 7e0daae1ec (svn r22567) -Codechange: Store persistent storages inside a pool. 13 years ago
terkhen 00e5c1df18 (svn r22567) -Codechange: Store persistent storages inside a pool. 13 years ago
terkhen 43de2fa2e8 (svn r22542) -Add: Store cargo acceptance stats for stations. 13 years ago
terkhen 8e00fa39b2 (svn r22542) -Add: Store cargo acceptance stats for stations. 13 years ago
terkhen f8400b86b2 (svn r22541) -Document: GoodsEntry struct. 13 years ago
terkhen 9f68c20d10 (svn r22541) -Document: GoodsEntry struct. 13 years ago
terkhen 55695277c8 (svn r22540) -Codechange: Rename AcceptancePickup to GoodsEntryStatus. 13 years ago
terkhen 5bb79b1f46 (svn r22540) -Codechange: Rename AcceptancePickup to GoodsEntryStatus. 13 years ago
rubidium 0cf2ef83f0 (svn r21846) -Codechange: move documentation towards the code to make it more likely to be updated [o-s]. 14 years ago