Commit Graph
96 Commits
Author SHA1 Message Date
Peter NelsonandGitHub 30fbc0aab8 Codechange: make SaveLoadResult a scoped enum (#15584) 2026-05-04 22:58:43 +01:00
Peter NelsonandPeter Nelson 5aae8e2d64 Codechange: make Subdirectory a scoped enum 2026-04-05 21:46:07 +01:00
Peter NelsonandPeter Nelson 93a6aa77c6 Codechange: make SaveLoadOperation a scoped enum 2026-04-05 21:46:07 +01:00
Peter NelsonandPeter Nelson 04f7adb7b7 Codechange: make DetailedFileType a scoped enum 2026-04-05 21:46:07 +01:00
Rubidiumandrubidium42 bcaf3eaec2 Codefix: wrong parameter names and partially missing parameters 2026-02-02 18:18:51 +01:00
Rubidiumandrubidium42 c49f1da09e Codefix: incorrect naming of enum class members 2026-01-11 22:57:38 +01:00
Rito12andrubidium42 859b56a066 Doc: Correct file descriptions to match coding style and doxygen. 2025-12-15 17:31:00 +01:00
Cyprian KlimaszewskiandGitHub 99f04f27de Doc: Update information for receiving a copy of GPL. (#14869) 2025-12-07 11:25:08 +00:00
Rubidiumandrubidium42 49ef3eee13 Codechange: replace char* with std::string_view 2025-04-27 20:08:02 +02:00
Rubidiumandrubidium42 754311a779 Codechange: use std::move when appropriate 2025-03-13 13:00:24 +01:00
Peter NelsonandGitHub 6e10584b91 Codechange: Use EncodedStrings for News messages. (#13654) 2025-02-23 20:24:02 +00:00
Rubidiumandrubidium42 380e7b48ce Codechange: use std::variant instead of a custom version for news references 2025-02-16 14:50:15 +01:00
Rubidiumandrubidium42 ab8177ea77 Codechange: strongly type CompanyID 2025-02-16 14:02:18 +01:00
Peter NelsonandGitHub 908ee7292b Codechange: Replace all FILE * with FileHandle RAII class. (#12718)
This removes the need to manually ensure all files are closed.
2024-09-16 08:45:26 +01:00
Peter NelsonandGitHub f6a88e40a4 Codechange: Use std::list for News Items. (#12338) 2024-04-04 07:53:14 +01:00
Patric StoutandGitHub 3e625b5b1a Add: track savegame size to report with survey (#12304) 2024-03-16 08:58:56 +01:00
Patric StoutandGitHub d3b2a576de Feature: Plugin framework for Social Integration with Steam, Discord, GOG, etc (#11628) 2024-01-22 19:22:45 +00:00
Peter NelsonandGitHub 33ff64ef74 Codechange: Simplify ConvertDateToYMD by returning YearMonthDay instead of outputting to a pointer. (#11637) 2023-12-28 21:34:08 +00:00
Patric StoutandGitHub 37e2f99c09 Change: store crash logs in JSON format (#11232) 2023-09-14 20:13:27 +02:00
Patric StoutandGitHub de5e338a76 Change: mention in MacOS / Windows crashlog popup when files couldn't be generated (#11239)
For example, if the crash.sav couldn't be created, and the TryExcept
detected an issue, write out that the file is not available in
the popup.
2023-08-27 22:49:12 +00:00
Patric StoutandGitHub b00e483b0f Change: recover when possible from crashes during a crash (#11238) 2023-08-27 21:54:05 +02:00
Patric StoutandGitHub 352ac264a5 Remove: [Win32] module-list from crash.log (#11219)
Only Windows implemented this, and it opens the files to read them
to get a CRC. Doing this in a crash-handler is strange at best.

Lastly, nobody has actually ever used this information to come to
some sort of conclusion. The module-list is used in combination
with the crash.dmp, but this information is already embedded in
there.
2023-08-20 17:09:21 +00:00
Patric StoutandGitHub f120d2beb8 Add: use breakpad to create crash.dmp on MacOS / Linux too (#11202)
Normally only the Windows platform could create a crash.dmp, making
analysing crash-reports from MacOS / Linux rather tricky.
2023-08-20 17:16:08 +02:00
Patric StoutandGitHub a5aebeb1b5 Remove: [Win32] register values in crash.log (#11212) 2023-08-20 16:59:22 +02:00
Jonathan G RennisonandGitHub a6b625eea3 Fix #10993: Crash log when font caches not initialised (#11024)
See also: #10836
2023-06-17 17:56:27 +01:00
Owen Rudge 1a3d1bca59 Remove: OS/2 port 2023-06-16 14:29:14 +01:00
Rubidiumandrubidium42 13cdf5fffa Codechange: use std::filesystem::path for the language file's path 2023-06-08 23:20:28 +02:00
Rubidiumandrubidium42 87ccff16b5 Codechange: use std::string for the screenshot name/path 2023-06-04 16:53:10 +02:00
Rubidiumandrubidium42 30b9e02dd9 Codechange: replace crashlog filenames with std::string in Crashlog 2023-05-25 05:42:10 +02:00
Rubidiumandrubidium42 19304bd3d5 Codechange: replace seprintf with fmt::format for filling the crash log data 2023-05-25 05:42:10 +02:00
Rubidiumandrubidium42 a19a43a4f7 Codechange: use fmt::format and time conversions over "custom" implementation 2023-05-22 15:36:09 +02:00
Rubidiumandrubidium42 c518293135 Codechange: replace printf with fmt::print 2023-05-21 15:12:02 +02:00
Patric StoutandGitHub 0850193a38 Fix: survey result on crash only worked on Linux (#10855)
Every OS-specific crashlog handler has their own MakeCrashLog
in some form. In result, only Linux was calling the generic one.
2023-05-21 12:57:32 +02:00
Patric StoutandPatric Stout 7634553d22 Feature: opt-in survey when exiting a game
On first start-up, the game will ask if you want to participate
in our automated survey. You have to opt-in, and can easily opt-out
(via the Options) at any time.

When opt-in, whenever you exit a game, a JSON blob will be send
to the survey server hosted by OpenTTD. This JSON blob contains
information that gives a global picture of the game just played:
- What settings were used
- How many humans vs AIs
- How long the game has been played
- Basic information about the OS / CPU

All this information is kept very generic, so there is no
chance we send private information to our survey server.
Nothing in the JSON blob could identify you as a person; it
mostly tells about the game played. At any time you can see
what the JSON blob includes, by pressing the "Preview Survey
Results" button in-game.
2023-05-14 23:22:02 +02:00
Rubidiumandrubidium42 ab51175db2 Codechange: use std::string for script config 2023-05-14 22:54:10 +02:00
Rubidiumandrubidium42 51c6b8c1e4 Codechange: use fmt::format_to for gamelog message creation over seprintf 2023-05-04 23:23:32 +02:00
Tyler TrahanandGitHub 6501f84b4a Codechange: Move calendar date functions inside TimerGameCalendar (#10753) 2023-05-04 13:14:12 +00:00
Peter NelsonandPeterN 00bf42353a Codechange: Place gamelog into its own class, along with internal data.
Data is now stored in vectors to avoid manual memory management and
passing lengths around.
2023-05-02 19:47:55 +01:00
Patric StoutandPatric Stout 81d4fa6999 Feature: drop ICU-lx in favour of directly interfacing with harfbuzz
This means we have RTL support again with ICU 58+. It makes use of:
- ICU for bidi-itemization
- ICU for script-itemization
- OpenTTD for style-itemization
- harfbuzz for shaping
2023-05-01 22:17:56 +02:00
Rubidiumandrubidium42 f74e26ca7e Codechange: replace error/usererror printf variant with fmt variant and rename 2023-04-25 17:55:09 +02:00
Patric StoutandGitHub 7aa2b9ab0a Codechange: move all date-related variables inside the timer (#10706) 2023-04-24 15:56:01 +00:00
Patric StoutandGitHub 64523709bf Add: use https:// for content-service connections (#10448)
This requires the use of WinHTTP (for Windows) or libcurl (for all
others except Emscripten). Emscripten does not support http(s)
calls currently.

On Linux it requires ca-certificates to be installed, so the HTTPS
certificate can be validated. It is really likely this is installed
on any modern machine, as most connections these days are HTTPS.

(On MacOS and Windows the certificate store is filled by default)

Reminder: in case the http(s):// connection cannot be established,
OpenTTD falls back to a custom TCP-based connection to fetch the
content from the content-service. Emscripten will always do this.
2023-02-12 12:07:31 +01:00
Rubidiumandrubidium42 d51d08ddcb Codechange: put stack variables in global variables for gamelog/crashlog 2023-01-28 17:23:30 +01:00
Rubidiumandrubidium42 7cdc23fd64 Codechange: hide the map's size related fields in the Map structure 2023-01-21 17:11:40 +01:00
Niels Martin Hansen 5b86bce7b2 Change: Log video driver info string instead of just name in crashlog 2022-05-03 21:03:30 +02:00
glx22andMichael Lutz b6c5f49379 Change: add a timestamp in name of crash files 2022-02-02 21:32:01 +01:00
Patric StoutandGitHub bcd7a7aafe Codechange: rename _SQ64 into POINTER_IS_64BIT (#9313) 2021-05-30 10:40:03 +02:00
rubidium42andrubidium42 aa5a8fe28a Codechange: use thread safe time functions
Functions like localtime, gmtime and asctime are not thread safe as they (might) reuse the same buffer. So use the safer _s/_r variant for localtime and gmtime, and use strftime in favour of asctime.
2021-05-14 23:22:29 +02:00
Michael Lutz dd138fc460 Codechange: Stringify config file paths. 2020-12-27 13:19:25 +01:00
Michael Lutz a49fdb7ebb Codechange: Store base set related texts in std::strings. 2020-05-21 20:02:34 +02:00