1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-18 01:42:38 +01:00
Commit Graph

1358 Commits

Author SHA1 Message Date
frosch
35cd05b27d Codechange: Rename _current_data to _current_gamestrings_data. 2025-04-11 22:11:28 +02:00
Peter Nelson
936d78fefc Codefix: Avoid uppercase characters in variable names. (#13985) 2025-04-10 07:19:27 +01:00
Peter Nelson
8275bbfb87 Codechange: Pass Viewport by reference.
This means we do not have to care what type of pointer is used.
2025-04-09 22:03:23 +01:00
frosch
fa284af263 Codechange: Replace remaining Utf8Encode usages with StringBuilder. 2025-04-08 23:10:58 +02:00
frosch
dd073eb38d Codechange: Use StringBuilder to create encoded strings. 2025-04-08 23:10:58 +02:00
frosch
04246c530f Codechange: Use fmt::format instead of stringstream with iomanip flags. (#13964) 2025-04-08 20:57:50 +00:00
Peter Nelson
5b9d171e63 Codechange: Use EnumBitSet for StringValidationSettings. (#13974) 2025-04-08 21:19:17 +01:00
frosch
2cdf2bedfa Codechange: Add a std::string overload for StrMakeValidInPlace() and a moving std::string&& overload for StrMakeValid(). (#13962) 2025-04-07 18:22:47 +02:00
frosch
8846f347f2 Fix: MayHaveRoad claimed rail station tiles had road, so the custom stationspec index would be read as roadtype. (#13949) 2025-04-04 11:49:10 +02:00
frosch
061b5630ee Codefix: Conversion from char to char32_t requires cast to unsigned first. (#13950) 2025-04-03 13:56:50 +02:00
Peter Nelson
a361841848 Codechange: Store GameStrings as shared_ptr. (#13905)
Uses shared_ptr/weak_ptr as LanguageScanner needs access without ownership.
2025-03-28 17:44:43 +00:00
Peter Nelson
325f7f9767 Codechange: Use EnumBitSet for GoodsEntry status. (#13899) 2025-03-26 21:22:33 +00:00
Peter Nelson
7f3820fa7e Codechange: Load check data is only interested in landscape and starting_year. 2025-03-26 10:54:11 +00:00
Peter Nelson
732109e444 Codechange: Use EnumBitSet for RoadTypes. 2025-03-25 20:15:48 +00:00
Peter Nelson
79ef4e98fe Codechange: Use std::swap() instead of Swap() (#13883) 2025-03-24 23:47:34 +00:00
Peter Nelson
42eb513897 Codechange: Make use of emplace_back's return value. (#13879) 2025-03-23 18:34:04 +00: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
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
89948b941b Codechange: Use emplace_back instead of push_back. (#13855) 2025-03-20 17:39:10 +00:00
Rubidium
ec647975ad Cleanup: remove ancient FIXME comments 2025-03-16 05:42:29 +01:00
Rubidium
754311a779 Codechange: use std::move when appropriate 2025-03-13 13:00:24 +01:00
Peter Nelson
8b39b23d2b Codechange: Use EnumBitSet for VehicleFlags. (#13793) 2025-03-13 08:38:54 +00:00
Rubidium
32b2de36ef Codefix: check the table header is actually being read 2025-03-12 17:55:34 +01:00
Peter Nelson
91d22f7617 Codechange: Use EnumBitSet for VehStates. (#13755)
Renamed from VehStatus because pluralising that is weird.
2025-03-08 18:24:21 +00:00
Peter Nelson
6d631d7a13 Fix f8b1e30: Fix recent savegames may have incorrect EngineFlags saved. (#13745)
Detect and update engines saved with invalid EngineFlags.
2025-03-05 17:58:03 +00:00
Loïc Guilloux
7723625823 Fix #13729, f8b1e30: Incorrect conversion of EngineFlags to EngineFlag (#13743) 2025-03-05 09:12:06 +00:00
Loïc Guilloux
0d4346c8dc Fix #13727, bdd1406: Incorrect ls.vehicle_names size for TTO saves (#13732) 2025-03-03 22:59:57 +00:00
Peter Nelson
94c6221dff Fix edf9f597ec: Screenshot with non-wallclock date saved with wrong filename. (#13721) 2025-03-03 21:44:48 +00:00
glx22
d6a261439b Add: [Script] Framework for loading/saving selected ScriptObject 2025-03-02 13:41:12 +01:00
Peter Nelson
edf9f597ec Codechange: Use parameterised GetString() for remaining windows. 2025-03-02 07:29:25 +00:00
Rubidium
09716dba75 Codechange: do not use MallocT for the pool
Needed to make the placement new operator use Tindex over size_t because of
ambiguity for the delete operator variant that also has the size.
2025-02-28 20:15:42 +01:00
Peter Nelson
3cf9b15959 Codechange: Handle SnowTile state separately from ClearGround.
This removes the need for ClearGround to pretend that CLEAR_SNOW exists.
2025-02-25 08:22:46 +00:00
Rubidium
02f040b22a Codechange: remove unused alloc_func.hpp includes 2025-02-24 20:00:19 +01:00
Rubidium
24a7cde9cc Codechange: explicitly initialise Company member variables 2025-02-22 16:33:05 +01:00
Rubidium
37d549d395 Codefix 35e58f68e4: afterload did not properly set airport rotation 2025-02-18 23:09:02 +01:00
Rubidium
fd4adc55e3 Codechange: replace INVALID_X with XID::Invalid() for PoolIDs 2025-02-16 20:23:00 +01:00
Rubidium
59df0ff496 Codechange: strongly type StationID 2025-02-16 18:25:51 +01:00
Rubidium
70c9f3963c Codechange: strongly type VehicleID 2025-02-16 14:50:15 +01:00
Rubidium
1003967267 Codechange: strongly type TownID 2025-02-16 14:50:15 +01:00
Rubidium
7e04651220 Codechange: strongly type EngineID 2025-02-16 14:50:15 +01:00
Rubidium
2cb59b1856 Codechange: make VehicleID an enum 2025-02-16 14:50:15 +01:00
Rubidium
9015c3651f Codechange: make EngineID an enum 2025-02-16 14:50:15 +01:00
Rubidium
ab8177ea77 Codechange: strongly type CompanyID 2025-02-16 14:02:18 +01:00
Rubidium
1ffc950e22 Codechange: use prefix operator++ for CompanyID iterations 2025-02-16 14:02:18 +01:00
Rubidium
bdd14063a0 Codechange: move vehicle name to LoadgameState and change to std::vector 2025-02-16 13:45:07 +01:00
Rubidium
e7595c6c85 Codechange: pass oldloader LoadgameState by reference instead of pointer 2025-02-16 12:31:14 +01:00
Peter Nelson
2d7d085e8e Codechange: Use EncodedString for error messages. (#13569) 2025-02-16 10:04:32 +00:00
Rubidium
4fe3f0ccdd Codechange: simplify management of temporary Engine in saveload 2025-02-14 18:35:12 +01:00
Peter Nelson
6cf7a899e9 Codechange: Use EnumBitSet for PauseMode. (#13553) 2025-02-14 08:30:04 +00:00
Peter Nelson
f309b90a1d Codechange: Use EnumBitSet for Airport blocks. 2025-02-13 22:02:02 +00:00