1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-12 09:09:09 +00:00
Commit Graph

30864 Commits

Author SHA1 Message Date
234c9fb3bd Codechange: Use EnumBitSet for SpriteFlags. 2025-03-23 18:01:02 +00:00
5abe7c1386 Codechange: Use default initialisation for 32bpp_sse2's SpriteData.
Avoids using memset.
2025-03-23 18:01:02 +00:00
828e808444 Codechange: Split NewGRF loader into separate Action handlers. 2025-03-23 16:59:36 +00:00
0b7fa11a5b Codechange: Move NewGRF string mapping to own file. 2025-03-23 16:59:36 +00:00
2cb389946d Codechange: Move GrfProcessingState to separate file.
Allows reuse by other files.
2025-03-23 16:59:36 +00:00
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
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
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
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
a4f9977d18 Codechange: Don't reimplement DistanceManhattan. (#13850) 2025-03-21 17:06:39 +00:00
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
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
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
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
762e2f76a3 Codechange: Avoid STR_NULL in header file. 2025-03-21 12:53:40 +00:00
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
89948b941b Codechange: Use emplace_back instead of push_back. (#13855) 2025-03-20 17:39:10 +00:00
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
17f7d0950e Fix #13838: Formatted error message of sub-errors may be lost. (#13840) 2025-03-18 08:39:40 +00:00
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
Rubidium
b4e5b12047 Codechange: remove unneeded locking from SmallStack 2025-03-16 14:13:51 +01:00
Patric Stout
b28b35c239 Fix: [CI] Disable CodeQL TRAP Cache, as it trashes our cache (#13832)
Each cache is ~1GB. And you can only have 10GB of cache. So after
10 runs, our cache is full of trap caches.

The kicker? We don't actually benefit from this cache. It is only
used if you re-run CodeQL over the exact same codebase (without
changes), to quickly re-evaluate the latest CodeQL set. We are
way to active to have any benefit from that, and we don't run
CodeQL on a schedule to ever pick up on the cache.
2025-03-16 11:48:41 +00:00
Rubidium
ec647975ad Cleanup: remove ancient FIXME comments 2025-03-16 05:42:29 +01:00
Rubidium
2b9c94f55a Fix: don't show owner of non-existent road 2025-03-16 05:42:29 +01:00
3b004c57bc Codechange: Use EnumBitSet for AdminUpdateFrequency. (#13819) 2025-03-15 21:18:20 +00:00
Koen Bussemaker
8d4639e525 Fix: Error message window timeout doesn't match setting 2025-03-15 22:08:19 +01:00
Rubidium
ccca7fc2b4 Codechange: remove unused INVALID_TRACK_BIT 2025-03-15 22:03:17 +01:00
enveeed
b0cc56a8b5 Fix: NewGRF vehicles display loading sprites when not actually loading or unloading (#13554) 2025-03-15 16:58:47 -04:00
rubidium42
2fed4b0059 Codechange: simplify code (#13822) 2025-03-15 21:49:07 +01:00
Rubidium
c13226cdf8 Codefix: do not leave pointers to stack allocations in globals 2025-03-15 21:46:43 +01:00