Rubidium and rubidium42
8bbad0dfaf
Codechange: Object's colour is actually a recolour offset
2026-04-18 21:28:08 +02:00
Rubidium and rubidium42
9a87f184c4
Codechange: move calculating livery recolour offset to Livery
2026-04-17 22:05:25 +02:00
Peter Nelson and GitHub
c41f893428
Fix 1ec1f1ef37: object id overrides were not reset between games ( #15465 )
2026-04-11 21:35:46 +01:00
Rubidium and rubidium42
d067bfe577
Codechange: add missing parameter/return documentation to NewGRF code
2026-02-18 18:28:46 +01:00
Peter Nelson and GitHub
0e25f9245c
Codechange: use PoolID for newgrf class ids ( #15228 )
2026-02-18 09:11:04 +00:00
Rubidium and rubidium42
c6c06e13eb
Codefix: wrong parameter names and partially missing parameters
2026-02-02 16:31:46 +01:00
Cyprian Klimaszewski and rubidium42
97f3e5b70f
Codechange: Make TileType enum an enum class.
2026-01-24 08:34:05 +01:00
Tyler Trahan and GitHub
9c6100c32a
Change: Transmitter object only spawns after original base year ( #14786 )
2026-01-08 15:21:45 -05:00
Cyprian Klimaszewski and GitHub
99f04f27de
Doc: Update information for receiving a copy of GPL. ( #14869 )
2025-12-07 11:25:08 +00:00
frosch and frosch
6faa667644
Codechange: Remove global GetRegister(), instead return 100+ registers directly from GetXxxCallback().
2025-05-06 22:24:41 +02:00
frosch and frosch
f59cf73b88
Codechange: Access temporary storage through ResolverObject during sprite layout preprocessing.
2025-05-06 22:24:41 +02:00
frosch and frosch
85be7a4d92
Codechange: Access temporary storage through ResolverObject during Resolve.
2025-05-06 22:24:41 +02:00
frosch and frosch
99d7a775ad
Codechange: Make GetRegister return a signed integer, matching the underlying TemporaryStorageArray.
2025-05-06 22:24:41 +02:00
frosch and frosch
74030a63e6
Codechange: Move SpriteLayoutProcessor's operations closer to the ResolverObject.
2025-05-06 22:24:41 +02:00
frosch and frosch
8bbfbd0347
Codechange: Move spritelayout preprocessing to a separate class, which owns the heap allocations involved.
2025-05-06 18:30:42 +02:00
frosch and frosch
d9c43e7fda
Codechange: Make TileLayoutSpriteGroup::ProcessRegisters return a DrawTileSpriteSpan on the stack, instead of a reference to a global.
2025-05-06 18:30:42 +02:00
frosch and frosch
010b944173
Codechange: Move SpriteGroup cast from callers into Resolve.
2025-04-29 10:35:10 +02:00
Peter Nelson and GitHub
2c4897c2cd
Codechange: Use EnumBitSet for HouseZones. ( #14137 )
2025-04-28 20:27:43 +01:00
frosch and frosch
b7e7f08f78
Codechange: Simplify usage of GRFFileProps by adding some common helper methods.
2025-04-28 13:44:46 +02:00
frosch and frosch
e1859df1c0
Codechange: Use enums as keys for the spritegroups in FixedGRFFileProps.
2025-04-27 19:50:51 +02:00
frosch and GitHub
f554d799d7
Change: [NewGRF] Provide shared random bits in multi-tile animation-triggers of airport tiles and objects, just like for other features. ( #14090 )
2025-04-25 10:01:01 +02:00
frosch and GitHub
d7ddea4032
Codechange: Turn AnimationTrigger enums into enum classes. ( #14067 )
2025-04-21 20:53:31 +02:00
frosch and frosch
f399b8eb29
Codechange: Unify naming of NewGRF animation callbacks.
2025-04-21 19:06:13 +02:00
frosch and frosch
cde350dc01
Codechange: Replace macros GENERAL_SPRITE_COLOUR and COMPANY_SPRITE_COLOUR with functions GetColourPalette and GetCompanyPalette.
2025-04-18 23:41:37 +02:00
Peter Nelson and Peter Nelson
3503082f19
Codechange: Move template class implementation includes.
...
These are now placed at the bottom of the including files include list.
2025-03-21 12:53:40 +00:00
Peter Nelson and 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
Rubidium and rubidium42
24a7cde9cc
Codechange: explicitly initialise Company member variables
2025-02-22 16:33:05 +01:00
Peter Nelson and Peter Nelson
8f14894024
Add: NewGRF Badges.
2025-02-16 22:24:25 +00:00
Rubidium and rubidium42
fd4adc55e3
Codechange: replace INVALID_X with XID::Invalid() for PoolIDs
2025-02-16 20:23:00 +01:00
Rubidium and rubidium42
ab8177ea77
Codechange: strongly type CompanyID
2025-02-16 14:02:18 +01:00
Peter Nelson and GitHub
ff7eb996e6
Codechange: Use variable storage for GrfProps with cargo-type groups. ( #13557 )
...
Slots are only allocated when used instead of being reserved.
Array-based GrfProps are still used when the number of options is more limited.
2025-02-14 18:30:17 +00:00
Jonathan G Rennison and rubidium42
d06b371254
Cleanup: Fix various spelling errors
2025-02-12 22:44:51 +01:00
Peter Nelson and GitHub
e114ed357d
Codechange: Use EnumBitSet for ObjectFlags. ( #13441 )
2025-02-02 21:15:03 +00:00
Peter Nelson and GitHub
59354576d4
Codechange: Use EnumBitSet for LandscapeTypes and remove LandscapeID. ( #13436 )
2025-02-01 23:09:18 +00:00
Peter Nelson and Peter Nelson
40aeedeade
Codechange: Use EnumBitSet for callback masks.
2025-01-31 17:08:24 +00:00
Peter Nelson and Peter Nelson
e73d6fcaac
Codechange: Store grfid with entity grfprops.
...
This allows using the grfid without having to dereference the grffile pointer.
Uses no extra storage as it fits within otherwise wasted padding space.
2024-12-05 18:17:58 +00:00
Loïc Guilloux and GitHub
29ce013eda
Codechange: Pass avail(able) as reference instead of pointer since they are never nullptr ( #12696 )
2024-05-18 17:04:16 +02:00
Peter Nelson and Peter Nelson
d5671030b1
Codechange: Add NewGRFSpecsBase class to hold class/index information.
...
Standardises how the class index is stored in the spec, instead of relying ot the Spec structs having the same members.
This allows retrieving class_index and index without searching or using pointer arithmetic.
'cls_id' is renamed to 'class_index' to make it clearer that it is an index rather than the multichar label of the class.
2024-05-11 02:12:41 +01:00
Peter Nelson and GitHub
774f811217
Codechange: Use std::optional for town parent scope resolver. ( #12530 )
...
When resolving NewGRF, the parent town_scope is lazily initialised as it does not always need to be used.
Replace the manually managed pointer with std::optional to simplify. Using std::optional avoids extra memory allocation.
2024-04-18 22:14:16 +01:00
Peter Nelson and GitHub
668186ca5b
Codechange: Remove macros involved with NewGRFClass. ( #12363 )
...
Use direct class instantiation instead.
2024-03-23 21:55:50 +00:00
Patric Stout and GitHub
a3cfd23cf9
Codechange: rename byte to uint8_t ( #12308 )
2024-03-16 23:59:32 +01:00
frosch and frosch
b1718478c8
Codechange: Replace old non-standard attributes with C++17/20 standard attributes.
2024-02-02 22:29:28 +01:00
Peter Nelson and GitHub
ab535c0a86
Codechange: Add base() method to StrongType to allow access to the base type without casting. ( #11445 )
...
This removes the ability to explicitly cast to the base type, but the requirement
to use .base() means the conversion is still explicit.
2023-11-06 20:29:35 +00:00
frosch and frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
2023-09-19 22:49:59 +02:00
Patric Stout and GitHub
07730584d7
Codechange: make explicit when a TileIndex is cast to its basetype ( #11190 )
...
This prevents people accidentially assigning a TileIndex to a Date
or any other type they shouldn't.
2023-08-15 18:12:05 +02:00
Patric Stout and GitHub
299570b2c1
Codechange: make TimerGameCalendar Date and Year types strongly typed ( #10761 )
2023-08-12 18:14:21 +00:00
Rubidium and rubidium42
eaae0bb5e7
Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
...
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
PeterN and GitHub
0b663f709d
Codechange: Sprite mapping for objects doesn't involve cargo types. ( #10905 )
...
Objects have a default sprite group and an optional purchase list sprite
group. There is no need to pretend that these are cargo IDs.
2023-06-02 08:25:13 +00:00
Rubidium and rubidium42
fb856e16c1
Codechange: replace some min/clamp constructs to ClampTo
2023-05-06 21:26:13 +02:00
Patric Stout and GitHub
7aa2b9ab0a
Codechange: move all date-related variables inside the timer ( #10706 )
2023-04-24 15:56:01 +00:00