Commit Graph

24467 Commits

Author SHA1 Message Date
Rubidium
f8aceb6c37 Codechange: use value initialisation over memset 2025-05-09 17:20:41 +02:00
Rubidium
7981fcb297 Codechange: use std::fill_n over memset 2025-05-09 17:20:41 +02:00
Rubidium
92bd78dd25 Codechange: use std::ranges::fill over memset 2025-05-09 17:20:41 +02:00
Rubidium
96873dee63 Codechange: use std::array.fill over memset 2025-05-09 17:20:41 +02:00
frosch
228f9ca941
Fix #13854: 40bpp-anim blitter recolouring failed for 32bpp pixels without mask channel. (#14242) 2025-05-09 17:16:29 +02:00
frosch
a277cb2b4c Change: [NewGRF] Increase the textstack for all callbacks to 16 registers. 2025-05-09 12:39:11 +02:00
frosch
c6fa5022cb Add: [NewGRF] All callbacks returning D0xx strings, have now the option to return any string id via register 0x100. 2025-05-09 12:39:11 +02:00
frosch
84bc78fd8f Add: [NewGRF] Special value 0x7FFE for VarAction2 results specifying 'return calculated result'. 2025-05-09 12:38:58 +02:00
frosch
9d32087236 Add: [NewGRF] Special value 0x7FFF for Action2 references specifying explicit 'callback/sprite-resolving failed'. 2025-05-09 12:38:58 +02:00
translators
b1cdf5024f Update: Translations from eints
spanish (mexican): 7 changes by absay
2025-05-09 04:46:47 +00:00
Peter Nelson
ae1f469aac
Fix #14234, 16b4e73: Skip PLURAL data if parameter is invalid. (#14236) 2025-05-08 09:06:56 +01:00
glx22
1d18b4a80b Codechange: remove core/mem_func.hpp 2025-05-08 09:33:18 +02:00
glx22
aba5e1258e Codechange: use assignment over MemCpyT 2025-05-08 09:33:18 +02:00
glx22
6356311fbc Codechange: use std::copy_n over MemCpyT 2025-05-08 09:33:18 +02:00
glx22
a013f81120 Codechange: use std::array's fill over memset 2025-05-08 09:33:18 +02:00
glx22
82244779eb Codechange: use C++ initialisation over MemSetT 2025-05-08 09:33:18 +02:00
translators
6680169251 Update: Translations from eints 2025-05-08 04:46:44 +00:00
Peter Nelson
2feba80fd7 Codechange: Codestyle fixes for elrail code. 2025-05-07 20:34:33 +01:00
Peter Nelson
4a8dd494ee Codechange: Don't abbreviate TileLocationGroup type name. 2025-05-07 20:34:33 +01:00
frosch
d00196cd65 Change: Rearrange buttons in the intro screen, remove unnecessary ones. 2025-05-07 18:41:48 +02:00
frosch
4111ce2698 Add: WWT_IMGTEXTBTN, WWT_PUSHIMGTEXTBTN 2025-05-07 18:41:48 +02:00
Peter Nelson
a7019b859c Codechange: Use DiagDirections when checking for flat buildable tiles. 2025-05-07 17:31:29 +01:00
Peter Nelson
aa9e5b38cd Codechange: Use DiagDirections when drawing level crossings. 2025-05-07 17:31:29 +01:00
Peter Nelson
1ac9f24f38 Codechange: Use (Diag)Directions when drawing catenary. 2025-05-07 17:31:29 +01:00
Peter Nelson
87544eff0c Codechange: Use DiagDirections to collect rail fence data. 2025-05-07 17:31:29 +01:00
Peter Nelson
1cbc4da054 Codechange: Use Directions for water flooding data. 2025-05-07 17:31:29 +01:00
Peter Nelson
968bb8961e Codechange: Add Directions and DiagDirections EnumBitSets. 2025-05-07 17:31:29 +01:00
Peter Nelson
e0dbbbb032 Codechange: Add Reset() and missing &=/|= operators for BaseBitSet. 2025-05-07 17:31:29 +01:00
Peter Nelson
c4d033967b
Codechange: Remove some unnecessary includes from network files. (#14226) 2025-05-07 16:46:14 +01:00
frosch
22fedca77e Codechange: Integrate ResolverObject::ResetState() into DoResolve(), no need to call it manually. 2025-05-06 22:24:41 +02:00
frosch
f8c928ed98 Codechange: Make temporary storage a member of ResolverObject. 2025-05-06 22:24:41 +02:00
frosch
eb9bbb2456 Codechange: Remove direct access to temporary storage from TextRefStack. 2025-05-06 22:24:41 +02:00
frosch
6faa667644 Codechange: Remove global GetRegister(), instead return 100+ registers directly from GetXxxCallback(). 2025-05-06 22:24:41 +02:00
frosch
f59cf73b88 Codechange: Access temporary storage through ResolverObject during sprite layout preprocessing. 2025-05-06 22:24:41 +02:00
frosch
85be7a4d92 Codechange: Access temporary storage through ResolverObject during Resolve. 2025-05-06 22:24:41 +02:00
frosch
99d7a775ad Codechange: Make GetRegister return a signed integer, matching the underlying TemporaryStorageArray. 2025-05-06 22:24:41 +02:00
frosch
74030a63e6 Codechange: Move SpriteLayoutProcessor's operations closer to the ResolverObject. 2025-05-06 22:24:41 +02:00
Rubidium
0ffdc86a2c Codechange: use std::ranges::equal over memcmp 2025-05-06 21:29:21 +02:00
Rubidium
89deb3876f Codechange: use fstream to compare file equality 2025-05-06 21:29:21 +02:00
frosch
cd7ac64f9d
Codefix: Fix compilation with DEBUG_DUMP_COMMANDS. (#14228) 2025-05-06 21:11:30 +02:00
frosch
592cc49b62 Codechange: Turn _grow_town_result into a local variable in GrowTownAtRoad. 2025-05-06 20:58:17 +02:00
frosch
5af877d12d Codechange: Do not assign _grow_town_result in GrowTownInTile, instead return the new value. 2025-05-06 20:58:17 +02:00
frosch
22af391064 Codechange: Move _grow_town_result out of GrowTownWithExtraHouse, GrowTownWithRoad, GrowTownWithBridge and GrowTownWithTunnel. 2025-05-06 20:58:17 +02:00
Rubidium
d70aeb72a7 Codechange: C++ initialise LanguageHeaderPack 2025-05-06 20:03:35 +02:00
Rubidium
8f1e94c546 Codechange: use C++ initialisation over MemSetT 2025-05-06 20:03:35 +02:00
Rubidium
cc51b29234 Codechange: use std::fill_n/copy_n over MemSetT/MemCpyT 2025-05-06 20:03:35 +02:00
Rubidium
0d922c9d62 Codechange: use std::array's fill over memset 2025-05-06 20:03:35 +02:00
Rubidium
4c1cd4fe4c Codefix: remove unused mem_func includes 2025-05-06 20:03:35 +02:00
Peter Nelson
9735fbbaa1 Codechange: Use LRUCache for layouted LineCache.
This avoids needing to manually manage the size of the cache.
2025-05-06 18:09:00 +01:00
Peter Nelson
8c4f8af66e Codechange: Move std::unique_ptr out of LRUCache implementation.
This is an implementation detail of how OpenGLSprites are stored.
2025-05-06 18:09:00 +01:00
frosch
8bbfbd0347 Codechange: Move spritelayout preprocessing to a separate class, which owns the heap allocations involved. 2025-05-06 18:30:42 +02:00
frosch
d9c43e7fda Codechange: Make TileLayoutSpriteGroup::ProcessRegisters return a DrawTileSpriteSpan on the stack, instead of a reference to a global. 2025-05-06 18:30:42 +02:00
frosch
51a7edd941 Codechange: Remove _input_events_this_tick. 2025-05-06 18:29:41 +02:00
frosch
42f9312f71 Codechange: Make station variable cache a member of StationScopeResolver. 2025-05-06 18:29:41 +02:00
frosch
b20b6da937 Codechange: The compiler ensures static variables are initialised only once, no need to track that manually. 2025-05-06 18:29:41 +02:00
frosch
75a775e59d Codechange: Make GetCurrentLocale return a std::string instead of a reference to a static buffer.
For win32 this is even a fix, because the static buffer was only updated once. Later calls discarded the determined locale.
2025-05-06 18:29:41 +02:00
frosch
0d5b3ebd7f Codechange: Declare all IntervalTimers const, which can be const. 2025-05-06 18:29:41 +02:00
frosch
61cec33be2 Codechange: Add 'const' to static variables, which are only initialised once. 2025-05-06 18:29:41 +02:00
frosch
1900125c98 Codechange: Use string_view for FileExists. 2025-05-06 18:29:41 +02:00
Peter Nelson
d571491405
Codechange: Replace std::bitset<CONTENT_TYPE_END> with ContentTypes. (#14223)
#14214 added `ContentTypes` as en `EnumBitSet`, but some std::bitset existed already; they are now `ContentTypes` too.
2025-05-06 17:20:01 +01:00
translators
eca826b0a4 Update: Translations from eints
korean: 7 changes by telk5093
hungarian: 3 changes by vargaviktor
latvian: 3 changes by lexuslatvia
polish: 6 changes by pAter-exe
2025-05-06 04:46:37 +00:00
frosch
13349254ea
Fix #14216, d030d17: RealSpriteGroups referencing CallbackResultSpriteGroups were always treated as callback-failure. (#14218) 2025-05-05 16:13:41 +02:00
Peter Nelson
e23de03a99 Codechange: Use FlatSet for sprite picker list. 2025-05-05 14:00:38 +01:00
Peter Nelson
b06273f716 Codechange: Use FlatSet when searching tiles around stations. 2025-05-05 14:00:38 +01:00
Peter Nelson
7679b0bc46 Codechange: Use FlatSet when filtering and drawing badge names. 2025-05-05 14:00:38 +01:00
Peter Nelson
5fd7344a6d Codechange: Use FlatSet when creating rivers. 2025-05-05 14:00:38 +01:00
Peter Nelson
7c834921b2 Codechange: Use FlatSet for per-industry type industry lists. 2025-05-05 14:00:38 +01:00
Peter Nelson
6070f8d4f3 Codechange: Add FlatSet implementation.
This is a flat set implemented using a sorted vector for storage.
2025-05-05 14:00:38 +01:00
Peter Nelson
2355d67e11
Codechange: Use EnumBitSet instead of Vector to record received content types. (#14214) 2025-05-05 08:55:34 +01:00
translators
a46b885640 Update: Translations from eints
english (au): 1 change by krysclarke
russian: 2 changes by Ln-Wolf
2025-05-05 04:47:18 +00:00
Peter Nelson
ac76212b80 Fix: Closing the Game Options window closes all textfile windows.
Record the parent window that opens a textfile window so only child windows are closed instead of all.
2025-05-04 19:36:46 +01:00
Peter Nelson
dabf2ede67 Change: Add methods to close child windows with a specific window number. 2025-05-04 19:36:46 +01:00
Rubidium
0724b3cda8 Codechange: replace SQChar with char 2025-05-04 16:59:06 +02:00
Rubidium
1f411f8a16 Codechange: use string_view for squirrel parameter checks 2025-05-04 16:59:06 +02:00
Rubidium
588b0de3de Codechange: hide SQString internals behind std::string_view/std::span 2025-05-04 16:59:06 +02:00
Rubidium
635ca3739f Codechange: use std::string_view in squirrel lexer 2025-05-04 16:59:06 +02:00
Rubidium
4255a94779 Codechange: use std::span over char* for writing the buffers 2025-05-04 15:32:52 +02:00
Rubidium
6817f52d9b Codechange: move definition of getcwd for Windows to where it is used 2025-05-04 15:32:52 +02:00
Rubidium
6189bbc45a Codechange: return std::string_view for convert_from_fs 2025-05-04 15:32:52 +02:00
Rubidium
6caa08098c Codechange: remove char* StringConsumer 2025-05-04 15:32:52 +02:00
Peter Nelson
3e608b5fe4
Fix: Zoom-scroll extra viewports only if the mouse cursor is over the viewport. (#14209) 2025-05-04 14:16:05 +01:00
Rubidium
afc1e76575 Codefix: StartNewThread uses char* after returning 2025-05-04 14:05:15 +02:00
Rubidium
8f74c08ea6 Codechange: put SQRegFunctions into initializer_list and use ranged for loops 2025-05-04 14:05:05 +02:00
Rubidium
f4fc8f6b38 Codechange: replace Error with simple throw 2025-05-04 14:05:05 +02:00
Rubidium
9d8a612bfb Codechange: remove unused function 2025-05-04 10:43:56 +02:00
Rubidium
5e3c7c4146 Codechange: char* -> char * 2025-05-04 10:43:56 +02:00
Rubidium
3f2b39e3f8 Codechange: replace char* where out-of-date 2025-05-04 10:43:56 +02:00
Rubidium
d697280493 Codechange: remove now obsolete char* tests
The function is std::string_view and there are std::string_view tests as well.
2025-05-04 10:43:56 +02:00
Rubidium
d01bebbd18 Codefix 26a4da9b01: MinGW compilation failure 2025-05-04 09:07:02 +02:00
translators
7d7a6bd32c Update: Translations from eints
norwegian (bokmal): 3 changes by eriksorngard
2025-05-04 04:46:05 +00:00
frosch
8571af9833 Codechange: Turn ZoomLevel into enum class. 2025-05-03 23:21:09 +02:00
frosch
c0d4ab69d0 Codechange: Add a container to index data by zoom level. 2025-05-03 23:21:09 +02:00
frosch
7055ea0aee Codechange: Define sequential operators for ZoomLevel. 2025-05-03 23:21:09 +02:00
frosch
bbfda39ac3 Codechange: Add ZoomLevels bit set. 2025-05-03 23:21:09 +02:00
frosch
48d09af039 Codechange: Simplify weird range check. 2025-05-03 23:21:09 +02:00
Rubidium
d464961c41 Codechange: use std::string_view for SQ stack and function info 2025-05-03 23:02:09 +02:00
Rubidium
0bc773215e Codechange: use std::optional<std::string_view> to make the intent of function clearer 2025-05-03 23:02:09 +02:00
Rubidium
ead3b96883 Codechange: use std::string_view to create SQString 2025-05-03 23:02:09 +02:00
Rubidium
fca99967a7 Codechange: make sq_scratchpad use std::span<char> 2025-05-03 23:02:09 +02:00
Rubidium
b4d9682f21 Codechange: use std::string_view for sq_throwerror 2025-05-03 23:02:09 +02:00
Rubidium
ec79ceb2be Codechange: use std::string_view for sq_pushstring 2025-05-03 23:02:09 +02:00
Rubidium
3020e615a9 Codechange: use std::string_view for squirrel compilation 2025-05-03 23:02:09 +02:00
Rubidium
26a4da9b01 Codechange: replace last strncmp uses 2025-05-03 21:51:01 +02:00
Peter Nelson
31754a0afd
Fix: Changing monospace font didn't refresh the monospace width cache. (#14185) 2025-05-03 18:34:45 +01:00
Peter Nelson
7596f98e2d
Codechange: Cache layouted text for the last used width. (#14177) 2025-05-03 18:33:47 +01:00
Peter Nelson
bd1a3fe0b7
Change: Remove the limit of 20 parameters to a Script Text string. (#14193) 2025-05-03 18:33:29 +01:00
frosch
518a34c286 Codechange: Use std::byte for generic buffers. 2025-05-03 18:43:20 +02:00
frosch
02082a0211 Codechange: Deduplicate array lookup. 2025-05-03 18:43:20 +02:00
frosch
bb767608de Codechange: Pass SpriteType as direct parameter to SpriteEncoder::Encoder. 2025-05-03 18:43:20 +02:00
frosch
c3aa3f140c
Codechange: Use more std::string_view. (#14197) 2025-05-03 18:40:37 +02:00
frosch
74a275f37b
Add: [NewGRF] Add purchase list Action3 CID for houses, industries, industry tiles, airports and airport tiles. (#14121) 2025-05-03 17:50:20 +02:00
frosch
9ac9798d7f
Codechange: Remove usages of stoi and stol. (#14196) 2025-05-03 17:46:30 +02:00
Rubidium
b6afd8d2b6 Codechange: remove some completely unused squirrel files 2025-05-03 17:14:10 +02:00
Rubidium
85f1110569 Codechange: rewrite ini file parsing with the StringConsumer 2025-05-03 17:13:33 +02:00
Rubidium
6a9f694158 Codechange: remove StrEmpty 2025-05-03 15:58:14 +02:00
Rubidium
d037dbb42a Codechange: use std::string_view for locales 2025-05-03 15:58:14 +02:00
Rubidium
96fd291693 Codechange: introduce GetEnv that returns optional based on std::getenv 2025-05-03 15:58:14 +02:00
Rubidium
04a6a55e94 Codechange: replace StripTrailingWhitespace with StrTrimView 2025-05-03 15:57:53 +02:00
Rubidium
1f39d469ff Codechange: pass the characters to trim to StrTrimView 2025-05-03 15:57:53 +02:00
Rubidium
e2db8277b8 Codefix: implement StrTrimInPlace without assigning a borrowed view of itself 2025-05-03 15:57:53 +02:00
Rubidium
4109b6848b Codechange: replace manual trim and std::from_chars with ParseInteger 2025-05-03 15:57:53 +02:00
Rubidium
414f6a3067 Codechange: add support for parsing octal numbers 2025-05-03 15:57:53 +02:00
Rubidium
c79abc6da6 Codechange: reduce dependence on C-style strings in OpenGL 2025-05-03 14:24:49 +02:00
Rubidium
278aee2c19 Codechange: use std::string_view for sq_getstring 2025-05-03 14:24:28 +02:00
translators
f4f05dea33 Update: Translations from eints
chinese (traditional): 1 change by KogentaSan
chinese (simplified): 1 change by WenSimEHRP
greek: 1 change by gh658804
russian: 1 change by Ln-Wolf
finnish: 1 change by hpiirai
dutch: 8 changes by Afoklala
portuguese: 3 changes by jcteotonio
portuguese (brazilian): 1 change by pasantoro
polish: 1 change by pAter-exe
2025-05-03 04:45:31 +00:00
Peter Nelson
8b14faaa40
Codechange: Add version of DrawStringMultiLine that performs clipping test. (#14189)
Normally DrawStringMultiLine does not perform any clipping, as the return value may be needed if it the text is not drawn.

In some specific cases the height is already known, so it is possible to test for clipping, which can cut down on layouting time for text which won't be visible.
2025-05-02 22:59:55 +01:00
Iris-Persephone
2f020abe74
Add: "Many random towns" button in scenario editor now prompts for the number of towns, with defaults based on new game settings (#14158) 2025-05-02 22:54:21 +01:00
Peter Nelson
3eba97f67c
Codechange: Scrollbar Count no longer needs to be clamped to uint16_t. (#14184) 2025-05-02 22:21:05 +01:00
Peter Nelson
f7db4938ce
Fix #14098: Use 64-bit type for MIDI realtime information. (#14144) 2025-05-02 22:20:44 +01:00
Rubidium
c420ba349d Codechange: use std::string_view over char* 2025-05-02 23:12:43 +02:00
Rubidium
f2a32c6d13 Codechange: use std::byte instead of char for calculating arbitrary byte offsets 2025-05-02 23:12:43 +02:00
Peter Nelson
932dca927b
Fix: Crash/Undefined behaviour in station view window. (#14183)
No column limit was applied when drawing waiting cargo, which could cause out-of-bounds array access.
2025-05-02 08:02:35 +01:00
translators
e0a9c7d818 Update: Translations from eints
english (au): 2 changes by krysclarke
chinese (traditional): 3 changes by KogentaSan
chinese (simplified): 6 changes by WenSimEHRP
greek: 2 changes by gh658804
russian: 2 changes by Ln-Wolf
finnish: 3 changes by hpiirai
portuguese (brazilian): 2 changes by pasantoro
polish: 2 changes by pAter-exe
2025-05-02 04:45:34 +00:00
Peter Nelson
ae9646eb0a
Change: Use same padding as NewGRF parameters for AI/GS parameters lists. (#14118) 2025-05-01 22:36:53 +01:00
Rubidium
5ca686261e Codechange: use std::string_view for the string setting defaults 2025-05-01 23:24:43 +02:00
Rubidium
5c7b04a0c2 Codechange: use std::string_view for 'x-of-many' settings 2025-05-01 23:24:43 +02:00
Rubidium
7805c1c189 Codechange: use std::string_view for ini_key 2025-05-01 23:24:43 +02:00
Peter Nelson
d958d50985
Fix: Small order list arrow was wrong direction for RTL text. (#14174)
Add sprite for small left arrow and use for small order list when using an RTL language.
2025-05-01 22:08:24 +01:00
Loïc Guilloux
41b113840a
Fix: [Script] Access to enum/consts defined outside of main.nut (#14176) 2025-05-01 18:16:32 +02:00
Loïc Guilloux
1f212e6f2a
Fix: Handle \t when loading GS strings from savegame (#14180) 2025-05-01 16:48:02 +02:00
Loïc Guilloux
6f4994329c
Fix bf8a241f: Handle \t in trailing whitespaces (#14178) 2025-05-01 12:32:00 +02:00
translators
a30f251d05 Update: Translations from eints
hungarian: 99 changes by meskobalazs
russian: 8 changes by Ln-Wolf
finnish: 24 changes by hpiirai
latvian: 70 changes by lexuslatvia
2025-05-01 04:47:22 +00:00
Rubidium
fbe80f31fe Codechange: replace char* in GetOptData with std::string_view 2025-04-30 23:49:06 +02:00
Rubidium
c1a287ad17 Codechange: make some saveload functions work natively with std::string_view 2025-04-30 23:49:06 +02:00
Rubidium
855377191e Codechange: replace some more char*s with std::string_view 2025-04-30 23:49:06 +02:00
frosch
a80c11a6e8
Fix 66733e2a: Textbuf was broken, and did not insert any input. (#14173) 2025-04-30 19:31:52 +00:00
Peter Nelson
7dd3bed10f
Fix #14170, 7fd0e6c27d: Missing spaces for timetabled order strings. (#14172) 2025-04-30 19:54:54 +01:00
frosch
316279f4b4 Codechange: Use more std::string_view. 2025-04-30 19:33:56 +02:00
frosch
9cf36dac39 Codechange: Use data() instead of c_str(), if no NUL termination is needed. 2025-04-30 19:33:56 +02:00
frosch
9e90d4ed79 Codefix: Do not assign nullptr to std::string_view. 2025-04-30 19:33:56 +02:00
frosch
36ce1f890a Codechange: Remove c_str, if std::string_view is already accepted. 2025-04-30 19:33:56 +02:00
frosch
b564fbb5e6 Codechange: Use StringConsumer to parse hotkeys. 2025-04-30 19:33:56 +02:00
frosch
66733e2a50 Codechange: Use std::string_view in IME input handling. 2025-04-30 19:33:56 +02:00
frosch
6db13df3b5 Add: [BaseSet] Allow basesets to set minor and patch versions in obg/obs/obm files. 2025-04-30 15:23:27 +02:00
frosch
d30fee4a99 Codechange: Improve debug/error messages when reading baseset metadata. 2025-04-30 15:23:27 +02:00
Rubidium
708e6a512d Codechange: replace char* with C++ style strings 2025-04-30 12:05:04 +02:00
Peter Nelson
356b0159c7
Fix 261e09a549: Compilation failure with Fluidsynth enabled. (#14167) 2025-04-30 07:27:57 +01:00
translators
7bec2029fa Update: Translations from eints
english (au): 4 changes by krysclarke
norwegian (bokmal): 5 changes by eriksorngard
chinese (traditional): 4 changes by KogentaSan
greek: 8 changes by gh658804
russian: 4 changes by Ln-Wolf
finnish: 4 changes by hpiirai
portuguese: 4 changes by jcteotonio
portuguese (brazilian): 4 changes by pasantoro
polish: 4 changes by pAter-exe
2025-04-30 04:46:51 +00:00
Peter Nelson
0abebfce1c
Codechange: Use result of .find() instead of looking up multiple times. (#14154) 2025-04-29 23:52:46 +01:00
Peter Nelson
aa9e8b422c
Fix #14166, dfd9fbf873: Loan was no longer invalidated when refreshing finance window. (#14168)
In most cases the company loan does not change, but it should be updated in case it does.
2025-04-29 23:52:11 +01:00
Rubidium
f4ad614285 Codechange: use std::string_view for FS2OTTD and OTTD2FS 2025-04-29 22:33:32 +02:00
Rubidium
ef71ce0a9d Codechange: return std::string_view for Textbuf::GetText() 2025-04-29 22:15:49 +02:00
Rubidium
261e09a549 Codechange: remove char* from base driver code 2025-04-29 21:09:18 +02:00
frosch
d030d17bd6 Codechange: Do not use a mutable global to return calculated VarAction2 results. 2025-04-29 20:35:46 +02:00
frosch
e90b68d504 Codechange: Pass SpriteGroup as reference to ResolveReal. 2025-04-29 20:35:46 +02:00
frosch
7c946d97da Codefix: Build with OPTION_DEDICATED=OFF and CMAKE_DISABLE_PRECOMPILE_HEADERS=ON. 2025-04-29 20:26:23 +02:00
frosch
afe3dfb3a4 Codechange: Use format instead of to_string. 2025-04-29 20:26:23 +02:00
frosch
fda93b6f35 Codechange: Add format_append as short-hand to format_to + back_inserter. 2025-04-29 20:26:23 +02:00
frosch
98481ecc01 Codechange: Replace strtol, strtoll, stroul and strtoull with ParseInteger. 2025-04-29 20:14:56 +02:00
frosch
cdafc50c94 Codechange: Replace atoi and atoll with ParseInteger. 2025-04-29 20:14:56 +02:00
frosch
3973199879 Change: ParseInteger now checks for trailing junk chars. 2025-04-29 20:14:56 +02:00
frosch
79b2202f2e Codechange: Use StringConsumer for parsing more strings. 2025-04-29 20:14:56 +02:00
frosch
e7d758c82a Codechange: Replace sscanf with StringConsumer. 2025-04-29 20:14:56 +02:00
frosch
8027e31f47 Codechange: Remove virtual functions SpriteGroup::GetResult and GetNumResults. They are only implemented in and called via ResultSpriteGroup. 2025-04-29 10:35:10 +02:00
frosch
010b944173 Codechange: Move SpriteGroup cast from callers into Resolve. 2025-04-29 10:35:10 +02:00
Rubidium
af25eecc15 Codechange: use const for std::string_view where appropriate 2025-04-29 10:15:18 +02:00
Rubidium
78250c3bba Codechange: remove const char* overloads when there are std::string_view and std::string& overloads 2025-04-29 10:14:53 +02:00
Peter Nelson
a5578166bb Codechange: Pass Script Info by reference. 2025-04-28 23:08:20 +01:00
Peter Nelson
341cdbc16b Codechange: Pass Script engine by reference. 2025-04-28 23:08:20 +01:00
Peter Nelson
72ca962b84 Codechange: Pass ScriptInstance by reference. 2025-04-28 23:08:20 +01:00
Peter Nelson
13fcc0900e
Change: Use enum/bitset to track which script configuration items are defined. (#14150)
Removes magic numbers, and simplifies compatibility. It is no longer necessary to provide values which won't be used.
2025-04-28 23:07:57 +01:00
Rubidium
b20b56d5fc Codechange: store revision information in C++ style strings 2025-04-28 23:48:32 +02:00
Rubidium
8b1c1cc33d Codechange: provide 'sv' (string_view) literals globally 2025-04-28 23:39:33 +02:00
Rubidium
be53bd320d Codechange: replace char* from settingsgen 2025-04-28 23:27:46 +02:00
frosch
47b5ca6115 Fix: [NewGRF] Computed VarAction2 callback results were not always properly masked to 15 bit results. 2025-04-28 23:25:31 +02:00
frosch
d90f6f01cc Codechange: CALLBACK_FAILED is an internal constant, do not use it as numeric value in VA2 computations. 2025-04-28 23:25:31 +02:00
frosch
30b1eb6e5f
Fix: [NewGRF] The result of Action123 evaluation affected rerandomisation in a weird corner case. (#14139)
Rerandomisation does not care about the Resolve result.
But we skipped it, in case of 'invalid SpriteGroup reference'.
2025-04-28 23:24:42 +02:00
frosch
b281c5616e Change: [NewGRF] If Action123 does not resolve in a valid SpriteSet, prefer drawing the default sprite instead of an invalid sprite. 2025-04-28 22:20:54 +02:00
frosch
7b08170ac8 Codechange: Replace a magic value with a maybe less magical constant. 2025-04-28 22:20:54 +02:00
Rubidium
360670626b Codechange: replace char* with std::string_view 2025-04-28 21:31:12 +02:00
Rubidium
9107c3f6c6 Codechange: add std::string_view variant of FileHandle::Open 2025-04-28 21:31:12 +02:00
Peter Nelson
2c4897c2cd
Codechange: Use EnumBitSet for HouseZones. (#14137) 2025-04-28 20:27:43 +01:00
frosch
f5a9eae8b1 Fix: [NewGRF] AI station construction callback did not work for stations with ID >= 0x100. 2025-04-28 20:50:13 +02:00
frosch
e2084bbdcd Codechange: Replace out parameters with result tuples. 2025-04-28 20:50:13 +02:00
frosch
0c6426cb2d Fix: Out-of-bounds read, if NewGRF stations provided no spritesets. 2025-04-28 20:49:20 +02:00
frosch
0f1ef96ca1 Codechange: Road stops do not use RealSpriteGroup, ResolveReal is never called. 2025-04-28 20:49:20 +02:00
Rubidium
9116f96e2e Codechange: replace char * with std::string_view 2025-04-28 17:53:18 +02:00
Rubidium
c6ea0ce961 Codechange: use std::span for transferring data in network code 2025-04-28 17:53:18 +02:00
frosch
b7e7f08f78 Codechange: Simplify usage of GRFFileProps by adding some common helper methods. 2025-04-28 13:44:46 +02:00
frosch
46494c6d44 Codechange: Rename GRFFileProps to SubstituteGRFFileProps. 2025-04-28 13:44:46 +02:00