dP
8404c2a7cc
Merge remote-tracking branch 'upstream/master'
2025-09-28 02:33:49 +05:00
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
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
dP
f0f93c68ca
Merge remote-tracking branch 'upstream/master'
2025-06-14 17:01:17 +05:00
dP
df3a6e321f
Merge remote-tracking branch 'upstream/master'
2025-05-14 18:41:13 +05:00
Peter Nelson
17f7d0950e
Fix #13838 : Formatted error message of sub-errors may be lost. ( #13840 )
2025-03-18 08:39:40 +00:00
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
96f260e718
Codechange: Pass TileDesc by reference.
2025-02-23 23:00:51 +00:00
Su
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
c3d5e6d2a0
Codechange: Use EnumBitSet for DoCommandFlags
2025-02-14 00:28:57 +01:00
Peter Nelson
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
59354576d4
Codechange: Use EnumBitSet for LandscapeTypes and remove LandscapeID. ( #13436 )
2025-02-01 23:09:18 +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
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
dP
a86fd7c621
Update to 15.0-beta1
2024-12-25 20:34:06 +05:00
Peter Nelson
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
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
f98b90ac2e
Codechange: Use constants for tree growth stages and tile update frequency ( #12833 )
2024-07-01 15:39:25 -04:00
Patric Stout
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
dP
645bfaffbd
Merge remote-tracking branch 'upstream/master'
2024-02-04 22:50:08 +05:30
dP
33ef333b57
Update to 14.0-beta1
2024-02-04 02:18:17 +05:30
frosch
b1718478c8
Codechange: Replace old non-standard attributes with C++17/20 standard attributes.
2024-02-02 22:29:28 +01:00
Peter Nelson
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
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
2023-09-19 22:49:59 +02:00
Rubidium
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
31ad990831
Codechange: move tick-counter into TimerGameTick ( #10712 )
2023-04-24 16:55:40 +00:00
Rubidium
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
b0542c8c49
Codechange: Don't store tree counter in the map array ( #10018 )
2023-02-26 16:39:44 -05:00
dP
2b3c725384
Merge remote-tracking branch 'upstream/master' into 13.0
2023-02-03 15:56:10 +04:00
dP
ebf0794b1c
Update to 13.0-RC2
2023-02-03 15:05:53 +04:00
Rubidium
fe2bcd2a58
Codechange: migrate size related functions to Map structure
2023-01-21 17:11:40 +01:00
Rubidium
3373128233
Codechange: pass the randomizer directly to the town name generation
2023-01-14 22:00:11 +01:00
Tyler Trahan
5c64cdcb79
Feature: Press Ctrl to build a diagonal area of trees ( #10342 )
2023-01-13 18:04:30 -05:00
Pavel Stupnikov
f3ecdf6f7f
Merge remote-tracking branch 'upstream/master' into 13.0
2022-11-26 22:16:25 +04:00
Pavel Stupnikov
be23283677
Update to 13.0-beta1
2022-11-23 14:30:36 +04: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
Michael Lutz
b0990fcff7
Codechange: Make TileIndex a "strong" typedef to give it a distinct type.
...
This is accomplished by changing it to a single member struct with the
appropriate operator overloads to make it all work with not too much
source modifications.
2021-12-16 22:28:32 +01:00
Michael Lutz
7048e1522f
Codechange: Move flags in CommandProc in front of the command arguments.
2021-12-16 22:28:32 +01:00
Michael Lutz
33ca4f2b99
Codechange: Let the compile generate the master command table out of templated command traits.
...
This is using a non-intrusive type-traits like templated system, which
allows compile-time validation that the command table and the command
enum match up.
2021-12-16 22:28:32 +01:00
Michael Lutz
b6933a2ebd
Codechange: Move command arguments to the back of the DoCommand function call.
2021-12-16 22:28:32 +01:00
dP
239ff976da
Merge remote-tracking branch 'upstream/master'
2021-09-27 19:53:01 +03:00
dP
4eb8b29dbf
Update to 12.0-RC1
2021-09-26 20:30:12 +03:00
Vít Šefl
710b758b81
Fix #9241 : Grove and forest tree brushes also create rainforests ( #9542 )
2021-09-12 08:42:24 +02:00
dP
a38dc30bf6
Merge remote-tracking branch 'upstream/master'
2021-08-16 01:58:47 +03:00
dP
9df4f2c4fc
Update to 12.0-beta1
2021-08-15 14:57:29 +03:00
Vít Šefl
30f5938eed
Fix b791ffc6: use the correct name in CmdPlantTree
2021-06-01 18:26:35 +02:00