1
0
Fork 0
Commit Graph

755 Commits (fbe80f31fe0ec41d8b6bcf1c28c98ef3bdac1427)

Author SHA1 Message Date
Rubidium fbe80f31fe Codechange: replace char* in GetOptData 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 36ce1f890a Codechange: Remove c_str, if std::string_view is already accepted. 2025-04-30 19:33:56 +02:00
Rubidium 708e6a512d Codechange: replace char* with C++ style strings 2025-04-30 12:05:04 +02:00
Rubidium f4ad614285 Codechange: use std::string_view for FS2OTTD and OTTD2FS 2025-04-29 22:33:32 +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 79b2202f2e Codechange: Use StringConsumer for parsing more strings. 2025-04-29 20:14:56 +02:00
Peter Nelson dfd9fbf873
Codechange: Defer refreshing company finance windows. (#14111)
During each game tick every cargo payment will issue an Invalidate of the status bar and company finance window. While this doesn't paint the window yet, it does need to search for open windows, and then mark a area of dirty blocks, which is done for every Invalidate.

Instead, set a bit in a CompanyMask, and test these bits once after the game tick is complete.

This reduces the amount of dirtying, and allows more specific widgets to be dirtied instead of the whole window.
2025-04-26 10:50:51 +00:00
frosch 26db4ccf09
Codechange: Turn bit-stuffed FiosType enum into a struct. (#14019) 2025-04-18 15:20:55 +02:00
SamuXarick 4310d7c7f5
Fix: [Script] Only run the Game::GameLoop() in-game (#13896) 2025-04-04 17:29:48 +02:00
Peter Nelson 6914d99778 Codechange: Split baseset type definitions into separate files. 2025-03-27 18:57:53 +00:00
Peter Nelson 422ff9dbd8 Codechange: Use std::unique_ptr for ai/game config. 2025-03-26 10:54:11 +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 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
Rubidium 754311a779 Codechange: use std::move when appropriate 2025-03-13 13:00:24 +01:00
Rubidium fd4adc55e3 Codechange: replace INVALID_X with XID::Invalid() for PoolIDs 2025-02-16 20:23:00 +01:00
Rubidium 1ffc950e22 Codechange: use prefix operator++ for CompanyID iterations 2025-02-16 14:02:18 +01:00
Peter Nelson 2d7d085e8e
Codechange: Use EncodedString for error messages. (#13569) 2025-02-16 10:04:32 +00:00
Peter Nelson 6cf7a899e9
Codechange: Use EnumBitSet for PauseMode. (#13553) 2025-02-14 08:30:04 +00:00
Peter Nelson 20e57a02a2
Codechange: Use GetString() with argument parameters in simple cases. (#13551)
Avoids using global string parameters.
2025-02-14 00:10:56 +00:00
Peter Nelson 9cdf740097
Codechange: Use ProviderManager to define screenshot generators. (#13526) 2025-02-11 21:38:20 +00:00
Peter Nelson fe31538a27
Codechange: Use EnumBitSet for Scanner::Modes. (#13471) 2025-02-05 20:08:12 +00:00
Peter Nelson 6f52a977a8 Codechange: Use EnumBitSet for GRFConfigFlags.
This is renamed from `GCF_Flag` didn't match convention.
2025-02-02 10:49:45 +00:00
Peter Nelson 5664b1e2f6
Codechange: Use std::vector for GRFConfig lists. (#10835)
This replaces the C-style custom managed linked-list and allows use of iterators etc.
2025-01-31 17:09:09 +00:00
Rubidium 4099acb946 Codechange: replace BSWAP32/BSWAP16 with std::byteswap 2025-01-28 19:22:12 +01:00
Rubidium c0df898ac5 Codechange: do not implicitly convert during assignment to StrongType 2025-01-01 21:32:51 +01:00
Peter Nelson 1faf60ae13
Fix #13199: -f command line parameter does not need a value. (#13200) 2024-12-27 00:16:34 +00:00
Peter Nelson b4b2fad8e0
Fix #12648: Ensure all uses of std::filesystem::path use native encoding. (#12650)
std::filesystem::path does not expect UTF-8 strings, so they must be converted to native format first (and back to utf-8 after.)
2024-06-09 10:23:47 +01:00
Peter Nelson 4b81b62b72
Change: Don't reinitialise font caches when setting initial interface scale. (#12722) 2024-05-27 12:44:34 +01:00
Peter Nelson 460fab920c
Fix #12418, 338def1b06: Filename extension taken from wrong string. (#12680) 2024-05-14 18:18:30 +01:00
ladysadie 00cfd572ff
Cleanup: Remove unneeded CheckMissingGlyphs call (#12640) 2024-05-08 21:42:02 +02:00
Rubidium a9318cf653 Cleanup: remove UI for changing the password 2024-05-07 00:03:15 +02:00
Rubidium 16639939e9 Cleanup: remove command line option for company password 2024-05-07 00:03:15 +02:00
Rubidium 455e202e03 Fix: server's client is shown incorrectly in some cases 2024-05-05 22:57:50 +02:00
Peter Nelson a1a01e21cf
Change: Use std::make_unique instead of passing new() (#12539) 2024-04-20 11:20:49 +01:00
Peter Nelson 21d11ee361 Codechange: Move cache check function to own file. 2024-04-18 22:13:55 +01:00
Patric Stout 1005c86c62
Codechange: record cache warnings with a "warning" prefix (#12518) 2024-04-17 19:49:55 +00:00
Jonathan G Rennison 0b9029b69c Fix: Station/industry nearby list checks in CheckCaches 2024-04-17 20:33:49 +02:00
Rubidium eda10abc8c Codechange: pass command line arguments as std::span to openttd_main 2024-04-11 21:57:53 +02:00
Rubidium afd7878de0 Codechange: internally use a span of arguments for GetOptData 2024-04-11 12:00:36 +02:00
Rubidium e8a56db21d Codechange: use designated initializers for OptionData and pass as span 2024-04-11 12:00:36 +02:00
Peter Nelson 3c94e81665 Codechange: Use ZOOM_LVL_MIN to refer to first zoom level.
Many uses of ZOOM_LVL_NORMAL actually just want the first zoom level slot, so use ZOOM_LVL_MIN to make this clearer.
2024-04-04 22:27:03 +01:00
Peter Nelson 338def1b06
Fix: Segfault when using -q without providing a . character. (#12418)
Use std::filesystem::path to find extension instead of strrchr.
2024-04-04 14:39:15 +01:00
merni-ns 6f36f3d714
Fix #11055: Make saveload failure error messages consistent with others (#12247)
The save/load error messages were combined using string parameters, rather than using the built-in functionality of error dialogs.
2024-04-01 17:57:03 +01:00
Patric Stout c0308acb03
Fix: "-q" displays NewGRF IDs in the wrong byte-order (#12397) 2024-03-29 23:26:24 +01:00
Patric Stout a3cfd23cf9
Codechange: rename byte to uint8_t (#12308) 2024-03-16 23:59:32 +01:00
Patric Stout 3e625b5b1a
Add: track savegame size to report with survey (#12304) 2024-03-16 08:58:56 +01:00
Rubidium bab5a8a787 Codechange: use std::source_location over __FILE__ and __LINE__ for Backup 2024-03-10 10:14:20 +01:00