Commit Graph

50695 Commits

Author SHA1 Message Date
Jonathan G Rennison
d6b5d6778e Fix train overshot station advice message being shown to all companies 2021-03-14 20:41:17 +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
Jonathan G Rennison
3f4333bcc8 Add setting to enable non-admin multiplayer clients to rename towns 2021-03-14 16:44:15 +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
Jonathan G Rennison
3e6b06f7b0 CPack: Change debian package name, mark as conflicting with openttd 2021-03-13 12:00:40 +00:00
Jonathan G Rennison
264b1ac370 CPack: Change various package fields to JGRPP values 2021-03-13 12:00:18 +00:00
Jonathan G Rennison
bb3ee135d8 CPack: Remove jgrpp- prefix from DEB version 2021-03-13 11:49:37 +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
Jonathan G Rennison
883e19f2c6 Windows: Fix wrong stack pointer for crash log window on non-main thread 2021-03-12 17:41:47 +00:00
Jonathan G Rennison
f53697ce76 Windows: Call SetThreadStackGuarantee for all threads, not just main thread 2021-03-12 17:30:40 +00:00
Jonathan G Rennison
909e343f40
Merge pull request #223 from telk5093/jgrpp
Update: Korean translation for v0.40.4
2021-03-11 22:22:03 +00: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
Jonathan G Rennison
4361a6dbf4 Avoid undefined behaviour const_casting std::string c_str()
Use non-const data() instead

See: #224
2021-03-11 01:33:06 +00: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
glx22
35a228f78f Add: [CMake] Install menu and media files 2021-03-09 22:42:25 +01:00
glx22
b5770acd50 Codechange: [CMake] Add checks for baseset script parameters 2021-03-09 22:42:25 +01: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
Patric Stout
64a8c38d2f
Fix: [Actions] update environment variable for AWS region (#8827) 2021-03-08 23:31:45 +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