Peter Nelson
17f7d0950e
Fix #13838 : Formatted error message of sub-errors may be lost. ( #13840 )
2025-03-18 08:39:40 +00:00
Rubidium
5ea5855677
Codechange: use std::move over copying where applicable
2025-03-16 17:33:06 +01:00
Peter Nelson
96f260e718
Codechange: Pass TileDesc by reference.
2025-02-23 23:00:51 +00:00
Peter Nelson
6cf7a899e9
Codechange: Use EnumBitSet for PauseMode. ( #13553 )
2025-02-14 08:30:04 +00:00
Rubidium
c3d5e6d2a0
Codechange: Use EnumBitSet for DoCommandFlags
2025-02-14 00:28:57 +01:00
Jonathan G Rennison
d06b371254
Cleanup: Fix various spelling errors
2025-02-12 22:44:51 +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
SamuXarick
40a29a71fb
Cleanup: Remove pointless DiagDirection array ( #13338 )
2025-01-19 21:38:32 +00:00
SamuXarick
b0ec3d6959
Cleanup: Missing TileDiffXY conversion in GenerateTerrain
2025-01-19 19:14:44 +01:00
Peter Nelson
d22fd78b1c
Codefix: Sprite offsets and counts are not SpriteIDs. ( #13336 )
2025-01-19 15:58:13 +00:00
Rubidium
3541ba4d0c
Codechange: use unique_ptr over CallocT and avoid copying table
2025-01-13 23:13:28 +01:00
SamuXarick
d74255a3ec
Codechange: Optimize FlowsDown ( #13262 )
2025-01-10 11:18:54 -05:00
SamuXarick
bf02cb014b
Codefix: Replace C style cast with C++ style static_cast for type safety
2025-01-05 15:17:40 +01:00
SamuXarick
e543768570
Cleanup: Tidy up variables in River_FoundEndNode ( #13276 )
2025-01-04 21:39:07 +01:00
SamuXarick
59a45cc852
Codefix 6222ced: Rename variables to adhere to codestyle ( #13255 )
2025-01-03 12:20:09 -05:00
SamuXarick
b91f8c13b8
Codechange: Remove macros and use direct methods instead ( #13257 )
2025-01-03 17:13:41 +00:00
SamuXarick
6222cedcc1
Codefix: Rename variables to adhere codestyle
2025-01-03 13:54:46 +01:00
Rubidium
c0df898ac5
Codechange: do not implicitly convert during assignment to StrongType
2025-01-01 21:32:51 +01:00
Rubidium
fd5f6caed4
Codechange: use explicit TileIndex constructor for tile 0
2025-01-01 08:26:54 +01:00
Peter Nelson
b35284d3dd
Fix 6a07f28103: Clearing animated tiles may lead to invalid state. ( #13192 )
2024-12-23 22:35:43 +01: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
SamuXarick
005c47c322
Codechange: Use Map::Iterate() on CreateDesertOrRainForest routine
2024-12-06 10:33:11 +10:00
SamuXarick
10e2d1ca36
Codechange: Use Map::Iterate() to iterate tiles
2024-12-06 10:33:11 +10:00
Peter Nelson
be505ec459
Add: Accessor to test if a tile may be animated.
2024-12-01 21:19:28 +00:00
Peter Nelson
61cbdef92d
Codechange: Make AyStarStatus an enum class. ( #13129 )
...
This enforces type-safety.
2024-11-30 14:23:32 +00:00
SamuXarick
cf7710fb61
Codechange 8e9603b: Replace int32_t with AyStarStatus ( #13127 )
2024-11-27 23:26:07 +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
Peter Nelson
e1697a6ad1
Codechange: Don't use enums for non-enumerated values. ( #13031 )
...
In the past we have used enums to hold an arbitrary values. These values
are not enumerated types, so make them constants instead.
2024-10-27 18:02:49 +00:00
Peter Nelson
a171939ec3
Codechange: Remove `m_` prefix from pathfinders.
2024-10-25 19:01:39 +01:00
dP
f98b90ac2e
Codechange: Use constants for tree growth stages and tile update frequency ( #12833 )
2024-07-01 15:39:25 -04:00
Jonathan G Rennison
fa82dd6096
Fix #12030 : Water infrastructure totals when using DC_FORCE_CLEAR_TILE
...
To remove objects on water
2024-06-09 14:49:09 +02:00
Rubidium
31085230a6
Codechange: use std::vector for the available neighbours
2024-05-30 23:15:38 +02:00
Rubidium
0e75dfd49f
Codechange: migrate aystar to use YAPF's nodelist infrastructure
2024-05-30 23:15:38 +02:00
merni-ns
c3ee5e58a3
Cleanup: Move remaining NPF files into pathfinder directory
2024-05-10 10:38:44 +02:00
Rubidium
8fe5fdf122
Codechange: use std::none_of to express clearer what the code does
2024-04-20 11:30:46 +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
8b9f59d320
Codechange: Use references for non-optional in/out values of slope functions
2024-03-08 18:08:55 +01:00
Michael Lutz
8dda387f82
Codechange: Use std::tuple for slope functions with two return values
2024-03-08 18:08:55 +01:00
Loïc Guilloux
b68d263d5f
Fix #12014 : Remove water when area clearing ship depot ( #12030 )
2024-02-09 18:17:08 +01:00
Patric Stout
090616b4c9
Add: allow loading heightmaps from command-line ( #11870 )
...
If you want to load a file from tar, you have to give the file
inside the tar in order for it to work:
<tar-file>/<dir-in-tar>/<file>.png
2024-01-22 22:35:25 +00:00
Kuhnovic
b38d3c2208
Change: simplified water region evaluation, removed savegame data ( #11750 )
2024-01-21 20:56:50 +00:00
Peter Nelson
33ff64ef74
Codechange: Simplify ConvertDateToYMD by returning YearMonthDay instead of outputting to a pointer. ( #11637 )
2023-12-28 21:34:08 +00: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
Patric Stout
9624017fc2
Codechange: be more type-specific about types in NPFs queue ( #11192 )
2023-08-12 18:18:22 +00:00
Patric Stout
299570b2c1
Codechange: make TimerGameCalendar Date and Year types strongly typed ( #10761 )
2023-08-12 18:14:21 +00: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
Peter Nelson
56085be9bd
Codechange: Move includes for common STL headers to stdafx.
2023-05-17 10:14:41 +01:00