Peter Nelson and Peter Nelson
0e951f3528
Codechange: make TransparencyOption a scoped enum
2026-05-31 18:59:51 +01:00
Peter Nelson and Peter Nelson
356ca9c6d9
Codechange: use static_cast/to_underlying when converting Direction
2026-05-31 13:11:53 +01:00
Rubidium and rubidium42
2ff631caa2
Codechange: make GameMode a scoped enum
2026-05-30 23:20:20 +02:00
Tyler Trahan and GitHub
49c36f1b39
Codechange: Use enum class for GenWorldProgress ( #15560 )
2026-05-19 13:26:02 +00:00
Peter Nelson and GitHub
01b5b35b74
Codechange: use Coord2D instead of various structs and typedefs ( #15586 )
2026-05-05 21:34:39 +01:00
Peter Nelson and GitHub
792f6d99a3
Codechange: make ExpensesType a scoped enum ( #15572 )
2026-05-04 08:20:52 +01:00
Peter Nelson and GitHub
4db1672611
Codechange: make TropicZone a scoped enum ( #15442 )
2026-04-07 08:33:16 +01:00
Cyprian Klimaszewski and rubidium42
2ac0811ff9
Codechange: Make documentation comments for some functions recognised by doxygen.
2026-02-21 15:05:13 +01:00
Rubidium and rubidium42
8bc3c13a7e
Codechange: use designated initialisers for _tile_type_trees_procs
2026-02-18 17:03:33 +01:00
Peter Nelson and GitHub
10f9f13c64
Codechange: use enum class for TreeGround ( #15222 )
2026-02-03 08:59:56 +00:00
Peter Nelson and Peter Nelson
5c2a37d03e
Codechange: use enum class for ClearGround
2026-02-02 18:49:20 +00:00
Rubidium and rubidium42
4adf494ebc
Codechange: enum-class-ify Commands
2026-01-28 23:32:51 +01:00
Cyprian Klimaszewski and rubidium42
97f3e5b70f
Codechange: Make TileType enum an enum class.
2026-01-24 08:34:05 +01:00
Peter Nelson and GitHub
16dc1fc8bd
Fix #15131 , 3cf9b15959: Trees no longer spread on partially snowy tiles. ( #15133 )
2026-01-19 18:45:51 +00:00
Cyprian Klimaszewski and rubidium42
322ce224b4
Codechange: Make Price an enum class.
2026-01-14 22:07:02 +01:00
Tyler Trahan and GitHub
18f2f7eb2d
Codechange: Use enum class for setting values ( #15074 )
2026-01-10 22:40:48 +00:00
Tyler Trahan and GitHub
c2532fac3e
Fix #14938 : Don't allow cacti to die off ( #14956 )
2025-12-24 12:34:46 -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
Tyler Trahan and GitHub
509cbedf0b
Feature: Rivers can end in wetlands if unable to reach sea ( #14784 )
2025-11-18 07:38:55 -05:00
Peter Nelson and GitHub
e8ba7d0a08
Codefix f98b90ac2e: Use to_underlying instead of direct static_cast. ( #14790 )
2025-11-17 18:12:27 +00:00
Peter Nelson and Peter Nelson
f30f808b50
Codechange: Implement tile proc handler to test for building bridge over tile.
2025-08-20 21:40:41 +01: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
Peter Nelson and GitHub
17f7d0950e
Fix #13838 : Formatted error message of sub-errors may be lost. ( #13840 )
2025-03-18 08:39:40 +00:00
Peter Nelson and Peter Nelson
3cf9b15959
Codechange: Handle SnowTile state separately from ClearGround.
...
This removes the need for ClearGround to pretend that CLEAR_SNOW exists.
2025-02-25 08:22:46 +00:00
Peter Nelson and Peter Nelson
96f260e718
Codechange: Pass TileDesc by reference.
2025-02-23 23:00:51 +00:00
4a37b6448f
Change: Make tree placement at world generation look more organic ( #13515 )
...
Trees are now placed in irregular blob shapes instead of repetitive diamond shapes.
---------
Co-authored-by: Susan <su+git@angel-island.zone >
Co-authored-by: Peter Nelson <peter1138@openttd.org >
2025-02-15 20:54:02 +00:00
Rubidium and rubidium42
c3d5e6d2a0
Codechange: Use EnumBitSet for DoCommandFlags
2025-02-14 00:28:57 +01:00
Peter Nelson and GitHub
08ed68bc85
Fix: Too many trees when generating trees at same height. ( #13460 )
...
Multiplying by tile height caused far too many trees to be generated when using maps higher than the original limit.
2025-02-03 19:35:05 +00:00
Tyler Trahan
3ae715722c
Doc: Rainforest is one word
2025-02-02 10:58:23 -05: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 GitHub
afc0745aa2
Codechange: Specify underlying type for all enums excluding those exposed to scripts. ( #13383 )
2025-01-28 22:17:34 +00:00
Peter Nelson and GitHub
4db0af99a7
Codechange: Use separate function for planting an individual tree. ( #13296 )
...
This allows early return and removes use of assignment inside if-conditions.
2025-01-08 20:36:38 +00:00
Peter Nelson and GitHub
1e77fd0b61
Codechange: Remove unnecessary 'return_cmd_error` macro. ( #13160 )
...
This macro is a leftover from when errors used to be packed into a single int32_t.
`return CommandCost` is clearer, and doesn't need a macro.
2024-12-08 18:02:30 +00:00
Peter Nelson and Peter Nelson
8f9836793f
Change: Store water tile flooding state in the map.
...
This allows water tiles which cannot flood any further to not even try to flood.
On a large map with lots of water tiles this can noticeably reduce game loop processing time.
Mostly ported from JGRPP.
2024-11-06 19:44:14 +00:00
dP and GitHub
f98b90ac2e
Codechange: Use constants for tree growth stages and tile update frequency ( #12833 )
2024-07-01 15:39:25 -04: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
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
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
Patric Stout and GitHub
31ad990831
Codechange: move tick-counter into TimerGameTick ( #10712 )
2023-04-24 16:55:40 +00:00
Rubidium and rubidium42
e8af8daa68
Codechange: pass "ground vehicle" to GetTileSlopeZ since for tunnel/bridges there are two states
...
Previously it checked the position in non-driving direction to "guess" whether
a ground vehicle was using the function, so on tunnels/bridges it could either
return the Z of the (virtual) ground compared to the Z of the path the vehicle
would take.
2023-04-09 19:00:26 +02:00
dP and GitHub
b0542c8c49
Codechange: Don't store tree counter in the map array ( #10018 )
2023-02-26 16:39:44 -05:00
Rubidium and rubidium42
fe2bcd2a58
Codechange: migrate size related functions to Map structure
2023-01-21 17:11:40 +01:00
Rubidium and rubidium42
3373128233
Codechange: pass the randomizer directly to the town name generation
2023-01-14 22:00:11 +01:00
Tyler Trahan and GitHub
5c64cdcb79
Feature: Press Ctrl to build a diagonal area of trees ( #10342 )
2023-01-13 18:04:30 -05:00
Michael Lutz
58cff7b081
Codechange: Un-bitstuff the remaining on-map commands.
2021-12-16 22:28:32 +01:00
Michael Lutz
c6d7b98808
Codechange: Un-bitstuff landscape commands.
2021-12-16 22:28:32 +01:00
Michael Lutz
e740c24eb7
Codechange: Template DoCommand to automagically reflect the parameters of the command proc.
...
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
2021-12-16 22:28:32 +01:00