Commit Graph

30774 Commits

Author SHA1 Message Date
frosch
77af1c89c8 Codechange: Split _show_todos into individual bool flags. 2025-03-24 23:10:13 +01:00
frosch
f8292a8d11 Codechange: Remove unused/obscure strgen feature for relative offsets in plural/gender choice lists. 2025-03-24 23:10:13 +01:00
frosch
4fc0900865 Codechange: Reorder functions in strgen and reduce external symbols. 2025-03-24 23:10:13 +01:00
Peter Nelson
b96b26ef15
Codechange: Rename short CargoType parameters cargo. (#13848)
Rename CargoType variables and parameters using short or meaningless names.
2025-03-24 18:18:21 +00:00
Loïc Guilloux
bdea29c414
Fix #13875: [Script] be less strict about empty constructor format for doxygen (#13882) 2025-03-24 13:38:10 +01:00
translators
997f8abaec Update: Translations from eints
chinese (traditional): 23 changes by KogentaSan
2025-03-24 04:46:50 +00:00
Peter Nelson
fc7b6c6cbb
Codechange: Use .fill() to clear an array instead of assigning a new array. (#13880)
Avoids allocating a temporary on the stack.
2025-03-23 22:09:45 +00:00
frosch
ca801d55d5
Fix: [NewGRF] Display an error, if NewGRF reference out-of-bounds string parameters in gender/plural choices. (#13881) 2025-03-23 20:43:12 +01:00
Peter Nelson
42eb513897
Codechange: Make use of emplace_back's return value. (#13879) 2025-03-23 18:34:04 +00:00
frosch
5aa4ad5135
Codechange: Pass unformatted strings from GetStringPtr as std::string_view. (#13871) 2025-03-23 19:23:31 +01:00
Peter Nelson
234c9fb3bd Codechange: Use EnumBitSet for SpriteFlags. 2025-03-23 18:01:02 +00:00
Peter Nelson
5abe7c1386 Codechange: Use default initialisation for 32bpp_sse2's SpriteData.
Avoids using memset.
2025-03-23 18:01:02 +00:00
Peter Nelson
828e808444 Codechange: Split NewGRF loader into separate Action handlers. 2025-03-23 16:59:36 +00:00
Peter Nelson
0b7fa11a5b Codechange: Move NewGRF string mapping to own file. 2025-03-23 16:59:36 +00:00
Peter Nelson
2cb389946d Codechange: Move GrfProcessingState to separate file.
Allows reuse by other files.
2025-03-23 16:59:36 +00:00
Peter Nelson
fe9dfa2b08 Codechange: Move NewGRF ByteReader to own file. 2025-03-23 16:59:36 +00:00
frosch
84f785b06b
Codechange: Pass GRF name as std::string to UpdateNewGRFScanStatus. (#13870) 2025-03-23 16:58:43 +01:00
Peter Nelson
8b4114d709
Fix #13849: Settings in old saves could be overridden by defaults. (#13874)
Resolved by resetting settings to default values before the OPTS and PATS chunks are loaded.
2025-03-23 15:55:55 +00:00
Peter Nelson
21d2a94809
Codechange: Use EnumBitSet for GrfMiscBits. (#13873) 2025-03-22 21:07:59 +00:00
frosch
af49320637
Fix: [NewGRF] Plurals and genders did not work in strings with cases. (#13853) 2025-03-22 21:41:27 +01:00
frosch
d4ae0f70da
Codechange: StringFilter now uses std::string_view entirely (#13869) 2025-03-22 20:35:31 +01:00
frosch
667d013726
Codechange: Return name, description and URL as std::string from GRFConfig. (#13868) 2025-03-22 20:30:40 +01:00
John Taylor
ae2d7947d7 Fix #13562: Removed cost estimation message from money cheat 2025-03-22 20:28:55 +01:00
Jonathan G Rennison
be79099a6f
Codechange: Use a std::span as input for GfxFillPolygon (#13866)
Instead of a std::vector const reference.
2025-03-22 15:16:14 +00:00
frosch
5764eaaacf
Fix: [NewGRF] Plurals and genders did not work in NewGRF substrings, and cases in substrings could mess up cases in the parent string. (#13852) 2025-03-22 13:40:43 +01:00
translators
7abca5bb25 Update: Translations from eints
hungarian: 77 changes by vargaviktor
2025-03-22 04:46:31 +00:00
Peter Nelson
e47082bf7b
Codefix: Don't look up NewGRF Action 6-modified data twice. (#13863) 2025-03-21 18:13:31 +00:00
frosch
a4f3ddae5f
Fix: [NewGRF] String parameter stack and case selection were not processed for control code 0x81. (#13851) 2025-03-21 18:13:08 +01:00
Peter Nelson
a4f9977d18
Codechange: Don't reimplement DistanceManhattan. (#13850) 2025-03-21 17:06:39 +00:00
Peter Nelson
6297b49a00 Codechange: Remove table/strings include from header files.
This was accidentally providing coverage to basically all source files...
2025-03-21 12:53:40 +00:00
Peter Nelson
3503082f19 Codechange: Move template class implementation includes.
These are now placed at the bottom of the including files include list.
2025-03-21 12:53:40 +00:00
Peter Nelson
2909a14374 Codechange: Include table/strings.h in files that use StringIDs.
Be consistent with how and where the file is incldued.
2025-03-21 12:53:40 +00:00
Peter Nelson
edb101d12f Codechange: Use free function get BaseSet list label.
This avoids using StringIDs in a header file.
2025-03-21 12:53:40 +00:00
Peter Nelson
762e2f76a3 Codechange: Avoid STR_NULL in header file. 2025-03-21 12:53:40 +00:00
Peter Nelson
4ffbf97770 Codechange: Move RawText::GetEncodedText() out of header.
This allows it to use StringID without polluting includes.
2025-03-21 12:53:40 +00:00
frosch
3b178bf58d Fix: NewGRF string interpolation did not process all string parameters, if certain string control codes were present.
String control codes with inline data may contain null characters, in particular plural/gender/case choice lists.
2025-03-21 11:03:24 +01:00
frosch
5d291317e7 Codechange: Two very different functions were named RemapNewGRFStringControlCode. 2025-03-21 11:03:24 +01:00
translators
a678bb263d Update: Translations from eints
hungarian: 32 changes by vargaviktor
2025-03-21 04:45:21 +00:00
Peter Nelson
89948b941b
Codechange: Use emplace_back instead of push_back. (#13855) 2025-03-20 17:39:10 +00:00
Peter Nelson
b98a7ff303
Fix f214c81e97: Signed overflow in collision test on large map when road vehicles are at just the right coordinates. (#13847)
If road vehicles are -32768 subtiles apart, the distance check will break.
2025-03-18 22:53:01 +00:00
Richard Wheeler
8e2ce35143
Fix: i circumflex width in TrueType small font (#13836)
Updates OpenTTD TTF fonts to v0.7. Fixes i circumflex alignments and right bearings and similar problems with other i and I diacritics.
2025-03-18 21:07:26 +00:00
Richard Wheeler
4ba69765be
Update: Developer credits (#13846)
<3
2025-03-18 20:57:25 +00:00
Rubidium
a908c7bed0 Codechange: remove uses of MemCmpT (and MemMoveT) 2025-03-18 21:18:37 +01:00
Loïc Guilloux
e55f54ce08
Fix #13843, 015c081c: Don't discard GetString() result (#13844) 2025-03-18 17:15:40 +00:00
Peter Nelson
17f7d0950e
Fix #13838: Formatted error message of sub-errors may be lost. (#13840) 2025-03-18 08:39:40 +00:00
Peter Nelson
5255aabe4d
Fix #13839: Incorrect colour of first company legend in smallmap window. (#13841)
Use the proper command to set the initial company colour.
2025-03-17 20:28:02 +00:00
translators
ff275b805b Update: Translations from eints
welsh: 144 changes by Ansbaradigeidfran
catalan: 6 changes by J0anJosep
2025-03-17 04:46:50 +00:00
Rubidium
5ea5855677 Codechange: use std::move over copying where applicable 2025-03-16 17:33:06 +01:00
Rubidium
f214c81e97 Codechange: simplify some complicated logic 2025-03-16 15:12:02 +01:00
Rubidium
d6a1a0b058 Codechange: simplify logic and prevent invalid bit 2025-03-16 14:14:21 +01:00