Commit Graph

20570 Commits (8d2a0a7da4a9e38c29680abdd29be2b05ac19061)

Author SHA1 Message Date
Loïc Guilloux 8d2a0a7da4
Fix #10846: [Squirrel] Ensure sqvector size does not overflow (#10848) 1 year ago
PeterN 0cbbfd3eae
Codechange: Use display list instead of exclude list for file window. (#10845)
This simplifies retrieving the correct data for each row when data is
filtered. The background FileList is left intact so that savegame data
does not have to be rescanned when the filter is changed, and sorting
still remains the task of the background FileList.
1 year ago
translators cdb184f53b Update: Translations from eints
catalan: 14 changes by J0anJosep
dutch: 14 changes by Afoklala
1 year ago
Peter Nelson 6b87fe6540 Codechange: Use std::array for GRF(File|Config) parameters.
This simplifies comparison, copying and assignment operations.
1 year ago
Peter Nelson c23aae96a2 Codechange: Use std::array instead of C array for automatic deep-copies. 1 year ago
Rubidium acec34a0fe Cleanup: remove MD5SumToString in lieu of FormatArrayAsHex 1 year ago
Rubidium d9a04ba446 Codechange: make the MD5 hash/digest/checksum variables a std::array 1 year ago
Peter Nelson 7934418133 Codechange: Remove comment alignment from GRFConfig. 1 year ago
Peter Nelson f14479d27d Codechange: Use std::optional for GRF Parameter list. 1 year ago
Peter Nelson c51a7f629e Codechange: GRFParameterInfo no longer needs deep-copy constructor. 1 year ago
translators fd26658558 Update: Translations from eints
russian: 2 changes by Ln-Wolf
1 year ago
Peter Nelson 91e140c722 Codechange: Use unique_ptr for fios company properties.
This is the data used to show company names in the saveload window.
1 year ago
Peter Nelson bf8f24f9a8 Codechange: Use unique_ptr for text layout font mapping.
This must stay a pointer as the value passed to other structures.
1 year ago
Peter Nelson c38df2d589 Codechange: Use std::map instead of custom SmallMap. 1 year ago
Peter Nelson 72018badff Codechange: Swap SocketList map key/value around.
This map is used store socket and address together, and, other than
checking that the address does not already have a socket, the data layout
does not seem particularly important.

However, as address is the key, technically it should not be modified,
and address may self-modify itself during comparisons.
1 year ago
Peter Nelson f454ec8d63 Fix: Don't rely on static initialization to set up sprite font caches.
The order of static initialization is undefined, so this can cause initalization
before relevant caches are initializations.
1 year ago
translators 418888ac23 Update: Translations from eints
romanian: 11 changes by bnegrut
turkish: 14 changes by densxd
1 year ago
Peter Nelson 83f2ad500e Codechange: stdarg.h include not needed as cstdarg is included. 1 year ago
Peter Nelson 56085be9bd Codechange: Move includes for common STL headers to stdafx. 1 year ago
translators a5cf362886 Update: Translations from eints
english (au): 14 changes by krysclarke
english (us): 14 changes by 2TallTyler
vietnamese: 14 changes by KhoiCanDev
korean: 19 changes by telk5093
italian: 14 changes by Rivarossi
russian: 14 changes by Ln-Wolf
finnish: 14 changes by hpiirai
danish: 22 changes by bscargo
portuguese: 14 changes by azulcosta
polish: 14 changes by pAter-exe
1 year ago
Rubidium e9c03f0dad Cleanup: remnants of C-style strings in saveload 1 year ago
Rubidium 52a7c69974 Codechange: rework Gamelog changes from union to classes 1 year ago
translators 389b66bd16 Update: Translations from eints 1 year ago
PeterN 40f567d464
Fix #10811: Crash getting row from non-resizable widget. (#10833)
GetScrolled*FromWidget took line height from the widget's resize_y value,
however not all widgets are resizable, resulting in a division-by-zero.

Allow passing line height explicitly in cases where a widget is not
resizable.
1 year ago
PeterN e4fd9d41d3
Codechange: Use std::any_of() (#10830)
When the result of std::find_if is compared only with end()
then '!= end()' is replaced with any_of().

Just... there's only one.
1 year ago
Patric Stout 199e41c762
Codechange: use default dtor instead of empty (#10826) 1 year ago
Patric 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.
1 year ago
Rubidium 62fda0f505 Codechange: remove manual allocation/free for SQ_instance 1 year ago
Rubidium f9b5bc7ee6 Cleanup: the need for SQAutoFreePointers has gone 1 year ago
Rubidium d9e93edc8b Codechange: replace 'const char *' script API parameters with std::string 1 year ago
Rubidium b1b578f988 Cleanup: stredup-ing string variant for calling scripts 1 year ago
Rubidium ab51175db2 Codechange: use std::string for script config 1 year ago
Rubidium bbcb55ebc9 Codechange: use std::string as script API return type 1 year ago
Rubidium b24a6bb8f3 Codechange: use std::string for script log calls 1 year ago
Rubidium 77177f7e8b Add: support for std::string parameters in the script API 1 year ago
Rubidium 98972a0748 Codechange: use C++ strings for constructing script file paths 1 year ago
Rubidium 20ff0bccd7 Codechange: use std::string to store script GUI's break string 1 year ago
Rubidium 48825e1a8e Codechange: rewrite script string-to-settings conversion to C++ 1 year ago
Rubidium 552d2f71a2 Codechange: use std::string for script library category 1 year ago
Rubidium e035705239 Codechange: introduce and use std::string variant of sq_throwerror 1 year ago
Rubidium 3453c03a17 Codechange: use fmt::format to create dummy scripts 1 year ago
Rubidium 9f2fc860ad Codechange: use std::optional<std::string> for changing the script over char * 1 year ago
Rubidium 0fd9eb0faa Codechange: use std::string for script info/library finding 1 year ago
Rubidium a30f7c83bd Codechange: use std::string for script names to load 1 year ago
Rubidium 9b0123ab66 Codechange: use std::string for script API versions 1 year ago
Rubidium 3d8d99ba11 Add: method to call script functions with std::string 1 year ago
Rubidium 4a6fdc8293 Fix: multiplication result converted to larger type
Technically unlikely to happen, though uint16 * uint16 get promoted to int and
then stored as uint64; similarly uint * uint16 remains uint and gets stored as
uint64. In both cases the value can get truncated before the change to uint64.
1 year ago
PeterN 4894da67da
Codechange: Pass bridge type instead of display row to BuildBridge. (#10828) 1 year ago
translators a8daf91eea Update: Translations from eints
vietnamese: 4 changes by KhoiCanDev
hungarian: 74 changes by PstasDev
turkish: 4 changes by densxd
1 year ago
Patric Stout 8493719cf4
Fix: padding miscalculated for the network-relay and bootstrap-question GUI (#10827) 1 year ago