Commit Graph
449 Commits
Author SHA1 Message Date
PeterNandGitHub acd7d3c913 Codechange: Rename *Railtype* to *RailType* for consistency. (#11287) 2023-09-11 08:55:12 +00:00
PeterNandGitHub a0b2f28f9c Codechange: Use std::copy/fill pattern to initialize rail and road specs. (#11285)
This avoids use of lengthof and array indices.
2023-09-10 23:01:08 +00:00
mrmbernardiandGitHub a5c8365aa4 Feature: Setting to disallow level crossings with competitors (#10755) 2023-09-02 12:46:24 +02:00
Patric StoutandGitHub 07730584d7 Codechange: make explicit when a TileIndex is cast to its basetype (#11190)
This prevents people accidentially assigning a TileIndex to a Date
or any other type they shouldn't.
2023-08-15 18:12:05 +02:00
Rubidiumandrubidium42 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
Koen Bussemakerandrubidium42 381fa36450 Change: Autorail / autoroad tools can start dragging from invalid tiles 2023-07-04 14:08:32 +02:00
KuhnovicandGitHub 6169e7f4bc Feature: Orientation of rail and road depots can be changed (#9642) 2023-07-01 08:11:31 -04:00
Jonathan G RennisonandGitHub a2c0e6aa18 Fix #10831: Level crossing parts left barred after crossing tile removal (#10874) 2023-06-03 23:04:24 +02:00
Rubidiumandrubidium42 3323402aaa Codechange: rename smallvec_type to container_func and use only when needed 2023-05-20 16:53:10 +02:00
Patric StoutandGitHub 7aa2b9ab0a Codechange: move all date-related variables inside the timer (#10706) 2023-04-24 15:56:01 +00:00
Rubidiumandrubidium42 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
rubidium42andrubidium42 6ba55e663e Codechange: do not hide variables with other variables 2023-01-29 07:21:34 +01:00
Rubidiumandrubidium42 fe2bcd2a58 Codechange: migrate size related functions to Map structure 2023-01-21 17:11:40 +01:00
Rubidiumandrubidium42 f667a831a5 Codechange: unify creation of diagonal/orthogonal iterator using smart pointers 2023-01-13 21:09:40 +01:00
Tyler TrahanandGitHub c19abebf8d Feature: Multi-track level crossings (#9931) 2022-11-01 16:51:23 -04:00
Michael LutzandCharles Pigott 8e6ed8d5e9 Fix db98cedb: Swap the tile parameter validation around as only the first TileIndex is automatically validated. 2022-10-17 07:54:58 +01:00
Michael LutzandCharles Pigott 10daaca5ea Fix db98cedb: Swap parameters for CmdRemoveRailroadTrack, too. 2022-10-17 07:54:58 +01:00
SamuXarickandMichael Lutz c7505539af Fix #9869: remove docking tile when doing a clear square
Terraforming through objects placed on water didn't properly remove docking tiles as expected.

By moving some logic regarding removal of docking tiles into DoClearSquare, the issue is solved, while also simplifying code, avoiding repetition elsewhere.
2022-10-16 18:29:03 +02:00
Tyler TrahanandMichael Lutz db98cedb7e Fix #9883: Show cost/income float over end tile of rail or road construction 2022-10-16 14:15:31 +02:00
J0anJosepandMichael Lutz d9a37c915f Cleanup #9725: Replace cmd_helper related functions and remove cmd_helper.h. 2022-02-02 21:30:15 +01:00
Joan JosepandGitHub e890e7db76 Cleanup #9725: Clean up Doxygen docs and fix typo. (#9753) 2021-12-19 16:51:45 +01:00
Michael Lutz c6d7b98808 Codechange: Un-bitstuff landscape commands. 2021-12-16 22:28:32 +01:00
Michael Lutz 55170ae703 Codechange: Un-bitstuff rail commands. 2021-12-16 22:28:32 +01:00
Michael Lutz 6fe445e6c0 Codechange: Un-bitstuff station/depot/waypoint 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 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
dPandGitHub 54951e39a1 Fix #8797: Use logical rail length when placing signals (#9652) 2021-11-19 00:07:22 +00:00
Vít Šeflandrubidium42 c936f8b769 Fix b791ffc6: use the correct parameter in CmdSignalTrackHelper 2021-06-01 17:12:06 +02:00
rubidium42andrubidium42 2e136285e1 Codechange: move from C-string to std::string for DoCommand 2021-05-29 19:02:18 +02:00
rubidium42andrubidium42 b791ffc6de Fix: do not hide parameter by local variable with the same name 2021-05-27 18:30:56 +02:00
Peter NelsonandNiels Martin Hansen f9460c0c8b Fix #8981: Don't attempt to re-reserve path if already entering/entered depot. 2021-04-11 00:11:41 +02:00
Charles PigottandGitHub 086c95718d Fix #8803: Only auto-remove signals when rail can be built (#8904) 2021-03-31 09:27:25 +01:00
Charles PigottandGitHub 9b800a96ed Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
KuhnovicandGitHub a3a7928372 Feature: option to auto remove signals when in the way during rail construction (#8274) 2021-01-07 10:17:05 +01:00
Patric StoutandGitHub bb28ff7226 Codechange: DC_NO_RAIL_OVERLAP is a remnant of the OldAI. (#8496)
The OldAI was removed in 2009. Pretty sure we can remove this flag
now too.
2021-01-05 12:36:57 +01:00
Charles Pigott 860c270c73 Codechange: Replace assert_compile macro with static_assert 2020-12-27 10:55:42 +00:00
glxandCharles Pigott 39092ee13b Fix #8119: Update docking area when clearing a shore rail tile 2020-05-10 20:10:12 +01:00
SamuXarickandGitHub a95fbd59a3 Fix #8119, f538179: Update docking tile area when placing a diagonal rail next to a dock end (#8124) 2020-05-09 22:27:06 +02:00
S. D. CloudtandCharles Pigott 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
stormconeandIngo von Borstel f1712a54b2 Fix #6407: Show snowy ground sprites for depots (#7671)
This is a quick fix by @KeldorKatarn:
https://github.com/KeldorKatarn/OpenTTD_PatchPack/commit/65e656b9d6b24476d074ec6b41830a8f197d535b

It has the drawback that snow is draw to the inside the depots as well, as the removed comment suggests.
2019-10-08 12:51:15 +02:00
Niels Martin Hansen 81614f2378 Fix #7633: Allow zero-cost track conversion to succeed 2019-07-06 21:04:43 +02:00
peter1138andNiels Martin Hansen f538179878 Feature: Multi-tile docks and docking points. 2019-06-30 16:46:32 +02:00
peter1138andMichael Lutz c02ef3e456 Feature: Add NotRoadTypes (NRT) 2019-05-01 21:36:27 +02:00
Charles PigottandPeterN 5b34c8019f Codechange: Remove Company/OwnerByte types 2019-04-29 17:40:22 +01:00
glxandglx22 25e534f3cf Codechange: use std::vector for _sorted_railtypes 2019-04-18 21:49:34 +02:00
Henry WilsonandMichael Lutz 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
Henry WilsonandPeterN c01a2e2a81 Codechange: Removed SmallVector completely 2019-03-26 20:15:57 +00:00
Henry WilsonandPeterN ab711e6942 Codechange: Replaced SmallVector::[Begin|End]() with std alternatives 2019-03-26 20:15:57 +00:00