Peter Nelson and GitHub
10f9f13c64
Codechange: use enum class for TreeGround ( #15222 )
2026-02-03 08:59:56 +00:00
Cyprian Klimaszewski and rubidium42
97f3e5b70f
Codechange: Make TileType enum an enum class.
2026-01-24 08:34:05 +01:00
Rito12 and rubidium42
859b56a066
Doc: Correct file descriptions to match coding style and doxygen.
2025-12-15 17:31:00 +01:00
Cyprian Klimaszewski and GitHub
99f04f27de
Doc: Update information for receiving a copy of GPL. ( #14869 )
2025-12-07 11:25:08 +00:00
Peter Nelson and GitHub
98275ee5d3
Codechange: Use enum class for water-related enums. ( #14804 )
2025-11-19 20:35:11 +00:00
Peter Nelson and Peter Nelson
2851c70a59
Codechange: Use enum class for RailGroundType.
2025-11-17 20:46:05 +00:00
Peter Nelson and GitHub
921d83c324
Codechange: Unify structures with sprite sub-tile bounds and simplify bounding boxes. ( #14424 )
...
Lots of different structs contain variations on sub-tile bounds with different naming. Unify into a single struct that can be inherited and passed directly to AddSortableSpriteToDraw.
At the same time, offsets now work more logically: sub-tile bounds now specify the bounding box, and an offset can be applied to the sprite.
2025-07-22 00:02:00 +01:00
Jonathan G Rennison and GitHub
7f792e9c5f
Codefix: Spelling error in name of GetGRFStringTextStackParameters ( #14447 )
2025-07-16 09:21:25 -04:00
frosch and frosch
c6fa5022cb
Add: [NewGRF] All callbacks returning D0xx strings, have now the option to return any string id via register 0x100.
2025-05-09 12:39:11 +02:00
frosch and frosch
eb9bbb2456
Codechange: Remove direct access to temporary storage from TextRefStack.
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
99d7a775ad
Codechange: Make GetRegister return a signed integer, matching the underlying TemporaryStorageArray.
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
41a20e512d
Codechange: Use proper enum type to index sprite groups in VariableGRFFileProps.
2025-04-27 19:50:51 +02:00
frosch and frosch
42deccc4f5
Codechange: Merge (IsOn|Toggle)(Snow|Desert) into (IsOn|Toggle)SnowOrDesert.
2025-04-18 16:33:26 +02:00
Peter Nelson and GitHub
1f83ea41fc
Fix: [NewGRF] PrepareLayout worked on a copy of the data resulting in bad sprite layouts. ( #14013 )
2025-04-16 21:27:36 +00:00
Peter Nelson and Peter Nelson
a281ac4674
Codefix: Information for NewGRF specs remained duplicated after loading.
...
After loading airports+tiles, industries+tiles, houses and objects, their specs are copied from the NewGRF's loading storage to the final global storage.
Instead, move the specs to the their new storage, and clear the NewGRF's storage once done. (Stations and RoadStops are different, and the NewGRF's storage is the final storage location.)
2025-04-16 19:43:07 +01:00
Peter Nelson and Peter Nelson
91ab7f10cd
Codefix: Avoid using override keyword as member name.
...
Rename `GRFFileProps` `override` member to `override_id`.
2025-04-09 22:02:35 +01:00
Peter Nelson and GitHub
79ef4e98fe
Codechange: Use std::swap() instead of Swap() ( #13883 )
2025-03-24 23:47:34 +00:00
frosch and GitHub
dbea968f4f
Codefix 20e57a02a2: String parameters were off by one. ( #13810 )
2025-03-14 15:22:30 +01:00
Peter Nelson and GitHub
b28dca2222
Codechange: Preprocess text ref stack parameters. ( #13642 )
...
NewGRF text ref stack is now processed in advance, creating parameters as necessary, and then encoding this into an EncodedString.
2025-02-22 22:03:38 +00:00
Peter Nelson and GitHub
9de913dd21
Codechange: Use helper to set grf_prop's grffile and grfid together. ( #13612 )
2025-02-18 22:33:13 +00:00
Peter Nelson and GitHub
ed57b9c297
Fix faa845398f: Crash when loading tile layout with no building sprites. ( #13589 )
...
Tile layouts are permitted to have no building sprites, therefore the test for an empty sequence of sprites is not valid.
2025-02-16 22:29:56 -05:00
Rubidium and rubidium42
ab8177ea77
Codechange: strongly type CompanyID
2025-02-16 14:02:18 +01:00
Rubidium and rubidium42
a50c953854
Codefix: Clone should make a clone, not copy some data to another instance
2025-02-16 12:31:25 +01:00
Rubidium and rubidium42
faa845398f
Codechange: use std::vector for NewGRFSpriteLayout registers
2025-02-16 12:31:25 +01:00
Rubidium and rubidium42
44506ebc86
Codechange: use span size over terminator object
2025-02-16 11:19:12 +01:00
Peter Nelson and GitHub
2d7d085e8e
Codechange: Use EncodedString for error messages. ( #13569 )
2025-02-16 10:04:32 +00: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
Rubidium and rubidium42
069ff846e4
Codechange: use std::vector/std::span for DrawTileSprites over malloc-ed table
2025-02-14 16:01:45 +01:00
Peter Nelson and GitHub
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 and Peter Nelson
877fa54f66
Codechange: Use EnumBitSet for GRFBug enum.
2025-02-02 10:49:45 +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
2d372fa516
Codechange: NewGRF strings are not StringIDs.
...
Add GRFStringID type and use it when dealing with GRF-local string IDs.
2025-01-02 20:03:40 +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
Jonathan G Rennison and rubidium42
9c84e5df3f
Add: Road waypoint functionality
2024-06-24 22:12:08 +02:00
Peter Nelson and Michael Lutz
3e83dcedfd
Codechange: Allocate houses dynamically instead of from a fixed array.
...
This uses vectors for HouseSpecs and global/town building counts.
2024-03-28 23:23:00 +01:00
Patric Stout and GitHub
a3cfd23cf9
Codechange: rename byte to uint8_t ( #12308 )
2024-03-16 23:59:32 +01:00
Michael Lutz
8dda387f82
Codechange: Use std::tuple for slope functions with two return values
2024-03-08 18:08:55 +01: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
Rubidium and rubidium42
1a179cb297
Codechange: use GetString + StrMakeValid to pass string without colours/font sizes to Debug
2023-05-21 21:17:12 +02:00
Rubidium and rubidium42
fb856e16c1
Codechange: replace some min/clamp constructs to ClampTo
2023-05-06 21:26:13 +02:00
Peter Nelson and PeterN
912eb68981
Change: Extend entity override manager and station spec lists to support 16 bit IDs.
2023-05-05 07:08:40 +01:00
Peter Nelson and PeterN
370a8d77a4
Codechange: Use simple assignment to assign specs.
2023-04-23 15:58:27 +01:00
Rubidium and rubidium42
7088f5b7c7
Codechange: use string/fmt instead of printf for grfmsg
2023-04-18 23:21:08 +02:00
Peter Nelson and PeterN
1f46f080f0
Codechange: Store objectspecs in std::vector instead of flat array.
2023-04-02 22:42:38 +01:00
Peter Nelson and PeterN
93197f58b7
Codechange: Bind objectspecs to classes once all finalised.
2023-04-02 22:42:38 +01:00
Peter Nelson and Michael Lutz
ede1201b6a
Codechange: Rename override manager variables.
2023-01-26 21:39:16 +01:00
Peter Nelson and Michael Lutz
bcc53c5ad5
Codechange: Add missing this-> in override manager.
...
Variable scope is also tweaked in a couple of cases reducing line count.
2023-01-26 21:39:16 +01:00
Peter Nelson and Michael Lutz
eedb786872
Codechange: Use vector for NewGRF spec overrides.
...
This replaces C-style memory management.
2023-01-26 21:39:16 +01:00