Commit Graph

18696 Commits

Author SHA1 Message Date
Rubidium e5fedcd6da Fix #6322: [Script] Try to let the script die when no memory can be allocated instead of crashing the whole game 2021-04-17 22:24:52 +02:00
Rubidium 4400bbfa96 Change: [Script] Let Script_FatalError use std::string instead of const char * 2021-04-17 22:24:52 +02:00
Peter Nelson 3248a6c12b Fix #9042: Make multiplayer server list height auto-fill window.
#9042 did not fix all combinations of scaling options. This additional
change makes the server list automatically fill available height.
2021-04-17 22:23:43 +02:00
PeterN 195cf31cb9
Fix: Inconsistent button sizing on AI/GS setting window depending on scale settings. (#9044) 2021-04-17 19:20:22 +01:00
Milek7 aade177d79
Fix: Corrupted savegame could cause heap corruption by writing outside link graph edge matrix. (#9046) 2021-04-17 19:19:37 +01:00
Milek7 da55286c2c
Fix: Corrupted savegame could crash the game by providing invalid gamelog enums. (#9045) 2021-04-17 19:19:18 +01:00
PeterN 8e539ce293
Change: Improve layout and spacing of vehicle group widgets. (#9041)
Existing layout included a blank widget above the group list to align with the vehicle list, however since then an additional sort-by row was added.
Group list size tweaks to match normal row size (at least with normal gui and text size.)
Removed reduction of 2 rows in the group list <- main culprit of odd sizing.
Removed fill attribute on buttons which gave strange sizes, and put it on the group info widget instead.
Tweaked various soft-padding values to line up (centreing text with a 1px offset does not make centred text.)
2021-04-17 19:19:06 +01:00
Rubidium 44d1b964bf Fix #7513: recursive array/class/table release caused stack overflow 2021-04-17 19:18:51 +01:00
Rubidium 47a99bb676 Fix #7513: recursive garbage collection caused stack overflow 2021-04-17 19:18:51 +01:00
translators 6c49ae9cd7 Update: Translations from eints
chinese (simplified): 3 changes by clzls
spanish: 1 change by MontyMontana
polish: 6 changes by Milek7
2021-04-17 17:50:40 +00:00
Peter Nelson cb9f56df0c Feature: Show previous chat history when the chat message box is open 2021-04-16 20:25:46 +02:00
Peter Nelson fbef63822c Codechange: Use std::deque for chat history instead of fixed array 2021-04-16 20:25:46 +02:00
Peter Nelson 837994034d Fix: Sizing of Multiplayer server list incorrect when GUI zoom doesn't match Font zoom.
The server information panel was scaled by GUI scale, which could result in a panel that is longer than the server list. This height difference is then maintained when the window is resized to fill the screen.
Instead, specify the minimum size by number of text lines and (summed total) padding.
2021-04-16 20:24:08 +02:00
translators a4db7c844d Update: Translations from eints
korean: 6 changes by telk5093
portuguese (brazilian): 2 changes by Greavez
2021-04-16 17:52:24 +00:00
translators 010d977b16 Update: Translations from eints
hungarian: 5 changes by nemesbala
catalan: 2 changes by J0anJosep
tamil: 3 changes by Saran-S-Menon
2021-04-15 17:52:17 +00:00
translators 3e0a16c027 Update: Translations from eints
romanian: 57 changes by kneekoo
russian: 3 changes by Ln-Wolf
spanish: 3 changes by MontyMontana
portuguese: 7 changes by azulcosta
2021-04-14 17:49:26 +00:00
Milek7 4cd9e0f41b Fix: Add virtual destructor to link graph Path.
Classes derived from Path were freed through base class pointer, but no virtual destructor was present.
2021-04-13 20:48:49 +02:00
Michael Lutz 433602b072 Fix #9028: [OpenGL] Clear cursor cache on destroying the OpenGL backend. 2021-04-12 22:40:40 +02:00
Rubidium 468b1c6c5d Fix: [win32] buffer_locked state not initialised, causing _screen.dst_ptr to be potentially not set 2021-04-12 21:14:01 +02:00
Rubidium 8562395413 Fix: [Video] fast forward boolean states not initialised, potentially causing unstoppable fast forward 2021-04-12 21:14:01 +02:00
Rubidium 64e8305874 Fix: [SDL] buffer_locked state not initialised, causing _screen.dst_ptr to be potentially not set 2021-04-12 21:14:01 +02:00
Rubidium d2fe8c2842 Change: warn the user about the resolving of an address being extra very slow 2021-04-12 21:10:21 +02:00
Rubidium 7597740bff Fix: split the UDP blocking of sockets to only the socket involved, and when another thread is busy do not attempt to process the packets of that socket 2021-04-12 21:10:21 +02:00
Rubidium ca6b9ad8b0 Change: move some things only relevant to UDP from network.cpp to network_udp.cpp 2021-04-12 21:10:21 +02:00
rubidium42 c4bccd4f70
Fix #8874: show a warning when a NewGRF scan is requested multiple times from the console (#9022) 2021-04-12 20:53:04 +02:00
translators e722ea89f0 Update: Translations from eints
norwegian (bokmal): 2 changes by Anolitt
english (us): 2 changes by 2TallTyler
korean: 3 changes by telk5093
german: 2 changes by danidoedel
romanian: 35 changes by kneekoo
finnish: 2 changes by hpiirai
spanish: 4 changes by MontyMontana
french: 3 changes by glx22
portuguese: 4 changes by azulcosta
2021-04-12 17:51:14 +00:00
translators e5b960eaeb Update: Translations from eints
korean: 23 changes by telk5093
romanian: 1 change by kneekoo
russian: 1 change by Ln-Wolf
french: 1 change by glx22
2021-04-11 17:50:00 +00:00
Wim Leflere 9aebfca083
Fix: clang-cl build (#9018)
Remove macro redefinitions
Add final and fallthrough attributes for clang-cl
2021-04-11 14:15:37 +01:00
PeterN 31c5b8fe0f
Fix: Invalidate cached vehicle colourmaps when changing liveries setting. (#9006) 2021-04-11 14:30:13 +02:00
Michael Lutz 5644c00482
Fix: Check for a validly mapped OpenGL screen buffer during driver init. (#9007) 2021-04-11 14:28:29 +02:00
Patric Stout d50b934bb4 Change: reworked how the Game Option display options are drawn
"Hardware acceleration" was not aligned with its checkbox. So instead
of drawing the labels left and the options right, now draw settings
one by one with a spacer between label and option to get the right
spacing.

Also, use SetPIP instead of repeating a SetPadding for all but
last element.
2021-04-11 14:26:00 +02:00
Patric Stout f0f2073006 Feature: allow a toggle to enable/disable vsync
Vsync should be off by default, as for most players it will be
better to play without vsync. Exception exist, mainly people who
play in fullscreen mode.
2021-04-11 14:26:00 +02:00
PeterN 56f982fa7f
Fix #9015: Don't set free space value if not requested. (#9016) 2021-04-11 13:07:08 +01:00
rubidium42 df045b92ea
Fix #9008: Validate starting year given on the command line. (#9014)
An invalid starting year causes all sorts of weird behaviour and crashes in map generation.

Now just set the appropriate setting via IConsoleSetSetting so the validation
and, if needed, clamping is performed on the starting year value.
2021-04-11 13:52:55 +02:00
TELK fdc8230dfa
Cleanup: Fix comment for only one form (#9012) 2021-04-11 11:48:51 +01:00
Peter Nelson f9460c0c8b Fix #8981: Don't attempt to re-reserve path if already entering/entered depot. 2021-04-11 00:11:41 +02:00
Peter Nelson 59b6e46bce Fix: Adjust scrolling interval of credits to account for text line height 2021-04-10 22:36:30 +02:00
Jonathan G Rennison 39b7ef31f8 Fix: Data races on cursor state in OpenGL backends 2021-04-10 18:31:42 +02:00
Jonathan G Rennison fbd0a2e65a Fix: Thread unsafe use of sprite cache in OpenGLBackend::DrawMouseCursor
See also: #8870
See also: #8977
2021-04-10 18:31:42 +02:00
frosch c6781cbd44
Fix d4c3d01d: add plural form 14 to strgen. (#8999) 2021-04-10 18:09:04 +02:00
translators 0e01a7a431 Update: Translations from eints 2021-04-10 15:48:34 +00:00
Nicolae Crefelean d4c3d01d07
Add: new plural form for Romanian translation (#8936) 2021-04-10 17:33:27 +02:00
translators 5a14bf3a6c Update: Translations from eints
korean: 1 change by telk5093
spanish: 1 change by MontyMontana
2021-04-10 15:24:45 +00:00
Charles Pigott c506263197
Fix #8956: Industry disaster news messages showed the wrong location (#8992) 2021-04-10 13:44:17 +01:00
Didac Perez Parera 47c0403320
Change: do not disable NewGRF window apply button if dev tools are enabled (#8975)
enabled
2021-04-10 12:55:49 +02:00
Niels Martin Hansen c800dcaff8 Fix: [Win32] Font glyphs of certain widths broke
Font glyphs between 33 and 39 pixels wide, in the Win32 font system, used wrong alignment and caused glyphs to appear broken.
When in the 33 to 39 pixel range, glyphs without AA were rounded down to 32 pixel pitch, instead of up to 64 pixel pitch.
2021-04-10 11:39:28 +02:00
Didac Perez Parera 0cb99c5523
Codechange: nullptr deletion in DeleteWindowById (#8941) 2021-04-10 10:19:14 +01:00
Loïc Guilloux c64b0946e8
Fix e0561dbde: [MinGW] use ofstring(wchar_t*) as ofstring(wstring) doesn't exist (#8985) 2021-04-10 10:15:47 +01:00
Patric Stout ff6924f122
Fix 70bc55cfd6e: snow line height was set while calculating desert line (#8989)
Seems I liked copy/pasting just a tiny bit too much.
2021-04-10 10:14:55 +01:00
translators e98aed8b48 Update: Translations from eints
swedish: 3 changes by DonaldDuck313
korean: 2 changes by telk5093
portuguese (brazilian): 4 changes by brunodelara-cloudcrm
2021-04-09 17:46:40 +00:00
Michael Lutz 96d33ab46a Fix #8930: [Win32] Don't handle printable keys on keydown if an edit box is in focus.
Handle printable input only when the matching WM_CHAR message is incoming.
Without an edit box, do the handling in keydown as usual to support hotkeys.
2021-04-09 12:24:27 +02:00
Niels Martin Hansen 785e42a6f9 Feature: Volume sliders in Game Options window 2021-04-09 12:18:52 +02:00
Niels Martin Hansen 88c92f7b7c Codechange: Move volume control slider logic to separate functions 2021-04-09 12:18:52 +02:00
Niels Martin Hansen 64c9af0991 Add: NWidgetBase::GetCurrentRect function 2021-04-09 12:18:52 +02:00
Niels Martin Hansen 49d370185b Change: Default music and sound effects volume to be lower 2021-04-09 12:18:52 +02:00
Wim Leflere 5233fd2751
Change: [win32] Use user UI language for initial language selection (#8973) (#8974) 2021-04-09 11:22:03 +02:00
translators 2b86d42ddc Update: Translations from eints
english (us): 3 changes by 2TallTyler
korean: 3 changes by telk5093
russian: 32 changes by Ln-Wolf
spanish: 1 change by JohnBoyFan
french: 4 changes by arikover
portuguese: 10 changes by azulcosta
2021-04-08 17:53:09 +00:00
Jonathan G Rennison 3ede756d23 Fix: Viewport drag tooltips not being removed when dragging over other windows 2021-04-08 19:34:45 +02:00
Jonathan G Rennison ae94b2d296 Fix: Viewport drag tooltip flickering when dragging outside window 2021-04-08 19:34:45 +02:00
translators 1529403584 Update: Translations from eints
norwegian (bokmal): 3 changes by Anolitt
spanish (mexican): 3 changes by absay
vietnamese: 3 changes by KhoiCanDev
german: 3 changes by danidoedel
finnish: 3 changes by hpiirai
catalan: 3 changes by J0anJosep
spanish: 3 changes by JohnBoyFan
2021-04-07 17:53:18 +00:00
Ghislain Antony Vaillant e7cf589868 Fix: Honor default soundfont for FluidSynth
Debian now provides a default soundfont for FluidSynth via its alternatives system.

In short, FluidSynth is configured to look for `/usr/share/sounds/sf3/default-GM.sf3` as its default soundfont, and each soundfront package (FluidR3, OPL-3, MuseScore...) may provide or override this symlink. By default, FluidSynth is installed on Debian with the `TimGM6mb` soundfont by default due to its limited size.

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=929185 for further details.
2021-04-07 12:30:04 +02:00
Ghislain Antony Vaillant 9725bd8dd0 Fix: Use FluidSynth default soundfont 2021-04-07 12:29:21 +02:00
Niels Martin Hansen 746f1ca11a Codechange: Remove the now meaningless console_cp parameter from OTTD2FS 2021-04-07 09:31:47 +02:00
Niels Martin Hansen e0561dbded Fix #8713: Change OTTD2FS and FS2OTTD to return string objects instead of static buffers 2021-04-07 09:31:47 +02:00
Jonathan G Rennison 825867f2c5
Fix: [Network] State conditions for sending client info/quit packets (#8959)
Use status >= STATUS_AUTHORIZED as the state criteria for all cases
where updates about other clients are sent.
This avoids the case where a client is informed that another client
has joined but not informed when it later quits, resulting in
stale entries in the client list window.
2021-04-06 19:31:52 +01:00
Peter Nelson 920bf703cd Fix: Allow full sample range for 16-bit audio.
Clamping each sample value to half the available range could cause
unnecessary premature clipping with lots of sounds playing. This change
does not affect the actual volume level.
2021-04-06 19:31:14 +01:00
Peter Nelson 42fbdda9ab Change: Apply power-of-3 scaling to master effect volume to improve perceived loudness change. 2021-04-06 19:31:14 +01:00
Bernard Teo f0a24e98f5
Fix #8922: Show vehicle window for single vehicle in shared order grouping (#8926) 2021-04-06 19:30:35 +01:00
translators 2f5035d6dc Update: Translations from eints
korean: 1 change by telk5093
2021-04-06 17:53:34 +00:00
Didac Perez Parera ca783d447a
Feature: Button to reset game settings to their default values (#8958) 2021-04-06 12:47:44 +02:00
Didac Perez Parera 43c465e8f4
Change: Disable NewGRF window apply button if no change was made (#8934) 2021-04-05 22:24:03 +02:00
PeterN 130a052ed5
Fix: Apply master effect volume during mixing instead of sound start. (#8945)
This makes the volume control work as most players would expect, affecting
existing playing sounds as well as new sounds.
2021-04-05 12:18:59 +02:00
Michael Lutz 1cd3a3b070
Fix #8935: [OSX] Crash when clicking 'Save' due to wrongly-threaded OS call. (#8944) 2021-04-05 12:18:45 +02:00
translators 295d542911 Update: Translations from eints
spanish (mexican): 1 change by absay
vietnamese: 1 change by KhoiCanDev
estonian: 1 change by siimsoni
romanian: 3 changes by kneekoo
catalan: 1 change by perezdidac
portuguese: 1 change by azulcosta
2021-04-04 17:52:55 +00:00
Charles Pigott e8a94dc8bb Cleanup: Delete remaining Blob code 2021-04-04 08:01:54 +01:00
Charles Pigott e8022a589d Codechange: Replace CBlobT usage with std::vector 2021-04-04 08:01:54 +01:00
Charles Pigott f481c9fc2c Codechange: Replace CStrA with std::string 2021-04-04 08:01:54 +01:00
Milek7 33c5f984f5
Codechange: Use COINIT_MULTITHREADED in CoInitializeEx (#8938) 2021-04-04 07:40:56 +01:00
translators 5b1ea0ee38 Update: Translations from eints
swedish: 1 change by DonaldDuck313
norwegian (bokmal): 1 change by Anolitt
english (us): 1 change by 2TallTyler
chinese (simplified): 8 changes by RichardYan314
german: 1 change by danidoedel
romanian: 115 changes by kneekoo
finnish: 1 change by hpiirai
spanish: 2 changes by MontyMontana
polish: 3 changes by yazalo
2021-04-03 17:52:59 +00:00
translators ec0c159586 Update: Translations from eints
korean: 1 change by telk5093
indonesian: 25 changes by dimaspaf14
romanian: 23 changes by kneekoo
2021-04-02 17:53:17 +00:00
Didac Perez Parera e760c9fbec
Fix: adjust object and rail station selection window padding to be consistent (#8929)
consistent
2021-04-02 10:15:26 +02:00
Jonathan G Rennison 83ac5aa27a
Fix: Memory leak of airport tile layout in AirportChangeInfo (prop 0A) (#8928) 2021-04-02 10:13:53 +02:00
Tyler Trahan adb9fa3b36
Feature: Press ctrl to build diagonal rivers in Scenario Editor (#8880) 2021-04-02 10:13:27 +02:00
stormcone bde5396d11 Add: Hotkey to focus the build object class name filter editbox. 2021-04-02 10:12:47 +02:00
stormcone c56e9a546d Add: Hotkey to focus the rail station class name filter editbox. 2021-04-02 10:12:47 +02:00
milek7 295f34a9df Fix: Freeing LanguagePack with wrong size. 2021-04-02 10:12:25 +02:00
Charles Pigott dd798d688b
Fix #8919: Release builds with asserts enabled (#8925) 2021-04-01 23:57:49 +01:00
translators c5cb44e138 Update: Translations from eints
catalan: 1 change by J0anJosep
spanish: 3 changes by MontyMontana
2021-04-01 17:53:24 +00:00
Patric Stout 4d501655ad
Fix: building on Raspberry Pi failed because of const vs constexpr (#8924) 2021-04-01 19:39:55 +02:00
Patric Stout fece1c57ca
Codechange: Suppress warnings when asserts are disabled (#8917) 2021-04-01 11:16:19 +02:00
translators 9eb6c78a02 Update: Translations from eints
catalan: 2 changes by J0anJosep
2021-04-01 08:13:26 +00:00
Charles Pigott 591ea9862d
Codechange: Suppress warnings when asserts are disabled (#8916) 2021-04-01 10:03:12 +02:00
translators 088964a091 Update: Translations from eints
luxembourgish: 1 change by phreeze83
serbian: 59 changes by nkrs
2021-03-31 17:53:48 +00:00
Charles Pigott 086c95718d
Fix #8803: Only auto-remove signals when rail can be built (#8904) 2021-03-31 09:27:25 +01:00
translators 50cd6e135e Update: Translations from eints
english (us): 23 changes by 2TallTyler
luxembourgish: 63 changes by phreeze83
ukrainian: 72 changes by StepanIvasyn
catalan: 5 changes by J0anJosep
turkish: 5 changes by nullaf
2021-03-30 17:53:18 +00:00
Mike 49c89cb5f6
Fix #8565: Stopped road vehicle displays a speed different than 0 (#8901) 2021-03-30 19:42:12 +02:00
translators e23ccc95f5 Update: Translations from eints
english (us): 7 changes by HAJDog247
czech: 18 changes by PatrikSamuelTauchim
luxembourgish: 99 changes by phreeze83
serbian: 4 changes by nkrs
catalan: 20 changes by J0anJosep
french: 1 change by arikover
portuguese: 30 changes by azulcosta
2021-03-29 17:52:55 +00:00
translators a1230b932c Update: Translations from eints
swedish: 30 changes by kustridaren
spanish (mexican): 1 change by absay
japanese: 13 changes by Azusa257
vietnamese: 1 change by KhoiCanDev
estonian: 12 changes by siimsoni
czech: 6 changes by PatrikSamuelTauchim, 2 changes by tomas-vl
chinese (simplified): 88 changes by clzls
arabic (egypt): 16 changes by AviationGamerX
luxembourgish: 4 changes by phreeze83
korean: 34 changes by telk5093
italian: 16 changes by AlphaJack
german: 1 change by danidoedel, 1 change by Wuzzy2
slovak: 30 changes by FuryPapaya
catalan: 35 changes by J0anJosep
tamil: 16 changes by Aswn
dutch: 32 changes by Afoklala
portuguese (brazilian): 14 changes by Greavez, 5 changes by jpsl00
2021-03-28 17:53:11 +00:00
Charles Pigott 2d7b34bc68 Fix #8886: Don't try to resolve folders within tars named '.' 2021-03-28 09:52:15 +01:00
translators a36b286e04 Update: Translations from eints
norwegian (bokmal): 28 changes by Anolitt
spanish (mexican): 29 changes by absay
galician: 1 change by JohnBoyFan
vietnamese: 30 changes by KhoiCanDev
estonian: 31 changes by siimsoni
czech: 6 changes by tomas-vl
arabic (egypt): 73 changes by AviationGamerX
hungarian: 37 changes by pnpBrumi
german: 24 changes by danidoedel, 4 changes by matthiasradde, 2 changes by SecretIdetity
russian: 2 changes by SecretIdetity
finnish: 40 changes by lanurmi
catalan: 47 changes by J0anJosep
lithuanian: 30 changes by devbotas
spanish: 29 changes by JohnBoyFan
french: 30 changes by MalaGaM
portuguese (brazilian): 7 changes by jpsl00, 5 changes by Greavez
polish: 31 changes by Milek7
2021-03-27 18:46:44 +00:00
translators 76e92f6751 Update: Translations from eints 2021-03-26 18:46:58 +00:00
Patric Stout d0ed656fd1 Change: scale heightmaps we export to highest peak and inform the user of this value
Before this commit, it scaled to map-height-limit. Recently this
could also be set to "auto", meaning players don't really know
or care about this value.

This also means that if a player exported a heightmap and wanted
to import it again, looking like the exact same map, he did not
know what value for "highest peak" to use.
2021-03-26 12:22:32 +01:00
Patric Stout 13a5264438 Fix: store the recent new game_creation settings in savegames
This allows us to later on see what someone did, and makes sure
that "restart" command still knows how the game was created.
2021-03-26 12:22:32 +01:00
Patric Stout f05e2e0d40 Feature: allow setting a custom terrain type to define highest peak
At least, TGP will try to reach it. It heavily depends on the map
if it is reachable at all. But for sure it will do its atmost to
get there!
2021-03-26 12:22:32 +01:00
Patric Stout 45c2c29c35 Add: allow setting the highest mountain for heightmaps
It will add some slack to the map height limit if that was set
to auto.
2021-03-26 12:22:32 +01:00
Patric Stout 422e132845 Feature: auto-detect map height limit based on generated map
This opens up the true power of the TGP terrain generator, as it
is no longer constrainted by an arbitrary low map height limit,
especially for extreme terrain types.

In other words: on a 1kx1k map with "Alpinist" terrain type, the
map is now really hilly with default settings.

People can still manually limit the map height if they so wish,
and after the terrain generation the limit is stored in the
savegame as if the user set it.

Cheats still allow you to change this value.
2021-03-26 12:22:32 +01:00
Patric Stout 1a1049bc0d Change: rename setting "max_heightlevel" to "map_height_limit"
This better reflects what it is, and hopefully removes a bit of
the confusion people are having what this setting actually does.

Additionally, update the text on the setting to better inform
users what it is doing exactly, so they can make an educated
decision on how to change it.

Next commit will introduce an "auto" value, which should be the
new default. The rename has as added benefit that everyone will
start out on the "auto" value.
2021-03-26 12:22:32 +01:00
Patric Stout 23f27db8c3 Change: remove "maximum map height" from the New Game GUI
This setting influence the max heightlevel, and not as the name
suggests: the height of the generated map.

How ever you slice it, it is a very weird place to add this
setting, and it is better off being only in the settings menu.

Commits following this commit also make it more useful, so users
no longer have to care about it.
2021-03-26 12:22:32 +01:00
Patric Stout 70bc55cfd6 Feature: setting to indicate desert coverage for tropic climate
This is an indication value; the game tries to get as close as it
can, but due to the complex tropic rules, that is unlikely to be
exact.

In the end, it picks a height-level to base the desert/tropic
line on. This is strictly seen not needed, as we can convert any
tile to either. But it is the simplest way to get started with
this without redoing all related functions.
2021-03-26 12:22:32 +01:00
Patric Stout cafe4eed6e Feature: setting to indicate snow coverage for arctic climate (replaces snow line height)
Setting the snow coverage (in % of the map) makes a lot more sense
to the human, while still allowing the niche player to set (by
finding the correct %) a snow line height they like. This makes for
easier defaults, as it decoupled terrain height from amount of snow.

Maps can never be 100% snow, as we do not have sprites for coastal
tiles.

Internally, this calculates the best snow line height to approach
this coverage as close as possible.
2021-03-26 12:22:32 +01:00
Milek7 7a886cb4d4 Change: Do not disallow persistent buffer mapping on AMD GPUs, as it is actually faster. 2021-03-25 19:37:24 +00:00
translators bcaa367b68 Update: Translations from eints
chinese (traditional): 25 changes by SiderealArt
japanese: 81 changes by taku315
2021-03-25 18:47:34 +00:00
Koen Bussemaker 59bfed65a1 Fix #8875: Filter string in station window breaks flow in user interface 2021-03-25 16:19:18 +00:00
Patric Stout 751434ea63
Fix: placing random trees in SE crashes the game (#8892)
This used to work by accident: originally the code checked if
GenerateWorld was threaded. If not, it would abort the function.
This worked for placing trees, because it was also returning false
when it was not active.

With the recent changes, that check got removed, and this crash
started to happen. So now check if we have a modal window, which
is a very solid indication we are generating the world.
2021-03-25 11:57:28 +01:00
translators 0c4443667d Update: Translations from eints
slovak: 6 changes by FuryPapaya
2021-03-24 18:40:00 +00:00
translators 3b3412d561 Update: Translations from eints
arabic (egypt): 22 changes by AviationGamerX
2021-03-23 18:08:07 +00:00
translators f9d24ff45e Update: Translations from eints
slovak: 10 changes by FuryPapaya
2021-03-22 18:54:16 +00:00
translators ae65ceb1a7 Update: Translations from eints
chinese (simplified): 2 changes by clzls
korean: 2 changes by telk5093
slovak: 9 changes by FuryPapaya
catalan: 4 changes by J0anJosep
polish: 4 changes by pAter-exe
2021-03-22 18:07:50 +00:00
Michael Lutz df958dc907 Fix f0f96e31: [OpenGL] Broken window resizing due to invalid buffer pitch on texture creation. 2021-03-21 22:26:55 +01:00
translators 545ca3d014 Update: Translations from eints
vietnamese: 118 changes by KhoiCanDev
slovak: 13 changes by FuryPapaya
2021-03-21 18:10:20 +00:00
frosch 0230624359
Fix f0f96e31: [OpenGL] warning: comparison of integer expressions of different signedness. (#8881) 2021-03-21 18:38:51 +01:00
Michael Lutz f0f96e3103
Fix #8871: [OpenGL] Initialize all buffers after resize and clear back buffer. (#8877) 2021-03-20 19:43:54 +01:00
translators c92358527b Update: Translations from eints
ukrainian: 1 change by StepanIvasyn
2021-03-20 18:06:09 +00:00
dP d8dfa1613f Fix: Recompute road/railtype availability after disabling the engine 2021-03-20 17:55:23 +00:00
Peter Nelson b43cc21214 Fix: OSK layout not scaled for 2x or 4x GUI scale. 2021-03-20 17:55:17 +00:00
translators 1893aef649 Update: Translations from eints
spanish (mexican): 8 changes by absay
ukrainian: 13 changes by StepanIvasyn
dutch: 3 changes by Afoklala
lithuanian: 1 change by devbotas
2021-03-19 18:06:01 +00:00
translators 379b6b45e0 Update: Translations from eints
ukrainian: 10 changes by StepanIvasyn
portuguese: 78 changes by azulcosta
2021-03-18 19:03:56 +00:00
translators 8ad75e4798 Update: Translations from eints
swedish: 1 change by kustridaren
estonian: 1 change by siimsoni
russian: 5 changes by Ln-Wolf, 3 changes by SecretIdetity
ukrainian: 7 changes by StepanIvasyn
lithuanian: 31 changes by devbotas
portuguese: 54 changes by azulcosta
2021-03-17 19:03:35 +00:00
translators 8b16cbaf6f Update: Translations from eints
estonian: 2 changes by siimsoni
2021-03-16 19:14:32 +00:00
translators 9782268e17 Update: Translations from eints
swedish: 10 changes by kustridaren
norwegian (bokmal): 3 changes by buzzCraft
czech: 39 changes by PatrikSamuelTauchim
ukrainian: 4 changes by StepanIvasyn
2021-03-16 19:02:11 +00:00
translators 5c73f93361 Update: Translations from eints
english (us): 8 changes by 2TallTyler
estonian: 16 changes by siimsoni
korean: 5 changes by telk5093
italian: 32 changes by AlphaJack
german: 5 changes by Wuzzy2
danish: 15 changes by achton
lithuanian: 89 changes by devbotas
spanish: 3 changes by MontyMontana
french: 8 changes by arikover
portuguese (brazilian): 3 changes by Greavez
polish: 17 changes by yazalo, 2 changes by pAter-exe
2021-03-15 18:07:52 +00:00
Patric Stout 9bfa7198fd
Change: Heading for 1.12 now (#8862) 2021-03-14 20:47:31 +01:00
Patric Stout 74c98db1b6
Fix 217071aa: spanish translation contains an invalid character (#8863) 2021-03-14 20:26:48 +01:00
translators 217071aa1d Update: Translations from eints
norwegian (bokmal): 5 changes by Anolitt
estonian: 13 changes by siimsoni
korean: 5 changes by telk5093
italian: 1 change by AlphaJack
german: 5 changes by danidoedel
ukrainian: 15 changes by StepanIvasyn
catalan: 5 changes by J0anJosep
dutch: 5 changes by Afoklala
lithuanian: 82 changes by devbotas
spanish: 255 changes by MontyMontana
portuguese (brazilian): 5 changes by Greavez
2021-03-14 19:01:42 +00:00
Tyler Trahan 41baf8778b
Doc: Clarify comment that SND_05_TRAIN_THROUGH_TUNNEL is only for steam engines (#8858) 2021-03-14 11:16:14 +01:00
Patric Stout c25847787e Codechange: we are not booing straps .. we are bootstrapping 2021-03-14 11:04:14 +01:00
Patric Stout 4fe222d853 Fix: errors during bootstrap could still show up after bootstrap
For example, if you have a config that defines OpenGFX as baseset
but for some reason you have no basesets anymore. In that case
bootstrap downloads OpenGFX for you, but it will still show the
error that "OpenGFX was not found" after the bootstrap. This was
an error generated before the bootstrapped kicked in.

Simply muting all errors during bootstrap solves this; as we cannot
show them anyway, this is fine. Any errors that remain after
bootstrap will be generated again anyway.
2021-03-14 11:04:14 +01:00
Patric Stout 22a9d921ef Fix: if bootstrap failed, it could end with an empty screen instead of error
There are various of ways bootstrap can fail:
- Failing network connection
- Incomplete download
- No write permissions
- Disk full
- (others I forgot)

They all result in a screen with no windows. To ensure we at least
always show something when anything bad happens, if the bootstrap
is not successful, show a screen what the next step for the human
should be.
2021-03-14 11:04:14 +01:00
Michael Lutz 13011e00c6 Fix #8860: [Win32] Crashlog window wasn't reliably shown for crashes not on the main thread. 2021-03-13 22:09:05 +01:00
translators 062eeb9810 Update: Translations from eints
english (us): 7 changes by 2TallTyler
estonian: 17 changes by siimsoni
hungarian: 100 changes by pnpBrumi
ukrainian: 8 changes by StepanIvasyn
dutch: 24 changes by Afoklala
spanish: 338 changes by MontyMontana
french: 29 changes by MalaGaM
portuguese (brazilian): 1 change by Greavez
2021-03-13 19:03:00 +00:00
Patric Stout 5056e963ba Fix #8851: don't allow infinite "exec" depth in script, but limit to 10 deep
This means if you execute a script from a script from a script, ..
for more than 10 times, it bails out now. This should be sufficient
for even the most complex scripts.
2021-03-13 10:01:05 +01:00
Patric Stout 8230cd009d Fix: calling "exec" from script never returned
Example:

exec other.script
echo hello

The "echo" was never executed.
2021-03-13 10:01:05 +01:00
Matt Kimber bcb3313e13
Feature: allow setting maximum zoom level at which sprites are drawn (#8604) 2021-03-13 10:00:53 +01:00
Didac Perez Parera e708fb38da
Feature: allow filtering on name in rail station window (#8706) 2021-03-13 10:00:36 +01:00
stormcone 9c5a7d3a57 Fix #8733: Can't buy train engine when the "Engines only" filter is active 2021-03-11 21:35:10 +00:00
translators 3cb2dd4889 Update: Translations from eints
swedish: 22 changes by kustridaren
ukrainian: 4 changes by StepanIvasyn
lithuanian: 7 changes by devbotas
spanish: 312 changes by MontyMontana
2021-03-11 18:08:46 +00:00
Tyler Trahan de891238d6
Change: Recolour graph windows to brown (#8700) 2021-03-11 15:30:29 +01:00
frosch f580ab4ba4 Fix #8647: draw tram catenary using 4 bounding boxes.
The back sprite is now supposed to contain west, north and east pillars.
The front sprite is supposed to contain the south pillar and the wires.
2021-03-11 00:21:09 +01:00
frosch 28589db664 Fix: front/back sprites of action5 tram catenary were swapped. 2021-03-11 00:21:09 +01:00
Jonathan G Rennison c0b722ec46 Codechange: Add fast path to catenary drawing in MaskWireBits
MaskWireBits always returns its input unchanged if the input
has only 0 or 1 track bits set.
Having only 0 or 1 track bits sets (i.e. non junction tiles)
is by far the most common case.
Examining the state of neighbouring tiles and the subsequent
masking logic is relatively expensive and can be omitted in this case.
2021-03-10 23:28:10 +01:00
translators 1fb1e75038 Update: Translations from eints
norwegian (bokmal): 26 changes by Anolitt
spanish (mexican): 25 changes by absay
japanese: 11 changes by Azusa257
korean: 7 changes by telk5093
german: 7 changes by danidoedel
russian: 63 changes by Ln-Wolf
finnish: 7 changes by hpiirai
ukrainian: 5 changes by StepanIvasyn
catalan: 7 changes by J0anJosep
spanish: 7 changes by MontyMontana
portuguese (brazilian): 12 changes by Greavez
2021-03-10 18:08:46 +00:00
Patric Stout 4866e43862
Codechange: rework codeflow introduced in 098d5b22 (#8837)
It didn't sit well to me, how I wrote the commit initially. First
casting a variable into another, only to write it back into the
originally feels wrong.

This flow makes a bit more sense to me.
2021-03-10 13:57:52 +01:00
Patric Stout 14b61bfa6f Fix #8833: don't reload NewGRFs when we are shutting down
Otherwise that might cause calls to the video-driver, which are
already shut down by now. This causes, depending on the video-driver
crashes or weird effects.
2021-03-10 13:41:18 +01:00
Patric Stout afadae6d50 Fix: abort world generation on exiting the game as soon as possible
This prevents the window from "freezing" when you close it during
world generation, as it first would continue the action.
2021-03-10 13:41:18 +01:00
Patric Stout 5426cb3baf Fix: abort GRFFileScanner on exiting the game as soon as possible
This prevents the window from "freezing" when you close it during
the scanning of NewGRFs, as it first would continue the action.
2021-03-10 13:41:18 +01:00
Patric Stout b349ef6e71 Fix: don't update framerates when a modal window is open
Otherwise the numbers are all over the place when a modal window
just closed.
2021-03-10 13:41:18 +01:00
Patric Stout 970fedd78c Add: make modal windows update more smooth
Basically, modal windows had their own thread-locking for what
drawing was possible. This is a bit nonsense now we have a
game-thread. And it makes much more sense to do things like
NewGRFScan and GenerateWorld in the game-thread, and not in a
thread next to the game-thread.

This commit changes that: it removes the threads for NewGRFScan
and GenerateWorld, and just runs the code in the game-thread.
On regular intervals it allows the draw-thread to do a tick,
which gives a much smoother look and feel.

It does slow down NewGRFScan and GenerateWorld ever so slightly
as it spends more time on drawing. But the slowdown is not
measureable on my machines (with 700+ NewGRFs / 4kx4k map and
a Debug build).

Running without a game-thread means NewGRFScan and GenerateWorld
are now blocking.
2021-03-10 13:41:18 +01:00
Patric Stout 098d5b2239
Fix #8711: having gui_zoom lower than zoom_min causes crashes (#8835)
gui_zoom was never clamp'd between zoom_min/zoom_max.

zoom_min controls how zoomed-in we load sprites. For a value of 1,
no quad-sizes sprites are loaded. If gui_zoom would be 0, meaning
it wants quad-sized sprites to display, it was printing random
stuff to the screen, which could or could not result in crashes.
2021-03-10 13:39:03 +01:00
sean 160a5f2fdd
Codechange: Misleading function name for selecting refresh rate (#8836)
Co-authored-by: pnda <43609023+ThePNDA@users.noreply.github.com>
2021-03-10 12:37:35 +00:00
Patric Stout 47e11fa3f2
Codechange: only run InteractiveRandom() from the draw-thread (#8831)
Otherwise both the draw-thread and game-thread can do it both
at the same time, which gives rather unwanted side-effects.

Calling it from the draw-thread alone is sufficient, as we just
want to create some unpredictable randomness for the player. The
draw-thread is a lot more active (normally) than the game-thread,
so it is the best place of the two to do this.
Additionally, InteractiveRandom() mostly has to do with visuals
that are client-side-only, so more related to drawing than to
game.
2021-03-09 20:30:37 +01:00
Patric Stout 68e92d215a
Fix #8810: "aircraft out of fuel" news was looking in the wrong place (#8832)
v->tile for aircrafts is always zero when in the air. Only when
it starts its landing (or take-off) patterns it becomes a sane
value.
So instead, base the news on the last x/y coordinates of the plane.
2021-03-09 20:29:22 +01:00
translators 65f558d6df Update: Translations from eints
english (us): 18 changes by 2TallTyler
korean: 17 changes by telk5093
german: 13 changes by danidoedel, 4 changes by Wuzzy2
finnish: 17 changes by hpiirai
catalan: 17 changes by J0anJosep
lithuanian: 33 changes by devbotas
spanish: 17 changes by MontyMontana
portuguese (brazilian): 20 changes by Greavez
polish: 9 changes by yazalo
2021-03-09 18:22:28 +00:00
Patric Stout b21ba566ae
Codechange: remove special strings for language and resolutions (#8824)
As OpenTTD grew, we found other ways to do this, and we are no
longer in need for a hack like this.
2021-03-09 10:58:33 +01:00
PeterN 9fdc881005
Fix: Scale PIP-padding the same as regular padding. (#8829) 2021-03-09 10:43:04 +01:00
sean 0464a50ab8
Add: Display refresh rate game option (#8813) 2021-03-09 10:22:52 +01:00
Michael Lutz 436cdf1fc8 Fix #8825: [OpenGL] Don't clear cursor cache from the game loop thread. 2021-03-08 21:35:35 +01:00
translators ee69a0dc29 Update: Translations from eints
lithuanian: 5 changes by devbotas
portuguese (brazilian): 8 changes by Greavez
2021-03-08 19:03:59 +00:00
Patric Stout 8946b41d20 Fix: ensure switching blitter happens in the main thread
This because video-drivers might need to make changes to their
context, which for most video-drivers has to be done in the same
thread as the window was created; main thread in our case.
2021-03-08 19:18:55 +01:00
Patric Stout e56d2c63c3 Add: [Video] move GameLoop into its own thread
This allows drawing to happen while the GameLoop is doing an
iteration too.

Sadly, not much drawing currently can be done while the GameLoop
is running, as for example PollEvent() or UpdateWindows() can
influence the game-state. As such, they first need to acquire a
lock on the game-state before they can be called.

Currently, the main advantage is the time spend in Paint(), which
for non-OpenGL drivers can be a few milliseconds. For OpenGL this
is more like 0.05 milliseconds; in these instances this change
doesn't add any benefits for now.

This is an alternative to the former "draw-thread", which moved
the drawing in a thread for some OSes. It has similar performance
gain as this does, although this implementation allows for more
finer control over what suffers when the GameLoop takes too
long: drawing or the next GameLoop. For now they both suffer
equally.
2021-03-08 19:18:55 +01:00
Michael Lutz 3a4a15cc93 Codechange: don't set the window position when changing blitter
There really is no need to make an extra call to the OS in
these cases.
2021-03-08 19:18:55 +01:00
Patric Stout b9eac7c6dc Codechange: remove the unused lock around Blitter 2021-03-08 19:18:55 +01:00
Patric Stout 4610aa7ae3 Remove: [Video] no longer draw in a thread
Drawing in a thread is a bit odd, and often leads to surprising
issues. For example, OpenGL would only allow it if you move the
full context to the thread. Which is not always easily done on
all OSes.
In general, the advise is to handle system events and drawing
from the main thread, and do everything else in other threads.
So, let's be more like other games.

Additionally, putting the drawing routine in a thread was only
done for a few targets.

Upcoming commit will move the GameLoop in a thread, which will
work for all targets.
2021-03-08 19:18:55 +01:00
dP 56911a86ea Add: Buttons to open global goals from company goals and vice versa 2021-03-08 18:18:47 +00:00
dP 818bee3961 Change: Don't show global goals in company goal windows 2021-03-08 18:18:47 +00:00
Didac Perez Parera 3878c4781e
Fix #8817: keep NewGRF order for object class sorting (#8818) 2021-03-08 17:00:43 +01:00
Patric Stout 04db99749b
Fix #8784: using alt+enter didn't update the fullscreen toggle visibly (#8820)
Basically, the window was not invalidated, so it was never redrawn.
This made it look like it wasn't working, but it really was.
2021-03-08 16:57:59 +01:00
Eddi-z d3179709b1
Change: Clarify what effect town interactions have (#8744) 2021-03-08 15:44:33 +01:00
Michael Lutz 25656a10cb Fix #8808: [OSX, OpenGL] Crash on switching blitters due to double-mapping the video buffer. 2021-03-08 15:43:22 +01:00
Michael Lutz ae1f7bd695
Fix 937d60f2: Broken company colours for 40bpp-blitter. (#8821) 2021-03-08 15:43:08 +01:00
Patric Stout b93d7dd3cb
Add: Option to (dis-)allow accelerated video drivers. (#8819)
The video drivers using the OpenGL backend are currently our only
accelerated drivers. The options defaults to off for macOS builds and
to on everywhere else.

Co-authored-by: Michael Lutz <michi@icosahedron.de>
2021-03-08 15:42:39 +01:00
Didac Perez Parera 6e2a96c133
Add: filter for "engines only" in build train window (#8733) 2021-03-08 12:03:11 +01:00
translators f70aa8fabe Update: Translations from eints
estonian: 6 changes by siimsoni
catalan: 3 changes by J0anJosep
latvian: 37 changes by lexuslatvia
portuguese (brazilian): 8 changes by Greavez
polish: 1 change by azabost
2021-03-07 19:02:12 +00:00
Jonathan G Rennison 25909b06d2 Fix #8809: Crash when removing airport when hangar window open 2021-03-07 17:59:38 +00:00
translators 2860de7bf4 Update: Translations from eints
chinese (traditional): 5 changes by benny30111
estonian: 1 change by siimsoni
italian: 1 change by AlphaJack
ukrainian: 4 changes by StepanIvasyn
tamil: 37 changes by Aswn
portuguese (brazilian): 19 changes by Greavez
2021-03-06 19:01:58 +00:00
translators f536fd55d8 Update: Translations from eints
swedish: 1 change by kustridaren
spanish (mexican): 4 changes by absay
estonian: 80 changes by siimsoni
arabic (egypt): 13 changes by AviationGamerX
ukrainian: 1 change by StepanIvasyn
dutch: 1 change by Afoklala
portuguese (brazilian): 15 changes by Greavez
2021-03-05 19:02:54 +00:00
Patric Stout 06a3c0cb26 Fix dddf885f: use IConsoleError to produce console errors 2021-03-04 22:23:05 +01:00
Patric Stout 8c6b5e52fd Add: allow making heightmap screenshot via console 2021-03-04 22:23:05 +01:00
Patric Stout ac5e77ea3b Feature: allow custom width/height of screenshot via console
Reworked how the screenshot command works while keeping it backwards
compatible. It can now more freely understand arguments, and has
the ability to make SC_DEFAULTZOOM screenshots.
2021-03-04 22:23:05 +01:00
translators 879eb9c348 Update: Translations from eints
estonian: 22 changes by siimsoni
korean: 1 change by telk5093
serbian: 41 changes by nkrs
german: 1 change by Wuzzy2
romanian: 14 changes by ALEX11BR
russian: 5 changes by Ln-Wolf
finnish: 5 changes by hpiirai
ukrainian: 2 changes by StepanIvasyn
lithuanian: 105 changes by devbotas
spanish: 3 changes by MontyMontana
french: 5 changes by MalaGaM
portuguese (brazilian): 13 changes by Greavez
2021-03-04 19:00:02 +00:00
Patric Stout 0243ae4654
Fix #8799: NGameAllowedSorter() is not imposing strict weak ordering relation (#8801)
In other words, it should only (!) return true if A comes for B.
This promise was broken for the situation where two values are
identical. It would return true in these cases too. This is of
course not possible: if two values are identical, neither come
before the other. As such, the sorter was not imposing strict
weak ordering relations.

libstdc++ handled this scenario just fine, but libc++ crashes
badly on this, as it allowed comparing of [begin, end] instead
of [begin, end).
libc++ considered this not a bug (and by specs, they are correct;
just this way of crashing is of course a bit harsh):
https://bugs.llvm.org/show_bug.cgi?id=47903
2021-03-03 12:12:29 +00:00
Michael Lutz 937d60f239
Fix #8774: Black screenshots when using 40bpp-blitter. (#8791)
This affected all screenshot types that render to an off-screen
buffer and don't copy the actual screen contents.
2021-03-02 20:55:39 +01:00
translators 95462493ef Update: Translations from eints
english (us): 4 changes by 2TallTyler
italian: 4 changes by troccoli
serbian: 251 changes by nkrs
german: 6 changes by ebla71, 2 changes by Wuzzy2
romanian: 3 changes by ALEX11BR
russian: 11 changes by Ln-Wolf
ukrainian: 2 changes by StepanIvasyn
lithuanian: 15 changes by devbotas
spanish: 2 changes by perezdidac
2021-03-02 18:56:54 +00:00
Michael Lutz c656633bea Fix #8775: [Win32] Don't create the main window when alt-tabbing back into fullscreen. 2021-03-01 23:41:39 +01:00
Michael Lutz b7a44983b4 Fix: [Win32] Original window size was lost when tabbing in and out of fullscreen. 2021-03-01 23:41:39 +01:00
Patric Stout 74aa934441 Codechange: validate that "max" value of settings fit in their storage
This is an easy mistake to make, so protect us against making such
mistakes, by validating it doesn't happen.
2021-03-01 23:17:47 +01:00
Patric Stout d7a70c67ba Fix: old snow_line_height had a higher maximum value than could be stored
So any old game made with this setting was overflowing anyway;
not really a lot we can do about that now.
2021-03-01 23:17:47 +01:00
Patric Stout a0c298a539 Fix: three max-values for settings could exceed their storage size 2021-03-01 23:17:47 +01:00
Patric Stout abac4b1758
Fix c4df0f95: bootstrap was only showing a black screen (#8788)
The bootstrap has the _switch_mode to SM_MENU, and never leaves
this mode. Neither is it considered a modal window (while in some
sense it really is). So .. we need to add another "draw anyway"
exception, to make sure bootstrap is being drawn.
2021-03-01 23:17:30 +01:00
Limyx826 47e899cf75 Add: Malaysia Ringgit as Currency
Cause why not

*Update the formating
2021-03-01 21:56:26 +00:00
Charles Pigott 64686b53ff Change: Zero out the gameloop timers when the game is paused 2021-03-01 21:55:51 +00:00
Charles Pigott ef5cea0e06 Change: De-limit framerate window's framerate 2021-03-01 21:55:51 +00:00
Owen Rudge 838fd61f29 Fix: [OSX] Hide dock when entering fullscreen 2021-03-01 21:03:18 +00:00
translators 02e7bc7e0a Update: Translations from eints
swedish: 4 changes by kustridaren
norwegian (bokmal): 3 changes by buzzCraft
spanish (mexican): 12 changes by absay
korean: 4 changes by telk5093
greek: 85 changes by sntovas
german: 4 changes by MagnumSociety
catalan: 5 changes by J0anJosep
tamil: 16 changes by Ramesh78dev
dutch: 4 changes by rcpaul
polish: 5 changes by pAter-exe
2021-03-01 19:01:41 +00:00
Patric Stout 40505e645a Fix: terraform limit acted random when maxing out per_64k_frames setting
uint32 + uint32 can overflow, so cast it to uint64 first.
2021-03-01 16:35:16 +01:00
Patric Stout 25e5a92286 Fix 9b800a96: (a << 16) is unsigned, so don't remove the cast 2021-03-01 16:35:16 +01:00
Patric Stout 8bc0089fc4
Fix c3dc27e3: put the max-value of fast-forward-speed-limit to within the storage size (#8769) 2021-02-28 21:53:14 +01:00
translators 2545b24118 Update: Translations from eints
czech: 1 change by LubosKolouch
2021-02-28 19:00:53 +00:00
Patric Stout c3dc27e37e Add: settings to limit your fast-forward game speed
By default this setting is set to 2500% normal game speed.
2021-02-28 18:04:51 +00:00
dP 73fd634209 Fix #6266: Ugly lists in network lobby windows on double/quad interface sizes with custom fonts 2021-02-28 17:43:30 +00:00
Patric Stout 2d9062bfc1 Fix: [Network] don't desync if client leaves before you finish downloading map
When you are downloading a map, all the commands are queued up
for you. Clients joining/leaving is done by the network protocol,
and as such are processed immediately. This means that by the
time you are processing the commands, a client that triggered
it, might already have left.

So, all commands that do something with ClientID, shouldn't
error on an invalid ClientID when DC_EXEC is set, but
gracefully handle the command anyway, to make sure the
game-state is kept in sync with all the clients that did
execute the DoCommand while the now-gone client was still
there.

Additionally, in the small chance a client disconnects between
the server validating a DoCommand and the command being
executed, also just process the command as if the client was
still there. Otherwise, lag or latency can cause clients that
did not receive the disconnect yet to desync.
2021-02-28 12:27:04 +01:00
Patric Stout 13889b6554 Fix: [Network] don't show "server doesn't respond" while in queue
Send all clients in the queue every game-day a packet that they
are still in the queue.
2021-02-28 12:27:04 +01:00
Patric Stout 8d199b1bbc Fix: [Network] send map to next client if current client disconnects
Also terminate creating of the savegame, as the client is gone,
there really is no need for that anymore.
2021-02-28 12:27:04 +01:00
Patric Stout 3677418225 Fix: [Network] also count the person downloading the map in the queue
Strictly seen, there are "N" people -waiting- in front of you
in the queue, but it is nicer to show "N + 1" for the person that
is currently downloading the map. Avoids it showing:
"0 clients in front of you". That just feels a bit off.
2021-02-28 12:27:04 +01:00
Charles Pigott 6b8f9b50b9 Fix: Vehicle list windows did not update when this year's profit changed
Remove caching from vehicle group object. and recalculate it whenever
required instead.
2021-02-28 11:24:09 +00:00
Michael Lutz d79398a1d5 Fix #8763: [OpenGL] Cursor sprite origin can be negative. 2021-02-28 11:12:13 +01:00
Pavel Stupnikov 4fd2eecb8b
Change: Improve console warnings on invalid network commands (#8753) 2021-02-27 20:26:51 +01:00
translators cd756e6f01 Update: Translations from eints
swedish: 60 changes by kustridaren
norwegian (bokmal): 12 changes by buzzCraft
czech: 82 changes by PatrikSamuelTauchim, 1 change by tomas-vl
italian: 86 changes by AlphaJack, 9 changes by federico1564S
german: 16 changes by ebla71
romanian: 10 changes by ALEX11BR
ukrainian: 3 changes by StepanIvasyn
spanish: 1 change by MontyMontana
2021-02-27 19:01:06 +00:00
Michael Lutz 77854d561b Fix: [OpenGL] Don't use OpenGL on MESA software renderers.
Performance in this case is worse than not using OpenGL, so just let
OTTD fall back to a different video driver.
2021-02-27 19:01:34 +01:00
Patric Stout 1b5d1d074e
Fix: [SDL2] set GL attributes to get the best GL context possible (#8759) 2021-02-27 18:51:20 +01:00
frosch dfa141818b Fix: OpenGL cursor did not consider sprite offsets of cursor sprites. 2021-02-27 14:52:11 +01:00
frosch d236c57600 Fix: yet another place where the vehicle-cursor did not account for the interface zoom level. 2021-02-27 14:52:11 +01:00
Michael Lutz ef4cec9382 Fix #8750: [OpenGL] Line drawing did not set proper RGB/mask colours. 2021-02-27 13:09:38 +01:00
Patric Stout fe451b8dc7 Codechange: remove _realtime_tick variable 2021-02-27 00:36:14 +01:00
Patric Stout 853bfc3562 Codechange: replace _realtime_tick with std::chrono for mouse events 2021-02-27 00:36:14 +01:00
Patric Stout 53c28a8ec9 Codechange: [Network] replace _realtime_tick with std::chrono 2021-02-27 00:36:14 +01:00
Patric Stout d068d61f3c
Fix bddfcaef: don't tell twice that a client left because of a timeout etc (#8746)
SendError() notifies all clients of the disconnect. This calls
CloseConnection() at the end, which also notified the clients
of the disconnect. Really no need to do it twice.

The status NETWORK_RECV_STATUS_SERVER_ERROR is only set by
SendError(), so in case that is the status, don't let
ClientConnection() send another notification.
2021-02-27 00:32:51 +01:00
translators af326753a9 Update: Translations from eints
swedish: 1 change by kustridaren
english (us): 15 changes by 2TallTyler
catalan: 1 change by J0anJosep
dutch: 1 change by Afoklala
2021-02-26 19:01:33 +00:00
Michael Lutz 3cbbaa62db Change: Never auto-select an 8bpp blitter unless explicitly allowed by the 'support8bpp' setting. 2021-02-26 19:26:52 +01:00
Patric Stout 9a3dbf3122
Fix 02e770ff: allow estimating CloneVehicle if short on money (#8748)
CheckCompanyHasMoney() was also executed when not using DC_EXEC,
resulting in an error about shortage of money instead of the
estimation.
This mostly is a problem for AI players, as they will have no
way to know how much it would have cost.
2021-02-26 16:22:58 +01:00
Patric Stout d4583fa64c
Fix #8123: trams on half-tiles couldn't find depots (#8738)
Basically, follow_track.hpp contains a fix for half-tiles, but
this wasn't duplicated for when trying to find a depot and in
a few other places. This makes sure all places act the same.
2021-02-25 22:46:46 +01:00
translators 9209807d66 Update: Translations from eints
swedish: 19 changes by kustridaren
german: 1 change by Wuzzy2
slovak: 3 changes by FuryPapaya
2021-02-25 19:01:49 +00:00
Michael Lutz 311df31fb1 Codechange: [OpenGL] Load all OpenGL functions dynamically. 2021-02-25 00:34:49 +01:00
Michael Lutz a0c1a3f736 Codechange: [OpenGL] Simplify loading OpenGL extension functions. 2021-02-25 00:34:49 +01:00
Michael Lutz e1e8cc3851
Fix #8734: [OpenGL] Apply palette remap to cursor sprites. (#8742) 2021-02-24 22:10:25 +01:00
Patric Stout 6a8c461e38 Codechange: [OSX] GameLoop is really more like MainLoop
MainLoop() is used to bootstrap OSX, where later a callback is
done to GameLoop() to execute OpenTTD. All other video drivers
don't need that, so what is in GameLoop is in MainLoop for all
other drivers. This is rather confusing. So, instead, name
GameLoop MainLoopReal to be more in sync with the other drivers.
2021-02-24 21:58:47 +01:00
Patric Stout 67d3c6aa71 Codechange: [Video] move InteractiveRandom() to the VideoDriver 2021-02-24 21:58:47 +01:00
Patric Stout c409f45ddd Codechange: [Video] make the prototype of PollEvent() the same for all drivers
Additionally, call it from the draw-tick.
2021-02-24 21:58:47 +01:00
Tyler Trahan 8476f12432
Change: Improve graph period markings (#8732) 2021-02-24 09:18:15 +01:00
frosch 79c2b81ffd Fix: vehicle-cursor size-limit did not account for the interface zoom level. 2021-02-24 08:00:42 +00:00
Michael Lutz 46e13313e4 Fix #8731: Always use a 32bpp blitter if font anti-aliasing is enabled. 2021-02-23 22:15:03 +01:00
translators c93c9c099e Update: Translations from eints
estonian: 7 changes by siimsoni
polish: 2 changes by yazalo
2021-02-23 18:59:47 +00:00
Niels Martin Hansen cc465efa67 Change: [Win32] Use more modern way of getting free disk space 2021-02-23 11:25:39 +01:00
Niels Martin Hansen b427ddce88 Codechange: Switch to explicit wide strings 2021-02-23 11:25:39 +01:00
Niels Martin Hansen beeb9e0a1b Remove: [Win32] Last pretenses of being able to build for Windows 95 2021-02-23 11:25:39 +01:00
Michael Lutz 06ca147a82 Fix 8706c36f: Change RELEASE code, too. 2021-02-22 23:16:46 +01:00
Michael Lutz 7af1fd3ffb Add: [OSX] OpenGL video driver. 2021-02-22 22:16:07 +01:00
Michael Lutz b4a3bc1ffe Codechange: [OpenGL] Separate context state setup from general init. 2021-02-22 22:16:07 +01:00
Michael Lutz 7f55f0a264 Codechange: [OSX] Add support for (un)locking the video buffer. 2021-02-22 22:16:07 +01:00
Michael Lutz 2f25e9bdf8 Codechange: [OSX] Separate video driver into a base and a Quartz implementation. 2021-02-22 22:16:07 +01:00
Michael Lutz 421b599541 Codechange: [SDL2] Split driver in base-part and default backend 2021-02-22 22:16:07 +01:00