Commit Graph

17358 Commits (c46581e91f0e2c8f489494bb9cdc1752db79d8e5)

Author SHA1 Message Date
Charles Pigott 96097b34a5 Codechange: Remove Direction*Byte types 5 years ago
Charles Pigott 9f3928658b Codechange: Remove Track{dir,}{Bits,}Byte types 5 years ago
Charles Pigott 931d32f414 Codechange: Remove RailTypeByte type 5 years ago
Charles Pigott 10ba431d21 Codechange: Remove SpriteTypeByte type 5 years ago
Charles Pigott 119ea7a195 Codechange: Remove StationHadVehicleOfTypeByte type 5 years ago
Charles Pigott fb6ae81415 Codechange: Remove StationFacilityByte type 5 years ago
Charles Pigott 09567bf0b3 Codechange: Remove StoryPageElementTypeByte type 5 years ago
Charles Pigott f20b75d712 Codechange: Remove TownLayoutByte type 5 years ago
Charles Pigott 0e439aeab7 Codechange: Remove TownFoundingByte type 5 years ago
Charles Pigott 0a57db01af Codechange: Remove TrainForceProceedingByte type 5 years ago
Charles Pigott 69a6c494bf Codechange: Set VehicleType's base type to byte instead of using VehicleTypeByte 5 years ago
Charles Pigott 96a4787710 Codechange: Set ZoomLevel's base type to byte instead of using ZoomLevelByte 5 years ago
translators aa220b2375 Update: Translations from eints
indonesian: 2 changes by fanioz
dutch: 3 changes by JanWillem
korean: 3 changes by telk5093
5 years ago
PeterN 0ab6244f6b
Fix #7165: Missed another 'Append() --> push_back()' replacement (#7548) 5 years ago
translators ead5b55119 Update: Translations from eints
spanish (mexican): 3 changes by Absay
russian: 3 changes by Lone_Wolf
5 years ago
peter1138 b454ca7110 Fix 81d335b: Coverage button missing from town window in scenario editor. 5 years ago
translators f354b869c1 Update: Translations from eints
indonesian: 3 changes by fanioz
croatian: 3 changes by VoyagerOne
5 years ago
translators 5b0ce8c214 Update: Translations from eints
finnish: 3 changes by hpiirai
italian: 3 changes by lorenzodv
5 years ago
Niels Martin Hansen d5841109f0 Fix dcb2571: Missing override keywords 5 years ago
peter1138 81d335b081 Feature: Add station coverage area display for towns. 5 years ago
peter1138 81f0f97406 Feature: Add existing station coverage area display when placing new station parts. 5 years ago
peter1138 b6733edd17 Feature: Add coverage area display for existing stations. 5 years ago
Niels Martin Hansen 37daf43037 Change: Zoom title game by UI zoom level 5 years ago
Niels Martin Hansen 58609e8fa6 Fix: Manager name in company news was being clipped 5 years ago
Niels Martin Hansen 2c67af391b Fix: Scale news ticker scroll speed by UI scale 5 years ago
Niels Martin Hansen 62dec9f174 Fix: Scale all min size and padding by UI scale 5 years ago
Niels Martin Hansen dd35a43703 Codechange: Revert unnecessary indentation change 5 years ago
Niels Martin Hansen a64bd6e22c Fix: Also breaking for warning text in set company password 5 years ago
Niels Martin Hansen 08284e005d Fix: Automatic line breaking of the warning 5 years ago
Niels Martin Hansen dcb2571888 Add: Warn players that company passwords are not truly secure 5 years ago
peter1138 66cd32a252 Codechange: Use std::underlying_type for DECLARE_POSTFIX_INCREMENT. 5 years ago
peter1138 ac1e1a272f Fix: Replace int with std::underlying_type in DECLARE_ENUM_AS_BIT_SET.
This fixes 64 bit uses of this macro.
5 years ago
PeterN c17736b493
Fix e8d397e: Invisible station/waypoint signs could still be clicked on. (#7531) 5 years ago
PeterN be073b46da
Fix: Bounds check access to railtype_map. (#7529) 5 years ago
PeterN d2b6176cdf
Add: NewGRF string codes to access PUSH/POP_COLOUR. (#7527) 5 years ago
glx22 66a8db9dc5
Fix #7526, 5b77102b6: FiosItem::operator< must return false for equality (#7528) 5 years ago
glx ebd4f32d15 Cleanup: remove core/sort_func.hpp as it's not used anymore 5 years ago
glx 48f99fd980 Codechange: use std::array for _sorted_industry_types 5 years ago
glx 60da17418a Codechange: use std::sort in SaveHighScoreValueNetwork() 5 years ago
glx 9388fa2aa1 Codechange: use std::vector to sort _all_grfs linked list 5 years ago
glx 8899272614 Codechange: use std::vector for _language_dropdown 5 years ago
glx 9195f2337a Codechange: use std::vector for _resolutions 5 years ago
glx 25e534f3cf Codechange: use std::vector for _sorted_railtypes 5 years ago
glx 0797de06be Codechange: use std::vector for _sorted_cargo_specs 5 years ago
translators f0b3267615 Update: Translations from eints
indonesian: 9 changes by fanioz
5 years ago
PeterN 671a310d21
Fix #7235: Ensure catchment area of neutral station covers entire industry. (#7518) 5 years ago
translators 8ae15d9797 Update: Translations from eints
indonesian: 6 changes by fanioz
5 years ago
Michael Lutz 38729297f9 Codechange: No need for AutoFreePtr if there's std::unique_ptr. 5 years ago
Michael Lutz 4e85ccf3c0 Codechange: Replace SmallStackSafeStackAlloc with std::array.
The only port that ever used it to make heap allocations instead of stack ones was the NDS port, which got thrown out some time ago.
5 years ago
stormcone 79343762a4 Fix: Typos. (#7517) 5 years ago
translators 3964604148 Update: Translations from eints
luxembourgish: 1 change by Phreeze
5 years ago
peter1138 4f052fc2a4 Cleanup: Fix alignment after NULL -> nullptr change. 5 years ago
glx 410b81537c Fix 801cbea9c: operator< is not always the best idea
Also removes unused and anyway broken SmallMap::SortByKey() function.
5 years ago
PeterN 3bbd7ea2c1
Fix: Industry coverage area is no longer rectangular. (#7464)
AIs test station catchment in reverse to how players see station catchment.
This did not take account of non-rectangular station catchment areas, so AIs
could end up placing stations in locations that did not accept/deliver cargo.
5 years ago
PeterN abe8cf4985
Codechange: Replace duplicated code with TileArea::Expand() (#7467) 5 years ago
glx 801cbea9cc Codechange: use std::sort() for all std::vector types 5 years ago
glx 5b77102b63 Codechange: use std::sort() to sort file lists 5 years ago
glx b52561fd38 Codechange: use std::sort() in EngList_Sort[Partial]() 5 years ago
glx 2db88953e7 Codechange: use std::sort() in GUIList 5 years ago
PeterN b9b34f676b
Change: Always report error when ordering a road vehicle to wrong type of road stop. (#7316)
This was inconsistent before, depending on road/tram and articulated/single vehicle status.
5 years ago
peter1138 5bd2b15e86 Codechange: Replace NULL with nullptr in squirrel interface. 5 years ago
peter1138 c0836bccef Codechange: NULL -> nullptr in settings files. 5 years ago
peter1138 0130f3be45 Fix #7491: Send company update admin message when bankruptcy counter changes. 5 years ago
SamuXarick 4ad981a98e Fix 50e08f333a: Creating a cargo subsidy with town as source did not consider min population. (#7493) 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
glx22 3b4f224c0b
Fix #7494: std::sort() and qsort() use different comparators (#7495) 5 years ago
translators 87d588f22f Update: Translations from eints
luxembourgish: 17 changes by Phreeze
spanish (mexican): 2 changes by njn
5 years ago
Jonathan G Rennison 01f957c51f Fix: Crash due to use of invalid iterator in ClientNetworkContentSocketHandler
In particular this crash can be observed when using the
bootstrap GUI to download the base graphics.

In ClientNetworkContentSocketHandler::OnReceiveContentInfo
ClientNetworkContentSocketHandler::callbacks is iterated, using an iterator
cb->OnReceiveContentInfo() is called (cb is of type BootstrapAskForDownloadWindow)
This calls new BootstrapContentDownloadStatusWindow()
This inherits from BaseNetworkContentDownloadStatusWindow
The constructor of which calls _network_content_client.AddCallback(this)
This reallocates the std::vector which is being iterated in ClientNetworkContentSocketHandler::OnReceiveContentInfo
This results in iter being invalid, and an assertion failure occurs shortly
afterwards due to its use in the next iteration of cb->OnReceiveContentInfo()

Adjust all locations where ClientNetworkContentSocketHandler::callbacks
is iterated to avoid problematic behaviour
5 years ago
Michael Lutz 8b1880187a Remove: AutoFreeSmallVector.
The last use was for storing a list of memory blocks. As the way these lists are accessed is very
specific, it is easier to just write an explicit destructor instead of trying to exactly match the behaviour.
5 years ago
Michael Lutz e804173595 Codechange: If something is a vector of strings, use a vector of strings instead of an AutoFreeSmallVector. 5 years ago
Michael Lutz c7b9987d08 Codechange: Switch DropDownList to directly use std::vector, thus making AutoDeleteSmallVector obsolete.
DropDownListItem are strongly managed using std::unique_ptr to ensure leak-free handling. Appropriate use
of move-semantics make intent a lot clearer than parameter comments and allows the compiler to generate
copy-free code for most situations.
5 years ago
Michael Lutz d3e113eb5f Codechange: Use std::vector instead of AutoDeleteSmallVector in GS text handling. 5 years ago
Michael Lutz baf9229931 Codechange: Replace AutoDeleteSmallVector with direct std::vector use in text layout code. 5 years ago
Michael Lutz 329bb52613 Codechange: Store text layout runs directly as values in a std::vector instead of heap allocated.
This reduces memory allocations and heap fragmentation.
5 years ago
Michael Lutz 9325d63d8e Fix: Forgotten override keywords for DropDownListIconItem. 5 years ago
Michael Lutz fbc4cef180 Codechange: Use override specifier for text layout classes. 5 years ago
Michael Lutz d95c7083ea Fix: Don't crash if reading a GS string file from disk produces an error.
The raw_strings vector may not include NULLs as no consumer can deal with it.
5 years ago
translators 0a883afe19 Update: Translations from eints
luxembourgish: 20 changes by Phreeze
5 years ago
PeterN 812886ca61
Fix #7478: Don't remove NewGRF objects on company take-over. (#7483) 5 years ago
kiwitreekor bc9b47d2e5 Fix #6222: Advanced sprite layout sometimes showed incorrect railtype ground tile 5 years ago
glx22 3e608afa6c
Fix: [Windows] OpenTTD window may be inactive when an error happens (#7482) 5 years ago
Michael Lutz 967b27a2c1 Codechange: C++11 STL has a function for getting the number of CPU cores. 5 years ago
Michael Lutz ae748166d0 Codechange: Use platform independent C++11 function for sleeping on a thread. 5 years ago
Michael Lutz 94c5269fa7 Codechange: Use atomic variables for thread synchronization where useful. 5 years ago
Michael Lutz 05bc2ed7cb Codechange: Replace custom thread code with C++11 thread objects.
We assume a conforming C++11 compiler environment that has a valid <thread>-header.
Failure to run a real thread is handled gracefully.
5 years ago
Michael Lutz 05f4e73608 Codechange: Replace custom mutex code with C++11 mutex'es.
A conforming compiler with a valid <mutex>-header is expected.
Most parts of the code assume that locking a mutex will never fail unexpectedly,
which is generally true on all common platforms that don't just pretend to
be C++11. The use of condition variables in driver code is checked.
5 years ago
glx22 a1e492d0d8
Fix #7439: don't overwrite CompanyRemoveReason with ClientID (#7465) 5 years ago
Samu fb6e31ca43 Cleanup 3f32711: Don't apply forbid 90 deg turn settings for ships. 5 years ago
peter1138 8114bad033 Fix #7469: Desync when using build and refit feature. 5 years ago
translators 24fc25164a Update: Translations from eints
french: 3 changes by glx
croatian: 17 changes by VoyagerOne
5 years ago
Niels Martin Hansen cebdd72146 Fix #7440: Remove town sign when deleting town, not add it once more 5 years ago
translators 92d5835495 Update: Translations from eints
dutch: 2 changes by JanWillem
french: 19 changes by glx
5 years ago
translators cb449049ff Update: Translations from eints
english (us): 3 changes by Supercheese
spanish (mexican): 18 changes by Absay
hungarian: 2 changes by Brumi
latin: 33 changes by Supercheese
5 years ago
peter1138 f0336f1f17 Codechange: Remove ship max order distance from script API. 5 years ago
peter1138 f656f5e8eb Change: Remove ship max order distance.
It is skipped when NPF is in use.
It is trivial to work around by adding and removing dummy orders.
It is mostly alleviated by the ship path cache in YAPF.
5 years ago
peter1138 66bed86bbb Fix #7062, Revert 7af53d7588: Don't test ship max order distance when pathfinding. 5 years ago
glx d0e8060182 Fix 6fc60d8c4f: forgot to update API changelog 5 years ago
PeterN 6d1cc142c2
Change: Shorten engine rail type drop down in autoreplace window. (#7448)
In the autoreplace window, the rail type drop down is for choosing engines
of the given time. Many rail types do not have engines specifically designed for them,
and are merely compatible with other rail types. This list is thus unwieldy and many
options have no engines available.

As this drop down is for choosing _engine_ rail type rather than compatible rail types,
we can list just the rail types explicitly listed by engines.
5 years ago
PeterN e1069eee05
Codechange: Check airport layout would fit within map bounds before iterating tiles. (#7429) 5 years ago
PeterN 32fda83d39
Fix aa7ca7fe6: Linkgraph node index order must be maintained due to other references. (#7431)
Linkgraph nodes require a specific order that was maintained by swapping just the last
element for the node to be removed. std::vector::erase() changed this to removing the
node is then shuffling the remain items down, which upsets other references to this
indices.

This is fixed by switching back to the original swap & pop method.
5 years ago
Andy 423aea5c32 Change: adjust Violet smallmap colour 1 shade darker, to compensate for legibility against darker blue of sea introduced by #7436 5 years ago
glx22 e93630541d
Fix #7433: don't use AirportSpec substitute if it's not set (#7435) 5 years ago
Niels Martin Hansen df673e9b2c Fix: Fluidsynth should not try to lock sample data in memory 5 years ago
Niels Martin Hansen 66c60e52ba Change: [SDL] Do not offer video smaller than 640x480 5 years ago
frosch 0cf25e84df Fix #7447, 3357cac847: Action 4 has feature 48 'original strings'. (#7449) 5 years ago
translators 3118f1430f Update: Translations from eints
italian: 25 changes by lorenzodv
portuguese: 3 changes by JayCity
5 years ago
SamuXarick ed51fba7ed Change: Dark Blue company and water were indistinguishable in small map. (#7436) 5 years ago
translators 1d14e31be3 Update: Translations from eints
korean: 14 changes by telk5093
5 years ago
PeterN b6e3e30d86
Codechange: Distance between town and airport has already just been found, so use it. (#7427)
Previously the distance was thrown away, only to be expensively recalculated again.
5 years ago
PeterN 9244dad3f1
Fix #7434: Incorrect use of vector iterator. (#7437) 5 years ago
glx22 acb09eb9a8 Fix: [Win64] settingsgen MSVC compile warnings (#7432) 5 years ago
translators cd3767bec2 Update: Translations from eints
luxembourgish: 29 changes by Phreeze
russian: 2 changes by Lone_Wolf
latin: 4 changes by Supercheese
portuguese: 1 change by JayCity
5 years ago
Michael Lutz 21d9e87b46 Fix #7165: Const overload SmallMap::Contains(key) compared wrong types.
Const and non-const Find() have different return types.
5 years ago
stormcone ee260e4704 Fix #7165: SmallMap::Erase(key) does not work correctly 5 years ago
PeterN 7fb77ff35a
Fix: Incorrect display of industry production around tiles. (#7426)
Display of industry production around tiles (as shown when placing a station)
did not take account of the station catchment changes, so still showed production
from an industry even if it was not covered by a tile.

This is fixed by making a set of nearby industries that are covered, instead of
looping over all possible industries.
5 years ago
glx22 66dd7c3879
Fix: MSVC warnings (#7423) 5 years ago
translators e817951bfd Update: Translations from eints
finnish: 2 changes by hpiirai
english (us): 17 changes by Supercheese
luxembourgish: 10 changes by Phreeze
dutch: 20 changes by JanWillem
norwegian (bokmal): 2 changes by Leifbk
latin: 16 changes by Supercheese
portuguese: 3 changes by JayCity
5 years ago
Johannes E. Krause fdaf67d924 Add: [Newgrf] Some 60+ Vars for industries that were missed in #6867 5 years ago
Johannes E. Krause 1a4c7a4e54 Cleanup: use switch for industry cargo vars 5 years ago
Charles Pigott 49f7332b75 Feature #6053: Collapsible vehicle groups (3298) 5 years ago
Charles Pigott 8890436af1 Add #6189: Groups now count the total number of vehicles in subgroups (3298) 5 years ago
Charles Pigott a393c94695 Change #5977: Use specific error message when attempting to create a circular group hierarchy (3298) 5 years ago
Charles Pigott ed9005690a Fix #7421: Don't (directly) dereference std::vector::end() in SmallMap 5 years ago
stormcone b913c92aa7 Fix #7165: Missed 'Append() --> push_back()' replacement 5 years ago
glx22 427d9d483f
Fix #6564: enforce types of arguments for station name strings (#7419) 5 years ago
Charles Pigott a065d4623e Codechange: Move 2 constants into the ifdef where they're used 5 years ago
Charles Pigott 7c81f8e076 Codechange: Simplify refit cargo filter condition and stop mixing enum types 5 years ago
Charles Pigott e453572b6a Codechange: Initialise a few variables that -flto seems to think could possibly be uninitialised 5 years ago
Henry Wilson 03ca3190c9 Codechange: Use range-based for-loop in Auto[Free|Delete]SmallVector 5 years ago
Henry Wilson cc62f4163f Cleanup: Remove unused size template parameters from SmallMap and Auto[Free|Delete]SmallVector 5 years ago
Henry Wilson c01a2e2a81 Codechange: Removed SmallVector completely 5 years ago
Henry Wilson 6570f7989f Codechange: Declare SmallVector as an alias for std::vector 5 years ago
Henry Wilson ab711e6942 Codechange: Replaced SmallVector::[Begin|End]() with std alternatives 5 years ago
Henry Wilson 297fd3dda3 Codechange: Replaced SmallVector::Include() with include() 5 years ago
Henry Wilson 2bc2de9034 Codechange: Replaced SmallVector::Find() with std::find() 5 years ago
Henry Wilson e0c58bf5ee Codechange: Removed SmallVector::Insert() 5 years ago
Henry Wilson a0f36a50e6 Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back() 5 years ago
Henry Wilson ca2f33c6d0 Codechange: Replaced SmallVector::Erase() with std::vector::erase() 5 years ago
Henry Wilson 097328c3d7 Codechange: Replaced SmallVector::Get() const with std alternatives 5 years ago
Henry Wilson aa7ca7fe64 Codechange: Replaced SmallVector::Get(n) non-const with std::vector::data() + n 5 years ago
Henry Wilson bc7dcaffca Codechange: Removed SmallVector::Assign() 5 years ago
Henry Wilson 5795f66d2e Codechange: Replaced SmallVector::Contains() with std::find() pattern 5 years ago
Henry Wilson b1f5119d3a Codechange: Replaced SmallVector::ErasePreservingOrder(pos, count) with std::vector::erase() 5 years ago
Henry Wilson 9b5cc73f3e Codechange: Replaced SmallVector::ErasePreservingOrder(it, count) with std::vector::erase() 5 years ago
Henry Wilson 8460952240 Codechange: Replaced SmallVector::Find() const with suitable alternatives
The use of std::none_of in network/core/host.cpp is driven by the non-const
comparison operator use by NetworkAddress. A future commit should address
the const_casts in that class to ensure const-correctness.
5 years ago
Henry Wilson 81315939b9 Codechange: Replaced SmallVector::Find() non-const with std::find() 5 years ago
Henry Wilson f3938fdb83 Codechange: Replaced SmallVector::Reset() with std::vector::clear() + shrink_to_fit() 5 years ago
Henry Wilson bad2c2154b Codechange: Replaced SmallVector::Resize() with std::vector::resize() 5 years ago
Henry Wilson a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 5 years ago
Henry Wilson 56ae855dc2 Codechange: Removed SmallVector::operator[] 5 years ago
Henry Wilson 9cba6f7193 Codechange: Replaced SmallVector::Compact() with std::vector::shrink_to_fit() 5 years ago
Henry Wilson bfd79e59dc Codechange: Replace SmallVector::Clear() with std::vector::clear() 5 years ago
Henry Wilson 4b349c0f90 Codechange: [core] Implement SmallVector using std::vector
The public and protected interface to SmallVector are unchanged
SmallVector now requires that items be default constructible
This isn't an issue since some contained items were previously created
uninitialized.

Temporary default constructors are added to the following structs
- SmallPair
- SmallStackItem
- GRFPresence

Where vector<bool> is required, transition immediately to std::vector
to avoid returning proxy object references.
5 years ago
translators 7a32cf1401 Update: Translations from eints
greek: 51 changes by Jubilee
russian: 17 changes by Lone_Wolf
latin: 19 changes by Supercheese
portuguese: 53 changes by JayCity
5 years ago
PeterN e3ea758c46
Fix #7414: Reinstate marking sign dirty before removal. (#7416) 5 years ago
stormcone 8acca3a72b Change: Do not display a newspaper about old vehicles for which replacement is activated. 5 years ago
PeterN 698241e16e
Fix #7410: Sign position/width not set on initial creation. (#7413)
Sign width was only updated when the text was changed. This seems to work for player-placed
signs as there is always a rename operation, however AIs can create a sign with text in one
go, in which case the width was never set.
5 years ago
PeterN a4073895ae
Fix #7411: Use industry production callback (if used) on initial industry cargo generation. (#7412) 5 years ago
translators 10f0c1e3cd Update: Translations from eints
finnish: 12 changes by hpiirai
greek: 40 changes by Jubilee
luxembourgish: 2 changes by Phreeze
dutch: 12 changes by JanWillem
french: 4 changes by romazoon
norwegian (bokmal): 12 changes by Leifbk
hungarian: 14 changes by Brumi
portuguese: 51 changes by JayCity, 11 changes by vesgo
5 years ago
translators 37b9fdc0c1 Update: Translations from eints
finnish: 13 changes by hpiirai
korean: 1 change by telk5093
5 years ago
Niels Martin Hansen ce10d9be3f Fix #7374: Ensure k-d trees are always updated when station sign moves 5 years ago
peter1138 3860a2ce2a Codechange: Use override keyword for smallmap window. 5 years ago
peter1138 07de9d6c3f Codechange: Use override keyword in networking classes. 5 years ago
peter1138 b1fb3f4fb8 Codechange: More use of override keyword. 5 years ago
peter1138 e6bb90543e Change: Show additional cost and refitted capacity in build vehicle window. 5 years ago
glx f8e6cd10ef Add: script API functions for build with refit feature 5 years ago
peter1138 d54b6ac09b Feature: When filtering purchase list by cargo type, make buy button perform a refit if required. 5 years ago
Peter Nelson f6264e5212 Change: Bump savegame version for tree tile water class conversion. 5 years ago
Peter Nelson 76e77aefad Fix #7400: Water class for tree tiles was not converted for old saves preventing industry creation.
As the information is always available from the tree ground type, unconditionally
update the map array for tree tiles.
5 years ago
peter1138 317f69c152 Codechange: Use override specifier in Window-derived classes. 5 years ago
peter1138 aafce47596 Codechange: Use override specifier for DropDownListItem classes. 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
translators 685f822c63 Update: Translations from eints
finnish: 13 changes by hpiirai
danish: 2 changes by nielsmh
5 years ago
PeterN 4feea8db67
Fix: Filtered file list did not scroll properly. (#7402) 5 years ago
translators d755375966 Update: Translations from eints
luxembourgish: 31 changes by Phreeze
croatian: 2 changes by VoyagerOne
5 years ago
Peter Nelson 3357cac847 Fix: Bounds check NewGRF feature. 5 years ago
Peter Nelson 054d05b132 Codechange: NewGRF features are documented in hex, so display as hex. 5 years ago
Michael Lutz 2cf7ac2863 Fix #7391, 9b99b95: Don't invalidate go to depot orders of non-aircraft when invalidating hangar orders that happen to share IDs.
This was caused because hangars are referred to by station ID, which is not unique with respect to depot IDs.
5 years ago
peter1138 1585c12bb9 Fix 4da83d2f66: Remove measurement tooltips when completed. 5 years ago
translators 0837a1a398 Update: Translations from eints
dutch: 28 changes by JanWillem
russian: 1 change by Lone_Wolf
5 years ago
peter1138 c34f07d5fd Fix #7390: Extra line removed by mistake caused server_password to disappear from settings. 5 years ago
peter1138 b3ef06fdf3 Fix #7384: Industry Chain tooltips did not display on right-click.
This is fixed by handling the new Window::OnTooltip() event instead of OnHover()
5 years ago
peter1138 f5f33da126 Codechange: Implement OnTooltip event for custom window tooltips.
This avoids windows from needing to know or care about tooltip delay settings.
5 years ago
peter1138 4da83d2f66 Fix #7386: Measurement tooltip for tunnels, aqueducts & docks did not display or flickered.
Measurement tooltip was auto-closed as the hover/right-click test for tooltips was not
satisfied in this case. This is fixed by keeping the tooltip visible and instead explicitly
closing the tooltip when the PlaceObject is cancelled/completed.
5 years ago
Patric Stout e3c639a09f Remove: ENABLE_NETWORK switch
This switch has been a pain for years. Often disabling broke
compilation, as no developer compiles OpenTTD without, neither do
any of our official binaries.

Additionaly, it has grown so hugely in our codebase, that it
clearly shows that the current solution was a poor one. 350+
instances of "#ifdef ENABLE_NETWORK" were in the code, of which
only ~30 in the networking code itself. The rest were all around
the code to do the right thing, from GUI to NewGRF.

A more proper solution would be to stub all the functions, and
make sure the rest of the code can simply assume network is
available. This was also partially done, and most variables were
correct if networking was disabled. Despite that, often the #ifdefs
were still used.

With the recent removal of DOS, there is also no platform anymore
which we support where networking isn't working out-of-the-box.

All in all, it is time to remove the ENABLE_NETWORK switch. No
replacement is planned, but if you feel we really need this option,
we welcome any Pull Request which implements this in a way that
doesn't crawl through the code like this diff shows we used to.
5 years ago
Patric Stout 72c5f2b3ee Remove: DOS support
In 10 years there was no active development on DOS. Although it
turned out to still work, the FPS was very bad. There is little
interest in the current community to look into this.

Further more, we like to switch to c++11 functions for threads,
which are not implemented by DJGPP, the only current compiler
for DOS.

Additionally, DOS is the only platform which does not support
networking. It is the reason we have tons of #ifdefs to support
disabling networking.

By removing DOS support, we can both use c++11 functions for threads,
and remove all the code related to disabling network. Sadly, this
means we have to see DOS go.

Of course, if you feel up for the task, simply revert this commit,
and implement stub c++11 functions for threads and stub functions
for networking. We are more than happy to accept such Pull Request.
5 years ago
translators 559d4e8335 Update: Translations from eints
korean: 7 changes by telk5093
5 years ago
Patric Stout fe13fadcfb Codechange: fix Intel C++ Compiler linking issues.
GetAircraftFlightLevel<Aircraft> is only used in static functions
inside aircraft_cmd.cpp. With GCC, Clang and MSVC this is not an
issue, but on ICC fails linking, because it doesn't find this
version of this template. Possibly these two pieces of information
are linked.
Explicit defining the function fixes the issue.
5 years ago
stormcone 43caef2968 Fix f58fa80e: Wrong company performance rating when money exceeds INT_MAX. (#7382)
Company performance rating calculation does not take into account the companies' money when those exceeds INT_MAX.
5 years ago
translators c66b9c657a Update: Translations from eints
dutch: 1 change by JanWillem
russian: 1 change by Lone_Wolf
5 years ago
Charles Pigott 592f591a4b Cleanup: Unused lang strings 5 years ago
Charles Pigott fe448a2616 Remove: OPF 5 years ago
translators c7b5f34138 Update: Translations from eints
norwegian (bokmal): 1 change by Leifbk
5 years ago
PeterN bcfc9620b0 Change: Use default value for invalid multi-string settings instead of clamping to min or max value. (#7361) 5 years ago
translators 1100418063 Update: Translations from eints
romanian: 8 changes by alexmerlin1985
dutch: 2 changes by JanWillem
5 years ago
peter1138 35967effd3 Cleanup: Update changed string in language files. 5 years ago
peter1138 fc5f67123a Fix e66cec8f86: Permit loading of industry production callback with invalid cargo type.
It is only an error if the invalid result is actually used. This will be silently ignored at the moment.
It is still an error if a duplicate cargo type is returned.
5 years ago
peter1138 b00a861467 Codechange: Make FindStationsAroundTile() out-parameter stations const to prevent incorrect modification. 5 years ago
peter1138 6b92b83128 Fix #7372: FindStationsAroundTiles() with caching returns no result for industry tiles.
Currently this can only be triggered by NewGRF house tiles querying for cargo acceptance history
of nearby stations (var 0x64) with a tile offset, and providing an offset that happens to point
to an industry tile. This serves no useful purpose.
5 years ago
Johannes E. Krause 43ced57794 Cleanup: Remove questionable syntax in track drawing 5 years ago
Johannes E. Krause e6798ffdca Cleanup: Remove questionable syntax in town rating display 5 years ago
Johannes E. Krause 21ec3e5531 Cleanup: Remove questionable syntax in GetOrderCmdFromTile 5 years ago
Johannes E. Krause 234f1007f7 Cleanup: Remove questionable syntax in HQ size calculation 5 years ago
Johannes E. Krause ba3d7122df Cleanup: Remove questionable syntax in station rating calculation 5 years ago
Gabda dea7f078f4 Codechange: Update town sign on population change only when population is shown (#7368) 5 years ago
translators 776fbda324 Update: Translations from eints
finnish: 110 changes by hpiirai
ukrainian: 149 changes by nsergiy
5 years ago
Jonathan G Rennison 1a115e1cc8 Change: Include _current_company in crashlog AI config line
_current_company is not currently logged anywhere in the crashlog.
_local_company is logged, despite being much less useful than
_current_company.
This change logs _current_company alongside _local_company.
5 years ago
Patric Stout aea1726f45 Fix: MingW and MSVC compiled strgen had different path separator behaviour
If it was compiled with MingW, both / and \ were accepted as
path separator. On MSVC, only \ was. This is an unexpected
difference between binaries for the same platform. Remove this
discrepancy by accepting both / and \ on all platforms.
5 years ago
Patric Stout 45fbaa64c2 Codechange: check if a define is set directly, instead of indirectly
config.lib happens to set GLOBAL_DATA_DIR in case it is not DOS
and not OS2, but this kind of deduction is annoying to maintain.
It is better to just check if the define you want to use is set,
and leave it to config.lib to set it or not depending on the OS.
5 years ago
Patric Stout 1f57150d80 Codechange: "basedir.h" is a system include, not a local 5 years ago
Patric Stout 36105841b9 Codechange: ICU_SORT is in reality ICU_I18N (according to their CMake files)
By naming it in a different way, things get a bit confusing.
Especially if we are switching to CMake, which autodetects these
things, we need to use the name the authors of ICU gave it; not
our interpertation of that name.
5 years ago
Patric Stout 52d7e7d45e Codechange: ICU_LAYOUT is in reality ICU_LX (according to their CMake files)
By naming it in a different way, things get a bit confusing.
Especially if we are switching to CMake, which autodetects these
things, we need to use the name the authors of ICU gave it; not
our interpertation of that name.
5 years ago
Patric Stout 7adae09897 Codechange: liblzma is called liblzma, how ever strange that might be
It is the only library we use that calls itself with 'lib' in the
name. This might be confusing, but with the arrival of cmake a lot
of these things are automated. And detection will find 'liblzma',
not 'lzma', like with 'lzo', 'zlib', ..
5 years ago
translators c09c94378c Update: Translations from eints
finnish: 214 changes by hpiirai
norwegian (bokmal): 10 changes by Leifbk
russian: 2 changes by Lone_Wolf
croatian: 6 changes by VoyagerOne
5 years ago
peter1138 9cb84a1bad Feature: Add road icon to road construction drop down list. 5 years ago
peter1138 9c8b7b5efc Feature: Add rail icon to rail construction drop down list. 5 years ago
peter1138 b56ea5ca27 Add: Generic drop down list string item with icon. 5 years ago
peter1138 fb35cb5ed2 Remove: Unnecessary virtual destructors on drop down list items. 5 years ago
peter1138 303cfd86a3 Remove: Unnecessary specialization of NewGRF preset list item. 5 years ago
peter1138 811bf22620 Codechange: Use Colours type instead of byte. 5 years ago
Michael Lutz cc5f175615 Feature: Railtype flags to allow/disallow 90 degree curves. (#7352) 5 years ago
Niels Martin Hansen e8d397e4ee Codechange: Make a merged k-d tree index of all viewport signs 5 years ago
Niels Martin Hansen d84b67e54d Codechange: Make a k-d tree index of stations 5 years ago
Niels Martin Hansen 7b56be0f3a Codechange: Make a k-d tree index of towns 5 years ago
Niels Martin Hansen d7522e5e8f Codechange: Add a k-d tree generic data structure 5 years ago
translators 3a54c71041 Update: Translations from eints
finnish: 46 changes by hpiirai
danish: 10 changes by nielsmh
hungarian: 2 changes by Brumi
5 years ago
Peter Nelson 943c58e468 Fix: Show industry name in Land Area Information window for oil-rig type stations instead of just 'Oil Rig' 5 years ago
Peter Nelson 8b1b3fd0f9 Feature: Non-rectangular sparse station catchment area. 5 years ago
Peter Nelson 3542ed53d4 Add: BitmapTileArea and Iterator to handle sparse tile areas. 5 years ago
peter1138 94b40fd530 Codechange: Convert IndustryVector to a std::set. 5 years ago
peter1138 ed6084523d Codechange: Convert StationList from SmallVector to std::set. 5 years ago
Andy 46aca9377b Add: windowshade for rail station construction window 5 years ago
PeterN 42046af933
Add: Add flag and railtype sprite type to draw pre-combined ground sprites. (#7231) 5 years ago
Gabda 7e7563f15f Add: Chrono based TIC() and TOC() in debug 5 years ago
Gabda 4be2c1022e Cleanup: changing variable names in TIC() and TOC()
Removing double underscores to be ANSI-C standard compliant.
5 years ago
PeterN 6c6971fb43
Add: Road vehicle path cache. (#7261) 5 years ago
glx22 dae35188ab
Fix 13962a847, 00d28a500: forgotten squirrel_export run (#7345) 5 years ago
translators 35a2b3bb08 Update: Translations from eints
finnish: 14 changes by ln
catalan: 8 changes by juanjo
polish: 7 changes by xaxa
dutch: 7 changes by JanWillem
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
PeterN 41563a871b
Add: AI API for vehicle group colours (#7336) 5 years ago
Peter Nelson 7ca1793ec4 Change: Automatically use Trackdir node key as needed if ship curve penalties differ. 5 years ago
Peter Nelson b8a0107ad1 Change: Add configurable curve penalty for ships. 5 years ago
peter1138 a69eb5f516 Fix #7334: Ship lost after crossing bridge due to path cache not being consumed while on final bridge end. 5 years ago
translators 1ad8321fff Update: Translations from eints
dutch: 2 changes by JanWillem
russian: 4 changes by Lone_Wolf
5 years ago
SamuXarick cdb6dbad85 Cleanup: Remove repeated network error message on connection timeout. (#7327) 5 years ago
nikolas a7e335c0b3 Fix: spelling for a few real town names (#7338)
Added special characters to mostly Slovak towns, a few Spanish, and one Turkish.
5 years ago
translators 3d4736cedd Update: Translations from eints
dutch: 13 changes by JanWillem
hungarian: 4 changes by Brumi
5 years ago
Patric Stout f52e5a4d61 Fix: warnings when compiling with DJGPP
This was most likely broken for months, if not years.
5 years ago
Patric Stout 1c5ea33099 Fix: warnings when compiling for a recent version of Haiku
This might break older Haiku versions, but it is hard to tell.
5 years ago
Patric Stout aa350528df Remove: libtimidity support (NOT timidity support)
libtimidity was introduced with the support for PSP. PSP has been
dropped almost a year ago, but this music driver was not. This
corrects that oversight.

timidity (via extmidi) still works fine. This purely removes the
libtimidity support, which was only really available for PSP.
5 years ago