Commit Graph

84 Commits (6b21368bc2fdef6877ef5930f94e85719b670a76)

Author SHA1 Message Date
Rubidium 6b21368bc2 Codechange: replace FIND_FIRST_BIT/FindFirstBit2x64 with FindFirstBit 4 months ago
Tyler Trahan 1f41e773d6 Codechange: Use consistent name for bay road stops
As of #10494, this is how we describe original dead-end road stops.
6 months ago
frosch b6c8f301be Codechange: Silence warnings about intentionally unused parameters. 9 months ago
Patric Stout 9624017fc2
Codechange: be more type-specific about types in NPFs queue (#11192) 10 months ago
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
11 months ago
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.
1 year ago
Rubidium 580d0a6343 Codechange: make use of Tile in for all direct map accesses 1 year ago
Rubidium 71b46db8d0 Cleanup: remove commented out code 1 year ago
Loïc Guilloux 6ff0858b38
Fix #9669, cbe00ec: Only try valid reverse directions (#9672) 3 years ago
glx22 cbe00ec651 Fix: Try all possible reverse directions when a ship reaches a dead end 3 years ago
Patric Stout f87fe395a7
Fix: pathfinders always tried to avoid docking tiles (even if nothing was on them) (#9522)
When coming across any docking tile (for example, all tiles around
an oilrig are docking tiles), it always at least added a penalty
of 3 times a normal tile, even when there are no ships on them.

In result, the pathfinder got suggested to always go around docking
tiles. This was most likely not the intention of the change made in
31db4f8d5e.
3 years ago
glx22 49b66ea504 Codechange: Remove FOR_EACH_SET_TRACK 3 years ago
Rubidium 281a65b3e1 Cleanup: simplify some boolean expressions 3 years ago
rubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 3 years ago
Patric Stout 28e90769f7 Codechange: use "[[maybe_unused]]" instead of a wide variety of other ways we had
While at it, replace OTTD_ASSERT with WITH_ASSERT, as this
is always set if assert() is valid. No matter if NDEBUG is set
or not.
3 years ago
Patric Stout 665a3928e2 Remove: performance measurements in YAPF
YAPF was constantly measuring its performance, but only at
certain debug-levels this information was shown.

Now after years, I sincerely wonder if anyone still knows about this
feature and who still use it. Especially with the new framerate window,
this detailed performance is not as meaningful anymore as it once
was.
3 years ago
Charles Pigott 591ea9862d
Codechange: Suppress warnings when asserts are disabled (#8916) 3 years ago
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 3 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
JMcKiern 04f659e768 Fix: Some typos found using codespell 5 years ago
peter1138 31db4f8d5e Add: Penalty for occupied docking points. 5 years ago
peter1138 f538179878 Feature: Multi-tile docks and docking points. 5 years ago
peter1138 c02ef3e456 Feature: Add NotRoadTypes (NRT) 5 years ago
peter1138 bcdb28249c Codechange: Use RAILTYPES_NONE instead of INVALID_RAILTYPES when not using rail.
INVALID_RAILTYPES, if it was accidentally tested, would match any railtype.
5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Michael Lutz cc5f175615 Feature: Railtype flags to allow/disallow 90 degree curves. (#7352) 5 years ago
Peter Nelson 3f327116db Change: Don't apply forbid 90 deg turn settings to ships. 5 years ago
J0an Josep 029c48cf4a Cleanup: [NPF] Remove unused parameter. 5 years ago
J0an Josep d814dd3434 Cleanup: [NPF] Assert that a track has been chosen. 5 years ago
J0an Josep aa63517c92 Fix #7060: [NPF] Do not check whether ignored first tiles are end nodes. 5 years ago
J0an Josep 19be1f4ace Codechange: [NPF] Add some consts. 5 years ago
J0an Josep 96c5e5e73a Cleanup: [NPF] Remove unused parameters. 5 years ago
J0an Josep c304aa50e9 Fix: [NPF] Don't look two-way for road vehicles when looking for a depot. Road vehicles shouldn't reverse all of a sudden. 5 years ago
Juanjo! edb7adf183 Codechange: [NPF] Stop looking for an automatic servicing (rail/road) depot when the cost of a path exceeds max. penalty. 5 years ago
J0an Josep 16a91130a7 Codechange: Use INVALID_TRACKDIR instead of 0xFF. 5 years ago
J0anJosep 31ac11bddb Codechange: Increase readability of track functions and pathfinders. 6 years ago
Patric Stout 17bd580630
Remove: NO_DEBUG_MESSAGES was only read and setting it broke compilation (#6703)
Given any speed issue cannot be attributed to checking for _debug_NNN_level, removing this is a safe action

This fixes #6652.
6 years ago
michi_cc 016a68815d (svn r27912) -Fix (r13948): [NPF] Reserved track bits were not accounted for when trying to find any safe position. 7 years ago
adf88 1dd6930507 (svn r27906) -Cleanup: Remove some NPF code with no effect and mark possible bug about never used NPF_FLAG_IGNORE_RESERVED flag 7 years ago
frosch 062c736437 (svn r27896) -Fix: some warnings 7 years ago
frosch a23f707f92 (svn r27733) -Codechange: Pass NPF user data as void* instead of as array of integers. 7 years ago
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 10 years ago
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 12 years ago
frosch d17ec934f5 (svn r24481) -Feature [FS#5127]: Make the pathfinder decide whether ships shall leave depots towards north or south. 12 years ago
frosch 9215192d34 (svn r24479) -Fix: Trains were unable to reverse in stations when using NPF. 12 years ago
rubidium 6d6be50ae0 (svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files 13 years ago
rubidium 7757a2ed40 (svn r23091) -Codechange: rename some Get*Z functions to Get*PixelZ functions if they return the Z in pixels (like TilePixelHeight) 13 years ago
alberth 31386c42a7 (svn r22145) -Codechange: Do explicit test for non-bool values. 13 years ago
rubidium faf5d899f7 (svn r22017) -Codechange: move MarkTileDirtyByTile to viewport_func.h 14 years ago
michi_cc e744b97ec8 (svn r21524) -Fix [FS#4302]: Do not apply the last signal red pathfinder penalty when the signal is a path signal. 14 years ago