Patric Stout
8ab267496b
Codechange: reference a string by its name, not with "another + 1" ( #9517 )
...
It is wrong anyway, as "TINY" normally is at -1. Just weird code.
3 years ago
rubidium42
55a11710a6
Codechange: convert printf DEBUG statements to fmt Debug statements
3 years ago
glx22
5799402f7a
Codechange: Rename window related DeleteXXX to match new behaviour
3 years ago
rubidium42
2e136285e1
Codechange: move from C-string to std::string for DoCommand
3 years ago
rubidium42
b791ffc6de
Fix: do not hide parameter by local variable with the same name
3 years ago
frosch
f96f113951
Codechange: use IterateFromBack/Front only if the order is important.
...
Use Iterate if the order does not matter.
3 years ago
frosch
22567a1f43
Codechange: use iterators instead of 'subranges' when iterating from a specific window.
...
Using iterators makes it easier to include or exclude the start window in the iteration.
3 years ago
glx22
14e92bd8e2
Codechange: Replace window related FOR_ALL with range-based for loops
3 years ago
Jonathan G Rennison
3ede756d23
Fix: Viewport drag tooltips not being removed when dragging over other windows
4 years ago
Loïc Guilloux
b927da73c1
Fix 81d335b081: Use non-pulsating red highlight for coverage ( #8622 )
4 years ago
SamuXarick
a4035af337
Codechange: Apply coding style ( #8640 )
...
* Fix: Missing or needed spaces
* Codechange: Remove space
* Codechange: Remove space
* Codechange: More missing spaces
* Codechange: Missing spaces
* Codechange: Remove space
* Codechange: Remove space
4 years ago
Matt Kimber
40d5fe1631
Fix eeb88e8: Trains reversed while paused do not correctly update sprite bounds ( #8540 )
4 years ago
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
4 years ago
Niels Martin Hansen
2d9fa81bd0
Feature: Plant clumps of trees in editor by dragging on the landscape
4 years ago
dP
e82333cf77
Feature #7962 : Improve rendering of large viewports
4 years ago
dP
5ca8a0bda9
Feature #7962 : Significantly improve sprite sorter performance
4 years ago
Michael Lutz
79240eab1e
Codechange: Make use of the improved C++17 emplace_back function.
4 years ago
TechGeekNZ
a10013dd00
Codechange: Spell 'Viewport' consistently
...
Some places in the codebase misspell 'Viewport' as 'ViewPort' or 'view_port'.
This patch makes everything consistent.
4 years ago
TechGeekNZ
8652a4db76
Cleanup: Give `SetDirtyBlocks` a more descriptive name.
4 years ago
Jonathan G Rennison
14af8701df
Fix #6566 : Fix signed integer overflow in viewport draw area chunking
...
This caused drawing areas larger than 2097151 pixels at 8x zoom to
not be subdivided into smaller chunks as required.
This resulted in pathological performance issues in the sprite sorter.
5 years ago
glx
ee7a8eebca
Codechange: Replace FOR_ALL_TOWNS with range-based for loops
5 years ago
glx
869581eb23
Codechange: Replace FOR_ALL_SIGNS with range-based for loops
5 years ago
glx
ddabfed1cd
Codechange: Replace station related FOR_ALL with range-based for loops
5 years ago
Niels Martin Hansen
9900af38f5
Fix #7847 : Use ViewportSign coordinates for sign Kdtree coordinates ( #7849 )
...
Ensure the same coordinates are used for station/town/player signs regardless of how the landscape changes below it after the coordinates were first determined.
By keeping track of whether each ViewportSign is valid for Kdtree use (and only ever registering the viewport sign when the object is valid) a lot of code can be simplified and become more robust at the same time.
5 years ago
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
5 years ago
Gabda
b870596f15
Add #6887 : Option to show zone inside local authority boundary of towns
...
Can be found at town information > local authority window
Layout for button is same as Graph Keys
Turn on/off for every town individually
5 years ago
PeterN
2d0352d67f
Fix e8d397e4ee: Avoid using RemapCoords2 during savegame conversion. ( #7588 )
5 years ago
Niels Martin Hansen
c9fe6e7b8f
Fix #7371 : Avoid dependency on foundations of town tile during saveload
5 years ago
Charles Pigott
96a4787710
Codechange: Set ZoomLevel's base type to byte instead of using ZoomLevelByte
6 years ago
peter1138
81d335b081
Feature: Add station coverage area display for towns.
6 years ago
peter1138
81f0f97406
Feature: Add existing station coverage area display when placing new station parts.
6 years ago
peter1138
b6733edd17
Feature: Add coverage area display for existing stations.
6 years ago
PeterN
c17736b493
Fix e8d397e: Invisible station/waypoint signs could still be clicked on. ( #7531 )
6 years ago
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
6 years ago
glx22
66dd7c3879
Fix: MSVC warnings ( #7423 )
6 years ago
Henry Wilson
c01a2e2a81
Codechange: Removed SmallVector completely
6 years ago
Henry Wilson
ab711e6942
Codechange: Replaced SmallVector::[Begin|End]() with std alternatives
6 years ago
Henry Wilson
a0f36a50e6
Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back()
6 years ago
Henry Wilson
097328c3d7
Codechange: Replaced SmallVector::Get() const with std alternatives
6 years ago
Henry Wilson
a690936ed7
Codechange: Replace SmallVector::Length() with std::vector::size()
6 years ago
Henry Wilson
bfd79e59dc
Codechange: Replace SmallVector::Clear() with std::vector::clear()
6 years ago
peter1138
1585c12bb9
Fix 4da83d2f66: Remove measurement tooltips when completed.
6 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.
6 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.
6 years ago
Niels Martin Hansen
e8d397e4ee
Codechange: Make a merged k-d tree index of all viewport signs
6 years ago
PeterN
87ebfe1227
Fix #7004 : Mark linkgraph dirty to be rebuilt on next draw call. ( #7265 )
...
Previously the linkgraph was rebuilt before the viewport extents were finalized.
6 years ago
Peter Nelson
0749a291c4
Revert 479f13fc41
, Fix #7133 , Fix #7136 : "Codechange: Tweak ViewportAddLandscape so it no more relies on "go down as fast as possible" tile height model (Patch by adf88, #6583 )"
...
This reverts commit 479f13fc41
.
6 years ago
Johannes E. Krause
479f13fc41
Codechange: Tweak ViewportAddLandscape so it no more relies on "go down as fast as possible" tile height model (Patch by adf88, #6583 )
6 years ago
Johannes E. Krause
05da5a177c
Codechange: Simplify marking tiles dirty when terraforming (Patch by adf88, #6583 )
6 years ago
Johannes E. Krause
f744dea0ff
Fix: jumping effect when scrolling viewport over bottom edge of the map (Patch by adf88, #6583 )
6 years ago