Patric Stout
648ee88a02
Codechange: merge guiflags and flags in settings .ini files
...
It was rather confusing which one was for what, especially as some
SaveLoad flags were settings-only. Clean up this mess a bit by
having only Setting flags.
2021-06-06 21:45:01 +02:00
Patric Stout
264991dfa5
Codechange: move SLF_NO_NETWORK_SYNC into settings
...
It is a settings-only flag, so don't pollute SaveLoad code with it.
2021-06-06 21:45:01 +02:00
Patric Stout
414e12d26b
Codechange: move SLF_NOT_IN_SAVE into settings
...
It is a settings-only flag, so don't pollute SaveLoad code with it.
2021-06-06 21:45:01 +02:00
translators
d835a42c05
Update: Translations from eints
...
english (us): 1 change by 2TallTyler
catalan: 5 changes by J0anJosep
2021-06-06 19:37:57 +00:00
glx22
c27afdf3f6
Codechange: Remove FOR_ALL_CHUNK_HANDLERS
...
Co-Authored-By: Patric Stout <truebrain@openttd.org >
2021-06-06 19:35:06 +02:00
translators
3559e55b91
Update: Translations from eints
...
spanish (mexican): 1 change by absay
latvian: 2 changes by osprinkis
2021-06-05 19:36:47 +00:00
translators
ea23a9cdb6
Update: Translations from eints
...
korean: 1 change by telk5093
dutch: 1 change by Afoklala
french: 1 change by MalaGaM
2021-06-04 20:11:37 +00:00
translators
d816ff0361
Update: Translations from eints
...
korean: 1 change by telk5093
2021-06-03 20:24:19 +00:00
Patric Stout
5e44da3010
Fix ef991b17
: server was trying to free() a packet created with "new CommandPacket()" ( #9334 )
2021-06-03 22:07:44 +02:00
Patric Stout
feb2ddbefa
Codechange: rename SettingGuiFlag to SettingFlag ( #9332 )
...
It is a lovely organicly grown enum, where it started off with
GUI-only flags, and after that a few flags got added that can be
considered GUI-only (the GUI disables/enables based on them), to
only have flags added that has nothing to do with the GUI.
So be less confusing, and rename them to what they do.
Additionally, I took this opportunity to rename 0ISDISABLED to
reflect what it really does.
2021-06-03 21:18:29 +02:00
Patric Stout
f8dd5dd00a
Codechange: remove unused assert_msg() macro
2021-06-03 17:30:00 +02:00
Patric Stout
28e90769f7
Codechange: use "[[maybe_unused]]" instead of a wide variety of other ways we had
...
While at it, replace OTTD_ASSERT with WITH_ASSERT, as this
is always set if assert() is valid. No matter if NDEBUG is set
or not.
2021-06-03 17:30:00 +02:00
translators
48ecc481ee
Update: Translations from eints
...
swedish: 1 change by joeax910
2021-06-01 20:58:39 +00:00
Vít Šefl
30f5938eed
Fix b791ffc6
: use the correct name in CmdPlantTree
2021-06-01 18:26:35 +02:00
Vít Šefl
c936f8b769
Fix b791ffc6
: use the correct parameter in CmdSignalTrackHelper
2021-06-01 17:12:06 +02:00
Patric Stout
9fff00ba20
Codechange: C++-ify lists for SaveLoad ( #9323 )
...
Basically, this changes "SaveLoad *" to either:
1) "SaveLoadTable" if a list of SaveLoads was meant
2) "SaveLoad &" if a single entry was meant
As added bonus, this removes SL_END / SLE_END / SLEG_END. This
also adds core/span.hpp, a "std::span"-lite.
2021-05-31 22:26:44 +02:00
translators
956d761e3e
Update: Translations from eints
...
japanese: 1 change by scabtert
2021-05-31 20:18:35 +00:00
Patric Stout
921ab68a48
Codechange: use AsIntSetting()->Read() wrapper if possible ( #9324 )
2021-05-31 10:56:06 +02:00
Rubidium
68217b4568
Cleanup: [Fluidsynth] Remove fluid_player_join
...
The function fluid_player_join in the library is broken beyond compare for the
usecases it was used for (see their #872 ). It does not wait until it is safe
to delete the player, so it is up to the end user to ensure that.
For OpenTTD we acquire a lock before fluid_synth_write_s16 and we acquire the
same lock in the stop function. So, only one of the functions can be doing its
thing, meaning we do not need to wait for the player to be stopped as it
cannot be doing anything as we prevent that by the lock.
(cherry picked from commit 79fc094c54
)
2021-05-30 22:09:54 +01:00
PeterN
d274a81d3f
Fix: Apply unscaled padding to Viewport inside WWT_INSET. ( #9219 )
...
Since pixel dimensions in SetPadding() are scaled by GUI size, padding for inset viewports was excessive.
Instead, automatically apply padding for WWT_INSET at widget level. This applies to all widgets inside a WWT_INSET, which in all instances is a NWID_VIEWPORT.
(cherry picked from commit 330a305c99
)
2021-05-30 22:06:56 +01:00
Jonathan G Rennison
fe64093cc0
Avoid reading non-32bpp sprites twice where possible
...
Try to avoid unnecessary over-reading
2021-05-30 22:02:14 +01:00
Jonathan G Rennison
f212332359
Inline fast case for random access file byte/word/dword read
2021-05-30 22:02:14 +01:00
Jonathan G Rennison
054c820521
Implement custom sprite detection with new sprite mechanism
2021-05-30 22:02:14 +01:00
rubidium42
2b014ba1d9
Fix fdc11a9
: Missing sprite count determined on the wrong file
...
(cherry picked from commit de940b1dbc
)
2021-05-30 22:02:14 +01:00
Rubidium
e227bbaff0
Cleanup: remove the old FIO slot functions
...
(cherry picked from commit fa6abe1646
)
2021-05-30 22:02:14 +01:00
Rubidium
eecf7c8525
Codechange: let NewGRF make use of SpriteFile instead of most of the FIO slot functions
...
(cherry picked from commit 10e35ca8e4
)
2021-05-30 22:02:14 +01:00
Rubidium
6bd12e24d7
Codechange: introduce SpriteFile to be used by the sprite loader instead of the global FIO slot functionality
...
(cherry picked from commit fdc11a9f94
)
2021-05-30 22:02:14 +01:00
translators
043a544248
Update: Translations from eints
...
korean: 2 changes by telk5093
russian: 1 change by Ln-Wolf
finnish: 1 change by hpiirai
portuguese: 1 change by azulcosta
portuguese (brazilian): 1 change by Vimerum
2021-05-30 19:56:14 +00:00
Rubidium
5ded596c80
Fix #9320 , 2e136285
: nullptr could not be converted to string
2021-05-30 19:59:49 +02:00
rubidium42
4613ababd3
Fix #9316 , 64eddaeb
: at about 250.000 inhabitants the bridge length limit check overflows
2021-05-30 15:09:18 +02:00
Patric Stout
0c96884700
Codechange: add a wrapper function to find all settings based on prefix ( #9312 )
2021-05-30 10:55:52 +02:00
Patric Stout
e9e4588db1
Codechange: use setting name instead of index for HandleOldDiffCustom() ( #9311 )
2021-05-30 10:40:59 +02:00
Patric Stout
bcd7a7aafe
Codechange: rename _SQ64 into POINTER_IS_64BIT ( #9313 )
2021-05-30 10:40:03 +02:00
rubidium42
8c273ed598
Codechange: [Network] Let admin-console use std::string(_view)
2021-05-30 10:15:22 +02:00
rubidium42
e58581f1f8
Codechange: [Network] Let admin-game script use std::string
2021-05-30 10:15:22 +02:00
rubidium42
29f2bd27c4
Codechange: [Game] Pass the length instead of '\0' terminating (and undoing that) in the middle of a C-string
2021-05-30 10:15:22 +02:00
rubidium42
8a918ce170
Codechange: [Network] Make admin name and version std::string
2021-05-30 10:15:22 +02:00
rubidium42
97c461d1e7
Fix: limit heightmap sizes to something reasonable to prevent crafted heightmaps to OOM-crash the game
2021-05-30 09:50:38 +02:00
Rubidium
04b38dbfca
Codechange: lets music make use of RandomAccessFile instead of the FIO slot functions
...
(cherry picked from commit 0dd339ecd8
)
2021-05-30 08:23:50 +01:00
Rubidium
525f6adcd0
Codechange: let NewGRF sounds make use of RandomAccessFile instead of the FIO slot functions
...
(cherry picked from commit c097bc9d7d
)
2021-05-30 08:23:39 +01:00
Rubidium
4b37044ef1
Codechange: use the new RandomAccessFile as backend for the FIO slot functions
...
(cherry picked from commit b144e56b2c
)
2021-05-30 08:21:09 +01:00
Jonathan G Rennison
98e9a3991b
Increase RandomAccessFile::BUFFER_SIZE to 4096
2021-05-30 08:14:15 +01:00
Rubidium
e856ca7b69
Add: concept of a RandomAccessFile to replace the FIO slot functions
...
(cherry picked from commit 8e0b1b5d1a
)
2021-05-30 08:11:09 +01:00
Rubidium
2606f5409a
Fix: leaking file descriptors
...
(cherry picked from commit 495d73a67f
)
2021-05-30 07:52:55 +01:00
Rubidium
7c4d803265
Fix: memory leak due to assigning result of strdup to a std::string
...
(cherry picked from commit 296194ad36
)
2021-05-30 07:52:46 +01:00
Jonathan G Rennison
bf87578173
Fix #264 : Crash before calling SDL_SetTextInputRect with no window focused
2021-05-30 07:38:37 +01:00
rubidium42
62e3bfd684
Fix #9243 : [Network] For a dedicated server use a fallback client and server name
...
Also warn when the client or server name has not been set and provide pointers on how to set them
(cherry picked from commit 0968d009c8
)
2021-05-30 06:45:44 +01:00
rubidium42
e3c9ed4d15
Codechange: [Network] Use std::string to determine an unique name for clients
2021-05-30 00:01:49 +02:00
rubidium42
806f78aa04
Codechange: [Network] Use std::string to send the client name and rcon commands
2021-05-30 00:01:49 +02:00
rubidium42
fd95736bac
Codechange: [Network] Use std::string for server side logic of kicking and banning clients
2021-05-30 00:01:49 +02:00