Tyler Trahan
e95f43a720
Codechange: Use sprite table instead of magic number when drawing ground sprite ( #15828 )
2026-07-08 08:46:21 -04:00
Peter Nelson
c3b0d71973
Codechange: use EnumRange over many enum loops
2026-06-13 21:54:42 +01:00
Peter Nelson
f010c21f1a
Codechange: make DiagDirection a scoped enum
2026-05-31 13:11:53 +01:00
Rubidium
2ff631caa2
Codechange: make GameMode a scoped enum
2026-05-30 23:20:20 +02:00
Peter Nelson
fa387fe129
Codechange: use EnumIndexArray for ClearGround-indexed arrays
2026-05-26 17:12:50 +01:00
Tyler Trahan
49c36f1b39
Codechange: Use enum class for GenWorldProgress ( #15560 )
2026-05-19 13:26:02 +00:00
Peter Nelson
792f6d99a3
Codechange: make ExpensesType a scoped enum ( #15572 )
2026-05-04 08:20:52 +01:00
Peter Nelson
4db1672611
Codechange: make TropicZone a scoped enum ( #15442 )
2026-04-07 08:33:16 +01:00
Rubidium
a1708450f7
Codechange: use designated initialisers for _tile_type_clear_procs
2026-02-18 17:03:33 +01:00
Rubidium
c7468a6922
Codechange: add missing @param and @return
2026-02-15 22:14:37 +01:00
Peter Nelson
092fe307ce
Codechange: follow defensive coding for clear ground arrays
...
Ensure arrays used for clear ground lookups never overflow.
2026-02-02 18:49:20 +00:00
Peter Nelson
5c2a37d03e
Codechange: use enum class for ClearGround
2026-02-02 18:49:20 +00:00
Rubidium
4adf494ebc
Codechange: enum-class-ify Commands
2026-01-28 23:32:51 +01:00
Cyprian Klimaszewski
97f3e5b70f
Codechange: Make TileType enum an enum class.
2026-01-24 08:34:05 +01:00
Peter Nelson
f983a74f2e
Codechange: Remove CLEAR_SNOW. ( #15136 )
...
Remove CLEAR_SNOW which is no longer used on the map and causes confusion.
IsSnowTile() is checked instead.
2026-01-19 23:34:56 +00:00
Cyprian Klimaszewski
322ce224b4
Codechange: Make Price an enum class.
2026-01-14 22:07:02 +01:00
Peter Nelson
4776837675
Change: Allow rocks on desert tiles. ( #14979 )
2025-12-27 20:08:00 +00:00
Cyprian Klimaszewski
99f04f27de
Doc: Update information for receiving a copy of GPL. ( #14869 )
2025-12-07 11:25:08 +00:00
Peter Nelson
98275ee5d3
Codechange: Use enum class for water-related enums. ( #14804 )
2025-11-19 20:35:11 +00: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
0a1c0b8b48
Change: Hide bridge pillars if obstructed by tile below.
...
Tiles can now control if pillars are drawn on a bridge above it. There is no visible change with default bridges.
2025-08-15 23:20:18 +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
Peter Nelson
21d2a94809
Codechange: Use EnumBitSet for GrfMiscBits. ( #13873 )
2025-03-22 21:07:59 +00:00
Peter Nelson
2a05a845df
Feature: Snow-covered rocks are now visible.
2025-03-04 20:39:08 +00:00
Peter Nelson
28a1267e57
Change: Adjust costs for clearing snowy landscape tiles.
...
Rocks with snow is no longer cheaper to clear than rocks without snow.
2025-03-04 20:39:08 +00:00
Peter Nelson
f1b683b372
Change: Show the type of land covered by snow.
2025-02-25 08:22:46 +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
Peter Nelson
9b65786055
Fix: Incorrect snow density when making rocks snowy. ( #13626 )
...
Rocks do not use density, but snowy rocks use snow density. Therefore it should start at zero like non-rocky land.
2025-02-20 18:57:17 +00:00
Rubidium
fd4adc55e3
Codechange: replace INVALID_X with XID::Invalid() for PoolIDs
2025-02-16 20:23:00 +01:00
Rubidium
c3d5e6d2a0
Codechange: Use EnumBitSet for DoCommandFlags
2025-02-14 00:28:57 +01:00
Peter Nelson
588597805d
Feature: Place rocks on "too steep" tiles when fixing slopes. ( #13462 )
...
When generating maps or loading heightmaps, the terrain height is altered to prevent slopes that can't be represented.
During this, there is now a chance of these tiles being turned into a rocky tile.
Chance of placing rocks is based on the height. This gives a rocky mountain appearance without affecting all peaks.
2025-02-09 18:37:25 +00:00
Peter Nelson
59354576d4
Codechange: Use EnumBitSet for LandscapeTypes and remove LandscapeID. ( #13436 )
2025-02-01 23:09:18 +00:00
J0anJosep
1e0004bcd6
Codechange: Slightly simplify code in clear_cmd.cpp.
2024-07-01 17:54:56 +02:00
Patric Stout
a3cfd23cf9
Codechange: rename byte to uint8_t ( #12308 )
2024-03-16 23:59:32 +01:00
Rubidium
27eadc13ec
Codechange: rename TILE_ADD(XY) to TileAdd(XY)
2024-03-10 15:50:24 +01:00
Michael Lutz
8dda387f82
Codechange: Use std::tuple for slope functions with two return values
2024-03-08 18:08:55 +01:00
Peter Nelson
d6c5efd795
Change: Draw north-side farm fences/hedges/walls on tile edge, instead of 1/16th in.
...
This matches original TTD drawing behaviour, which is what the original baseset sprites are designed for, and avoids alignment issues (which are more problematic with high detail 4x sprites.)
2024-02-11 22:10:46 +01: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
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
SamuXarick
46dc6da270
Codechange: Make void tiles flood edge tiles, instead of edge tiles flooding themselves ( #8517 )
2023-01-26 21:57:25 +01:00
Rubidium
fe2bcd2a58
Codechange: migrate size related functions to Map structure
2023-01-21 17:11:40 +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
b6933a2ebd
Codechange: Move command arguments to the back of the DoCommand function call.
2021-12-16 22:28:32 +01:00
Patric Stout
970fedd78c
Add: make modal windows update more smooth
...
Basically, modal windows had their own thread-locking for what
drawing was possible. This is a bit nonsense now we have a
game-thread. And it makes much more sense to do things like
NewGRFScan and GenerateWorld in the game-thread, and not in a
thread next to the game-thread.
This commit changes that: it removes the threads for NewGRFScan
and GenerateWorld, and just runs the code in the game-thread.
On regular intervals it allows the draw-thread to do a tick,
which gives a much smoother look and feel.
It does slow down NewGRFScan and GenerateWorld ever so slightly
as it spends more time on drawing. But the slowdown is not
measureable on my machines (with 700+ NewGRFs / 4kx4k map and
a Debug build).
Running without a game-thread means NewGRFScan and GenerateWorld
are now blocking.
2021-03-10 13:41:18 +01:00
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
2021-01-08 11:16:18 +01:00
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
2019-11-10 17:59:20 +00:00
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
2019-04-10 23:22:20 +02:00