1
0
Fork 0
Commit Graph

30654 Commits (62a571c892ed407d152dcc604a0e636693b12bcc)
 

Author SHA1 Message Date
Rubidium b6bdb97bed Codechange: [Script] replace some enums with constexpr values of the internal type 2025-02-01 02:38:37 +01:00
Rubidium b4e3425a5f Codefix: access pool via PoolItem, not the pool itself 2025-02-01 02:38:27 +01:00
Rubidium 4ca1fe6c32 Codechange: replace MAX_UVALUE with std::numeric_limits::max 2025-02-01 01:29:02 +01:00
Peter Nelson f67589d96e
Fix 5664b1e2f6: Missing sprite detection used the wrong filename. (#13421)
This caused the missing sprite count to be incorrect.
2025-01-31 22:28:38 +00:00
Sam James 4e82091f92
Codechange: use -fno-strict-enums instead of -fno-tree-vrp (#13369)
-fno-tree-vrp is essentially a GCC implementation detail which controls
a powerful source of optimisation information. The linked GCC bug from 2010(!)
shows that -fno-strict-enums was added in response to the bug report, and
we can use that instead. Clang supports it too. Use that instead for both
GCC and (newly) Clang.
2025-01-31 19:45:14 +00:00
Binraptor 1cba62faaf
Add: Ukrainian Hryvnia currency (#12877) 2025-01-31 19:37:58 +00:00
Tyler Trahan a0fb98df53
Change: When player joins network company, use its name instead of number in chat (#13263) 2025-01-31 14:02:17 -05:00
Peter Nelson f8b1e3033f Codechange: Use EnumBitSet for EngineFlags. 2025-01-31 18:55:31 +00:00
Peter Nelson 6c4ddb242a Codechange: Use EnumBitSet for EngineMiscFlags. 2025-01-31 18:55:31 +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
Peter Nelson 40aeedeade Codechange: Use EnumBitSet for callback masks. 2025-01-31 17:08:24 +00:00
Peter Nelson 1dd4adc50c Add: EnumBitSet function to test if All or Any enum values are set.
This allows multiple values to be tested in one operation.
2025-01-31 17:08:24 +00:00
Peter Nelson b9ae833e96 Codechange: Use std::array for water features.
Replaces a memset() with fill().
2025-01-31 17:08:24 +00:00
translators ebc57634e4 Update: Translations from eints
chinese (traditional): 1 change by KogentaSan
chinese (simplified): 3 changes by WenSimEHRP
catalan: 1 change by J0anJosep
polish: 1 change by pAter-exe
2025-01-31 04:41:56 +00:00
Peter Nelson 84b219ac64
Codefix: EngineNameContext uses enum class naming but wasn't. (#13417)
This could have caused namespace conflicts with its values.
2025-01-30 22:14:45 +00:00
Jonathan G Rennison 2fa81c89ce
Codechange: Remove unused GenWorldStatus::next_update (#13414) 2025-01-30 22:09:24 +00:00
Peter Nelson 917d5cc75d
Codechange: Use EnumBitSet for RoadTypeFlags and RailTypeFlags. (#13415) 2025-01-30 22:08:51 +00:00
SamuXarick a4d23c072d
Fix 95df7ea: Incorrect WindowClasses for deduplicated window descs. (#13412) 2025-01-30 18:51:09 +00:00
Peter Nelson a252ba3146
Codechange: Modernise NewGRF debug helper definitions. (#13410)
* Replace pointers and null-terminated lists with spans.
* Replace raw (undeleted) pointer with unique_ptr.
* Replace const char * with string_view.
2025-01-30 18:50:53 +00:00
Peter Nelson 56b1e9df1f Codechange: Use EnumBitSet for FrameFlags. 2025-01-30 08:40:42 +00:00
Peter Nelson d30e8dd1c1 Codechange: Use EnumBitSet for WindowDefaultFlags. 2025-01-30 08:40:42 +00:00
Peter Nelson efb05396a7 Codechange: Use EnumBitSet for WindowFlags. 2025-01-30 08:40:42 +00:00
translators 248f369e86 Update: Translations from eints
english (au): 1 change by krysclarke
norwegian (bokmal): 1 change by eriksorngard
english (us): 1 change by 2TallTyler
greek: 1 change by gh658804
finnish: 1 change by hpiirai
portuguese: 1 change by jcteotonio
portuguese (brazilian): 1 change by pasantoro
2025-01-30 04:43:04 +00:00
Peter Nelson f51627c76f Codechange: Use EnumBitSet for DepotCommand(Flag)s. 2025-01-29 21:46:39 +00:00
Peter Nelson 2560339472 Codechange: Use EnumBitSet for Border(Flag)s. 2025-01-29 21:46:39 +00:00
Peter Nelson 473728f181 Codechange: Use EnumBitSet for ExtraEngineFlags. 2025-01-29 21:46:39 +00:00
Peter Nelson cea62a8399 Codechange: Use EnumBitSet for AspectFlags. 2025-01-29 21:46:39 +00:00
Peter Nelson 5ef495da78 Codechange: Use EnumBitSet for GroupFlags. 2025-01-29 21:46:39 +00:00
Peter Nelson 4b573b2703 Codechange: Use EnumBitSet for ViewportStringFlags. 2025-01-29 21:46:39 +00:00
Peter Nelson 05ac1dd888 Codechange: Use EnumBitSet for TileFlags. 2025-01-29 21:46:39 +00:00
Peter Nelson 3c2706f859 Codechange: Use EnumBitSet for EngineDisplayFlags. 2025-01-29 21:46:39 +00:00
Peter Nelson 6d1f56ce6b Codechange: Allow using EnumBitSet over network commands. 2025-01-29 21:46:39 +00:00
Peter Nelson fdb3555147 Add: EnumBitSet class to safely use enum class values as a bitset.
This maintains type-safe enum values and type-safe masks, and avoids using undefined enum values.
2025-01-29 21:46:39 +00:00
Peter Nelson bf6293a13f
Fix: Rail/road type conversion data is not populated on new game. (#13403)
This means that the rail/road type conversion that happens if NewGRFs are changed does not work the first time for a new game, only with a savegame.
2025-01-29 21:45:16 +00:00
translators 402aaf3d11 Update: Translations from eints
persian: 32 changes by CptMcWill
2025-01-29 04:42:38 +00:00
Peter Nelson afc0745aa2
Codechange: Specify underlying type for all enums excluding those exposed to scripts. (#13383) 2025-01-28 22:17:34 +00:00
Peter Nelson 6fda85c569 Cleanup: Remove CMake endian detection. 2025-01-28 19:37:34 +00:00
Peter Nelson fb6781015a Codechange: Use std::endian instead of TTD_ENDIAN defines. 2025-01-28 19:37:34 +00:00
Peter Nelson b70438b76a
Fix #13392: Signs of removed stations are no longer visible. (#13395)
Add "Ghost" option for station sign visibility.
2025-01-28 19:10:32 +00:00
Peter Nelson 77f4d776c4
Codechange: Remove ZeroedMemoryAllocator from network socket handlers. (#13377)
Prefer member default initialisation instead.
2025-01-28 19:10:00 +00:00
Rubidium 4099acb946 Codechange: replace BSWAP32/BSWAP16 with std::byteswap 2025-01-28 19:22:12 +01:00
Rubidium 2481f2e085 Codechange: introduce own std::byteswap implementation
This is only available from C++23, but the implementation is fairly trivial
and the old variants of BSWAP32/BSWAP16 were not constexpr on MSVC. This was
due to all kinds of intrinsics that were added to get better code. However,
recent compilers with reasonable optimisation settings see the naive code and
will inject the appropriate optimised code (bswap op on x86-64).

For x86-64 recent is: Clang 6+ -O1, GCC 6+ -O2, MSVC 19.34+ /O1.
2025-01-28 19:22:12 +01:00
Rubidium 37a2d97c64 Doc: [Script] some IDs were not mentioned in script_types.hpp 2025-01-28 18:57:40 +01:00
Rubidium 1543b909dd Codechange: use 'using' over 'typedef' 2025-01-28 18:57:40 +01:00
Rubidium 9a21ca31f8 Codechange: [Script] do not redefine types in the script API
Also move includes to the locations where they are actually used
2025-01-28 18:57:40 +01:00
Rubidium 45444f9666 Codechange: rename DECLARE_POSTFIX_INCREMENT to DECLARE_INCREMENT_DECREMENT_OPERATORS 2025-01-28 18:56:58 +01:00
Rubidium 0207f91b8d Codechange: use traits to add increment/decrement operators to enums when requested 2025-01-28 18:56:58 +01:00
Peter Nelson 4b2b113292
Codechange: Remove TTD_ENDIAN from Colour union. (#13396)
`TTD_ENDIAN` is used to change the order of the r,g,b,a members of `Colour` to suit the architecture.

This kind of conditional is not supported by C++/`std::endian`, so instead three separate Colour unions are defined, `ColourRGBA`, `ColourARGB` and `ColourBGRA`. The correct union is then aliased to `Colour` using `std::conditional`.
2025-01-28 17:51:04 +00:00
Rubidium d1e001f1c8 Codechange: make script and internal NEW_STATION have the same value 2025-01-28 18:17:05 +01:00
Richard Wheeler b32e638e94 Change: Draw company manager face jacket after collar
Change the sprite drawing order defined by the enum and table to draw the (shirt) collar first, under the jacket. Simplifies new graphics development, allowing the shirt collar sprite to be a full shirt.
2025-01-27 21:31:29 +01:00